src/base/AbstractDriver.php
public function init()
    {
        $this->processShareData();

        $this->_data = ArrayHelper::merge([
            '{url}'         => $this->url,
            '{title}'       => $this->title,
            '{description}' => $this->description,
            '{imageUrl}'    => $this->imageUrl,
        ], $this->_data);

        $metaTags = $this->getMetaTags();

        if ($this->registerMetaTags && !empty($metaTags)) {
            $rawData = static::decodeData($this->_data);
            $view = Yii::$app->getView();

            foreach ($metaTags as $metaTag) {
                $metaTag['content'] = \strtr($metaTag['content'], $rawData);
                $view->registerMetaTag($metaTag, \md5(\implode(';', $metaTag)));
            }
        }
    }
public function init()
    {
        $this->processShareData();

        $this->_data = ArrayHelper::merge([
            '{url}'         => $this->url,
            '{title}'       => $this->title,
            '{description}' => $this->description,
            '{imageUrl}'    => $this->imageUrl,
        ], $this->_data);

        $metaTags = $this->getMetaTags();

        if ($this->registerMetaTags && !empty($metaTags)) {
            $rawData = static::decodeData($this->_data);
            $view = Yii::$app->getView();

            foreach ($metaTags as $metaTag) {
                $metaTag['content'] = \strtr($metaTag['content'], $rawData);
                $view->registerMetaTag($metaTag, \md5(\implode(';', $metaTag)));
            }
        }
    }
public function init ( ) { $ this -> processShareData ( ) ; $ this -> _data = ArrayHelper :: merge ( [ '{url}' => $ this -> url , '{title}' => $ this -> title , '{description}' => $ this -> description , '{imageUrl}' => $ this -> imageUrl , ] , $ this -> _data ) ; $ metaTags = $ this -> getMetaTags ( ) ; if ( $ this -> registerMetaTags && ! empty ( $ metaTags ) ) { $ rawData = static :: decodeData ( $ this -> _data ) ; $ view = Yii :: $ app -> getView ( ) ; foreach ( $ metaTags as $ metaTag ) { $ metaTag [ 'content' ] = \ strtr ( $ metaTag [ 'content' ] , $ rawData ) ; $ view -> registerMetaTag ( $ metaTag , \ md5 ( \ implode ( ';' , $ metaTag ) ) ) ; } } }
Prepare data data to insert into the link.
Prepare data data to insert into the link .