/var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/me-tools/src/View/Helper
NameSizeModeActions
AddButtonClassesTrait.php24000644editdlrm
BreadcrumbsHelper.php39780644editdlrm
DropdownHelper.php40920644editdlrm
FormHelper.php134400644editdlrm
HtmlHelper.php109430644editdlrm
IconHelper.php32180644editdlrm
LibraryHelper.php59250644editdlrm
PaginatorHelper.php36080644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/me-tools/src/View/Helper/DropdownHelper.php (4092B)
* $this->Dropdown->start('My dropdown'); * $this->Dropdown->link('First link', '/first'); * $this->Dropdown->link('Second link', '/second'); * echo $this->Dropdown->end(); * * @property \MeTools\View\Helper\HtmlHelper $Html */ class DropdownHelper extends Helper { /** * Helpers * @var array */ public $helpers = ['MeTools.Html']; /** * @var string */ protected string $_start; /** * @var string */ protected string $_id; /** * @var string[] */ protected array $_links = []; /** * Creates an HTML link for the dropdown. * * See the parent method for all available options. * @param array|string $title The content to be wrapped by `` tags. Can be an array if `$url` is `null`. If * `$url` is `null`, `$title` will be used as both the URL and title * @param array|string|null $url Cake-relative URL or array of URL parameters, or external URL (starts with http://) * @param array $options Array of options and HTML attributes * @return void */ public function link($title, $url = null, array $options = []): void { $options = $this->addClass($options, 'dropdown-item'); $this->_links[] = $this->Html->link($title, $url, $options); } /** * Starts a dropdown. * * It will subsequently capture links created with the `link()` method until the `end()` method is called. * * `$title` and `$titleOptions` arguments are about the link that allows the opening of the dropdown menu. * @param string $title Title for the opening link * @param array $titleOptions HTML attributes and options for the opening link * @return void */ public function start(string $title, array $titleOptions = []): void { $this->_id = uniqid('dropdown_'); $titleOptions += [ 'aria-expanded' => 'false', 'data-bs-toggle' => 'dropdown', 'id' => $this->_id, ]; $titleOptions = $this->addClass($titleOptions, 'dropdown-toggle'); $this->_start = $this->Html->link($title, '#', $titleOptions); } /** * Closes the dropdown and returns its entire code. * * `$ulOptions` argument is about the list of the dropdown menu. * @param array $ulOptions HTML attributes and options for the wrapper `