Example #1
0
 /**
  * @param $format
  * @return $this
  */
 function set_collection_format($format)
 {
     if (!$this->with_model()) {
         return;
     }
     $base_format = 'editor';
     $format = $base_format . '.' . $format;
     if ($this->collection->has_format($format)) {
         $this->collection->set_format($format);
     }
     /*
     // @fixme prevent 'editor' base format
     } elseif ($this->collection->has_format($base_format)) {
         $this->collection->set_format($base_format);
     }
     */
     return $this;
 }