SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/Controllers/Admin/NoRecordsAdminController.php

  1. <?php
  2. /*
  3.  * Copyright (C) 2017 Karmabunny Pty Ltd.
  4.  *
  5.  * This file is a part of SproutCMS.
  6.  *
  7.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  8.  * of the GNU General Public License as published by the Free Software Foundation, either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * For more information, visit <http://getsproutcms.com>.
  12.  */
  13.  
  14. namespace Sprout\Controllers\Admin;
  15.  
  16.  
  17. /**
  18.  * Provides a base class for controllers which don't manage records, but are just a set of tools
  19.  */
  20. abstract class NoRecordsAdminController extends ManagedAdminController
  21. {
  22.  
  23. public function _getNavigation() { return ''; }
  24. public function _getTools() { return []; }
  25. public function _getContents()
  26. {
  27. throw new \BadFunctionCallException('Method implementation needed');
  28. }
  29.  
  30. public function _getAddForm() { return ''; }
  31. public function _getEditForm($item_id) { return ''; }
  32. public function _getDeleteForm($item_id) { return ''; }
  33.  
  34. public function _addSave(&$item_id) { return false; }
  35. public function _editSave($item_id) { return false; }
  36. public function _deleteSave($item_id) { return false; }
  37.  
  38. }
  39.