Plugin Directory

source: codepress-admin-columns/trunk/classes/Admin/PageCollection.php @ 2293580

Last change on this file since 2293580 was 2293580, checked in by tschutter, 5 years ago

trunk

File size: 358 bytes
Line 
1<?php
2
3namespace AC\Admin;
4
5use AC\Collection;
6
7class PageCollection extends Collection {
8
9        /**
10         * @return Page[]
11         */
12        public function all() {
13                return parent::all();
14        }
15
16        public function add( Page $page ) {
17                $this->put( $page->get_slug(), $page );
18
19                return $this;
20        }
21
22        /**
23         * @return Page
24         */
25        public function first() {
26                return parent::first();
27        }
28
29}
Note: See TracBrowser for help on using the repository browser.