Backend\Modules\ContentBlocks\Repository\ContentBlockRepository::findOneByIdAndLocale PHP Method

findOneByIdAndLocale() public method

public findOneByIdAndLocale ( integer $id, Locale $locale ) : ContentBlock | null
$id integer
$locale common\Locale
return Backend\Modules\ContentBlocks\Entity\ContentBlock | null
    public function findOneByIdAndLocale($id, Locale $locale)
    {
        return $this->findOneBy(['id' => $id, 'status' => ContentBlockStatus::active(), 'locale' => $locale]);
    }