protected function getProductIdByNumber($number) { $entity =
$this->
findEntityByConditions( Detail::
class,
[['number' =>
$number]] );
if (!
$entity instanceof Detail
) { throw new NotFoundException(sprintf('Variant by order number %s not found',
$number));
} return $entity->
getArticle()->
getId();
}