예제 #1
0
 public function loadPlugin($pluginCode)
 {
     $pluginCodeObj = new PluginCode($pluginCode);
     $filePath = self::pluginSettingsFileExists($pluginCodeObj);
     if ($filePath === false) {
         throw new ApplicationException(Lang::get('rainlab.builder::lang.plugin.error_settings_not_editable'));
     }
     $this->initPropertiesFromPluginCodeObject($pluginCodeObj);
     $result = parent::load($filePath);
     $this->loadCommonProperties();
     return $result;
 }
예제 #2
0
 public function validate()
 {
     $this->validationMessages = ['fileName.required' => Lang::get('rainlab.builder::lang.form.error_file_name_required'), 'fileName.regex' => Lang::get('rainlab.builder::lang.form.error_file_name_invalid')];
     return parent::validate();
 }