MetaModels\Helper\ToolboxFile::addClasses PHP Метод

addClasses() защищенный Метод

Attach first, last and even/odd classes to the given array.
protected addClasses ( array &$arrSource ) : void
$arrSource array The array reference of the array to which the classes shall be added to.
Результат void
    protected function addClasses(&$arrSource)
    {
        $countFiles = count($arrSource);
        foreach (array_keys($arrSource) as $k) {
            $arrSource[$k]['class'] = ($k == 0 ? ' first' : '') . ($k == $countFiles - 1 ? ' last' : '') . ($k % 2 == 0 ? ' even' : ' odd');
        }
    }