/** * Gets all field types. * @return array */ public function getAllFieldTypes() { /* * List of field types: * - checkBox * - checkBoxList * - dropDownList * - fileField * - passwordField * - radioButton * - radioButtonList * - textArea * - textField */ if (empty(self::$_types) || self::$_refreshTypes === true) { self::$_refreshTypes = false; $fieldMetadata = $this->getAllFieldsMetadata(); self::$_types = array(); foreach ($fieldMetadata as $fieldName => $metadata) { if ($metadata['not_validator']['field_type'] !== 'dropDownList' && $metadata['not_validator']['field_type'] !== 'checkBoxList' && $metadata['not_validator']['field_type'] !== 'radioButtonList' && $metadata['not_validator']['field_type'] !== 'listBox') { self::$_types[$fieldName] = $metadata['not_validator']['field_type']; } else { self::$_types[$fieldName] = array('type' => $metadata['not_validator']['field_type'], 'data' => json_decode($metadata['not_validator']['items'], true)); } } } return self::$_types; }