Skip to content

Commit

Permalink
Change Controller and Model to Admin variants
Browse files Browse the repository at this point in the history
  • Loading branch information
HLeithner committed Jul 12, 2023
1 parent 9a92b3c commit f333071
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Joomla\Component\Menus\Administrator\Controller;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Controller\AdminController;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand All @@ -22,7 +22,7 @@
*
* @since 1.6
*/
class MenusController extends BaseController
class MenusController extends AdminController
{
/**
* Display the view
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_menus/src/Model/MenuModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Model\FormModel;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
Expand All @@ -29,7 +29,7 @@
*
* @since 1.6
*/
class MenuModel extends FormModel
class MenuModel extends AdminModel
{
/**
* The prefix to use with controller messages.
Expand Down Expand Up @@ -295,10 +295,10 @@ public function save($data)
*
* @since 1.6
*/
public function delete($itemIds)
public function delete(&$pks)
{
// Sanitize the ids.
$itemIds = ArrayHelper::toInteger((array) $itemIds);
$itemIds = ArrayHelper::toInteger((array) $pks);

// Get a group row instance.
$table = $this->getTable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected function getListQuery()
*
* @since 1.6
*/
protected function populateState($ordering = 'a.title', $direction = 'asc')
protected function populateState($ordering = 'a.ordering', $direction = 'asc')
{
$search = $this->getUserStateFromRequest($this->context . '.search', 'filter_search');
$this->setState('filter.search', $search);
Expand Down

0 comments on commit f333071

Please sign in to comment.