public static function state($states, $value, $i, $prefix = '', $enabled = true, $translate = true, $checkbox = 'cb')
	{
		if (is_array($prefix))
		{
			$options   = $prefix;

			$enabled   = array_key_exists('enabled', $options) ? $options['enabled'] : $enabled;
			$translate = array_key_exists('translate', $options) ? $options['translate'] : $translate;
			$checkbox  = array_key_exists('checkbox', $options) ? $options['checkbox'] : $checkbox;
			$prefix    = array_key_exists('prefix', $options) ? $options['prefix'] : '';
		}

		$state = Arr::getValue($states, (int) $value, $states[0]);

		$task           = array_key_exists('task', $state) ? $state['task'] : $state[0];
		$text           = array_key_exists('text', $state) ? $state['text'] : (array_key_exists(1, $state) ? $state[1] : '');
		$active_title   = array_key_exists('active_title', $state) ? $state['active_title'] : (array_key_exists(2, $state) ? $state[2] : '');
		$inactive_title = array_key_exists('inactive_title', $state) ? $state['inactive_title'] : (array_key_exists(3, $state) ? $state[3] : '');
		$tip            = array_key_exists('tip', $state) ? $state['tip'] : (array_key_exists(4, $state) ? $state[4] : false);
		$active_class   = array_key_exists('active_class', $state) ? $state['active_class'] : (array_key_exists(5, $state) ? $state[5] : '');
		$inactive_class = array_key_exists('inactive_class', $state) ? $state['inactive_class'] : (array_key_exists(6, $state) ? $state[6] : '');

		return self::action(
			$i, $task, $prefix, $text, $active_title, $inactive_title, $tip,
			$active_class, $inactive_class, $enabled, $translate, $checkbox
		);
	}
public static function state($states, $value, $i, $prefix = '', $enabled = true, $translate = true, $checkbox = 'cb')
	{
		if (is_array($prefix))
		{
			$options   = $prefix;

			$enabled   = array_key_exists('enabled', $options) ? $options['enabled'] : $enabled;
			$translate = array_key_exists('translate', $options) ? $options['translate'] : $translate;
			$checkbox  = array_key_exists('checkbox', $options) ? $options['checkbox'] : $checkbox;
			$prefix    = array_key_exists('prefix', $options) ? $options['prefix'] : '';
		}

		$state = Arr::getValue($states, (int) $value, $states[0]);

		$task           = array_key_exists('task', $state) ? $state['task'] : $state[0];
		$text           = array_key_exists('text', $state) ? $state['text'] : (array_key_exists(1, $state) ? $state[1] : '');
		$active_title   = array_key_exists('active_title', $state) ? $state['active_title'] : (array_key_exists(2, $state) ? $state[2] : '');
		$inactive_title = array_key_exists('inactive_title', $state) ? $state['inactive_title'] : (array_key_exists(3, $state) ? $state[3] : '');
		$tip            = array_key_exists('tip', $state) ? $state['tip'] : (array_key_exists(4, $state) ? $state[4] : false);
		$active_class   = array_key_exists('active_class', $state) ? $state['active_class'] : (array_key_exists(5, $state) ? $state[5] : '');
		$inactive_class = array_key_exists('inactive_class', $state) ? $state['inactive_class'] : (array_key_exists(6, $state) ? $state[6] : '');

		return self::action(
			$i, $task, $prefix, $text, $active_title, $inactive_title, $tip,
			$active_class, $inactive_class, $enabled, $translate, $checkbox
		);
	}
public static function state ( $ states , $ value , $ i , $ prefix = '' , $ enabled = true , $ translate = true , $ checkbox = 'cb' ) { if ( is_array ( $ prefix ) ) { $ options = $ prefix ; $ enabled = array_key_exists ( 'enabled' , $ options ) ? $ options [ 'enabled' ] : $ enabled ; $ translate = array_key_exists ( 'translate' , $ options ) ? $ options [ 'translate' ] : $ translate ; $ checkbox = array_key_exists ( 'checkbox' , $ options ) ? $ options [ 'checkbox' ] : $ checkbox ; $ prefix = array_key_exists ( 'prefix' , $ options ) ? $ options [ 'prefix' ] : '' ; } $ state = Arr :: getValue ( $ states , ( int ) $ value , $ states [ 0 ] ) ; $ task = array_key_exists ( 'task' , $ state ) ? $ state [ 'task' ] : $ state [ 0 ] ; $ text = array_key_exists ( 'text' , $ state ) ? $ state [ 'text' ] : ( array_key_exists ( 1 , $ state ) ? $ state [ 1 ] : '' ) ; $ active_title = array_key_exists ( 'active_title' , $ state ) ? $ state [ 'active_title' ] : ( array_key_exists ( 2 , $ state ) ? $ state [ 2 ] : '' ) ; $ inactive_title = array_key_exists ( 'inactive_title' , $ state ) ? $ state [ 'inactive_title' ] : ( array_key_exists ( 3 , $ state ) ? $ state [ 3 ] : '' ) ; $ tip = array_key_exists ( 'tip' , $ state ) ? $ state [ 'tip' ] : ( array_key_exists ( 4 , $ state ) ? $ state [ 4 ] : false ) ; $ active_class = array_key_exists ( 'active_class' , $ state ) ? $ state [ 'active_class' ] : ( array_key_exists ( 5 , $ state ) ? $ state [ 5 ] : '' ) ; $ inactive_class = array_key_exists ( 'inactive_class' , $ state ) ? $ state [ 'inactive_class' ] : ( array_key_exists ( 6 , $ state ) ? $ state [ 6 ] : '' ) ; return self :: action ( $ i , $ task , $ prefix , $ text , $ active_title , $ inactive_title , $ tip , $ active_class , $ inactive_class , $ enabled , $ translate , $ checkbox ) ; }
Returns a state on a grid

@param   array         $states     array of value/state. Each state is an array of the form
(task, text, title,html active class, HTML inactive class)
or ('task'=>task, 'text'=>text, 'active_title'=>active title,
'inactive_title'=>inactive title, 'tip'=>boolean, 'active_class'=>html active class,
'inactive_class'=>html inactive class)
@param   integer       $value      The state value.
@param   integer       $i          The row index
@param   string|array  $prefix     An optional task prefix or an array of options
@param   boolean       $enabled    An optional setting for access control on the action.
@param   boolean       $translate  An optional setting for translation.
@param   string        $checkbox   An optional prefix for checkboxes.
@return  string        The Html code
Returns a state on a grid