27505f7501
Completes the MokoJoomCross → MokoSuiteCross rebrand across all language string keys, Joomla event names, documentation, and wiki pages. - 1,151 language key references renamed (COM_, PLG_, PKG_ prefixes) - Event names renamed (onMokoJoomCross* → onMokoSuiteCross*) - CLAUDE.md, CHANGELOG.md, wiki docs updated - Zero mokojoomcross references remaining in codebase Closes #128, closes #138
60 lines
1.6 KiB
PHP
60 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @package MokoSuiteCross
|
|
* @subpackage com_mokosuitecross
|
|
* @author Moko Consulting <hello@mokoconsulting.tech>
|
|
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
|
* @license GNU General Public License version 3 or later; see LICENSE
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
namespace Joomla\Component\MokoSuiteCross\Administrator\View\Post;
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Language\Text;
|
|
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
|
use Joomla\CMS\Router\Route;
|
|
use Joomla\CMS\Toolbar\Toolbar;
|
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
|
|
|
class HtmlView extends BaseHtmlView
|
|
{
|
|
protected $form;
|
|
protected $item;
|
|
|
|
public function display($tpl = null): void
|
|
{
|
|
$this->form = $this->get('Form');
|
|
$this->item = $this->get('Item');
|
|
|
|
$this->addToolbar();
|
|
|
|
parent::display($tpl);
|
|
}
|
|
|
|
protected function addToolbar(): void
|
|
{
|
|
$isNew = empty($this->item->id);
|
|
|
|
ToolbarHelper::title(
|
|
'MokoSuiteCross — ' . ($isNew ? Text::_('COM_MOKOSUITECROSS_NEW_POST') : Text::_('COM_MOKOSUITECROSS_EDIT_POST')),
|
|
'share-alt'
|
|
);
|
|
|
|
ToolbarHelper::apply('post.apply');
|
|
ToolbarHelper::save('post.save');
|
|
|
|
$toolbar = Toolbar::getInstance('toolbar');
|
|
$toolbar->appendButton(
|
|
'Link',
|
|
'home',
|
|
'COM_MOKOSUITECROSS_SUBMENU_DASHBOARD',
|
|
Route::_('index.php?option=com_mokosuitecross&view=dashboard', false)
|
|
);
|
|
|
|
ToolbarHelper::cancel('post.cancel');
|
|
}
|
|
}
|