Init attributes used into ES.

@return \Smile\ElasticsuiteCatalog\Model\Eav\Indexer\Fulltext\Datasource\AbstractAttributeData
542171
private function initAttributes()
    {
        $attributeCollection = $this->attributeHelper->getAttributeCollection();
        $this->resourceModel->addIndexedFilterToAttributeCollection($attributeCollection);

        foreach ($attributeCollection as $attribute) {
            if ($this->canIndexAttribute($attribute)) {
                $attributeId = (int) $attribute->getId();
                $this->attributesById[$attributeId] = $attribute;
                $this->attributeIdsByTable[$attribute->getBackendTable()][] = $attributeId;

                $this->initField($attribute);
            }

            if ($attribute->getAttributeCode() === 'sku') {
                // SKU has no backend table.
                $this->initField($attribute);
            }
        }

        return $this;
    }
603920
protected function initData()
    {
        if ($this->data !== null) {
            return;
        }

        if ($this->value !== null) {
            $this->data = $this->value;
            return;
        }

        if ($this->model instanceof Model) {
            $data = ($this->model->hasProperty($this->attribute) || isset($this->model->{$this->attribute}))
                ? ArrayHelper::getValue($this->model, $this->attribute, [])
                : [];

            if (!is_array($data) && empty($data)) {
                return;
            }

            if (!($data instanceof \Traversable)) {
                $data = (array) $data;
            }

            foreach ($data as $index => $value) {
                $this->data[$index] = $value;
            }
        }
    }
420044
protected function Init()
    {
        $htmlCode = ContentHtmlCode::Schema()->ByContent($this->content);
        $this->code= $htmlCode->GetCode();
        return parent::Init();
    }
318122
public function initSettingsData()
    {
        $this->html_allow_empty_tags = $this->defaultHtmlAllowEmptyTags;
        $this->html_allow_tags = $this->defaultHtmlAllowTags;
        $this->html_no_wrap_tags = $this->defaultHtmlNoWrapTags;
        $this->html_remove_tags = $this->defaultHtmlRemoveTags;
        $this->html_line_breaker_tags = $this->defaultHtmlLineBreakerTags;
        $this->html_custom_styles = File::get(base_path().'/modules/backend/models/editorsetting/default_styles.less');
        $this->html_style_image = $this->makeStylesForTable($this->defaultHtmlStyleImage);
        $this->html_style_link = $this->makeStylesForTable($this->defaultHtmlStyleLink);
        $this->html_style_paragraph = $this->makeStylesForTable($this->defaultHtmlStyleParagraph);
        $this->html_style_table = $this->makeStylesForTable($this->defaultHtmlStyleTable);
        $this->html_style_table_cell = $this->makeStylesForTable($this->defaultHtmlStyleTableCell);
    }
1126542
protected function Init()
    {
        $select = ContentSelect::Schema()->ByContent($this->Content());
        $disableValidation = $select->GetDisableFrontendValidation();
        $this->label = $select->GetLabel();
        $this->name = $select->GetName();
        $this->required = $disableValidation ? false : $select->GetRequired();
        $this->value = $this->Value($this->name, $select->GetValue());
        $this->id = $this->CssID() ? $this->CssID(): $this->name;
        $list = new SelectListProvider($select);
        $this->options = $list->ToArray();
        $this->RealizeField($this->name);
        return parent::Init();
    }
1057987
public function getAttributes()
    {
        if ($this->hasSourceComponent()) {
            
            $attributes = $this->SourceComponent()->getAttributes();
            
            if ($this->StyleID) {
                $attributes['id'] = $this->StyleID;
            }
            
            if ($this->StyleClasses) {
                $attributes['class'] .= sprintf(' %s', $this->StyleClasses);
            }
            
            return $attributes;
            
        }
        
        return parent::getAttributes();
    }
1074273
public function init()
    {
        parent::init();

        $this->visible = Yii::$app->user->can('access-subclients');
        if (!$this->visible) {
            return null;
        }

        if (!$this->sortAttribute) {
            $this->sortAttribute = $this->nameAttribute;
        }
        if ($this->value === null) {
            $this->value = function ($model) {
                if (Yii::$app->user->identity->hasSeller($model->{$this->idAttribute})) {
                    return $model->{$this->nameAttribute};
                } else {
                    return Html::a($model->{$this->nameAttribute}, ['@client/view', 'id' => $model->{$this->idAttribute}]);
                }
            };
        }
        if (!empty($this->grid->filterModel)) {
            if (!isset($this->filterInputOptions['id'])) {
                $this->filterInputOptions['id'] = $this->attribute;
            }
            if ($this->filter === null && strpos($this->attribute, '_like') === false) {
                $this->filter = $this->getDefaultFilter();
            }
        }

        return true;
    }
102452
final public function init()
    {
        $sm = $this->getServiceLocator();
        $config = $sm->get($this->moduleService)->config();
        if (array_key_exists('*', $config)) {
            // Inject form instance if * is closure
            if (is_object($config['*']) && $config['*'] instanceof \Closure) {
                $form = $config['*']($this);
            }
        }
        $this->initialize();
        // Initialize form elements
        foreach ($this->getFormElements() as $element) {
            $elementOptions = array();
            if (array_key_exists($element['name'], $this->formElementOptions)) {
                $elementOptions = $this->formElementOptions[$element['name']];
            }
            // Add id attribute for each element
            if (!array_key_exists('attributes', $element)) {
                $element['attributes'] = array();
                $element['attributes'] ['id'] = $element['name'];
            } else {
                $element['attributes'] ['id'] = $element['name'];
            }
            $this->add($element, $elementOptions);
        }
        return $this;
    }
328928
protected function Init()
    {
        $contentContainer = ContentContainer::Schema()->ByContent($this->content);
        $tree = new ContainerContentTreeProvider($contentContainer->GetContainer());
        
        $renderer = new ContentsRenderer($tree->TopMost(), $tree);
        $this->contents = $renderer->Render();
        return parent::Init();
    }
1208052
function getAttributes() {
		if (!isset($this->attributes)) {
			$this->attributes = new Table\Attributes($this);
		}
		return $this->attributes;
	}
12993
protected function initTypes()
    {
        foreach ($this->result->getFieldNames() as $index => $name) {
            $type = $this->result->getFieldType($name);

            if ($type === null) {
                $type = 'text';
            }

            $this->types[$name] = $type;
            $this->converters[$name] = $this
                ->session
                ->getClientUsingPooler('converter', $type)
            ;
        }

        return $this;
    }
999695
protected function Init()
    {
        $sql = Access::SqlBuilder();
        $tbl = Membergroup::Schema()->Table();
        $order = $sql->OrderList($sql->OrderAsc($tbl->Field('Name')));
        $this->groups = Membergroup::Schema()->Fetch(false, null, $order);
        return parent::Init();
    }
934602
public function init()
    {
        Craft::setAlias('@NerdsAndCompany/Schematic', __DIR__);

        $config = [
            'components' => [
                'elementIndexMapper' => [
                    'class' => ElementIndexMapper::class,
                ],
                'emailSettingsMapper' => [
                    'class' => EmailSettingsMapper::class,
                ],
                'generalSettingsMapper' => [
                    'class' => GeneralSettingsMapper::class,
                ],
                'modelMapper' => [
                    'class' => ModelMapper::class,
                ],
                'pluginMapper' => [
                    'class' => PluginMapper::class,
                ],
                'userSettingsMapper' => [
                    'class' => UserSettingsMapper::class,
                ],
            ],
            'dataTypes' => [
                'plugins' => PluginDataType::class,
                'sites' => SiteDataType::class,
                'volumes' => VolumeDataType::class,
                'assetTransforms' => AssetTransformDataType::class,
                'emailSettings' => EmailSettingsDataType::class,
                'fields' => FieldDataType::class,
                'generalSettings' => GeneralSettingsDataType::class,
                'sections' => SectionDataType::class,
                'globalSets' => GlobalSetDataType::class,
                'categoryGroups' => CategoryGroupDataType::class,
                'tagGroups' => TagGroupDataType::class,
                'userGroups' => UserGroupDataType::class,
                'userSettings' => UserSettingsDataType::class,
                'elementIndexSettings' => ElementIndexDataType::class,
            ],
        ];

        Craft::configure($this, $config);

        parent::init();
    }
538243
protected function Init()
    {
        $html = ContentHtml::Schema()->ByContent($this->content);
        $this->html = $html->GetHtml();
        return parent::Init();
    }
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(),
        ];
    }
878469
private function getDefaultAttributes()
    {
        $attributes = ['id'];
        foreach ($this->entity->getAttributes() as $name => $attribute) {
            /* @var AbstractAttribute $attribute */
            if ($attribute->getToArrayDefault()) {
                $attributes[] = $name;
            }
        }

        return $this->arr($attributes)->implode(',')->val();
    }
1003281
protected function prepareAttributes()
    {

        // load the subject
        $subject = $this->getSubject();

        // load the ID of the product that has been created recently
        $lastEntityId = $subject->getLastEntityId();

        try {
            // load the category for the found path
            $category = $this->getCategoryByPath($this->path);

            // return the prepared category product relation
            return $this->initializeEntity(
                array(
                    MemberNames::CATEGORY_ID => $category[MemberNames::ENTITY_ID],
                    MemberNames::PRODUCT_ID  => $lastEntityId,
                    MemberNames::POSITION    => 0
                )
            );
        } catch (\Exception $e) {
            // query whether or not debug mode has been enabled
            if ($subject->isDebugMode()) {
                $subject->getSystemLogger()->warning($subject->appendExceptionSuffix($e->getMessage()));
            } else {
                throw $e;
            }
        }
    }