Inheritance: extends Sulu\Component\Persistence\Model\AuditableInterface
コード例 #1
0
ファイル: KeywordManager.php プロジェクト: sulu/sulu
 /**
  * Find the same keyword in the database or returns null if no synonym exists.
  *
  * @param Keyword $keyword
  *
  * @return Keyword|null
  */
 private function findSynonym(KeywordInterface $keyword)
 {
     return $this->keywordRepository->findByKeyword($keyword->getKeyword(), $keyword->getLocale());
 }
コード例 #2
0
ファイル: Keyword.php プロジェクト: sulu/sulu
 /**
  * {@inheritdoc}
  */
 public function equals(KeywordInterface $keyword)
 {
     return $keyword->getKeyword() === $this->getKeyword() && $keyword->getLocale() === $this->getLocale();
 }
コード例 #3
0
 public function __construct(KeywordInterface $keyword)
 {
     parent::__construct(sprintf('The keyword "%s" is used in multiple categories or translations.', $keyword->getKeyword()), 2002);
     $this->keyword = $keyword;
 }
コード例 #4
0
 public function __construct(KeywordInterface $keyword)
 {
     parent::__construct(sprintf('The keyword "%s" is already in use.', $keyword->getKeyword()), 2001);
     $this->keyword = $keyword;
 }