示例#1
0
文件: AdminMain.php 项目: kingsj/core
 /**
  * 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();
 }
示例#2
0
文件: AdminMain.php 项目: kingsj/core
 /**
  * Return fields list by the corresponding schema
  *
  * @return array
  */
 protected function getFormFieldsForSectionMain()
 {
     // Get main schema from parent class
     $schema = $this->mainSchema;
     // Exclude fields specified in $mainSchemaRemovedFields
     $schema = \Includes\Utils\ArrayManager::filterByKeys($schema, static::$mainSchemaRemovedFields, true);
     // Lock all fields specified in $mainSchemaReadonlyFields
     array_walk($schema, array($this, 'lockSectionField'), static::$mainSchemaReadonlyFields);
     // Modify the main schema
     $this->mainSchema = $schema;
     return parent::getFormFieldsForSectionMain();
 }