eZ\Publish\Core\MVC\Symfony\Controller\Content\DownloadRedirectionController::findFieldInContent PHP Метод

findFieldInContent() защищенный Метод

Finds the field with id $fieldId in $content.
protected findFieldInContent ( integer $fieldId, eZ\Publish\API\Repository\Values\Content\Content $content ) : eZ\Publish\API\Repository\Values\Content\Field
$fieldId integer
$content eZ\Publish\API\Repository\Values\Content\Content
Результат eZ\Publish\API\Repository\Values\Content\Field
    protected function findFieldInContent($fieldId, Content $content)
    {
        foreach ($content->getFields() as $field) {
            if ($field->id == $fieldId) {
                return $field;
            }
        }
        throw new InvalidArgumentException("Field with id {$fieldId} not found in Content with id {$content->id}");
    }