Orders the toolbar.

@param integer        $toolbar Which toolbar to use
@param array|callable $keys
@return void
427498
public function order($toolbar, $keys) {
        if(is_callable($keys)) {
            $this->addLazyOrder($toolbar, $keys);
        } else {
            $this->toolbars[$toolbar]->setOrder($keys);
        }
    }
925911
protected static function _createInnerIterator(ControllerToolbarInterface $toolbar)
    {
        $iterator = new \RecursiveArrayIterator($toolbar->getIterator());
        $iterator = new \RecursiveCachingIterator($iterator, \CachingIterator::TOSTRING_USE_KEY);

        return $iterator;
    }
1238501
protected function setServiceKeys($keys = [])
    {
        $allkeys = $this->getKeys();
        $serviceKey = $this->getCacheKey();

        $allkeys[$serviceKey] = $keys;

        CacheFacade::forever($this->cacheIndexKey, $allkeys);
    }
1051133
function () {
        var self = this;

        self.items().each(function (ctrl) {
          ctrl.classes.add('toolbar-item');
        });

        return self._super();
      }
1221935
public function setSidebar()
    {
        $this->sidebarItems = config('admin.sidebar');
        $responses = \Event::fire(new AfterSidebarSet($this->sidebarItems));
        if (is_array($responses)) {
            foreach ($responses as $response) {
                if (is_array($response)) {
                    $this->sidebarItems = array_merge($this->sidebarItems, $response);
                }
            }
        }
    }
287308
public function addToolbar($toolbar, $config = array())
    {
        if (!($toolbar instanceof ControllerToolbarInterface))
        {
            if (!($toolbar instanceof ObjectIdentifier))
            {
                //Create the complete identifier if a partial identifier was passed
                if (is_string($toolbar) && strpos($toolbar, '.') === false)
                {
                    $identifier = $this->getIdentifier()->toArray();
                    $identifier['path'] = array('controller', 'toolbar');
                    $identifier['name'] = $toolbar;

                    $identifier = $this->getIdentifier($identifier);
                }
                else $identifier = $this->getIdentifier($toolbar);
            }
            else $identifier = $toolbar;

            $config['controller'] = $this->getMixer();
            $toolbar = $this->getObject($identifier, $config);
        }

        if (!($toolbar instanceof ControllerToolbarInterface)) {
            throw new \UnexpectedValueException("Controller toolbar $identifier does not implement ControllerToolbarInterface");
        }

        //Store the toolbar to allow for name lookups
        $this->__toolbars[$toolbar->getType()] = $toolbar;

        if ($this->inherits(__NAMESPACE__.'\CommandMixin')) {
            $this->addCommandHandler($toolbar);
        }

        return $this->getMixer();
    }
938242
function Toolbar(props, context) {
	const { ui } = props;

	return <div className="tools">
			<FilterSelector ui={ ui } />
			<SortSelector ui={ ui } />
		</div>
}
607247
public function getToolbar($type = 'actionbar')
    {
        return isset($this->_toolbars[$type]) ? $this->_toolbars[$type] : null;
    }
568767
private function checkRequired(array $options, array $keys)
    {
        $missing = array_keys(array_diff_key(array_flip($keys), $options));

        if (!empty($missing)) {
            throw CommandException::missingOptions($missing);
        }
    }
712339
protected function _layoutBadge()
    {
        $context->commands = $this->getTemplate()->renderHelper('toolbar.commands', 'toolbar');

        $this->set(array(
            'commands' => $context->commands,
        ));
    }
1360658
public function orderBy($key, $direction = self::ORDER_ASC, $tableName = null)
    {
        if (!$tableName) {
            $tableName = $this->getTableName();
        }
        $this->orderBy[] = ['key' => $key, 'direction' => $direction, 'tableName' => $tableName];
        return $this;
    }
154419
public function select(array $keys)
    {
        $list = [];
        foreach ($keys as $key) {
            if ($this->containsKey($key)) {
                $list[$key] = $this->get($key);
            }
        }

        return $this->createFrom($list);
    }
231959
public function orderBy(string $key, string $direction)
    {
        if (str_contains($key, '.')) {
            $fullPath          = explode('.', $key);
            $relationPath      = implode('.', array_slice($fullPath, 0, -1));
            $relationKey       = last($fullPath);
            $result            = array_get($this->relations, $relationPath, ['filters' => [], 'sorts' => []]);
            $result['sorts'][] = new OrderBy($relationKey, $direction);
            array_set($this->relations, $relationPath, $result);
        } else {
            $this->sorts[] = new OrderBy($key, $direction);
        }
        return $this;
    }
168118
public function order($items)
	{
		$this->order = [];

		if (!empty($items)) {
			$this->addOrder($items);
		}

		return $this;
	}
1065239
public function addBarNode( $attributes = array(), $priority = 100 )
    {
        $defaultAttributes = [
            'id' => false,
            'title' => false,
            'parent' => false,
            'href' => false,
            'group' => false,
            'meta' => array(),
        ];

        $attributes = array_merge($defaultAttributes,$attributes);

        add_action('admin_bar_menu', function ($wpAdminBar) use ($attributes) {

            $wpAdminBar->add_node($attributes);

        }, $priority);
    }
1231705
public function exportOrders(OrderVisitor $orderVisitor, ProgressBar $bar): bool
    {
        $logger = $this->getLogger();

        $bar->start($count = count($orderVisitor));

        $logger->debug('Started the order export.', ['count' => $count]);

        foreach ($orderVisitor() as $num => $order) {
            set_time_limit(0);

            $this->exportOrder($order, $num);

            $bar->advance();
        }

        $logger->debug('Finished the order export.', ['count' => $count]);

        $bar->finish();

        return true;
    }
212009
public function setLocale($keys) {
		if (!setlocale(LC_ALL, $keys)) {
			exec('locale -a', $locales);
			$locales = implode("<br />", $locales);
			throw new \Exception(__METHOD__.'<br>setLocale() failed. These are the locales installed on this system:<br />'.$locales);
		}
	}