Example #1
0
 public function loadContents()
 {
     // strip excluded elements before loading book contents
     $contents = array();
     foreach ($this->app->book('contents') as $content) {
         if (!in_array($content['element'], $this->excludedElements)) {
             $contents[] = $content;
         }
     }
     $this->app->book('contents', $contents);
     parent::loadContents();
 }
Example #2
0
 public function loadContents()
 {
     // 'toc' content type makes no sense in epub books
     // 'cover' is a very special content for epub books
     $excludedElements = array('cover', 'toc', 'lot', 'lof');
     // strip 'toc' and 'cover' elements before loading book contents
     $contents = array();
     foreach ($this->app->book('contents') as $content) {
         if (!in_array($content['element'], $excludedElements)) {
             $contents[] = $content;
         }
     }
     $this->app->book('contents', $contents);
     parent::loadContents();
 }