Overview

Namespaces

  • Cron
  • None

Classes

  • _HtmlGrid_TableOut
  • _TransactionModel_RawSaveOperation
  • AccessControlComponent
  • AccessControlHelper
  • ActionListHelper
  • ActiveDirectoryUtils
  • AddCurrentPidToSchedulingShellCallLogs
  • AnonymousFunctionOperation
  • ArrayUtil
  • AssociationIntegrityBehavior
  • AtomicOperation
  • AuthenticationComponent
  • AuthenticationController
  • AuthenticationUser
  • AutocompleteDatasourceComponent
  • BaseModelComponent
  • Basics
  • CakeLayersHelper
  • CheckAndRunShell
  • ClassSearcher
  • CommandLineUtil
  • CommonValidationBehavior
  • ConfigurableShellCallsSchedulingTask
  • ConfigurationKey
  • ConfigurationKeys
  • ConfigurationKeysController
  • Context
  • ContextComponent
  • ContextHelper
  • Contexts
  • ControllerInspector
  • ControllerMenuHelper
  • CreateJournalingTables
  • CreateTableConfigurationKeys
  • CreateTableSchedulingConfigurableShellCalls
  • CreateTableSchedulingShellCallLogs
  • CreateTableSettedConfigurationKeys
  • CreateTableUserResetPasswordRequests
  • CreateTableUsers
  • CronSchedulingInstaller
  • CronValidationBehavior
  • CssBox
  • CssController
  • CssProperties
  • CssShell
  • CsvUtil
  • CustomDataModel
  • DatasourceDumperManager
  • DateTimeInput
  • DependencyShell
  • DetailHelper
  • DumperShell
  • ExtendedFieldsAccessControl
  • ExtendedFieldSet
  • ExtendedFieldSetHelper
  • ExtendedFieldsParser
  • ExtendedFormHelper
  • ExtendedHasManyAppModel
  • ExtendedOperationsBehavior
  • FieldDefinition
  • FieldRowDefinition
  • FieldSetDefinition
  • FieldSetLayoutHelper
  • FileOperations
  • FileOperations_Rename
  • FileOperations_SymLink
  • FileOperations_Touch
  • FileOperations_Unlink
  • FileSystem
  • FixConfigurationKeysPrimaryKey
  • FixSettedConfigurationKeysPrimaryKey
  • HasManyUtilsBehavior
  • HtmlDocument
  • HtmlGrid
  • HtmlGrid_Cell
  • HttpClient
  • HttpResponse
  • ImapClient
  • ImapMailBox
  • ImapParserShell
  • IncludePath
  • InputMasked
  • InputSearchable
  • InputsOnSubmit
  • InstallShell
  • JenkinsBuildShell
  • Journal
  • JournalDetail
  • JournalizedBehavior
  • JsonResponseComponent
  • LayoutsHelper
  • Ldap
  • LdapUtils
  • ListFieldSet
  • ListFieldSetHelper
  • ListsHelper
  • MailParser
  • Make
  • MenuHelper
  • MigrationAllPluginsShell
  • ModelOperations
  • ModelOperations_Delete
  • ModelOperations_Save
  • ModelTraverser
  • MysqlDumper
  • OpenLdapUtils
  • PaginatorUtilComponent
  • PaginatorUtilComponentFilter
  • PaginatorUtilHelper
  • Plugin
  • PluginManager
  • Reflections
  • RenameEnabledToActiveFromUsersTable
  • RunShellCallShell
  • ScaffoldUtilComponent
  • ScaffoldUtilHelper
  • Scheduling
  • SchedulingConfigurableShellCall
  • SchedulingConfigurableShellCallsController
  • SchedulingShellCallLog
  • SchedulingShellCallLogsController
  • SettedConfigurationKey
  • StuffreposPluginsRename
  • TimeZoneBehavior
  • TransactionModel
  • TransactionOperation
  • Translator
  • TranslatorShell
  • User
  • UserAuthenticationComponent
  • UserChangePassword
  • UserResetPassword
  • UserResetPasswordRequest
  • UserResetPasswordRequestSubmission
  • UsersController
  • ViewUtilHelper

Interfaces

  • AccessControlFilter
  • CommitableOperation
  • DatasourceDumper
  • MakeListener
  • SchedulingInstaller
  • TasksObject
  • UndoableOperation

Exceptions

  • LdapObjectNotWritableException
  • ModelTraverserException
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: App::uses('Shell', 'Console');
 4: App::uses('PluginManager', 'PluginManager.Lib');
 5: 
 6: class DependencyShell extends Shell {
 7: 
 8:     /**
 9:      * get the option parser.
10:      *
11:      * @return void
12:      */
13:     public function getOptionParser() {
14:         $parser = parent::getOptionParser();
15:         $parser->description('Plugin manager.');
16:         $parser->addOptions(
17:             array(
18:                 'pluginName' => array(
19:                     'short' => 'p',
20:                     'default' => 'app',
21:                     'help' => __d('plugin_manager',"Plugin's name or \"app\".")
22:                 ),
23:             )
24:         );
25:         $parser->addSubcommands(array(
26:             'tree' => array(
27:                 'help' => __d('plugin_manager','Show a dependency tree')
28:             ),
29:             'inTree' => array(
30:                 'help' => __d('plugin_manager','Show plugins in the tree')
31:             ),
32:             'notInTree' => array(
33:                 'help' => __d('plugin_manager','Show plugins not in the tree')
34:             ),
35:         ));
36: 
37:         return $parser;
38:     }
39: 
40:     public function main() {
41:         $this->out($this->getOptionParser()->help());
42:     }
43: 
44:     public function tree() {
45:         $this->_pluginDependencies(
46:             PluginManager::plugin($this->params['pluginName'])
47:             , 0);
48:     }
49: 
50:     private function _pluginDependencies(Plugin $plugin, $level) {
51:         $this->out(str_repeat(' ', $level * 2) . '- ' . $plugin->getName());
52: 
53:         foreach ($plugin->dependencies() as $dependencyName) {            
54:             $this->_pluginDependencies(PluginManager::plugin($dependencyName), $level + 1);
55:         }
56:     }
57: 
58:     public function inTree() {
59:         foreach(PluginManager::inTree($this->params['pluginName']) as $plugin) {
60:             $this->out($plugin);
61:         }
62:     }
63:     
64:     public function notInTree() {
65:         foreach(PluginManager::notInTree($this->params['pluginName']) as $plugin) {
66:             $this->out($plugin);
67:         }
68:     }
69: 
70: }
API documentation generated by ApiGen 2.8.0