mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
reformatting help() to fit on 80 col displays.
This commit is contained in:
parent
ca8744c8b9
commit
ce64f2fa6e
1 changed files with 64 additions and 47 deletions
|
@ -362,64 +362,81 @@ class AclShell extends Shell {
|
|||
* @access public
|
||||
*/
|
||||
function help() {
|
||||
$head = __("Usage: cake acl <command> <arg1> <arg2>...", true) . "\n";
|
||||
$head = "-----------------------------------------------\n";
|
||||
$head .= __("Usage: cake acl <command> <arg1> <arg2>...", true) . "\n";
|
||||
$head .= "-----------------------------------------------\n";
|
||||
$head .= __("Commands:", true) . "\n\n";
|
||||
$head .= __("Commands:", true) . "\n";
|
||||
|
||||
$commands = array(
|
||||
'create' => "\tcreate aro|aco <parent> <node>\n" .
|
||||
"\t\t" . __("Creates a new ACL object <node> under the parent specified by <parent>, an id/alias.", true) . "\n" .
|
||||
"\t\t" . __("The <parent> and <node> references can be in one of the following formats:", true) . "\n" .
|
||||
"\t\t\t- " . __("<model>.<id> - The node will be bound to a specific record of the given model", true) . "\n" .
|
||||
"\t\t\t- " . __("<alias> - The node will be given a string alias (or path, in the case of <parent>),", true) . "\n" .
|
||||
"\t\t\t " . __("i.e. 'John'. When used with <parent>, this takes the form of an alias path,", true) . "\n" .
|
||||
"\t\t\t " . __("i.e. <group>/<subgroup>/<parent>.", true) . "\n" .
|
||||
"\t\t" . __("To add a node at the root level, enter 'root' or '/' as the <parent> parameter.", true) . "\n",
|
||||
'create' => "create aro|aco <parent> <node>\n" .
|
||||
"\t" . __("Creates a new ACL object <node> under the parent", true) . "\n" .
|
||||
"\t" . __("specified by <parent>, an id/alias.", true) . "\n" .
|
||||
"\t" . __("The <parent> and <node> references can be", true) . "\n" .
|
||||
"\t" . __("in one of the following formats:", true) . "\n\n" .
|
||||
"\t\t- " . __("<model>.<id> - The node will be bound to a", true) . "\n" .
|
||||
"\t\t" . __("specific record of the given model.", true) . "\n\n" .
|
||||
"\t\t- " . __("<alias> - The node will be given a string alias,", true) . "\n" .
|
||||
"\t\t" . __(" (or path, in the case of <parent>)", true) . "\n" .
|
||||
"\t\t " . __("i.e. 'John'. When used with <parent>,", true) . "\n" .
|
||||
"\t\t" . __("this takes the form of an alias path,", true) . "\n" .
|
||||
"\t\t " . __("i.e. <group>/<subgroup>/<parent>.", true) . "\n\n" .
|
||||
"\t" . __("To add a node at the root level,", true) . "\n" .
|
||||
"\t" . __("enter 'root' or '/' as the <parent> parameter.", true) . "\n",
|
||||
|
||||
'delete' => "\tdelete aro|aco <node>\n" .
|
||||
"\t\t" . __("Deletes the ACL object with the given <node> reference (see 'create' for info on node references).", true) . "\n",
|
||||
'delete' => "delete aro|aco <node>\n" .
|
||||
"\t" . __("Deletes the ACL object with the given <node> reference", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'setparent' => "\tsetParent aro|aco <node> <parent>\n" .
|
||||
"\t\t" . __("Moves the ACL object specified by <node> beneath the parent ACL object specified by <parent>.", true) . "\n" .
|
||||
"\t\t" . __("To identify the node and parent, use the row id.", true) . "\n",
|
||||
'setparent' => "setParent aro|aco <node> <parent>\n" .
|
||||
"\t" . __("Moves the ACL object specified by <node> beneath", true) . "\n" .
|
||||
"\t" . __("the parent ACL object specified by <parent>.", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'getpath' => "\tgetPath aro|aco <node>\n" .
|
||||
"\t\t" . __("Returns the path to the ACL object specified by <node>. This command", true) . "\n" .
|
||||
"\t\t" . __("is useful in determining the inhertiance of permissions for a certain", true) . "\n" .
|
||||
"\t\t" . __("object in the tree.", true) . "\n" .
|
||||
"\t\t" . __("For more detailed parameter usage info, see help for the 'create' command.", true) . "\n",
|
||||
'getpath' => "getPath aro|aco <node>\n" .
|
||||
"\t" . __("Returns the path to the ACL object specified by <node>. This command", true) . "\n" .
|
||||
"\t" . __("is useful in determining the inhertiance of permissions for a certain", true) . "\n" .
|
||||
"\t" . __("object in the tree.", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'check' => "\tcheck <aro_id> <aco_id> [<aco_action>] " . __("or", true) . " all\n" .
|
||||
"\t\t" . __("Use this command to check ACL permissions.", true) . "\n" .
|
||||
"\t\t" . __("For more detailed parameter usage info, see help for the 'create' command.", true) . "\n",
|
||||
'check' => "check <aro_id> <aco_id> [<aco_action>] " . __("or", true) . " all\n" .
|
||||
"\t" . __("Use this command to check ACL permissions.", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'grant' => "\tgrant <aro_id> <aco_id> [<aco_action>] " . __("or", true) . " all\n" .
|
||||
"\t\t" . __("Use this command to grant ACL permissions. Once executed, the ARO", true) . "\n" .
|
||||
"\t\t" . __("specified (and its children, if any) will have ALLOW access to the", true) . "\n" .
|
||||
"\t\t" . __("specified ACO action (and the ACO's children, if any).", true) . "\n" .
|
||||
"\t\t" . __("For more detailed parameter usage info, see help for the 'create' command.", true) . "\n",
|
||||
'grant' => "grant <aro_id> <aco_id> [<aco_action>] " . __("or", true) . " all\n" .
|
||||
"\t" . __("Use this command to grant ACL permissions. Once executed, the ARO", true) . "\n" .
|
||||
"\t" . __("specified (and its children, if any) will have ALLOW access to the", true) . "\n" .
|
||||
"\t" . __("specified ACO action (and the ACO's children, if any).", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'deny' => "\tdeny <aro_id> <aco_id> [<aco_action>]" . __("or", true) . " all\n" .
|
||||
"\t\t" . __("Use this command to deny ACL permissions. Once executed, the ARO", true) . "\n" .
|
||||
"\t\t" . __("specified (and its children, if any) will have DENY access to the", true) . "\n" .
|
||||
"\t\t" . __("specified ACO action (and the ACO's children, if any).", true) . "\n" .
|
||||
"\t\t" . __("For more detailed parameter usage info, see help for the 'create' command.", true) . "\n",
|
||||
'deny' => "deny <aro_id> <aco_id> [<aco_action>]" . __("or", true) . " all\n" .
|
||||
"\t" . __("Use this command to deny ACL permissions. Once executed, the ARO", true) . "\n" .
|
||||
"\t" . __("specified (and its children, if any) will have DENY access to the", true) . "\n" .
|
||||
"\t" . __("specified ACO action (and the ACO's children, if any).", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'inherit' => "\tinherit <aro_id> <aco_id> [<aco_action>]" . __("or", true) . " all\n" .
|
||||
"\t\t" . __("Use this command to force a child ARO object to inherit its", true) . "\n" .
|
||||
"\t\t" . __("permissions settings from its parent.", true) . "\n" .
|
||||
"\t\t" . __("For more detailed parameter usage info, see help for the 'create' command.", true) . "\n",
|
||||
'inherit' => "inherit <aro_id> <aco_id> [<aco_action>]" . __("or", true) . " all\n" .
|
||||
"\t" . __("Use this command to force a child ARO object to inherit its", true) . "\n" .
|
||||
"\t" . __("permissions settings from its parent.", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'view' => "\tview aro|aco [<node>]\n" .
|
||||
"\t\t" . __("The view command will return the ARO or ACO tree. The optional", true) . "\n" .
|
||||
"\t\t" . __("id/alias parameter allows you to return only a portion of the requested tree.", true) . "\n" .
|
||||
"\t\t" . __("For more detailed parameter usage info, see help for the 'create' command.", true) . "\n",
|
||||
'view' => "view aro|aco [<node>]\n" .
|
||||
"\t" . __("The view command will return the ARO or ACO tree.", true) . "\n" .
|
||||
"\t" . __("The optional id/alias parameter allows you to return\n\tonly a portion of the requested tree.", true) . "\n" .
|
||||
"\t" . __("For more detailed parameter usage info,", true) . "\n" .
|
||||
"\t" . __("see help for the 'create' command.", true),
|
||||
|
||||
'initdb' => "\tinitdb\n".
|
||||
"\t\t" . __("Uses this command : cake schema run create DbAcl", true) . "\n",
|
||||
'initdb' => "initdb\n".
|
||||
"\t" . __("Uses this command : cake schema run create DbAcl", true),
|
||||
|
||||
'help' => "\thelp [<command>]\n" .
|
||||
"\t\t" . __("Displays this help message, or a message on a specific command.", true) . "\n"
|
||||
'help' => "help [<command>]\n" .
|
||||
"\t" . __("Displays this help message, or a message on a specific command.", true)
|
||||
);
|
||||
|
||||
$this->out($head);
|
||||
|
@ -427,8 +444,8 @@ class AclShell extends Shell {
|
|||
foreach ($commands as $cmd) {
|
||||
$this->out("{$cmd}\n\n");
|
||||
}
|
||||
} elseif (isset($commands[low($this->args[0])])) {
|
||||
$this->out($commands[low($this->args[0])] . "\n\n");
|
||||
} elseif (isset($commands[strtolower($this->args[0])])) {
|
||||
$this->out($commands[strtolower($this->args[0])] . "\n\n");
|
||||
} else {
|
||||
$this->out(sprintf(__("Command '%s' not found", true), $this->args[0]));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue