/**
  * {@inheritdoc}
  */
 public function getCacheKeys(BlockInterface $block)
 {
     return array('name' => $this->getName(), 'block_id' => $block->getId(), 'updated_at' => $block->getUpdatedAt()->format('U'));
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function getCacheKeys(BlockInterface $block)
 {
     return array('block_id' => $block->getId(), 'updated_at' => $block->getUpdatedAt() ? $block->getUpdatedAt()->format('U') : strtotime('now'));
 }
 /**
  * @param BlockInterface $block
  *
  * @return array
  */
 protected function createBlocks(BlockInterface $block)
 {
     $content = array();
     $content['id'] = $block->getId();
     $content['name'] = $block->getName();
     $content['enabled'] = $block->getEnabled();
     $content['position'] = $block->getPosition();
     $content['settings'] = $block->getSettings();
     $content['type'] = $block->getType();
     $content['created_at'] = $block->getCreatedAt()->format('U');
     $content['updated_at'] = $block->getUpdatedAt()->format('U');
     $content['blocks'] = array();
     foreach ($block->getChildren() as $child) {
         $content['blocks'][] = $this->createBlocks($child);
     }
     return $content;
 }