public function getArtefactsByTypeAndEntityId($type, $entityId)
    {

        // query whether or not, artefacts for the passed params are available
        if (isset($this->artefacs[$type][$entityId])) {
            // load the artefacts
            $artefacts = $this->artefacs[$type][$entityId];

            // unserialize the original data
            array_walk($artefacts, function (&$artefact) {
                if (isset($artefact[ColumnKeys::ORIGINAL_DATA])) {
                    $artefact[ColumnKeys::ORIGINAL_DATA] = unserialize($artefact[ColumnKeys::ORIGINAL_DATA]);
                }
            });

            // return the artefacts
            return $artefacts;
        }

        // throw an exception if not
        throw new \Exception(
            sprintf(
                'Cant\'t load artefacts for type %s and entity ID %d',
                $type,
                $entityId
            )
        );
    }
public function getArtefactsByTypeAndEntityId($type, $entityId)
    {

        // query whether or not, artefacts for the passed params are available
        if (isset($this->artefacs[$type][$entityId])) {
            // load the artefacts
            $artefacts = $this->artefacs[$type][$entityId];

            // unserialize the original data
            array_walk($artefacts, function (&$artefact) {
                if (isset($artefact[ColumnKeys::ORIGINAL_DATA])) {
                    $artefact[ColumnKeys::ORIGINAL_DATA] = unserialize($artefact[ColumnKeys::ORIGINAL_DATA]);
                }
            });

            // return the artefacts
            return $artefacts;
        }

        // throw an exception if not
        throw new \Exception(
            sprintf(
                'Cant\'t load artefacts for type %s and entity ID %d',
                $type,
                $entityId
            )
        );
    }
public function getArtefactsByTypeAndEntityId ( $ type , $ entityId ) { // query whether or not, artefacts for the passed params are available if ( isset ( $ this -> artefacs [ $ type ] [ $ entityId ] ) ) { // load the artefacts $ artefacts = $ this -> artefacs [ $ type ] [ $ entityId ] ; // unserialize the original data array_walk ( $ artefacts , function ( & $ artefact ) { if ( isset ( $ artefact [ ColumnKeys :: ORIGINAL_DATA ] ) ) { $ artefact [ ColumnKeys :: ORIGINAL_DATA ] = unserialize ( $ artefact [ ColumnKeys :: ORIGINAL_DATA ] ) ; } } ) ; // return the artefacts return $ artefacts ; } // throw an exception if not throw new \ Exception ( sprintf ( 'Cant\'t load artefacts for type %s and entity ID %d' , $ type , $ entityId ) ) ; }
Return the artefacts for the passed type and entity ID.

@param string $type     The artefact type, e. g. configurable
@param string $entityId The entity ID to return the artefacts for

@return array The array with the artefacts
@throws \Exception Is thrown, if no artefacts are available
Return the artefacts for the passed type and entity ID .