2 require_once(
'class.arField.php');
72 self::FIELDTYPE =>
'type',
73 self::IS_NOTNULL =>
'notnull',
95 if (isset(self::$key_maps[
$key])) {
96 return self::$key_maps[
$key];
108 return self::$allowed_connector_fields;
117 return self::$allowed_description_fields;
129 $arFieldList =
new self(
$ar);
130 $arFieldList->initRawFields($ar);
131 $arFieldList->initFields();
145 $arFieldList =
new self();
146 $arFieldList->initRawFields(
$ar);
147 $arFieldList->initFields();
160 $return[$field->getName()] = $field->getAttributesForConnector();
172 $arField->getHasField();
174 $this->
fields[] = $arField;
175 if ($arField->getPrimary()) {
192 $field_key = $this->ar->getConnectorContainerName() .
'.' . $field_name;
193 if (is_array($field_map) && array_key_exists($field_key, $field_map)) {
194 return $field_map[$field_key];
197 if ($field->getName() == $field_name) {
198 $field_map[$field_key] = $field;
215 if ($field->getName() == $field_name) {
249 $regex =
"/[ ]*\\* @(" . implode(
'|', self::$prefixes) .
")_([a-zA-Z0-9_]*)[ ]*([a-zA-Z0-9_]*)/u";
252 foreach ($reflectionClass->getProperties() as $property) {
253 if (in_array($property->getName(), self::$protected_names)) {
256 $properties_array = array();
257 $has_property =
false;
258 foreach (explode(
"\n", $property->getDocComment()) as $line) {
259 if (preg_match($regex, $line, $matches)) {
260 $has_property =
true;
261 $properties_array[(string) $matches[2]] = $matches[3];
265 $raw_fields[$property->getName()] = $properties_array;
280 return in_array($attribute_name, array_merge(self::$allowed_description_fields, array( self::HAS_FIELD )));
291 if (isset($attributes[self::HAS_FIELD]) && $attributes[self::HAS_FIELD] ===
'true') {
292 foreach (array_keys($attributes) as $atr) {
293 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()
initRawFields(arStorageInterface $ar)
static isAllowedAttribute($attribute_name)
setPrimaryField($primary_field)
static $allowed_connector_fields
static getInstanceFromStorage($ar)
if(array_key_exists('yes', $_REQUEST)) $attributes
static checkAttributes(array $attributes)
static getAllowedDescriptionFields()
__construct(ActiveRecord $ar)
arFieldList constructor.