Register seo meta tag

@param Component $model
@param string $modelSeoAttributeName
@param string $metaTagKey
@since x.x.x
975405
protected static function registerSeoMetaTag(Component $model, string $modelSeoAttributeName, string $metaTagKey)
	{
		$value = $model->{$modelSeoAttributeName};
		if ($value)
			Yii::$app->view->registerMetaTag(['name' => $metaTagKey, 'content' => $value], $metaTagKey);
	}
622035
function addPropertyToModelMeta(modelName, property, meta) {
    if (!exports.propertiesByModel[modelName]) {
        exports.propertiesByModel[modelName] = {};
    }
    // TODO: investigate why we need to genericize to model (from <T>)
    exports.propertiesByModel[modelName][property] = meta;
}
549603
protected static function behavior(Component $model)
    {
        foreach ($model->getBehaviors() as $b) {
            if ($b instanceof SeoBehavior) {
                return $b;
            }
        }

        throw new InvalidConfigException('Model ' . $model->className() . ' must have SeoBehavior');
    }
452957
private void applyDefinitionComponent(MarkupDocBuilder markupDocBuilder, String definitionName, Model model) {
        definitionComponent.apply(markupDocBuilder, DefinitionComponent.parameters(
                definitionName,
                model,
                2));
    }
91204
public function resolveForDisplay($model, $attribute = null)
    {
        try {
            parent::resolveForDisplay($model, $this->attribute.'_type');
        } catch (\Exception $e) {
            //
        }
 
        foreach ($this->meta['types'] as $index => $type) {
            $this->meta['types'][$index]['active'] =
                $this->mapToKey($type['value']) == $model->{$this->attribute . '_type'};

            foreach ($type['fields'] as $field) {
                try {
                    $field->resolveForDisplay($model->{$this->attribute});
                } catch (\Exception $e) {
                    //
                }
            }
        }
    }
562833
public Meta addTag(String theSystem, String theCode, String theDisplay) {
     addTag().setSystem(theSystem).setCode(theCode).setDisplay(theDisplay);
     return this;
    }
290811
public static function register($metaTags)
    {

        if ($metaTags instanceof \mrstroz\wavecms\metatags\models\MetaTags) {

            if ($metaTags->meta_title) {
                Yii::$app->view->title = $metaTags->meta_title;
            }

            if ($metaTags->meta_description) {
                Yii::$app->view->registerMetaTag([
                    'name' => 'description',
                    'content' => $metaTags->meta_description,
                ]);
            }

            if ($metaTags->meta_keywords) {
                Yii::$app->view->registerMetaTag([
                    'name' => 'keywords',
                    'content' => $metaTags->meta_keywords,
                ]);
            }

            Yii::$app->view->registerMetaTag([
                'name' => 'og:url',
                'content' => Yii::$app->request->absoluteUrl,
            ]);

            if ($metaTags->og_type) {
                Yii::$app->view->registerMetaTag([
                    'name' => 'og:type',
                    'content' => $metaTags->og_type,
                ]);
            }

            if ($metaTags->og_title) {
                Yii::$app->view->registerMetaTag([
                    'name' => 'og:title',
                    'content' => $metaTags->og_title,
                ]);
            }

            if ($metaTags->og_description) {
                Yii::$app->view->registerMetaTag([
                    'name' => 'og:description',
                    'content' => $metaTags->og_description,
                ]);
            }

            if ($metaTags->og_image) {
                Yii::$app->view->registerMetaTag([
                    'name' => 'og:image',
                    'content' => Url::base(true) . '/images/' . $metaTags->og_image
                ]);

                list($width, $height) = getimagesize('images/' . $metaTags->og_image);

                if ($width) {
                    Yii::$app->view->registerMetaTag([
                        'name' => 'og:image:width',
                        'content' => $width
                    ]);
                }

                if ($height) {
                    Yii::$app->view->registerMetaTag([
                        'name' => 'og:image:height',
                        'content' => $height
                    ]);
                }
            }
        }

    }
141833
public function updateDataKeyObj( $model, $meta ) {

		$data	= $model->getDataMeta( 'data' );
		$key	= $meta->key;
		$data	= !empty( $data ) ? $data : new \StdClass();

		$data->$key = $meta->value;

		$model->updateDataMeta( 'data', $data );

		$model->refresh();

		return $model;
	}
962405
public static function metaTag($name, $content)
    {
        if (self::$_page) {
            self::$_page->metaTag($name, $content);
        }
    }
361534
public function registerComponent($className, $code = null, $plugin = null)
    {
        if (!$this->classMap) {
            $this->classMap = [];
        }

        if (!$this->codeMap) {
            $this->codeMap = [];
        }

        if (!$code) {
            $code = Str::getClassId($className);
        }

        if ($code == 'viewBag' && $className != 'Cms\Components\ViewBag') {
            throw new SystemException(sprintf(
                'The component code viewBag is reserved. Please use another code for the component class %s.',
                $className
            ));
        }

        $className = Str::normalizeClassName($className);
        $this->codeMap[$code] = $className;
        $this->classMap[$className] = $code;
        if ($plugin !== null) {
            $this->pluginMap[$className] = $plugin;
        }
    }
1221606
def register_with_model(self, name, model):
        ''''''
        if self.name:
            raise FieldError('Field %s is already registered\
 with a model' % self)
        self.name = name
        self.attname = self.get_attname()
        self.model = model
        meta = model._meta
        self.meta = meta
        meta.dfields[name] = self
        meta.fields.append(self)
        if not self.primary_key:
            self.add_to_fields()
        else:
            model._meta.pk = self
85570
protected function addModel(ClassMetadataInfo $class, \SimpleXMLElement $model)
    {
        $fields = array();

        foreach ($model as $field) {
            /** @var \SimpleXMLElement $field */
            if ('field' === $field->getName()) {
                $fields[] = (string) $field['name'];
            } else {
                throw new \InvalidArgumentException(sprintf('Unable to parse tag "%s"', $field->getName()));
            }
        }

        $class->addModel((string) $model['manager'], (string) $model['name'], $fields, (isset($model['repository-method'])? (string) $model['repository-method'] : null));
    }
878599
private function register(Entity $meta): self
    {
        $this->mapping = $this->mapping->put((string) $meta->class(), $meta);

        return $this;
    }
945333
protected function registerMetadataService()
    {
        if ($this->getServiceLocator()->has(MetadataService::SERVICE_ID)) {
            $metadataService = $this->getServiceLocator()->get(MetadataService::SERVICE_ID);
        } else {
            $metadataService = $this->getServiceManager()->build(MetadataService::class);
        }
        $metadataService->setOption(MetadataService::IMPORTER_KEY, $this);
        $this->getServiceManager()->register(MetadataService::SERVICE_ID, $metadataService);
    }
1352722
@GetMapping
  public String viewTagWizard(
      @RequestParam(required = false, value = "selectedTarget") String target, Model model) {
    List<String> entityTypeIds =
        dataService
            .findAll(ENTITY_TYPE_META_DATA, EntityType.class)
            .filter(entityType -> !EntityTypeUtils.isSystemEntity(entityType))
            .map(EntityType::getId)
            .collect(toList());

    if (StringUtils.isEmpty(target)) {
      Optional<String> findFirst = entityTypeIds.stream().findFirst();
      if (findFirst.isPresent()) {
        target = findFirst.get();
      }
    }

    if (StringUtils.isEmpty(target)) {
      throw new IllegalStateException("There are no entities available!");
    }

    List<Ontology> ontologies = ontologyService.getOntologies();
    EntityType emd = dataService.getEntityType(target);
    List<Attribute> attributes = newArrayList(emd.getAttributes());
    Map<String, Multimap<Relation, OntologyTerm>> taggedAttributes =
        attributes
            .stream()
            .collect(
                toMap((Attribute::getName), (x -> ontologyTagService.getTagsForAttribute(emd, x))));

    model.addAttribute("entity", emd);
    model.addAttribute("entityTypeIds", entityTypeIds);
    model.addAttribute("attributes", attributes);
    model.addAttribute("ontologies", ontologies);
    model.addAttribute("taggedAttributes", taggedAttributes);
    model.addAttribute("relations", Relation.values());

    return VIEW_TAG_WIZARD;
  }
1306795
private void addNodeIndex(EntityMetadata entityMetadata, Node node, Index<Node> nodeIndex, MetamodelImpl metaModel)
    {
//        MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
//                entityMetadata.getPersistenceUnit());

        // ID attribute has to be indexed necessarily
        String idColumnName = ((AbstractAttribute) entityMetadata.getIdAttribute()).getJPAColumnName();
        nodeIndex.add(node, idColumnName, node.getProperty(idColumnName));

        // Index all other fields, for whom indexing is enabled
        for (Attribute attribute : metaModel.entity(entityMetadata.getEntityClazz()).getSingularAttributes())
        {
            Field field = (Field) attribute.getJavaMember();
            if (!attribute.isCollection() && !attribute.isAssociation()
                    && entityMetadata.getIndexProperties().keySet().contains(field.getName()))
            {
                String columnName = ((AbstractAttribute) attribute).getJPAColumnName();
                nodeIndex.add(node, columnName, node.getProperty(columnName));
            }
        }
    }
546545
private void addFacetNameToParentTag(UIComponentClassicTagBase parentTag, String facetName)
    {
        if (parentTag._facetsAdded == null)
        {
            parentTag._facetsAdded = new ArrayList<String>();
        }
        parentTag._facetsAdded.add(facetName);
    }