src/Almeida/UIKit/Collections/Actions/AbstractActions.php
public static function map($actions=array(), $options=array())
    {
        if (empty($actions)) {
            return null;
        }

        $out   = array();
        $count = 0;
        $len   = count($actions);

        foreach ($actions as $label => $mixed) {

            $count++;

            $action = new Item($label, $mixed);

            if ($count == 1) {
                $action->isFirst = true;
            }

            if ($count == $len) {
                $action->isLast = true;
            }

            $out[] = $action;

        }

        return $out;
    }
public static function map($actions=array(), $options=array())
    {
        if (empty($actions)) {
            return null;
        }

        $out   = array();
        $count = 0;
        $len   = count($actions);

        foreach ($actions as $label => $mixed) {

            $count++;

            $action = new Item($label, $mixed);

            if ($count == 1) {
                $action->isFirst = true;
            }

            if ($count == $len) {
                $action->isLast = true;
            }

            $out[] = $action;

        }

        return $out;
    }
public static function map ( $ actions = array ( ) , $ options = array ( ) ) { if ( empty ( $ actions ) ) { return null ; } $ out = array ( ) ; $ count = 0 ; $ len = count ( $ actions ) ; foreach ( $ actions as $ label => $ mixed ) { $ count ++ ; $ action = new Item ( $ label , $ mixed ) ; if ( $ count == 1 ) { $ action -> isFirst = true ; } if ( $ count == $ len ) { $ action -> isLast = true ; } $ out [ ] = $ action ; } return $ out ; }
Get actions mapped
Preserve structure
@param  array  $actions [description]
@param  array  $options [description]
@return [type]          [description]
Get actions mapped Preserve structure