本文整理汇总了PHP中AppModel::getFields方法的典型用法代码示例。如果您正苦于以下问题:PHP AppModel::getFields方法的具体用法?PHP AppModel::getFields怎么用?PHP AppModel::getFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppModel
的用法示例。
在下文中一共展示了AppModel::getFields方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFields
public function getFields($options = array())
{
$noCustomField = array_key_exists('noCustomField', $options) ? $options['noCustomField'] : false;
$currentCustomField = $this->alias . 'CustomField';
$currentCustomValue = $this->alias . 'CustomValue';
parent::getFields();
$user = $this->SecurityUser->getFields();
$order = 1;
$this->setField('openemisid', $user, $order++);
$this->setField('first_name', $user, $order++);
$this->setField('middle_name', $user, $order++);
$this->setField('last_name', $user, $order++);
$this->setField('date_of_birth', $user, $order++);
$this->setField('photo_content', $user, $order++);
$this->setField('country_id', $user, $order++);
$this->setField('gender', $user, $order++);
$this->setField('address', $user, $order++);
$this->setField('postal_code', $user, $order++);
$this->fields['photo_content']['type'] = 'image';
$this->fields['photo_content']['visible'] = array('edit' => true);
$this->fields['security_user_id']['type'] = 'hidden';
$this->fields['start_year']['type'] = 'hidden';
$this->fields['gender']['type'] = 'select';
$this->fields['gender']['options'] = $this->getGenderOptions();
$this->fields['type']['type'] = 'select';
$this->fields['type']['options'] = $this->getStaffTypeOptions();
$this->fields['staff_status_id']['type'] = 'select';
$this->fields['staff_status_id']['options'] = $this->StaffStatus->getOptions('name', 'order', 'asc', array('visible' => 1));
$this->fields['staff_category_id']['type'] = 'select';
$this->fields['staff_category_id']['options'] = $this->StaffCategory->getOptions('name', 'order', 'asc', array('visible' => 1));
if (!$noCustomField) {
$this->fields[$currentCustomField] = $this->{$currentCustomField}->getCustomFields();
}
return $this->fields;
}
示例2: getFields
public function getFields($options = array())
{
parent::getFields();
$yearOptions = array(0 => $this->Message->getLabel('general.allYears'));
$yearOptions = array_merge($yearOptions, $this->SchoolYear->find('list', array('conditions' => array('visible' => 1), 'order' => 'start_year')));
$gradeOptions = $this->EducationGrade->getProgrammeGradeOptions();
if (!isset($options['action'])) {
$options['action'] = '';
}
if ($options['action'] == 'add') {
$this->fields['visible']['type'] = 'hidden';
$this->fields['visible']['value'] = 1;
$this->fields['order']['value'] = 0;
$this->fields['order']['visible'] = array('edit' => true);
$this->fields['education_grade_id']['visible'] = false;
} else {
$this->fields['visible']['type'] = 'select';
$this->fields['visible']['options'] = $this->getStatusOptions();
if ($options['action'] == 'edit') {
$this->fields['education_grade_id']['type'] = 'disabled';
} else {
$this->fields['education_grade_id']['type'] = 'select';
}
$this->fields['education_grade_id']['options'] = $gradeOptions;
}
$this->fields['order']['type'] = 'hidden';
$this->fields['school_year_id']['labelKey'] = 'SchoolYear';
$this->fields['school_year_id']['type'] = 'select';
$this->fields['school_year_id']['options'] = $yearOptions;
$this->fields['class_id']['type'] = 'hidden';
$this->fields['class_id']['value'] = 0;
return $this->fields;
}
示例3: getFields
public function getFields($options = array())
{
parent::getFields();
$this->fields['order']['visible'] = false;
$this->fields['visible']['visible'] = false;
$this->fields['type']['type'] = 'select';
$this->fields['type']['options'] = $this->getCustomFieldTypes();
$this->fields['is_mandatory']['type'] = 'select';
$this->fields['is_mandatory']['options'] = $this->getYesnoOptions();
$this->fields['is_unique']['type'] = 'select';
$this->fields['is_unique']['options'] = $this->getYesnoOptions();
return $this->fields;
}
示例4: getFields
public function getFields($options = array())
{
$currentCustomField = $this->alias . 'CustomField';
$currentCustomValue = $this->alias . 'CustomValue';
parent::getFields();
$user = $this->SecurityUser->getFields();
$order = 1;
$this->setField('first_name', $user, $order++);
$this->setField('middle_name', $user, $order++);
$this->setField('last_name', $user, $order++);
// $this->setField('identification_no', $user, $order++);
// $this->fields[$currentCustomField] = $this->$currentCustomField->getCustomFields();
return $this->fields;
}
示例5: getFields
public function getFields($options = array())
{
parent::getFields();
// $this->fields['ReportCardTemplateComments'] = array(
// 'data-name' => 'ReportCardTemplateComments',
// 'type' => 'dataRows',
// 'visible' => true
// );
// $this->fields['ReportCardTemplateSignatures'] = array(
// 'data-name' => 'ReportCardTemplateSignatures',
// 'type' => 'dataRows',
// 'visible' => true
// );
return $this->fields;
}
示例6: getFieldsForGuardian
public function getFieldsForGuardian()
{
// $currentCustomField = 'GuardianCustomField';
// $currentCustomValue = 'GuardianCustomValue';
parent::getFields();
$order = 1;
$this->setFieldOrder('openemisid', $order++);
$this->setFieldOrder('first_name', $order++);
$this->setFieldOrder('middle_name', $order++);
$this->setFieldOrder('last_name', $order++);
$this->setFieldOrder('date_of_birth', $order++);
$this->setFieldOrder('country_id', $order++);
$this->setFieldOrder('gender', $order++);
$this->setFieldOrder('address', $order++);
$this->setFieldOrder('postal_code', $order++);
$this->fields['country_id']['type'] = 'select';
$this->fields['country_id']['options'] = $this->Country->getOptions();
$this->fields['gender']['type'] = 'select';
$this->fields['gender']['options'] = $this->getGenderOptions();
// $this->fields[$currentCustomField] = $this->$currentCustomField->getCustomFields();
$this->fields['identification_no']['type'] = 'hidden';
return $this->fields;
}
示例7: getFields
public function getFields($options = array())
{
parent::getFields($options);
$this->fields['type']['type'] = 'hidden';
return $this->fields;
}
示例8: getFields
public function getFields($options = array())
{
parent::getFields();
$yearOptions = $this->SchoolYear->getYearList();
$this->fields['school_year_id']['labelKey'] = 'SchoolYear';
$this->fields['school_year_id']['type'] = 'select';
$this->fields['school_year_id']['options'] = $yearOptions;
if (array_key_exists('action', $options)) {
if ($options['action'] == 'edit') {
$this->fields['school_year_id']['type'] = 'disabled';
}
}
return $this->fields;
}