Tworzy pole na podstawie atrybutu
@param \Cms\Orm\CmsAttributeRecord $attribute
@return \Mmi\Form\Element\ElementAbstract
974940
private function _createFieldByAttribute(\Cms\Orm\CmsAttributeRecord $attribute)
    {
        //ustalenie klasy pola
        $fieldClass = $attribute->getJoined('cms_attribute_type')->fieldClass;
        //tworzenie i konfiguracja pola
        $field = (new $fieldClass('cmsAttribute' . $attribute->id))
            ->setLabel($attribute->name)
            ->setDescription($attribute->description)
            ->setValue($attribute->getJoined('cms_attribute_type')->restricted ? $this->_arrayValueByAttribute($attribute) : $this->_scalarValueByAttribute($attribute));
        $options = [];
        //parsowanie opcji
        parse_str($attribute->fieldOptions, $options);
        //ustawienie opcji
        $field->setOptions($options);
        //checkbox zaznaczony
        if ($field instanceof \Mmi\Form\Element\Checkbox) {
            $field->setValue(1)
                ->setChecked($this->_scalarValueByAttribute($attribute));
        }
        //multiopcje
        if ($attribute->getJoined('cms_attribute_type')->restricted) {
            //wyszukiwanie opcji pola
            $options = (new \Cms\Orm\CmsAttributeValueQuery)->whereCmsAttributeId()->equals($attribute->id)
                ->orderAscLabel()
                ->orderAscValue()
                ->findPairs('value', 'label');
            $field->setMultioptions(($attribute->getJoined('cms_attribute_type')->multiple || $attribute->getJoined('cms_attribute_relation')->required) ? $options : [null => '---'] + $options);
        }
        //pole wymagane
        if ($attribute->getJoined('cms_attribute_relation')->required) {
            $field->setRequired();
        }
        //czy pole wymaga podania obiektu
        if (method_exists($field, 'setObject')) {
            //obiektem dla uploadera jest obiekt główny + klucz atrybutu, ignorowanie pola
            $field->setObject($this->_saveToObject . ucfirst($attribute->key));
            $field->setValue($this->_saveToObject . ucfirst($attribute->key));
        }
        //walidatory
        if ($attribute->getJoined('cms_attribute_relation')->validatorClasses) {
            //iteracja po walidatorach
            foreach (explode(',', $attribute->getJoined('cms_attribute_relation')->validatorClasses) as $validatorConfig) {
                $validator = $this->_parseClassWithOptions($validatorConfig)->getClass();
                //dodawanie walidatora
                $field->addValidator((new $validator)->setOptions($this->_parseClassWithOptions($validatorConfig)->getConfig()));
            }
        }
        //filtry
        if ($attribute->getJoined('cms_attribute_relation')->filterClasses) {
            //iteracja po filtrach
            foreach (explode(',', $attribute->getJoined('cms_attribute_relation')->filterClasses) as $filterConfig) {
                $filter = $this->_parseClassWithOptions($filterConfig)->getClass();
                //dodawanie filtra
                $field->addFilter((new $filter)->setOptions($this->_parseClassWithOptions($filterConfig)->getConfig()));
            }
        }
        //unikalność
        if ($attribute->getJoined('cms_attribute_relation')->unique) {
            $field->addValidator(new \Mmi\Validator\RecordUnique([(new \Cms\Orm\CmsAttributeValueQuery)
                    ->join('cms_attribute_value_relation')->on('id', 'cms_attribute_value_id')
                    ->whereCmsAttributeId()->equals($attribute->id)
                    ->where('object', 'cms_attribute_value_relation')->equals($this->_saveToObject), 'value', $this->getRecord()->id
            ]));
        }
        //zwrot skonfigurowanego pola
        return $this->_cmsAttributeElements[$attribute->id] = $field;
    }
133424
public function attr($attribute = null)
    {
        if ($this->isNull($attribute)) {
            return $this->attribute;
        }

        return $this->parent->attr($attribute);
    }
999000
public function attribute($attribute, $value = null)
    {
        $element = clone $this;

        $element->attributes->setAttribute($attribute, (string) $value);

        return $element;
    }
731548
public function getAttributes()
    {
        return (new CmsAttributeQuery)
                ->join('cms_attribute_relation')->on('id', 'cms_attribute_id')
                ->join('cms_attribute_type')->on('cms_attribute_type_id')
                ->joinLeft('cms_attribute_value', 'cms_attribute_relation')->on('cms_attribute_value_id')
                ->where('object', 'cms_attribute_relation')->equals($this->_object)
                ->where('objectId', 'cms_attribute_relation')->equals($this->_objectId)
                ->orderAsc('order', 'cms_attribute_relation')
                ->orderAsc('id', 'cms_attribute_relation')
                ->find();
    }
11442
public function setAttribute(string $attribute, string $value = '')
    {
        $this->htmlAttributes->setAttribute($attribute, $value);

        return $this;
    }
1293300
public function generateActiveField($attribute)
    {
        $model = new $this->modelClass();
        $attributeLabels = $model->attributeLabels();
        $tableSchema = $this->getTableSchema();
        if ($tableSchema === false || !isset($tableSchema->columns[$attribute])) {
            if (preg_match('/^(password|pass|passwd|passcode)$/i', $attribute)) {
                return "'$attribute' => ['type' => TabularForm::INPUT_PASSWORD,'options' => ['placeholder' => 'Enter ".$attributeLabels[$attribute]."...']],";
                //return "\$form->field(\$model, '$attribute')->passwordInput()";
            } else {
                return "'$attribute' => ['type' => TabularForm::INPUT_TEXT, 'options' => ['placeholder' => 'Enter ".$attributeLabels[$attribute]."...']],";
                //return "\$form->field(\$model, '$attribute')";
            }
        }
        $column = $tableSchema->columns[$attribute];
        if ($column->phpType === 'boolean') {
            //return "\$form->field(\$model, '$attribute')->checkbox()";
            return "'$attribute' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => 'Enter ".$attributeLabels[$attribute]."...']],";
        } elseif ($column->type === 'text') {
            //return "\$form->field(\$model, '$attribute')->textarea(['rows' => 6])";
            return "'$attribute' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Enter ".$attributeLabels[$attribute]."...','rows' => 6]],";
        } elseif ($column->type === 'date') {
            return "'$attribute' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(),'options' => ['type' => DateControl::FORMAT_DATE]],";
        } elseif ($column->type === 'time') {
            return "'$attribute' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(),'options' => ['type' => DateControl::FORMAT_TIME]],";
        } elseif ($column->type === 'datetime' || $column->type === 'timestamp') {
            return "'$attribute' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(),'options' => ['type' => DateControl::FORMAT_DATETIME]],";
        } else {
            if (preg_match('/^(password|pass|passwd|passcode)$/i', $column->name)) {
                $input = 'INPUT_PASSWORD';
            } else {
                $input = 'INPUT_TEXT';
            }
            if ($column->phpType !== 'string' || $column->size === null) {
                //return "\$form->field(\$model, '$attribute')->$input()";
                return "'$attribute' => ['type' => Form::".$input.", 'options' => ['placeholder' => 'Enter ".$attributeLabels[$attribute]."...']],";
            } else {
                //return "\$form->field(\$model, '$attribute')->$input(['maxlength' => $column->size])";
                return "'$attribute' => ['type' => Form::".$input.", 'options' => ['placeholder' => 'Enter ".$attributeLabels[$attribute]."...', 'maxlength' => ".$column->size."]],";
            }
        }
    }
199102
protected function formatAttributeValue(Attribute $attribute)
    {
        $value = $attribute->getValue();
        
        if ($attribute->getType() === Attribute::TYPE_FUNCTION && strlen($value)) {
            return new Expr($value);
        }
        
        return $value;
    }
709276
protected function getAttribute($data, $attribute)
	{
		if ($this->dataProvider instanceof CActiveDataProvider && $data->hasAttribute($attribute)) {
			return $data->{$attribute};
		}

		if ($this->dataProvider instanceof CArrayDataProvider || $this->dataProvider instanceof CSqlDataProvider) {
			if (is_object($data) && isset($data->{$attribute})) {
				return $data->{$attribute};
			}
			if (isset($data[$attribute])) {
				return $data[$attribute];
			}
		}
		return null;
	}
813901
public function attribute( $attribute, $value )
    {
        if ( null === $value )
        {
            unset( $this->attributes[ $attribute ] );
        } else {
            $this->attributes[ $attribute ] = $value;
        }

        return $this;
    }
1278221
public function setHtmlAttribute($key, $attribute)
    {
        $attribute = $this->prepareHtmlAttributeValue($attribute);

        if ($key == 'class') {
            $this->htmlAttributes[$key][] = $attribute;
        } else {
            $this->htmlAttributes[$key] = $attribute;
        }

        return $this;
    }
561451
private function _arrayValueByAttribute(\Cms\Orm\CmsAttributeRecord $attribute)
    {
        //tablica wartości
        $values = [];
        //iteracja po wartościach
        foreach ($this->_cmsAttributeValues as $valueRecord) {
            //znaleziony atrybut
            if ($valueRecord->cmsAttributeId == $attribute->id) {
                //dodanie wartości
                $values[] = $valueRecord->value;
            }
        }
        //brak wartości - ustawienie domyślnej jeśli istnieje
        if (empty($values) && $attribute->getJoined('cms_attribute_value')->value) {
            //zwrot domyślnej wartości
            return [$attribute->getJoined('cms_attribute_value')->value];
        }
        //zwrot znalezionych wartości
        return $values;
    }
566490
public function getAttribute($attribute)
    {
        if (!isset($this->attributes[$attribute])) {
            throw new EntityException(EntityException::ATTRIBUTE_NOT_FOUND, [
                $attribute,
                get_class($this)
            ]);
        }

        return $this->attributes[$attribute];
    }
802661
public function getAttribute($attribute) {
		if (isset($this->_attributes[$attribute])) {
			return $this->_attributes[$attribute];
		}

		return null;
	}
1163299
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
        case 'email':
            $this->_email = $attribute->nodeValue;
            break;
        case 'rel':
            $this->_rel = $attribute->nodeValue;
            break;
        case 'valueString':
            $this->_valueString = $attribute->nodeValue;
            break;
        default:
            parent::takeAttributeFromDOM($attribute);
        }
    }
885435
public function attribute( $attr )
    {
        switch ( $attr )
        {
            case 'element':
                return $this->element();
                break;
            case 'tail':
                return $this->elements();
                break;
            case 'base':
                return $this->base();
                break;
            case 'index':
                return $this->index();
                break;
            case 'uri':
                return $this->uriString();
                break;
            case 'original_uri':
                return $this->originalURIString();
                break;
            case 'query_string':
                return eZSys::queryString();
                break;
            default:
            {
                eZDebug::writeError( "Attribute '$attr' does not exist", __METHOD__ );
                return null;
            } break;
        }
    }
520590
protected function uninlineDynamicAttribute(DOMAttr $attribute)
	{
		$xslAttribute = $this->createElement('xsl:attribute');

		// Build the content of the xsl:attribute element
		foreach (AVTHelper::parse($attribute->value) as list($type, $content))
		{
			if ($type === 'expression')
			{
				$childNode = $this->createElement('xsl:value-of');
				$childNode->setAttribute('select', $content);
			}
			else
			{
				$childNode = $this->createText($content);
			}

			$xslAttribute->appendChild($childNode);
		}

		return $xslAttribute;
	}
1360634
public function escapeHtmlAttribute($attribute)
    {
        if (!$this->escapeHtmlAttrHelper) {
            $this->escapeHtmlAttrHelper = $this->getView()->plugin('escapehtmlattr');
            if (!$this->escapeHtmlAttrHelper instanceof EscapeHtmlAttr) {
                throw new Exception\RuntimeException('Helper not loaded: escapeHtmlAttr');
            }
        }
        return $this->escapeHtmlAttrHelper->__invoke($attribute);
    }