public function exec(array $data)
 {
     if (isset($data['images'])) {
         $images = $data['images'];
         unset($data['images']);
     }
     parent::exec($data);
     if (isset($images)) {
         foreach ($images as $image) {
             $this->addMeta('image', $image['url']);
             if (isset($image['width'])) {
                 $this->addMeta('image_width', $image['width']);
             }
             if (isset($image['height'])) {
                 $this->addMeta('image_height', $image['height']);
             }
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Execute import job
  *
  * @param array $data data array
  * @return void
  */
 public function exec(array $data)
 {
     $url = $this->extractUrl($data);
     $this->frontend->html('canonical')->content($this->makeCanonical($url))->prependTo('head')->load();
     parent::exec($data);
 }