src/Model/Aggregate/Entity.php
protected function getEmbeddedEntityFor($attribute_name, $embedded_entity_id)
    {
        $found_entity = null;
        foreach ($this->getValue($attribute_name) as $embedded_entity) {
            if ($embedded_entity->getIdentifier() === $embedded_entity_id) {
                $found_entity = $embedded_entity;
                break;
            }
        }

        return $found_entity;
    }
protected function getEmbeddedEntityFor($attribute_name, $embedded_entity_id)
    {
        $found_entity = null;
        foreach ($this->getValue($attribute_name) as $embedded_entity) {
            if ($embedded_entity->getIdentifier() === $embedded_entity_id) {
                $found_entity = $embedded_entity;
                break;
            }
        }

        return $found_entity;
    }
protected function getEmbeddedEntityFor ( $ attribute_name , $ embedded_entity_id ) { $ found_entity = null ; foreach ( $ this -> getValue ( $ attribute_name ) as $ embedded_entity ) { if ( $ embedded_entity -> getIdentifier ( ) === $ embedded_entity_id ) { $ found_entity = $ embedded_entity ; break ; } } return $ found_entity ; }
Return the Aggregate that is referred to by the given command.

@param string $attribute_name
@param string $embedded_entity_id

@return EntityInterface
Return the Aggregate that is referred to by the given command .