/** * Return fields list by the corresponding schema * * @return array */ protected function getFormFieldsForSectionMain() { if ($this->getModelObject()->isSocialProfile()) { unset($this->mainSchema['password']); unset($this->mainSchema['password_conf']); } return parent::getFormFieldsForSectionMain(); }
/** * Return fields list by the corresponding schema * * @return array */ protected function getFormFieldsForSectionAccess() { // Get main schema from parent class $schema = $this->accessSchema; // Lock all fields specified in $mainSchemaReadonlyFields array_walk($schema, array($this, 'lockSectionField'), static::$accessSchemaReadonlyFields); // Modify the main schema $this->accessSchema = $schema; return parent::getFormFieldsForSectionAccess(); }