getPluginClasses() public method

Returns the plugin classes.
See also: setPluginClasses()
public getPluginClasses ( ) : string[]
return string[] The fully qualified plugin class names.
 /**
  * {@inheritdoc}
  */
 public function findPluginClasses(Expression $expr)
 {
     $pluginClasses = array();
     foreach ($this->rootModuleFile->getPluginClasses() as $pluginClass) {
         if ($expr->evaluate($pluginClass)) {
             $pluginClasses[] = $pluginClass;
         }
     }
     return $pluginClasses;
 }
Example #2
0
 protected function addRootModuleFileToJson(RootModuleFile $moduleFile, stdClass $jsonData)
 {
     $moduleOrder = $moduleFile->getModuleOrder();
     $installInfos = $moduleFile->getInstallInfos();
     // Pass false to exclude base configuration values
     $configValues = $moduleFile->getConfig()->toRawArray(false);
     if (count($moduleOrder) > 0) {
         $jsonData->order = $moduleOrder;
     }
     if (count($configValues) > 0) {
         $jsonData->config = (object) $configValues;
     }
     if (array() !== $moduleFile->getPluginClasses()) {
         $jsonData->plugins = $moduleFile->getPluginClasses();
         sort($jsonData->plugins);
     }
     if (count($installInfos) > 0) {
         $modulesData = array();
         foreach ($installInfos as $installInfo) {
             $installData = new stdClass();
             $installData->{'install-path'} = $installInfo->getInstallPath();
             if (InstallInfo::DEFAULT_INSTALLER_NAME !== $installInfo->getInstallerName()) {
                 $installData->installer = $installInfo->getInstallerName();
             }
             if ($installInfo->hasDisabledBindingUuids()) {
                 $installData->{'disabled-bindings'} = array();
                 foreach ($installInfo->getDisabledBindingUuids() as $uuid) {
                     $installData->{'disabled-bindings'}[] = $uuid->toString();
                 }
                 sort($installData->{'disabled-bindings'});
             }
             if (Environment::PROD !== $installInfo->getEnvironment()) {
                 $installData->env = $installInfo->getEnvironment();
             }
             $modulesData[$installInfo->getModuleName()] = $installData;
         }
         ksort($modulesData);
         $jsonData->modules = (object) $modulesData;
     }
 }