AdminPageFramework_Form_Model___Format_CollapsibleSection::_getToggleAllButtonArgument PHP Method

_getToggleAllButtonArgument() private method

private _getToggleAllButtonArgument ( $sToggleAll, array $aSection )
$aSection array
    private function _getToggleAllButtonArgument($sToggleAll, array $aSection)
    {
        if (!$aSection['repeatable']) {
            return $sToggleAll;
        }
        if ($aSection['_is_first_index'] && $aSection['_is_last_index']) {
            return $sToggleAll;
        }
        if (!$aSection['_is_first_index'] && !$aSection['_is_last_index']) {
            return 0;
        }
        $_aToggleAll = $this->getAOrB(true === $sToggleAll || 1 === $sToggleAll, array('top-right', 'bottom-right'), explode(',', $sToggleAll));
        $_aToggleAll = $this->getAOrB($aSection['_is_first_index'], $this->dropElementByValue($_aToggleAll, array(1, true, 0, false, 'bottom-right', 'bottom-left')), $_aToggleAll);
        $_aToggleAll = $this->getAOrB($aSection['_is_last_index'], $this->dropElementByValue($_aToggleAll, array(1, true, 0, false, 'top-right', 'top-left')), $_aToggleAll);
        $_aToggleAll = $this->getAOrB(empty($_aToggleAll), array(0), $_aToggleAll);
        return implode(',', $_aToggleAll);
    }
AdminPageFramework_Form_Model___Format_CollapsibleSection