Author: Alexey Bobkov, Samuel Georges
Inheritance: extends RainLab\Builder\Classes\BaseModel
Exemplo n.º 1
0
 public function onPluginDataRegistryGetData()
 {
     $code = Input::get('registry_plugin_code');
     $type = Input::get('registry_data_type');
     $subtype = Input::get('registry_data_subtype');
     $result = null;
     switch ($type) {
         case 'localization':
             $result = LocalizationModel::getPluginRegistryData($code, $subtype);
             break;
         case 'model-classes':
             $result = ModelModel::getPluginRegistryData($code, $subtype);
             break;
         case 'model-forms':
             $result = ModelFormModel::getPluginRegistryData($code, $subtype);
             break;
         case 'model-lists':
             $result = ModelListModel::getPluginRegistryData($code, $subtype);
             break;
         case 'controller-urls':
             $result = ControllerModel::getPluginRegistryData($code, $subtype);
             break;
         case 'model-columns':
             $result = ModelModel::getPluginRegistryDataColumns($code, $subtype);
             break;
         case 'plugin-lists':
             $result = ModelListModel::getPluginRegistryDataAllRecords($code);
             break;
         case 'permissions':
             $result = PermissionsModel::getPluginRegistryData($code);
             break;
         default:
             throw new SystemException('Unknown plugin registry data type requested.');
     }
     return ['registryData' => $result];
 }
Exemplo n.º 2
0
 protected function getControllerList($pluginCode)
 {
     $result = ControllerModel::listPluginControllers($pluginCode);
     return $result;
 }
 protected function mergeRegistryDataIntoResult(&$result, $pluginCodeObj)
 {
     if (!array_key_exists('builderResponseData', $result)) {
         $result['builderResponseData'] = [];
     }
     $pluginCode = $pluginCodeObj->toCode();
     $result['builderResponseData']['registryData'] = ['urls' => ControllerModel::getPluginRegistryData($pluginCode, null), 'pluginCode' => $pluginCode];
 }