2 require_once(
'class.arField.php');
73 self::FIELDTYPE =>
'type',
74 self::IS_NOTNULL =>
'notnull',
93 public static function mapKey($key) {
94 if (isset(self::$key_maps[$key])) {
95 return self::$key_maps[$key];
106 return self::$allowed_connector_fields;
114 return self::$allowed_description_fields;
125 $arFieldList =
new self(
$ar);
126 $arFieldList->initRawFields($ar);
127 $arFieldList->initFields();
140 $arFieldList =
new self();
141 $arFieldList->initRawFields(
$ar);
142 $arFieldList->initFields();
154 $return[$field->getName()] = $field->getAttributesForConnector();
162 foreach ($this->
getRawFields() as $fieldname => $attributes) {
163 if (self::checkAttributes($attributes)) {
165 $arField->getHasField(
true);
166 $arField->loadFromArray($fieldname, $attributes);
167 $this->
fields[] = $arField;
168 if ($arField->getPrimary()) {
184 $field_key = $this->ar->getConnectorContainerName() .
'.' . $field_name;
185 if ($field_map[$field_key]) {
186 return $field_map[$field_key];
189 if ($field->getName() == $field_name) {
190 $field_map[$field_key] = $field;
206 if ($field->getName() == $field_name) {
237 $regex =
"/[ ]*\\* @(" . implode(
'|', self::$prefixes) .
")_([a-zA-Z0-9_]*)[ ]*([a-zA-Z0-9_]*)/u";
238 $reflectionClass =
new ReflectionClass($ar);
240 foreach ($reflectionClass->getProperties() as $property) {
241 if (in_array($property->getName(), self::$protected_names)) {
244 $properties_array =
array();
245 $has_property =
false;
246 foreach (explode(
"\n", $property->getDocComment()) as $line) {
247 if (preg_match($regex, $line, $matches)) {
248 $has_property =
true;
249 $properties_array[(
string)$matches[2]] = $matches[3];
253 $raw_fields[$property->getName()] = $properties_array;
267 return in_array($attribute_name, array_merge(self::$allowed_description_fields,
array( self::HAS_FIELD )));
277 if ($attributes[self::HAS_FIELD] ===
'true') {
278 foreach (array_keys($attributes) as $atr) {
279 if (!self::isAllowedAttribute($atr)) {
Class arStorageInterface.
getFieldByName($field_name)
setRawFields($raw_fields)
static getInstance(ActiveRecord $ar)
static $allowed_description_fields
setPrimaryFields($primary_fields)
static getAllowedConnectorFields()
Add rich text string
The name of the decorator.
initRawFields(arStorageInterface $ar)
static isAllowedAttribute($attribute_name)
setPrimaryField($primary_field)
static $allowed_connector_fields
static getInstanceFromStorage($ar)
Create styles array
The data for the language used.
static checkAttributes(array $attributes)
static getAllowedDescriptionFields()
__construct(ActiveRecord $ar)
arFieldList constructor.