Answers an array of attributes for a link.

@return array
172564
public function getLinkAttributes()
    {
        $attributes = [
            'href' => $this->owner->Link,
            'title' => $this->owner->LinkTitle
        ];
        
        if ($class = $this->owner->LinkClass) {
            $attributes['class'] = $class;
        }
        
        if ($this->owner->OpenLinkInNewTab) {
            $attributes['target'] = '_blank';
        }
        
        return $attributes;
    }
1292261
public function attributes()
    {
        $attributes = \yii\base\Model::attributes();
        foreach (self::rules() as $rule) {
            if (is_string(reset($rule))) {
                continue;
            }
            foreach (reset($rule) as $attribute) {
                if (substr_compare($attribute, '!', 0, 1) === 0) {
                    $attribute = mb_substr($attribute, 1);
                }
                $attributes[$attribute] = $attribute;
            }
        }

        return array_values($attributes);
    }
87930
public function build_attributes() {
		// setup attributes.
		$this->set_attributes();

		$attributes = [];
		foreach ( $this->attributes as $att => $value ) {
			if ( is_array( $value ) ) {
				$value = implode( ' ', $value );
			}
			$attributes[] = sprintf( '%s="%s"', esc_html( $att ), esc_attr( $value ) );
		}

		return implode( ' ', $attributes );
	}
18536
public function getLinks()
    {
        $links = '';
        foreach ($this->links as $link) {
            $links .= $link . "\n";
        }
        $links = rtrim($links, "\n");
        return $links;
    }
416821
public function getActualLinks(): array
	{
		$arr = [];
		if ($this instanceof Link) {
			$arr[] = $this;
		}
		$parent = $this->parent;
		if ($parent instanceof Item) {
			return array_merge($arr, $this->parent->getActualLinks());
		} else {
			return $arr;
		}
	}
924815
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true)
                ->setUnique(true),
            Attributes\LongTextAttribute::make('description'),
            Attributes\TextAttribute::make('filter'),
            Attributes\ClassNameAttribute::make('class_name', [\Railken\Amethyst\Contracts\DataBuilderContract::class]),
            Attributes\YamlAttribute::make('class_arguments'),
            Attributes\YamlAttribute::make('mock_data'),
            Attributes\YamlAttribute::make('input'),
            Attributes\TextAttribute::make('include'),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
1002719
public function getAttributes()
    {
        $attributes = array_merge(
            parent::getAttributes(),
            [
                'data-depth' => $this->Depth,
                'data-zoom' => $this->Zoom,
                'data-zoom-min' => $this->ZoomMin,
                'data-zoom-max' => $this->ZoomMax,
                'data-canvas' => $this->CanvasCSSID,
                'data-tag-list' => $this->TagListID,
                'data-color-text' => $this->ColorText,
                'data-color-outline' => $this->ColorOutline,
                'data-weight-size-min' => $this->WeightSizeMin,
                'data-weight-size-max' => $this->WeightSizeMax,
                'data-initial' => $this->Initial,
                'data-weight' => $this->dbObject('Weight')->NiceAsBoolean()
            ]
        );
        
        return $attributes;
    }
342672
public function getButtonAttributes()
    {
        $attributes = [
            'type' => 'button',
            'class' => $this->ButtonClass,
            'title' => $this->ButtonLabel,
            'aria-label' => $this->ButtonLabel,
            'aria-expanded' => 'false',
            'aria-controls' => $this->CollapseHTMLID,
            'data-target' => $this->CollapseCSSID,
            'data-toggle' => 'collapse'
        ];
        
        $this->extend('updateButtonAttributes', $attributes);
        
        return $attributes;
    }
911730
public function getImageLinkAttributes()
    {
        // Detect Media Type:
        
        if ($this->MediaType == 'photo') {
            
            // Answer Photo Attributes:
            
            return [
                'href' => $this->ImageURL,
                'data-title' => $this->ImageTitleText,
                'data-footer' => $this->ImageCaptionText,
                'data-toggle' => 'lightbox',
                'class' => 'image'
            ];
            
        }
        
        // Answer Standard Attributes:
        
        return [
            'href' => $this->MediaURL,
            'class' => 'image'
        ];
    }
519884
public function getStyleAttributeArray(): array
    {
        $value = $this->getAttribute('style')['value'];

        if ($value === null) {
            return [];
        }

        $value = explode(';', substr(trim($value), 0, -1));
        $result = [];
        foreach ($value as $attr) {
            $attr = explode(':', $attr);
            $result[$attr[0]] = $attr[1];
        }

        return $result;
    }
1085249
public function getRawAttributes()
    {
        $data = array();
        foreach ($this->attributes as $name => $attribute) {
            $data[$name] = $attribute->getValues();
        }
        return $data;
    }
546104
public function getAttributes()
    {
        $data = @ldap_get_attributes($this->connection, $this->entry);

        $result = array();

        for ($i = 0; $i < $data['count']; $i++) {
            $key = $data[$i];
            $result[$key] = array();
            for ($j = 0; $j < $data[$key]['count']; $j++) {
                $result[$key][] = $data[$key][$j];
            }
        }

        return $result;
    }
1346462
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true)
                ->setUnique(true),
            Attributes\LongTextAttribute::make('description'),
            Attributes\YamlAttribute::make('body')
                ->setRequired(true),
            Attributes\TextAttribute::make('filename')
                ->setRequired(true),
            Attributes\ClassNameAttribute::make('class_name', [GenerateExportContract::class])
                ->setRequired(true),
            Attributes\BelongsToAttribute::make('data_builder_id')
                ->setRelationName('data_builder')
                ->setRelationManager(DataBuilderManager::class)
                ->setRequired(true),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
544748
public function getFlagsAttribute() : array
    {
        if ($this->flagsArray !== null) {
            return $this->flagsArray;
        }

        return $this->flagsArray = json_decode($this->getAttributeFromArray('flags'), true);
    }
135508
public function getAttributes()
    {
        $array = [];

        if ($this->getValueSet() === null) {
            return $array;
        }

        foreach ($this->getValueSet()->getValues() as $value) {
            $array[$value->getAttribute()->getName()] = $value;
        }

        return $array;
    }
1153314
public function getLinkAttribute()
    {
        $category = FieldCategory::query()->first();
        if (is_null($category)) {
            return handles('antares::customfields/index');
        }
        return handles('antares::customfields/' . $category->name . '/index');
    }
453881
protected function getLink()
    {
        if ($this->link_value === null) {
            $link = $this->link;
        } elseif (is_array($this->link_value)) {
            $link_values = array();

            foreach ($this->link_value as $value) {
                $link_values[] = urlencode($value);
            }

            $link = vsprintf($this->link, $link_values);
        } else {
            $link_value = urlencode($this->link_value);
            $link = sprintf($this->link, $link_value);
        }

        return $link;
    }