AttributeFilter::getFieldName PHP Метод

getFieldName() публичный Метод

public getFieldName ( Attribute $attribute, null $mode = null ) : null | string
$attribute Attribute
$mode null
Результат null | string
    public function getFieldName(Attribute $attribute, $mode = null)
    {
        $type = (int) $attribute->type;
        if ($type === Attribute::TYPE_SHORT_TEXT) {
            return sprintf($this->stringTemplate, $attribute->name);
        }
        if ($type === Attribute::TYPE_CHECKBOX) {
            return sprintf($this->checkboxTemplate, $attribute->name);
        }
        if ($type === Attribute::TYPE_NUMBER) {
            return sprintf($this->numberTemplate, $attribute->name, $mode);
        }
        return null;
    }