Fetch the classes assigned to the given element

@param string $element [card|body|header|footer]

@return string
973173
private function elementClasses(string $element) : string
    {
        if (in_array($element, $this->elements) === true) {
            $class = '';

            if (count($this->classes[$element]) > 0) {
                $class = ' ' . implode(' ', $this->classes[$element]);
            }

            return $class;
        } else {
            return '';
        }
    }
839131
public function get_base($element = array())
	{
		if (!($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION) && !empty($element['xml_base_explicit']) && isset($element['xml_base']))
		{
			return $element['xml_base'];
		}
		elseif ($this->get_link() !== null)
		{
			return $this->get_link();
		}
		else
		{
			return $this->subscribe_url();
		}
	}
90584
public function lastIndexOf($element) {
        for ($i = (count($this->_elements) - 1); $i > 0; $i--) {
            if ($element == $this->get($i)) { return $i; }
        }
    }
1100238
public static function getAssetByHandle($element)
    {
        $volume = Craft::$app->volumes->getVolumeByHandle($element['source']);
        if ($volume) {

            $folderCriteria = new FolderCriteria();
            $folderCriteria->name = $element['folder'];
            $folderCriteria->volumeId = $volume->id;

            $folder = Craft::$app->assets->findFolder($folderCriteria);
            if ($folder) {

                $query = Asset::find();
                $query->volumeId($volume->id);
                $query->folderId($folder->id);
                $query->filename($element['filename']);
                $asset = $query->one();

                if ($asset) {
                    return $asset;
                }
            }
        }

        return false;
    }
434754
public static function extract(\DOMElement $element)
    {
        $doc = new \DOMDocument('1.0', 'utf-8');
        $imported = $doc->importNode($element, true);
        $doc->appendChild($imported);

        $prefix = $doc->lookupPrefix('http://www.w3.org/1999/xhtml');
        if ('' !== $prefix) {
            $prefix .= ':';
        }
        $patterns = [
            '/<\?xml[^<]*>[^<]*<' . $prefix . 'div[^<]*/',
            '/<\/' . $prefix . 'div>\s*$/'
        ];
        $text = preg_replace($patterns, '', $doc->saveXML());
        if ('' !== $prefix) {
            $text = preg_replace('/(<[\/]?)' . $prefix . '([a-zA-Z]+)/', '$1$2', $text);
        }

        return $text;
    }
158289
public static function prep_element($element) {
		if (self::containsCode($element)===false) {
			$element='"'.addslashes($element).'"';
		}
		return $element;
	}
1169274
function get($element) {
        $node = $this->findNode($element, $this->root);

        assert($node != null);

        return $node->value();
    }
490915
public function getPreviousSiblingOf( AbstractElement $element ) {
		$index = $this->indexOf($element);

		return $this->childAtIndex($index - 1);
	}
632472
protected function processRules($element)
	{
		// If this is a container (Form or Fieldset) loop through each of the fields
		if ($element instanceof Form or $element instanceof Fieldset)
		{
			$result = [];

			foreach ($element as $field)
			{
				$result += $this->processRules($field);
			}

			return $result;
		}

		$metaData = $element->getMetaContainer();

		if (isset($metaData['validation']))
		{
			$label = $element->getLabel();

			if (is_null($label))
			{
				$label = $element->getName();
			}

			return [$element->getName() => [
				$this->ruleProvider->getRuleKey() => $metaData['validation'],
				$this->ruleProvider->getLabelKey() => $label,
			]];
		}

		return [$element->getName() => []];
	}
1187639
public function getElements($className = ''){

        $returnValue = array();

        if($className){
            foreach($this->elements as $serial => $element){
                if($element instanceof $className){
                    $returnValue[$serial] = $element;
                }
            }
        }else{
            $returnValue = $this->elements;
        }


        return $returnValue;
    }
1296320
public function getNextSiblingOf( AbstractElement $element ) {
		$index = $this->indexOf($element);

		return $this->childAtIndex($index + 1);
	}
368267
private function renderElement(Element $element) : string
    {
        $label = $element->getLabel();

        if ($label->isEmpty()) {
            return $element->render();
        }

        return $label->render() . $element->render();
    }
336186
public static function getUserByHandle($element)
    {
        $user = Craft::$app->users->getUserByUsernameOrEmail($element['username']);
        if ($user) {
            return $user;
        }

        return false;
    }
609127
private function cardFooter() : string
    {
        $html = '';

        if ($this->footer !== null) {
            $html .= '<div class="card-footer' . $this->elementAttr('footer') .
                '"' . $this->elementAttr('header') . '>' . $this->footer . '</div>';
        }

        return $html;
    }
723228
public function getContentForElement(Element $element) : string
    {
        if ($element instanceof HasChildren && $element instanceof HasContent) {
            throw new InvalidArgumentException('An element can only implement one of HasChildren and HasContent');
        }

        if ($element instanceof HasChildren) {
            $renderedChildren = array_map(function(Element $element) {
                return $this->renderElement($element);
            }, $element->getChildren());

            return implode('', $renderedChildren);
        }

        if ($element instanceof HasContent) {
            return $element->getContent();
        }

        return '';
    }
1197656
private function elementBodyAttr(string $element) : string
    {
        if (in_array($element, $this->body_elements) === true) {
            $attr = '';

            if (count($this->body_attr[$element]) > 0) {
                if (array_key_exists($element, $this->body_attr_first) === false) {
                    $attr = ' style="' . implode(' ', $this->body_attr[$element]) . '"';
                } else {
                    $attr = ' style="';
                    foreach ($this->body_attr[$element] as $body_attr) {
                        if (array_key_exists($body_attr, $this->body_attr_first[$element]) === false) {
                            $attr .= ' ' . $body_attr . ';';
                        } else {
                            if ($this->body_attr_first[$element][$body_attr] === true) {
                                $attr .= ' ' . $body_attr . ';';
                                $this->body_attr_first[$element][$body_attr] = false;
                            }
                        }
                    }
                    $attr .= '"';
                }
            }

            return $attr;
        } else {
            return '';
        }
    }
579558
public function offsetGet($element)
    {
        try {
            return (bool) $this->map->find($element);
        } catch (\OutOfBoundsException $e) {
            return false;
        }
    }