public function readAction() { $collection = new Collection($this->_class); if ($this->_getParam('id')) { $collection->having(ObjectUri::IDENTIFIER)->equals($this->_getParam('id')); $collection->setBoundaryBatch(1)->find(); if ($collection->getTotalMembers() == 1) { $form = new FormComponent($collection->getMember(Collection::POS_FIRST)); $form->register(); } } else { $list = new ListComponent($collection); $list->addRowAction($_SERVER['REQUEST_URI'], 'Read', array('icon' => 'tool-blue')); $list->register(); } }