/** * Add the submenu item * @param string parent page slug */ private function addSubMenu($parent_slug) { add_submenu_page($parent_slug, $this->post_type_repo->getSubmenuText($this->post_type), $this->post_type_repo->getSubmenuText($this->post_type), 'edit_posts', $this->post_type_repo->getMenuSlug($this->post_type), Listing::admin_menu($this->post_type->name)); }
/** * Add the primary top-level menu item * @param int counter */ private function addMenu($c) { add_menu_page(__($this->post_type->labels->name), __($this->post_type->labels->name), $this->post_type->cap->edit_posts, $this->getSlug(), Listing::admin_menu($this->post_type->name), $this->menuIcon(), $this->menuPosition($c)); }