src/Repositories/EavAttributeOptionValueRepository.php
/**
     * Load's and return's the EAV attribute option value with the passed entity type ID, code, store ID and value.
     *
     * @param string  $entityTypeId  The entity type ID of the EAV attribute to load the option value for
     * @param string  $attributeCode The code of the EAV attribute option to load
     * @param integer $storeId       The store ID of the attribute option to load
     * @param string  $value         The value of the attribute option to load
     *
     * @return array The EAV attribute option value
     */
Load's and return's the EAV attribute option value with the passed entity type ID, code, store ID and value.
@param string  $entityTypeId  The entity type ID of the EAV attribute to load the option value for
@param string  $attributeCode The code of the EAV attribute option to load
@param integer $storeId       The store ID of the attribute option to load
@param string  $value         The value of the attribute option to load

@return array The EAV attribute option value
Load ' s and return ' s the EAV attribute option value with the passed entity type ID code store ID and value . @param string $entityTypeId The entity type ID of the EAV attribute to load the option value for @param string $attributeCode The code of the EAV attribute option to load @param integer $storeId The store ID of the attribute option to load @param string $value The value of the attribute option to load @return array The EAV attribute option value
public function findOneByEntityTypeIdAndAttributeCodeAndStoreIdAndValue($entityTypeId, $attributeCode, $storeId, $value)
    {
        $params = array(
            MemberNames::ENTITY_TYPE_ID => $entityTypeId,
            MemberNames::ATTRIBUTE_CODE => $attributeCode,
            MemberNames::STORE_ID       => $storeId,
            MemberNames::VALUE          => $value
        );
        $cacheKey = $this->cacheAdapter->cacheKey(array(SqlStatementKeys::EAV_ATTRIBUTE_OPTION_VALUE_BY_ENTITY_TYPE_ID_AND_ATTRIBUTE_CODE_AND_STORE_ID_AND_VALUE => $params));
        if ($this->cacheAdapter->isCached($cacheKey)) {
            return $this->cacheAdapter->fromCache($cacheKey);
        }
        $this->eavAttributeOptionValueByEntityTypeIdAndAttributeCodeAndStoreIdAndValueStmt->execute($params);
        if ($eavAttributeOptionValue = $this->eavAttributeOptionValueByEntityTypeIdAndAttributeCodeAndStoreIdAndValueStmt->fetch(\PDO::FETCH_ASSOC)) {
            $uniqueKey = array(CacheKeys::EAV_ATTRIBUTE_OPTION_VALUE => $eavAttributeOptionValue[$this->getPrimaryKeyName()]);
            $this->cacheAdapter->toCache($uniqueKey, $eavAttributeOptionValue, array($cacheKey => $uniqueKey));
        }
        return $eavAttributeOptionValue;
    }
public function findOneByEntityTypeIdAndAttributeCodeAndStoreIdAndValue ( $ entityTypeId , $ attributeCode , $ storeId , $ value ) { $ params = array ( MemberNames :: ENTITY_TYPE_ID => $ entityTypeId , MemberNames :: ATTRIBUTE_CODE => $ attributeCode , MemberNames :: STORE_ID => $ storeId , MemberNames :: VALUE => $ value ) ; $ cacheKey = $ this -> cacheAdapter -> cacheKey ( array ( SqlStatementKeys :: EAV_ATTRIBUTE_OPTION_VALUE_BY_ENTITY_TYPE_ID_AND_ATTRIBUTE_CODE_AND_STORE_ID_AND_VALUE => $ params ) ) ; if ( $ this -> cacheAdapter -> isCached ( $ cacheKey ) ) { return $ this -> cacheAdapter -> fromCache ( $ cacheKey ) ; } $ this -> eavAttributeOptionValueByEntityTypeIdAndAttributeCodeAndStoreIdAndValueStmt -> execute ( $ params ) ; if ( $ eavAttributeOptionValue = $ this -> eavAttributeOptionValueByEntityTypeIdAndAttributeCodeAndStoreIdAndValueStmt -> fetch ( \ PDO :: FETCH_ASSOC ) ) { $ uniqueKey = array ( CacheKeys :: EAV_ATTRIBUTE_OPTION_VALUE => $ eavAttributeOptionValue [ $ this -> getPrimaryKeyName ( ) ] ) ; $ this -> cacheAdapter -> toCache ( $ uniqueKey , $ eavAttributeOptionValue , array ( $ cacheKey => $ uniqueKey ) ) ; } return $ eavAttributeOptionValue ; }
Load's and return's the EAV attribute option value with the passed entity type ID, code, store ID and value.
Load ' s and return ' s the EAV attribute option value with the passed entity type ID code store ID and value .
// the parameters of the EAV attribute option to load // prepare the cache key // return the cached result if available // load the EAV attribute option value with the passed parameters // query whether or not the result has been cached // prepare the unique cache key for the EAV attribute option value // add the EAV attribute option value to the cache, register the cache key reference as well // finally, return it