Back to PhocacartHtmlJgrid class

Method displayAccount

public static
displayAccount
(mixed $value, mixed $i, mixed $prefix = '', mixed $enabled = true, mixed $checkbox = 'cb')

Method displayAccount - Source code

public static function displayAccount($value, $i, $prefix = '', $enabled = true, $checkbox = 'cb')
{
    if (is_array($prefix)) {
        $options = $prefix;
        $enabled = array_key_exists('enabled', $options) ? $options['enabled'] : $enabled;
        $checkbox = array_key_exists('checkbox', $options) ? $options['checkbox'] : $checkbox;
        $prefix = array_key_exists('prefix', $options) ? $options['prefix'] : '';
    }
    $states = array(1 => array('hideaccount', 'COM_PHOCACART_DISPLAYED', 'COM_PHOCACART_HIDE', 'COM_PHOCACART_DISPLAYED', false, 'publish', 'publish'), 0 => array('displayaccount', 'COM_PHOCACART_HIDDEN', 'COM_PHOCACART_DISPLAY', 'COM_PHOCACART_HIDDEN', false, 'unpublish', 'unpublish'));
    return self::state($states, $value, $i, $prefix, $enabled, true, $checkbox);
}