Documentation.php
48 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Type\Url; |
| 4 | |
| 5 | use AC\Type; |
| 6 | |
| 7 | class Documentation implements Type\Url { |
| 8 | |
| 9 | use Path; |
| 10 | |
| 11 | const URL = 'https://docs.admincolumns.com'; |
| 12 | |
| 13 | const ARTICLE_ACTIONS_FILTERS = '/article/15-hooks-and-filters'; |
| 14 | const ARTICLE_INLINE_EDITING = '/article/27-how-to-use-inline-editing'; |
| 15 | const ARTICLE_SORTING = '/article/34-how-to-enable-sorting'; |
| 16 | const ARTICLE_LOCAL_STORAGE = '/article/58-how-to-setup-local-storage'; |
| 17 | const ARTICLE_SMART_FILTERING = '/article/61-how-to-use-smart-filtering'; |
| 18 | const ARTICLE_BULK_EDITING = '/article/67-how-to-use-bulk-editing'; |
| 19 | const ARTICLE_ENABLE_EDITING = '/article/68-enable-editing-for-custom-field-columns'; |
| 20 | const ARTICLE_EXPORT = '/article/69-how-to-use-export'; |
| 21 | const ARTICLE_QUICK_ADD = '/article/71-how-to-use-quick-add'; |
| 22 | const ARTICLE_COLUMN_SETS = '/article/72-how-to-create-column-sets'; |
| 23 | const ARTICLE_SAVED_FILTERS = '/article/73-how-to-use-saved-filters'; |
| 24 | const ARTICLE_SHOW_ALL_SORTING_RESULTS = '/article/86-show-all-results-when-sorting'; |
| 25 | const ARTICLE_UPGRADE_V3_TO_V4 = '/article/91-how-to-upgrade-from-v3-to-v4'; |
| 26 | |
| 27 | /** |
| 28 | * @param string $path |
| 29 | */ |
| 30 | public function __construct( $path = null ) { |
| 31 | if ( $path ) { |
| 32 | $this->set_path( $path ); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | public function get_url() { |
| 37 | return self::URL . $this->get_path(); |
| 38 | } |
| 39 | |
| 40 | public static function create_with_path( $path ) { |
| 41 | return new self( $path ); |
| 42 | } |
| 43 | |
| 44 | public function __toString() { |
| 45 | return $this->get_url(); |
| 46 | } |
| 47 | |
| 48 | } |