/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/View/Helper
NameSizeModeActions
BreadcrumbsHelper.php133670644editdlrm
FlashHelper.php32940644editdlrm
FormHelper.php953450644editdlrm
HtmlHelper.php399600644editdlrm
IdGeneratorTrait.php27220644editdlrm
NumberHelper.php92250644editdlrm
PaginatorHelper.php460730644editdlrm
TextHelper.php155030644editdlrm
TimeHelper.php154970644editdlrm
UrlHelper.php95240644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/View/Helper/IdGeneratorTrait.php (2722B)
*/ protected $_idSuffixes = []; /** * Clear the stored ID suffixes. * * @return void */ protected function _clearIds(): void { $this->_idSuffixes = []; } /** * Generate an ID attribute for an element. * * Ensures that id's for a given set of fields are unique. * * @param string $name The ID attribute name. * @param string $val The ID attribute value. * @return string Generated id. */ protected function _id(string $name, string $val): string { $name = $this->_domId($name); $suffix = $this->_idSuffix($val); return trim($name . '-' . $suffix, '-'); } /** * Generate an ID suffix. * * Ensures that id's for a given set of fields are unique. * * @param string $val The ID attribute value. * @return string Generated id suffix. */ protected function _idSuffix(string $val): string { $idSuffix = mb_strtolower(str_replace(['/', '@', '<', '>', ' ', '"', '\''], '-', $val)); $count = 1; $check = $idSuffix; while (in_array($check, $this->_idSuffixes, true)) { $check = $idSuffix . $count++; } $this->_idSuffixes[] = $check; return $check; } /** * Generate an ID suitable for use in an ID attribute. * * @param string $value The value to convert into an ID. * @return string The generated id. */ protected function _domId(string $value): string { $domId = mb_strtolower(Text::slug($value, '-')); if ($this->_idPrefix) { $domId = $this->_idPrefix . '-' . $domId; } return $domId; } }