private function sanitizeActions($actionsString) {

        $actions = [];
        $actionsString = strtolower($actionsString);

        // with duplicate actions the latter ones overwrite previous ones

        foreach(explode('|', $actionsString) as $action) {

            $action = trim($action);
            $actions[strstr($action, ' ', true)] = $action;

        }

        return $actions;
    }
private function sanitizeActions($actionsString) {

        $actions = [];
        $actionsString = strtolower($actionsString);

        // with duplicate actions the latter ones overwrite previous ones

        foreach(explode('|', $actionsString) as $action) {

            $action = trim($action);
            $actions[strstr($action, ' ', true)] = $action;

        }

        return $actions;
    }
private function sanitizeActions ( $ actionsString ) { $ actions = [ ] ; $ actionsString = strtolower ( $ actionsString ) ; // with duplicate actions the latter ones overwrite previous ones foreach ( explode ( '|' , $ actionsString ) as $ action ) { $ action = trim ( $ action ) ; $ actions [ strstr ( $ action , ' ' , true ) ] = $ action ; } return $ actions ; }
turns actions string into array
avoid duplicate actions

@param string $actionsString
@return array
turns actions string into array avoid duplicate actions