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; }
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(); }