Returns all block elements.

@param string $element_name      Element name.
@param string $modificator_name  Modificator name.
@param string $modificator_value Modificator value.

@return NodeElement[]
195221
public function getElements($element_name, $modificator_name = null, $modificator_value = null)
	{
		return $this->getObject()->getElements($element_name, $modificator_name, $modificator_value);
	}
1143986
@SuppressWarnings("unchecked")
    public static List<Element> elements(Element element, String name) {

        return element.elements(name);
    }
944876
private static function getStringElements(\DOMElement $parent, string $name) : array
    {
        $e = Utils::xpQuery($parent, './saml_metadata:'.$name);

        $ret = [];
        foreach ($e as $i) {
            $ret[] = $i->textContent;
        }

        return $ret;
    }
682622
private function _createBlocksFromSerializedData($value, ElementInterface $element = null): array
    {
        if (!is_array($value)) {
            return [];
        }

        /** @var Element $element */
        // Get the possible block types for this field
        /** @var SuperTableBlockType[] $blockTypes */
        $blockTypes = ArrayHelper::index(SuperTable::$plugin->getService()->getBlockTypesByFieldId($this->id), 'id');

        $oldBlocksById = [];

        // Get the old blocks that are still around
        if ($element && $element->id) {
            $ownerId = $element->id;

            $ids = [];

            foreach (array_keys($value) as $blockId) {
                if (is_numeric($blockId) && $blockId != 0) {
                    $ids[] = $blockId;

                    // If that block was duplicated earlier in this request, check for that as well.
                    if (isset(Elements::$duplicatedElementIds[$blockId])) {
                        $ids[] = Elements::$duplicatedElementIds[$blockId];
                    }
                }
            }

            if (!empty($ids)) {
                $oldBlocksQuery = SuperTableBlockElement::find();
                $oldBlocksQuery->fieldId($this->id);
                $oldBlocksQuery->ownerId($ownerId);
                $oldBlocksQuery->id($ids);
                $oldBlocksQuery->anyStatus();
                $oldBlocksQuery->siteId($element->siteId);
                $oldBlocksQuery->indexBy('id');
                $oldBlocksById = $oldBlocksQuery->all();
            }
        } else {
            $ownerId = null;
        }

        $isLivePreview = Craft::$app->getRequest()->getIsLivePreview();
        $blocks = [];
        $sortOrder = 0;
        $prevBlock = null;

        foreach ($value as $blockId => $blockData) {
            if (!isset($blockData['type']) || !isset($blockTypes[$blockData['type']])) {
                continue;
            }

            $blockType = $blockTypes[$blockData['type']];

            // If this is a preexisting block but we don't have a record of it,
            // check to see if it was recently duplicated.
            if (
                strpos($blockId, 'new') !== 0 &&
                !isset($oldBlocksById[$blockId]) &&
                isset(Elements::$duplicatedElementIds[$blockId])
            ) {
                $blockId = Elements::$duplicatedElementIds[$blockId];
            }

            // Is this new? (Or has it been deleted?)
            if (strpos($blockId, 'new') === 0 || !isset($oldBlocksById[$blockId])) {
                $block = new SuperTableBlockElement();
                $block->fieldId = $this->id;
                $block->typeId = $blockType->id;
                $block->ownerId = $ownerId;
                $block->siteId = $element->siteId;
            } else {
                $block = $oldBlocksById[$blockId];
            }

            $block->setOwner($element);

            // Set the content post location on the block if we can
            $fieldNamespace = $element->getFieldParamNamespace();

            if ($fieldNamespace !== null) {
                $blockFieldNamespace = ($fieldNamespace ? $fieldNamespace . '.' : '') . $this->handle . '.' . $blockId . '.fields';
                $block->setFieldParamNamespace($blockFieldNamespace);
            }

            if (isset($blockData['fields'])) {
                foreach ($blockData['fields'] as $fieldHandle => $fieldValue) {
                    try {
                        $block->setFieldValue($fieldHandle, $fieldValue);
                    } catch (UnknownPropertyException $e) {
                        // the field was probably deleted
                    }
                }
            }
            
            $sortOrder++;
            $block->sortOrder = $sortOrder;

            // Set the prev/next blocks
            if ($prevBlock) {
                /** @var ElementInterface $prevBlock */
                $prevBlock->setNext($block);
                /** @var ElementInterface $block */
                $block->setPrev($prevBlock);
            }
            $prevBlock = $block;

            $blocks[] = $block;
        }

        return $blocks;
    }
208655
public function getNodeElements($field_name)
	{
		$node_elements = $this->findAll(
			'named',
			array('field', $this->getXpathEscaper()->escapeLiteral($field_name))
		);

		if ( empty($node_elements) ) {
			throw new FormException(
				sprintf('Form field "%s" not found', $field_name),
				FormException::TYPE_NOT_FOUND
			);
		}

		return $node_elements;
	}
765761
public  function getList( $key, array $default_value = NULL )
    {
        $value = $this->getPropertyNodeValue( $key );

        // return default value if the element is null
        if ( NULL === $value ){
            return NULL === $default_value ? NULL : new ArrayList($default_value);
        }

        return new ArrayList($value);
    }
1180330
public function getModifiers()
    {
        $lastIndent = null;
        $modifiers = array();

        if ($modiferComment = $this->getModifiersComment()) {
            $modifierLines = explode("\n", $modiferComment);
            foreach ($modifierLines as $line) {
                if (empty($line)) {
                    continue;
                }

                preg_match('/^\s*/', $line, $matches);
                $indent = strlen($matches[0]);

                if ($lastIndent && $indent > $lastIndent) {
                    $modifier = end($modifiers);
                    $modifier->setDescription($modifier->getDescription() + trim($line));
                } else {
                    $lineParts = explode(' - ', $line);

                    $name = trim(array_shift($lineParts));

                    $description = '';
                    if (!empty($lineParts)) {
                        $description = trim(implode(' - ', $lineParts));
                    }
                    $modifier = new Modifier($name, $description);

                    // If the CSS has a markup, pass it to the modifier for the example HTML
                    if ($markup = $this->getMarkup()) {
                        $modifier->setMarkup($markup);
                    }
                    $modifiers[] = $modifier;
                }
            }
        }

        return $modifiers;
    }
358941
def findall(self, name):
        
        return [
            S3Element(self.root_name, elem)
            for elem in self.element.findall('s3:{}'.format(name), _S3_NS)
        ]
829690
public function BEM($block = null, $element = null, $modifiers = []): string
    {
        return implode(" ", ArrayHelper::BEM($block, $element, $modifiers));
    }
1186642
protected function defineElement($element, $name = null, $description = null, array $values = [], array $options = [], array $params = [])
    {
        return [
            'name' => $name ?: $element,
            'description' => $description,
            'element' => $element,
            'values' => $values,
            'params' => $params,
        ];
    }
625183
private static int getFieldModifiers(VariableElement var) {
    int modifiers = ElementUtil.fromModifierSet(var.getModifiers());
    if (ElementUtil.isSynthetic(var)) {
      modifiers |= ElementUtil.ACC_SYNTHETIC;
    }
    if (ElementUtil.isEnumConstant(var)) {
      modifiers |= ElementUtil.ACC_ENUM;
    }
    return modifiers;
  }
89204
protected function _amplifyModifiers($value, $modifiers)
    {
        /** @var $helper Aoe_ExtendedFilter_Helper_Data */
        $helper = Mage::helper('Aoe_ExtendedFilter');
        foreach (explode('|', $modifiers) as $part) {
            if (empty($part)) {
                continue;
            }
            $params = explode(':', $part);
            $modifier = array_shift($params);
            $callback = $helper->getModifier($modifier);

            // Legacy modifiers
            if (!is_callable($callback) && isset($this->_modifiers[$modifier])) {
                $callback = $this->_modifiers[$modifier];
                if (!$callback) {
                    $callback = $modifier;
                }
            }

            if (is_callable($callback)) {
                array_unshift($params, $value);
                $value = call_user_func_array($callback, $params);
            }
        }

        return $value;
    }
941398
public function getBlockLocator($block_name, $modificator_name = null, $modificator_value = null)
	{
		return $this->_helper->getBlockLocator($block_name, $modificator_name, $modificator_value);
	}
542564
protected function getBlock($name = null)
    {
        return ($name == null) ? $this->block : (isset($this->block[$name]) ? $this->block[$name] : false);
    }
1150111
public function getModifier($name)
    {
        if (isset($this->modifiers[$name])) {
            $callback = $this->modifiers[$name];
            if (!$callback) {
                $callback = $name;
            }
            return $callback;
        }

        return null;
    }
281409
public function getBlockLocator($block_name, $modificator_name = null, $modificator_value = null)
	{
		if ( !$block_name ) {
			throw new ElementException('BEM Block name cannot be empty', ElementException::TYPE_BLOCK_REQUIRED);
		}

		$class_name = $block_name . $this->getModificatorSelector($modificator_name, $modificator_value);

		return array(How::CLASS_NAME => $class_name);
	}
1248269
public static function getFirstElementValueByTagName($node, $subnode_name)
    {
        $node = XMLTool :: getFirstElementByTagName($node, $subnode_name);
        if (isset($node))
        {
            return $node->nodeValue;
        }
        else
        {
            return null;
        }
    }