We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 4 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class ArticlesController extends PluginHandler implements Installable |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Return the icon associated with this plugin. |
||
| 23 | */ |
||
| 24 | public function icon() |
||
| 25 | { |
||
| 26 | return 'fa-file-text'; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Return the version for this plugin. |
||
| 31 | */ |
||
| 32 | public function version() |
||
| 33 | { |
||
| 34 | return '1.1'; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * The steps required for this plugin product to fully |
||
| 39 | * integrate into the webservice. |
||
| 40 | * |
||
| 41 | * @return bool |
||
| 42 | */ |
||
| 43 | public function install() |
||
| 44 | { |
||
| 45 | /** @var Page $page */ |
||
| 46 | $page = app(Page::class); |
||
| 47 | |||
| 48 | $page->seo_title = 'News'; |
||
| 49 | $page->slug = 'news'; |
||
| 50 | $page->enabled = true; |
||
| 51 | $page->sitemap = false; |
||
| 52 | $page->plugin = $this->pluginName(); |
||
| 53 | |||
| 54 | // status of the operation |
||
| 55 | return $page->save(); |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * The steps required for this plugin product to fully |
||
| 60 | * remove itself from the webservice. |
||
| 61 | * |
||
| 62 | * @return bool |
||
| 63 | * @throws \Exception |
||
| 64 | */ |
||
| 65 | public function uninstall() |
||
| 75 | } |
||
| 76 | } |
||
| 77 |