$item) { $result[] = ['path' => $path] + $item; } return $result; }))->setCheckPermissions($checkPermissions); } /** * @param bool $checkPermissions * @return Generic\BasicGetFieldsAction */ public static function getFields($checkPermissions = TRUE) { return (new Generic\BasicGetFieldsAction(__CLASS__, __FUNCTION__, function() { return [ [ 'name' => 'path', 'title' => 'Relative Path', 'required' => TRUE, 'data_type' => 'String', ], [ 'name' => 'title', 'title' => 'Page Title', 'required' => TRUE, 'data_type' => 'String', ], [ 'name' => 'page_callback', 'title' => 'Page Callback', 'required' => TRUE, 'data_type' => 'String', ], [ 'name' => 'page_arguments', 'title' => 'Page Arguments', 'required' => FALSE, 'data_type' => 'String', ], [ 'name' => 'path_arguments', 'title' => 'Path Arguments', 'required' => FALSE, 'data_type' => 'String', ], [ 'name' => 'access_arguments', 'title' => 'Access Arguments', 'required' => FALSE, 'data_type' => 'Array', ], ]; }))->setCheckPermissions($checkPermissions); } /** * @return array */ public static function permissions() { return [ "meta" => ["access CiviCRM"], "default" => ["administer CiviCRM"], ]; } }