Esempio n. 1
0
 /**
  * @param Item\AbstractItem $item
  * @return boolean
  */
 public function isRenderable(Item\AbstractItem $item)
 {
     if (!$item->isVisible()) {
         return false;
     }
     switch (true) {
         case $item instanceof Item\TextBlockItem:
             return $item->hasReference() || $item->isPresent();
             break;
         case $item instanceof Item\ImageBlockItem:
             return $item->isPresent();
             break;
         case $item instanceof Item\PageNumberItem:
             $page = $item->getParent();
             return $page->isCountable() && $item->isForReport();
             break;
         default:
             return true;
             break;
     }
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(Page $parent, array $format)
 {
     parent::__construct($parent, $format);
     $this->style = new TextStyle($format);
     $this->number_format = $this->format['format'];
 }
 public function __construct(Page $parent, array $format)
 {
     parent::__construct($parent, $format);
     $this->style = new GraphicStyle($format);
 }
Esempio n. 4
0
 /**
  * {@inheritdoc}
  */
 public function isTypeOf($type_name)
 {
     return parent::isTypeOf($type_name) || self::TYPE_NAME == $type_name;
 }