@param bool $useAttributesAppend

@return array
176864
private function getArrayWithNestedObjects($useAttributesAppend = true)
    {
        $result = [];
        $multipleNestedEntities = $this->getMultipleNestedEntities();

        foreach ($this->attributes as $attributeName => $attributeValue) {
            if (! is_object($attributeValue)) {
                $result[$attributeName] = $attributeValue;
            }

            if (array_key_exists($attributeName, $this->getSingleNestedEntities())) {
                $result[$attributeName] = $attributeValue->attributes;
            }

            if (array_key_exists($attributeName, $multipleNestedEntities)) {
                if ($useAttributesAppend) {
                    $attributeNameToUse = $attributeName . '_attributes';
                } else {
                    $attributeNameToUse = $attributeName;
                }

                $result[$attributeNameToUse] = [];
                foreach ($attributeValue as $attributeEntity) {
                    $result[$attributeNameToUse][] = $attributeEntity->attributes;

                    if ($multipleNestedEntities[$attributeName]['type'] === self::NESTING_TYPE_NESTED_OBJECTS) {
                        $result[$attributeNameToUse] = (object) $result[$attributeNameToUse];
                    }
                }

                if (
                    $multipleNestedEntities[$attributeName]['type'] === self::NESTING_TYPE_NESTED_OBJECTS
                    && empty($result[$attributeNameToUse])
                ) {
                    $result[$attributeNameToUse] = new \StdClass();
                }
            }
        }

        return $result;
    }
644938
protected function renderAttribs()
    {
        $strHtml = '';
        foreach ($this->aAttribs as $strKey => $mValue) {
            $strHtml .= is_bool($mValue)
                ? ($mValue ? $strKey : '') // just the attribute name for booleans
                : $strKey . '="' . $mValue . '"'; // otherwise key="value"
        }
        return $strHtml;
    }
19352
private function resolveAttributesFromAttributeStatement(array $attributes, AttributeStatement $attributeStatement)
    {
        $statementAttributes = $attributeStatement->getAllAttributes();

        return array_reduce($statementAttributes, [$this, 'mapAttributeValues'], $attributes);
    }
970248
public function getFilterOptions($idList, $usedOnly, &$arrCount = null)
    {
        if (!$this->isFilterOptionRetrievingPossible($idList)) {
            return [];
        }

        $filter = $this->getTagMetaModel()->getEmptyFilter();

        $this->buildFilterRulesForFilterSetting($filter);

        // Add some more filter rules.
        if ($usedOnly) {
            $this->buildFilterRulesForUsedOnly($filter, $idList ? $idList : []);
        } elseif ($idList && \is_array($idList)) {
            $filter->addFilterRule(new StaticIdList($idList));
        }

        $objItems = $this->getTagMetaModel()->findByFilter(
            $filter,
            $this->getSortingColumn(),
            0,
            0,
            $this->getSortDirection(),
            [$this->getAliasColumn(), $this->getValueColumn()]
        );

        if ($arrCount !== null) {
            $this->calculateFilterOptionsCount($objItems, $arrCount, $idList);
        }

        return $this->convertItemsToFilterOptions(
            $objItems,
            $this->getValueColumn(),
            $this->getAliasColumn(),
            $arrCount
        );
    }
374236
public function sourceParsedownElement(array $attributes, $reset = true)
    {
        empty($attributes['src']) && $attributes['src'] = $this->url(false);

        $srcset = $this->srcset($reset);
        if ($srcset) {
            empty($attributes['srcset']) && $attributes['srcset'] = $srcset;
            $attributes['sizes'] = $this->sizes();
        }

        return ['name' => 'img', 'attributes' => $attributes];
    }
568816
private function HtmlAttributes($attributes)
    {
        $formatted = join(' ', array_map(function ($key) use ($attributes) {
            if (is_bool($attributes[$key])) {
                return $attributes[$key] ? $key : '';
            }
            return $key . '="' . $attributes[$key] . '"';
        }, array_keys($attributes)));
        return $formatted;
    }
1286256
public function getFilterOptions($idList, $usedOnly, &$arrCount = null)
    {
        if (!$this->isFilterOptionRetrievingPossible($idList)) {
            return array();
        }

        $tableName     = $this->getSelectSource();
        $idColumn      = $this->getIdColumn();
        $strSortColumn = $this->getSortingColumn();

        if ($idList) {
            $builder = $this->connection->createQueryBuilder()
                ->select('COUNT(sourceTable.' . $idColumn . ') as mm_count')
                ->addSelect('sourceTable.*')
                ->from($tableName, 'sourceTable')
                ->rightJoin(
                    'sourceTable',
                    $this->getMetaModel()->getTableName(),
                    'modelTable',
                    'modelTable.' . $this->getColName() . '=sourceTable.' . $idColumn
                )
                ->where('modelTable.id IN (:ids)')
                ->setParameter('ids', $idList, Connection::PARAM_STR_ARRAY)
                ->addGroupBy('sourceTable.' . $idColumn)
                ->addOrderBy('sourceTable.' . $strSortColumn);

            if ($additionalWhere = $this->getAdditionalWhere()) {
                $builder->andWhere($additionalWhere);
            }

            $statement = $builder->execute();
        } else {
            $statement = $this->getFilterOptionsForUsedOnly($usedOnly);
        }

        return $this->convertOptionsList($statement, $this->getAliasColumn(), $this->getValueColumn(), $arrCount);
    }
883528
public function getAttributes()
    {
        $attribs = [];
        foreach (array_keys($this->attributeSetters) as $setter) {
            $attribs[] = $this->getPropertyName($setter, "set");
        }

        return $attribs;
    }
1128051
public function replaceMissingAttributes()
    {
        // collect persisted attributevalues
        $persistedAttributes = array();
        foreach ($this->getValueSet()->getValues() as $value) {
            $persistedAttributes[] = $value->getAttribute();
        }

        $newValues = array();
        // Create empty entities for missing attributes
        $missingAttributes = array_diff($this->getValueSet()->getAttributes()->toArray(), $persistedAttributes);
        foreach ($missingAttributes as $attribute) {
            $valueClass = $attribute->getValueType();
            $value = new $valueClass();

            $this->getValueSet()->addValue($value);
            $value->setValueSet($this->getValueSet());
            $value->setAttribute($attribute);

            $newValues[] = $value;
        }

        return $newValues;
    }
1149452
public function getAttributes(): array
    {
        $attributes = [];
        if ($this->confirm && $this->publicKey) {
            $attributes['confirm'] = $this->confirm;
            $attributes['public_key'] = $this->publicKey;
        }
        return $attributes;
    }
880062
public function getRequiredAttributes()
    {
        return [
            $this->attributePrefix.'chunk'         => $this->getType(),
            $this->attributePrefix.'slot-name'     => $this->slotname,
            $this->attributePrefix.'slot-template' => $this->template,
            $this->attributePrefix.'page'          => $this->page->getId(),
            $this->attributePrefix.'chunk-id'      => $this->getId(),
            $this->attributePrefix.'has-content'   => $this->hasContent(),
        ];
    }
1332607
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true)
                ->setUnique(true),
            Attributes\LongTextAttribute::make('description'),
            Attributes\TextAttribute::make('event_class')
                ->setRequired(true),
            Attributes\BooleanAttribute::make('enabled'),
            Attributes\YamlAttribute::make('data')->setDefault(function (EntityContract $entity) {
                return file_get_contents(__DIR__.'/../../resources/schema/default/data.yaml');
            }),
            Attributes\TextAttribute::make('condition'),
            Attributes\BelongsToAttribute::make('work_id')
                ->setRelationName('work')
                ->setRelationManager(WorkManager::class)
                ->setRequired(true),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
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;
        }
1217005
public function getAttributeValues($filterNull = true){
        $returnValue = array();
        foreach($this->attributes as $name => $attribute){
            if(!$filterNull || !$attribute->isNull()){
                $returnValue[$name] = $attribute->getValue();
            }
        }
        return $returnValue;
    }
630821
public function getAttributes()
    {
        $attributes = array_merge(
            parent::getAttributes(),
            $this->getDataAttributes()
        );
        
        if ($this->isMultiple()) {
            $attributes['multiple'] = true;
            $attributes['name'] = $this->getMultipleName();
        }
        
        if (!isset($attributes['data-placeholder'])) {
            $attributes['data-placeholder'] = $this->getEmptyString();
        }
        
        return $attributes;
    }
272632
public function getAttributes($asString = false)
    {
        if ($asString) {
            return self::getAttributesString($this->attributes);
        } else {
            return $this->attributes;
        }
    }
362970
public function getAttributes()
    {
        $emulated = [
            'params' => $this->params,
            'webroot' => $this->webroot,
            'base' => $this->base,
            'here' => $this->here
        ];

        return $this->attributes + $emulated;
    }