Generates the attribute labels for the search model.
@return array the generated attribute labels (name => label)
343910
public function generateSearchLabels() {
        /* @var $model Model */
        $model = new $this->modelClass();
        $attributeLabels = $model->attributeLabels();
        $labels = [];
        foreach ($this->getColumnNames() as $name) {
            if (isset($attributeLabels[$name])) {
                $labels[$name] = $attributeLabels[$name];
            } else {
                if (!strcasecmp($name, 'id')) {
                    $labels[$name] = 'ID';
                } else {
                    $label = Inflector::camel2words($name);
                    if (!empty($label) && substr_compare($label, ' id', -3, 3, true) === 0) {
                        $label = substr($label, 0, -3) . ' ID';
                    }
                    $labels[$name] = $label;
                }
            }
        }

        return $labels;
    }
769817
public function attributeLabels()
    {
        $attributeLabels = parent::attributeLabels();
        $attributeLabels['id'] = Yii::t('user', 'User ID');
        $attributeLabels['nickname'] = Yii::t('user', 'Nickname');
        $attributeLabels['first_name'] = Yii::t('user', 'First Name');
        $attributeLabels['last_name'] = Yii::t('user', 'Last Name');
        $attributeLabels['gf'] = Yii::t('user', 'Gender');
        $attributeLabels['createdFrom'] = Yii::t('user', 'From');
        $attributeLabels['createdTo'] = Yii::t('user', 'To');
        return $attributeLabels;
    }
514076
public function getLabels() {
        $labels = array();
        foreach ($this->cols as $col) {
            $labels[] = $col->getLabel();
        }
        return $labels;
    }
883528
public function getAttributes()
    {
        $attribs = [];
        foreach (array_keys($this->attributeSetters) as $setter) {
            $attribs[] = $this->getPropertyName($setter, "set");
        }

        return $attribs;
    }
1229741
protected function getPlainLabels()
    {
        $labels = [];

        foreach (Config::getCustomModelTemplates() as $key => $properties) {
            $label = $this->makeModelLabel($key, $properties, true, $this->defaultLang);
            $labels[$this->defaultLang][] = $label;
        }

        return $labels;
    }
589538
public function attributeLabels()
    {
        return array_merge($this->getBehaviorLabels(), [
            'username'      => Yii::t('usr', 'Username'),
            'email'         => Yii::t('usr', 'Email'),
            'firstName'     => Yii::t('usr', 'First name'),
            'lastName'      => Yii::t('usr', 'Last name'),
            'picture'       => Yii::t('usr', 'Profile picture'),
            'removePicture' => Yii::t('usr', 'Remove picture'),
            'password'      => Yii::t('usr', 'Current password'),
        ]);
    }
101089
protected function buildAttributes()
    {
        $attrs = array();

        $class = '';

        if(count($this->classes) > 0)
            $class = 'class="'.implode(' ', $this->classes).'" ';

        if(count($this->attributeString) > 0)
            $attrs = $this->attributeString;

        foreach($this->attributes as $key => $value)
            $attrs[] = $key.'="'.$value.'"';

        return $class.implode(' ', $attrs);
    }
253567
public function render()
    {

        $attr = [];

        foreach($this->attributes as $k => $v) {
            $attr[] = sprintf('%s="%s"', $k, $v);
        }

        return sprintf('<label %s>%s</label>',
            implode(' ', $attr),
            trim($this->labelText)
        );

    }
329937
public static function labels()
    {
        self::bootClass();

        $result = [];

        foreach (static::values() as $value) {
            $result[] = static::getLabel($value);
        }

        return $result;
    }
969467
private function createAttributes()
        {
            $return = [];
            foreach ($this->attributes as $key => $value) {
                if ('data' === $key && is_array($value)) {
                    foreach ($value as $k => $v) {
                        $return[] = 'data-'.$k.'="'.htmlentities(is_array($v)
                                ? implode(' ', $v)
                                : $v, ENT_QUOTES, 'UTF-8', false).'"';
                    }
                } else {
                    $return[] = $key.'="'.htmlentities(is_array($value)
                            ? implode(' ', $value)
                            : $value, ENT_QUOTES, 'UTF-8', false).'"';
                }
            }
            return count($return)
                ? ' '.implode(' ', $return)
                : false;
        }
2829
protected function setDefaultLabels()
    {
        $this->labels = [
            'name'                  => _x($this->many, 'Post type general name', $this->i18n),
            'singular_name'         => _x($this->one, 'Post type singular name', $this->i18n),
            'menu_name'             => _x($this->many, 'Admin Menu text', $this->i18n),
            'name_admin_bar'        => _x($this->one, 'Add New on Toolbar', $this->i18n),
            'add_new_item'          => __('Add New ' . $this->one, $this->i18n),
            'edit_item'             => __('Edit ' . $this->one, $this->i18n),
            'new_item'              => __('New ' . $this->one, $this->i18n),
            'view_item'             => __('View ' . $this->one, $this->i18n),
            'view_items'            => __('View ' . $this->many, $this->i18n),
            'search_items'          => __('Search ' . $this->many, $this->i18n),
            'not_found'             => __('No ' . strtolower($this->many) . ' found.', $this->i18n),
            'not_found_in_trash'    => __('No ' . strtolower($this->many) . ' found in Trash.', $this->i18n),
            'parent_item_colon'     => __('Parent ' . $this->many . ':', $this->i18n),
            'all_items'             => __('All ' . $this->many, $this->i18n),
            'archives'              => __($this->one . ' Archives', $this->i18n),
            'attributes'            => __($this->one . ' Attributes', $this->i18n),
            'insert_into_item'      => __('Insert into ' . strtolower($this->one), $this->i18n),
            'uploaded_to_this_item' => __('Uploaded to this ' . strtolower($this->one), $this->i18n),
            'filter_items_list'     => __('Filter ' . strtolower($this->many) . ' list', $this->i18n),
            'items_list_navigation' => __($this->many . ' list navigation', $this->i18n),
            'items_list'            => __($this->many . ' list', $this->i18n)
        ];

        return $this;
    }
817711
protected function getAttributes()
    {
        libxml_use_internal_errors(true);
        $dom = new DOMDocument('1.0', 'UTF-8');
        $dom->resolveExternals = false;
        $dom->validateOnParse = true;
        $dom->preserveWhiteSpace = false;
        $dom->strictErrorChecking = true;
        $dom->recover = true;

        @$dom->loadHTML($this->normalize($this->html));

        $errors = array_filter(libxml_get_errors(), function (LibXMLError $error) {
            return in_array((int) $error->code, static::$ignoreErrors, true) === false;
        });

        libxml_clear_errors();

        return [
            'severenity' => static::$severenity,
            'counter' => count($errors),
            'errors' => $errors,
            'html' => $this->html,
        ];
    }
373632
private function fetchContentAttributes()
    {
        $returnAttributeArray = array();

        $identifierArray = $this->getIdentifiers( $this->origNamePattern );

        $attributes = $this->contentObject->fetchAttributesByIdentifier( $identifierArray, $this->version, array( $this->translation ) );

        if ( is_array( $attributes ) )
        {
            foreach ( $attributes as $attribute )
            {
                $identifier = $attribute->contentClassAttributeIdentifier();
                $returnAttributeArray[$identifier] = $attribute->title();
            }
        }
        else
        {
            $returnAttributeArray = array();
        }
        $this->attributeArray = $returnAttributeArray;
    }
1224625
protected function getLabels()
	{
		preg_match_all(
			'/\\[((?:[^\\x17[\\]]|\\[[^\\x17[\\]]*\\])*)\\]/',
			$this->text,
			$matches,
			PREG_OFFSET_CAPTURE
		);
		$labels = [];
		foreach ($matches[1] as $m)
		{
			$labels[$m[1] - 1] = strtolower($m[0]);
		}

		return $labels;
	}
907772
public function getAttributes()
    {
        $attrs = parent::getAttributes();

        $attrs['class'] = $attrs['class'] . ' userform';
        $attrs['data-livevalidation'] = (bool)$this->controller->EnableLiveValidation;
        $attrs['data-toperrors'] = (bool)$this->controller->DisplayErrorMessagesAtTop;

        return $attrs;
    }
543718
public function getTooltipAttributes():array
    {
        if ($this->tooltip !== null) {
            $attrs = $this->tooltipOptions;
            $attrs['data-toggle'] = 'tooltip';
            $attrs['title'] = $this->tooltip;
            return $attrs;
        }
        return [];
    }
1348407
public function generateAttributes ()
	{
		
		// Get attributes and relationships
		
		$attributes	= $this->getAttributes ();
		
		$this->addLine ('protected static $attributes = array (');
		$this->tabUp (FALSE);
		
		// Add each attribute
		
		foreach ($attributes as $name => $attribute)
		{
			
			$this->addLine ($this->tabVals ('\'' . $name . '\'', 'array (', 4, '=> '));
			$this->tabUp (FALSE);
			
			foreach ($attribute as $key => $val)
			{
				
				switch ($key)
				{
					
					case 'charset':
					case 'relation':
						
						$val	= '\'' . $val . '\'';
						break;
					
					case 'valid':
					case 'values':
						
						$val	= 'array (' . $val . ')';
						break;
					
				}
				
				$this->addLine ($this->tabVals ('\'' . $key . '\'', $val . ',', 3, '=> '));
				
			}
			
			// Remove last ,

			if (substr ($this->class, -2) == ",\n")
			{
				$this->class	= substr ($this->class, 0, -2) . "\n";
			}
			
			$this->tabDown (FALSE);
			$this->addLine ('),');
			
		}
		
		// Remove last ,

		if (substr ($this->class, -2) == ",\n")
		{
			$this->class	= substr ($this->class, 0, -2) . "\n";
		}
		
		// End attributes
		
		$this->tabDown (FALSE);
		$this->addLine (');');
		
	}