classes/storage/UserStorage.php
public function getList($sKey)
    {
        if (empty($sKey)) {
            return [];
        }

        $arDefaultStorageValue = $this->getListDefaultStorageValue($sKey);

        //Get auth user object
        $obUser = UserHelper::instance()->getUser();
        if (empty($obUser)) {
            return $arDefaultStorageValue;
        }

        //Get value from user object
        $arValueList = $obUser->$sKey;
        if (empty($arValueList) || !is_array($arValueList)) {
            $arValueList = [];
        }

        if (!empty($arDefaultStorageValue)) {
            $arValueList = array_merge($arDefaultStorageValue, $arValueList);
            $arValueList = array_unique($arValueList);

            $this->put($sKey, $arValueList);
            $this->clearDefaultStorageValue($sKey);
        }

        return $arValueList;
    }
public function getList($sKey)
    {
        if (empty($sKey)) {
            return [];
        }

        $arDefaultStorageValue = $this->getListDefaultStorageValue($sKey);

        //Get auth user object
        $obUser = UserHelper::instance()->getUser();
        if (empty($obUser)) {
            return $arDefaultStorageValue;
        }

        //Get value from user object
        $arValueList = $obUser->$sKey;
        if (empty($arValueList) || !is_array($arValueList)) {
            $arValueList = [];
        }

        if (!empty($arDefaultStorageValue)) {
            $arValueList = array_merge($arDefaultStorageValue, $arValueList);
            $arValueList = array_unique($arValueList);

            $this->put($sKey, $arValueList);
            $this->clearDefaultStorageValue($sKey);
        }

        return $arValueList;
    }
public function getList ( $ sKey ) { if ( empty ( $ sKey ) ) { return [ ] ; } $ arDefaultStorageValue = $ this -> getListDefaultStorageValue ( $ sKey ) ; //Get auth user object $ obUser = UserHelper :: instance ( ) -> getUser ( ) ; if ( empty ( $ obUser ) ) { return $ arDefaultStorageValue ; } //Get value from user object $ arValueList = $ obUser -> $ sKey ; if ( empty ( $ arValueList ) || ! is_array ( $ arValueList ) ) { $ arValueList = [ ] ; } if ( ! empty ( $ arDefaultStorageValue ) ) { $ arValueList = array_merge ( $ arDefaultStorageValue , $ arValueList ) ; $ arValueList = array_unique ( $ arValueList ) ; $ this -> put ( $ sKey , $ arValueList ) ; $ this -> clearDefaultStorageValue ( $ sKey ) ; } return $ arValueList ; }
Get list value from storage
@param string $sKey
@return array
Get list value from storage