Retrieves all attributes of the element. If the element isn't present, or
the attributes can't be accessed, a null value will be returned.

@return String: the value of the css attribute
558564
@SuppressWarnings("unchecked")
    public Map<String, String> allAttributes() {
        if (!element.is().present()) {
            return null;
        }
        try {
            WebElement webElement = element.getWebElement();
            JavascriptExecutor js = (JavascriptExecutor) driver;
            return (Map<String, String>) js.executeScript(
                    "var items = {}; for (index = 0; index < arguments[0].attributes.length; ++index) { items[arguments[0].attributes[index].name] = arguments[0].attributes[index].value }; return items;",
                    webElement);
        } catch (NoSuchMethodError | Exception e) {
            log.warn(e);
            return null;
        }
    }
498728
public function getAttributeValueTextRepresentation()
    {
        $result = '';
        $value = $this->getAttributeValueObject();
        if ($value !== null) {
            $topics = $value->getSelectedTopics();
            if (!empty($topics)) {
                $ids = [];
                foreach ($topics as $topic) {
                    /* @var \\Concrete\Core\Entity\Attribute\Value\Value\SelectedTopic $topic */
                    $ids[] = 'tid:' . $topic->getTreeNodeID();
                }
                $result = implode('|', $ids);
            }
        }

        return $result;
    }
1039183
public function getSrcsetAttributeValue()
    {
        $srcset = [];
        foreach ($this->versions as $id) {
            $srcset[] = sprintf('%s %sw', $id->getUrl(), $id->getWidth());
        }
        return join(', ', $srcset);
    }
1175958
public function dirtyAttributes()
	{
		if (!$this->_dirty)
			return null;

		$dirty = array_intersect_key($this->_attributes, $this->_dirty);
		return !empty($dirty) ? $dirty : null;
	}
386755
public function get_inline_css() {
		if ( $this->get_pre_selectors() ) {
			$inline_css = sprintf(
				'%1$s { %2$s }',
				implode( ',', $this->get_selectors() ),
				$this->get_properties()
			);
			foreach ( $this->get_pre_selectors() as $pre_selector ) {
				$inline_css = sprintf(
					'%1$s { %2$s }',
					$pre_selector,
					$inline_css
				);
			}
			return $inline_css;
		}

		return sprintf(
			'%1$s { %2$s }',
			implode( ',', $this->get_selectors() ),
			$this->get_properties()
		);
	}
143213
public function getAttributes()
    {
        if ($this->_attributes === null) {
            $this->_attributes = $this->defaultAttributes();
        }
        return $this->_attributes;
    }
518117
protected function getAttributes()
    {
        $terminal = null;
        if ($this->hasLaravel() === true) {
            try {
                $controller = $this->laravel->make(TerminalController::class);
                $response = $this->laravel->call([$controller, 'index'], ['view' => 'panel']);
                $terminal = $response->getContent();
            } catch (Exception $e) {
                $terminal = $e->getMessage();
            }
        }

        return [
            'terminal' => $terminal,
        ];
    }
308307
protected function getAttributes()
    {
        $attributes = [];
        if (is_null($this->userResolver) === false) {
            $attributes['rows'] = call_user_func($this->userResolver);
        } elseif ($this->hasLaravel() === true) {
            $attributes = isset($this->laravel['sentinel']) === true ?
                $this->fromSentinel() : $this->fromGuard();
        }

        return $this->identifier($attributes);
    }
751464
public function getAttributeValueTextRepresentation()
    {
        $links = [];
        $value = $this->getAttributeValueObject();
        if ($value !== null) {
            foreach ($value->getSelectedLinks() as $socialLink) {
                $links[] = $socialLink->getService() . ':' . $socialLink->getServiceInfo();
            }
        }

        return implode("\n", $links);
    }
451890
public function getStylesAttribute()
    {
        if (!$this->isImage)
            return null;

        $styles = [];
        foreach ($this->image_styles as $style)
            $styles[$style->style->name] = $style->file;

        return $styles;
    }
1372158
public function getEnableAltAttribute()
    {
        if ($this->attributes['data'] == '' || $this->attributes['type'] != 'image')
            return null;

        $data = unserialize($this->attributes['data']);

        if (!isset($data['enable_alt']))
            return null;
        else {
            return $data['enable_alt'];
        }
    }
1003918
public function getHTML() {
        $tag = "<" . $this->name;
        $q = $this->quoteType;

        //build attribute strings
        foreach( $this->attrs as $name=>$value ) {
            //if true, such as CHECKED, we just add the name
            if( $value === true ) {
                $tag .= " $name";
            } else if( is_string( $value ) ) { //if it's a string, we add attr="value"
                $tag .= " {$name}={$q}{$value}{$q}";
            }
        }

        //short tag? close it and return
        if( $this->isShortTag ) {
            $tag .= ' />';
            
            return $tag;
        }

        //not a short tag, close it
        $tag .= '>';

        //add the children if they exist
        if( $this->hasChildren() ) {
            foreach( $this->getChildren() as $child ) {
                $tag .= $child->getHTML();
            }
        }

        //closing tag
        $tag .= "</{$this->name}>";

        return $tag;
    }
515309
public function getAttributes()
    {
        $attributes = array(
            'type' => $this->getInputType(),
            'name' => $this->getName(),
            'value' => $this->Value(),
            'class' => $this->extraClass(),
            'id' => $this->ID(),
            'disabled' => $this->isDisabled(),
            'readonly' => $this->isReadonly(),
            'autofocus' => $this->isAutofocus()
        );

        if ($this->Required()) {
            $attributes['required'] = 'required';
            $attributes['aria-required'] = 'true';
        }

        $attributes = array_merge($attributes, $this->attributes);

        $this->extend('updateAttributes', $attributes);

        return $attributes;
    }
847434
private function get_attrs()
    {
        $this->attrs = new \stdClass;

        foreach($this->dom_element->attributes as $name => $node)
        {
            $this->attrs->{strtolower($name)} = $node->nodeValue;
        }
        return $this;
    }
301136
private function getAttributeCode()
    {
        $attributeCode = false;

        if ($this->request->isAjax() && $this->request->getParam('filterName')) {
            $attributeCode = (string) $this->request->getParam('filterName');
        }

        return $attributeCode;
    }
343765
protected function getCssContent()
    {
        $styleString = "";

        if (class_exists("\\DOMDocument")) {
            $doc = new \DOMDocument();
            $doc->loadHTMLFile($this->getFilename());

            // Extract styles from the HTML file
            foreach($doc->getElementsByTagName('style') as $styleNode) {
                $styleString .= $styleNode->nodeValue . "\r\n";
            }
        } else {
            throw new \RuntimeException("Required extension 'dom' seems to be missing.");
        }

        return $styleString;
    }
362970
public function getAttributes()
    {
        $emulated = [
            'params' => $this->params,
            'webroot' => $this->webroot,
            'base' => $this->base,
            'here' => $this->here
        ];

        return $this->attributes + $emulated;
    }