public function init()
 {
     // Prepare rendering
     $this->set->prepareRendering(Set::MODE_EXPORT);
     if (!$this->entitiesPerPage) {
         $this->entitiesPerPage = $this->set->config->asFilter('ListPage')->get('setsPerPage', 0);
     }
     // Check whether search is available
     if ($this->set->getCapabilities()->search && $this->searchAvailable) {
         $searchable = false;
         foreach ($this->set->contents as $content) {
             if ($content->searchable) {
                 $searchable = true;
                 break;
             }
         }
         if ($this->searchAvailable && !$searchable) {
             $this->searchAvailable = false;
         }
     } else {
         $this->searchAvailable = false;
     }
 }
 public function init()
 {
     $this->pageUrl = $this->task->module->getRouteUrl('list-sets', array('type' => $this->type)) . '?';
     // Prepare rendering
     $this->set->prepareRendering(Set::MODE_LIST);
     if (!$this->entitiesPerPage) {
         $this->entitiesPerPage = $this->set->config->asFilter('ListPage')->get('setsPerPage', 10);
     }
     // Check whether search is available
     if ($this->set->getCapabilities()->search && $this->searchAvailable) {
         $searchable = false;
         foreach ($this->set->contents as $content) {
             if ($content->searchable) {
                 $searchable = true;
                 break;
             }
         }
         if ($this->searchAvailable && !$searchable) {
             $this->searchAvailable = false;
         }
     } else {
         $this->searchAvailable = false;
     }
 }