Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
use Joomla\Component\Actionlogs\Administrator\Model\ActionlogsModel;
Expand Down Expand Up @@ -134,7 +133,7 @@ public function display($tpl = null)
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'icon-list-2');
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

$toolbar->standardButton('download', 'COM_ACTIONLOGS_EXPORT_CSV', 'actionlogs.exportSelectedLogs')
->icon('icon-download')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Admin\Administrator\Model\SysinfoModel;

Expand Down Expand Up @@ -111,7 +110,7 @@ public function display($tpl = null): void
protected function addToolbar(): void
{
ToolbarHelper::title(Text::_('COM_ADMIN_SYSTEM_INFORMATION'), 'info-circle systeminfo');
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();
$toolbar->linkButton('download', 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT')
->url(Route::_('index.php?option=com_admin&view=sysinfo&format=text&' . Session::getFormToken() . '=1'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;
use Joomla\Component\Associations\Administrator\Model\AssociationModel;
Expand Down Expand Up @@ -358,7 +357,7 @@ protected function addToolbar(): void
'language assoc'
);

$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();
$toolbar->customButton('reference')
->html('<joomla-toolbar-button><button onclick="Joomla.submitbutton(\'reference\')" '
. 'class="btn btn-success"><span class="icon-save" aria-hidden="true"></span>'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
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;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;

Expand Down Expand Up @@ -268,7 +267,7 @@ protected function addToolbar()
ToolbarHelper::title(Text::_('COM_ASSOCIATIONS_TITLE_LIST_SELECT'), 'language assoc');
}

$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

if ($user->authorise('core.admin', 'com_associations') || $user->authorise('core.options', 'com_associations')) {
if (!isset($this->typeName)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function addToolbar(): void
$userId = $user->id;
$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $userId);
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Since we don't track these assets at the item level, use the category id.
$canDo = ContentHelper::getActions('com_banners', 'category', $this->item->catid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Banners\Administrator\Model\BannersModel;
use Joomla\Registry\Registry;
Expand Down Expand Up @@ -142,7 +141,7 @@ protected function addToolbar(): void
{
$canDo = ContentHelper::getActions('com_banners', 'category', $this->state->get('filter.category_id'));
$user = $this->getCurrentUser();
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_('COM_BANNERS_MANAGER_BANNERS'), 'bookmark banners');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected function addToolbar(): void
$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $user->id);
$canDo = $this->canDo;
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(
$isNew ? Text::_('COM_BANNERS_MANAGER_CLIENT_NEW') : Text::_('COM_BANNERS_MANAGER_CLIENT_EDIT'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Banners\Administrator\Model\ClientsModel;

Expand Down Expand Up @@ -124,7 +123,7 @@ public function display($tpl = null): void
protected function addToolbar(): void
{
$canDo = ContentHelper::getActions('com_banners');
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_('COM_BANNERS_MANAGER_CLIENTS'), 'bookmark banners-clients');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Banners\Administrator\Model\TracksModel;

Expand Down Expand Up @@ -124,7 +123,7 @@ public function display($tpl = null): void
protected function addToolbar(): void
{
$canDo = ContentHelper::getActions('com_banners', 'category', $this->state->get('filter.category_id'));
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_('COM_BANNERS_MANAGER_TRACKS'), 'bookmark banners-tracks');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Cache\Administrator\Model\CacheModel;

Expand Down Expand Up @@ -126,7 +125,7 @@ protected function addToolbar(): void
ToolbarHelper::title(Text::_('COM_CACHE_CLEAR_CACHE'), 'bolt clear');

// Get the toolbar object instance
$toolbar = Toolbar::getInstance('toolbar');
$toolbar = $this->getDocument()->getToolbar();

if (\count($this->data)) {
$toolbar->delete('delete')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Filesystem\Path;

Expand Down Expand Up @@ -168,7 +167,7 @@ protected function addToolbar()
$section = $this->state->get('filter.section');
$canDo = ContentHelper::getActions($component, 'category', $categoryId);
$user = $this->getCurrentUser();
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Avoid nonsense situation.
if ($component == 'com_categories') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected function addToolbar()

$user = $this->getCurrentUser();
$userId = $user->id;
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $userId);
Expand Down Expand Up @@ -336,7 +336,7 @@ protected function addModalToolbar()
$user = $this->getCurrentUser();
$userId = $user->id;
$isNew = ($this->item->id == 0);
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Avoid nonsense situation.
if ($extension == 'com_categories') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -123,7 +122,7 @@ public function display($tpl = null)
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_CHECKIN_GLOBAL_CHECK_IN'), 'check-square');
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

if (!$this->isEmptyState) {
$toolbar->checkin('checkin');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Config\Administrator\Helper\ConfigHelper;

Expand Down Expand Up @@ -138,7 +137,7 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_('COM_CONFIG_GLOBAL_CONFIGURATION'), 'cog config');
$toolbar->apply('application.apply');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Config\Administrator\Helper\ConfigHelper;

Expand Down Expand Up @@ -134,7 +133,7 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_($this->component->option . '_configuration'), 'cog config');
$toolbar->apply('component.apply');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function addToolbar()
$userId = $user->id;
$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $userId);
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Since we don't track these assets at the item level, use the category id.
$canDo = ContentHelper::getActions('com_contact', 'category', $this->item->catid);
Expand Down Expand Up @@ -218,7 +218,7 @@ protected function addModalToolbar()
$user = $this->getCurrentUser();
$userId = $user->id;
$isNew = ($this->item->id == 0);
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Since we don't track these assets at the item level, use the category id.
$canDo = ContentHelper::getActions('com_contact', 'category', $this->item->catid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -140,7 +139,7 @@ protected function addToolbar()
$user = $this->getCurrentUser();

// Get the toolbar object instance
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_('COM_CONTACT_MANAGER_CONTACTS'), 'address-book contact');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected function addToolbar()
$userId = $user->id;
$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $userId);
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Built the actions for new and existing records.
$canDo = $this->canDo;
Expand Down Expand Up @@ -261,7 +261,7 @@ protected function addModalToolbar()
$userId = $user->id;
$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $userId);
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Build the actions for new and existing records.
$canDo = $this->canDo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
Expand Down Expand Up @@ -171,7 +170,7 @@ protected function addToolbar()
{
$canDo = ContentHelper::getActions('com_content', 'category', $this->state->get('filter.category_id'));
$user = $this->getCurrentUser();
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_('COM_CONTENT_ARTICLES_TITLE'), 'copy article');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
Expand Down Expand Up @@ -137,7 +136,7 @@ protected function addToolbar()
{
$canDo = ContentHelper::getActions('com_content', 'category', $this->state->get('filter.category_id'));
$user = $this->getCurrentUser();
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

ToolbarHelper::title(Text::_('COM_CONTENT_FEATURED_TITLE'), 'star featured');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Filter\OutputFilter;

Expand Down Expand Up @@ -61,7 +60,7 @@ public function display($tpl = null)
{
$app = Factory::getApplication();
$dashboard = $app->getInput()->getCmd('dashboard', '');
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

$position = OutputFilter::stringURLSafe($dashboard);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function addToolbar()
$section = $this->state->get('field.section');
$userId = $this->getCurrentUser()->id;
$canDo = $this->canDo;
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

$isNew = ($this->item->id == 0);
$checkedOut = !(\is_null($this->item->checked_out) || $this->item->checked_out == $userId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Filesystem\Path;
Expand Down Expand Up @@ -127,7 +126,7 @@ protected function addToolbar()
$component = $this->state->get('filter.component');
$section = $this->state->get('filter.section');
$canDo = ContentHelper::getActions($component, 'field', $fieldId);
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

// Avoid nonsense situation.
if ($component == 'com_fields') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected function addToolbar()

$component = '';
$parts = FieldsHelper::extract($this->state->get('filter.context'));
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

if ($parts) {
$component = $parts[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Filesystem\Path;
Expand Down Expand Up @@ -120,7 +119,7 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();
$groupId = $this->state->get('filter.group_id');
$component = '';
$parts = FieldsHelper::extract($this->state->get('filter.context'));
Expand Down
Loading