Exemplo n.º 1
0
 /**
  * @return Closure
  */
 private function getMetaReverseTransformFunction()
 {
     return function ($metaData) {
         $metaId = null ? null : (int) $metaData['id'];
         if ($metaId === null || !$this->meta[$metaId] instanceof Meta) {
             return new Meta($metaData['keywords'], $metaData['keywordsOverwrite'], $metaData['description'], $metaData['descriptionOverwrite'], $metaData['title'], $metaData['titleOverwrite'], $metaData['url'], $metaData['urlOverwrite'], array_key_exists('custom', $metaData) ? $metaData['custom'] : null, ['seo_index' => SEOIndex::fromString($metaData['SEOIndex']), 'seo_follow' => SEOFollow::fromString($metaData['SEOFollow'])], $metaData['id'] = $metaId);
         }
         $this->meta[$metaId]->update($metaData['keywords'], $metaData['keywordsOverwrite'], $metaData['description'], $metaData['descriptionOverwrite'], $metaData['title'], $metaData['titleOverwrite'], $metaData['url'], $metaData['urlOverwrite'], array_key_exists('custom', $metaData) ? $metaData['custom'] : null, ['seo_index' => SEOIndex::fromString($metaData['SEOIndex']), 'seo_follow' => SEOFollow::fromString($metaData['SEOFollow'])]);
         return $this->meta[$metaId];
     };
 }
Exemplo n.º 2
0
 /**
  * @return SEOIndex|null
  */
 public function getSEOIndex()
 {
     if (!$this->hasSEOIndex()) {
         return;
     }
     return SEOIndex::fromString($this->data['seo_index']);
 }