Пример #1
0
 /**
  * Setter for the record for this controller.
  *
  * @param Alpha\Model\ActiveRecord $record
  *
  * @since 1.0
  */
 public function setRecord($record)
 {
     self::$logger->debug('>>setRecord(record=[' . var_export($record, true) . '])');
     $this->record = $record;
     // if the record has tags, use these as the meta keywords for this controller
     if ($this->record->isTagged()) {
         $tags = $this->record->getPropObject('tags')->getRelatedObjects();
         $keywords = '';
         if (count($tags) > 0) {
             foreach ($tags as $tag) {
                 $keywords .= ',' . $tag->get('content');
             }
         }
         $this->setKeywords(mb_substr($keywords, 1));
     }
     self::$logger->debug('<<setRecord');
 }