Class arFieldList.
More...
◆ checkAttributes()
static arFieldList::checkAttributes |
( |
array |
$attributes | ) |
|
|
staticprotected |
- Parameters
-
- Returns
- bool
Definition at line 260 of file class.arFieldList.php.
261 if ($attributes[self::HAS_FIELD] ===
'true') {
262 foreach (array_keys($attributes) as $atr) {
263 if (!self::isAllowedAttribute($atr)) {
◆ getAllowedConnectorFields()
static arFieldList::getAllowedConnectorFields |
( |
| ) |
|
|
static |
◆ getAllowedDescriptionFields()
static arFieldList::getAllowedDescriptionFields |
( |
| ) |
|
|
static |
◆ getArrayForConnector()
arFieldList::getArrayForConnector |
( |
| ) |
|
◆ getFieldByName()
arFieldList::getFieldByName |
( |
|
$field_name | ) |
|
- Parameters
-
- Returns
- arField
Definition at line 166 of file class.arFieldList.php.
References getFields().
169 if ($field_map[$field_name]) {
170 return $field_map[$field_name];
173 if ($field->getName() == $field_name) {
174 $field_map[$field_name] = $field;
◆ getFields()
arFieldList::getFields |
( |
| ) |
|
◆ getInstance()
◆ getInstanceFromStorage()
static arFieldList::getInstanceFromStorage |
( |
|
$ar | ) |
|
|
static |
◆ getPrimaryField()
arFieldList::getPrimaryField |
( |
| ) |
|
◆ getPrimaryFieldName()
arFieldList::getPrimaryFieldName |
( |
| ) |
|
◆ getPrimaryFields()
arFieldList::getPrimaryFields |
( |
| ) |
|
◆ getPrimaryFieldType()
arFieldList::getPrimaryFieldType |
( |
| ) |
|
◆ getRawFields()
arFieldList::getRawFields |
( |
| ) |
|
◆ initFields()
arFieldList::initFields |
( |
| ) |
|
|
protected |
Definition at line 146 of file class.arFieldList.php.
References fields, getRawFields(), and setPrimaryField().
147 foreach ($this->
getRawFields() as $fieldname => $attributes) {
148 if (self::checkAttributes($attributes)) {
150 $arField->getHasField(
true);
151 $arField->loadFromArray($fieldname, $attributes);
152 $this->
fields[] = $arField;
153 if ($arField->getPrimary()) {
setPrimaryField($primary_field)
◆ initRawFields()
- Parameters
-
\ActiveRecord | \arStorageInterface | $ar | |
- Returns
- array
Definition at line 220 of file class.arFieldList.php.
References $raw_fields, and setRawFields().
221 $regex =
"/[ ]*\\* @(" . implode(
'|', self::$prefixes) .
")_([a-zA-Z0-9_]*)[ ]*([a-zA-Z0-9_]*)/u";
222 $reflectionClass =
new ReflectionClass($ar);
224 foreach ($reflectionClass->getProperties() as $property) {
225 if (in_array($property->getName(), self::$protected_names)) {
228 $properties_array = array();
229 $has_property =
false;
230 foreach (explode(
"\n", $property->getDocComment()) as $line) {
231 if (preg_match($regex, $line, $matches)) {
232 $has_property =
true;
233 $properties_array[(string)$matches[2]] = $matches[3];
237 $raw_fields[$property->getName()] = $properties_array;
setRawFields($raw_fields)
◆ isAllowedAttribute()
static arFieldList::isAllowedAttribute |
( |
|
$attribute_name | ) |
|
|
staticprotected |
- Parameters
-
- Returns
- bool
Definition at line 250 of file class.arFieldList.php.
251 return in_array($attribute_name, array_merge(self::$allowed_description_fields, array( self::HAS_FIELD )));
◆ isField()
arFieldList::isField |
( |
|
$field_name | ) |
|
◆ mapKey()
static arFieldList::mapKey |
( |
|
$key | ) |
|
|
static |
◆ setFields()
arFieldList::setFields |
( |
|
$fields | ) |
|
◆ setPrimaryField()
arFieldList::setPrimaryField |
( |
|
$primary_field | ) |
|
◆ setPrimaryFields()
arFieldList::setPrimaryFields |
( |
|
$primary_fields | ) |
|
◆ setRawFields()
arFieldList::setRawFields |
( |
|
$raw_fields | ) |
|
◆ $allowed_connector_fields
arFieldList::$allowed_connector_fields |
|
staticprotected |
Initial value:= array(
self::IS_NOTNULL,
self::FIELDTYPE,
self::LENGTH,
)
Definition at line 44 of file class.arFieldList.php.
◆ $allowed_description_fields
arFieldList::$allowed_description_fields |
|
staticprotected |
Initial value:= array(
self::IS_UNIQUE,
self::IS_PRIMARY,
self::IS_NOTNULL,
self::FIELDTYPE,
self::LENGTH,
self::SEQUENCE,
self::INDEX,
)
Definition at line 32 of file class.arFieldList.php.
◆ $fields
arFieldList::$fields = array() |
|
protected |
◆ $key_maps
Initial value:= array(
self::FIELDTYPE => 'type',
self::IS_NOTNULL => 'notnull',
)
Definition at line 68 of file class.arFieldList.php.
◆ $prefixes
arFieldList::$prefixes = array( 'db', 'con' ) |
|
staticprotected |
◆ $primary_field
arFieldList::$primary_field |
|
protected |
◆ $primary_fields
arFieldList::$primary_fields = array() |
|
protected |
◆ $protected_names
◆ $raw_fields
arFieldList::$raw_fields = array() |
|
protected |
◆ FIELDTYPE
const arFieldList::FIELDTYPE = 'fieldtype' |
◆ HAS_FIELD
const arFieldList::HAS_FIELD = 'has_field' |
◆ INDEX
const arFieldList::INDEX = 'index' |
◆ IS_NOTNULL
const arFieldList::IS_NOTNULL = 'is_notnull' |
◆ IS_PRIMARY
const arFieldList::IS_PRIMARY = 'is_primary' |
◆ IS_UNIQUE
const arFieldList::IS_UNIQUE = 'is_unique' |
◆ LENGTH
const arFieldList::LENGTH = 'length' |
◆ SEQUENCE
const arFieldList::SEQUENCE = 'sequence' |
The documentation for this class was generated from the following file: