/** * Initialize the item. * Generate the sub items of this item. */ public function init() { $collection = $this->get_collection(); // bail if this direction is disabled if ($this->get_direction_disabled()) { return; } // create subitem and its collection and assign it $html = $this->get_direction_html(); $page = $this->get_direction_page_number(); $subitems_collection = Carbon_Pagination_Item_Page::generate_single_subitem_collection($collection, $html, $page); $this->set_subitems_collection($subitems_collection); }