setIsDefault() публичный Метод

Set is default image
public setIsDefault ( boolean $isDefault = false ) : void
$isDefault boolean
Результат void
Пример #1
0
 /**
  * Set default article image
  *
  * @param int            $articleNumber
  * @param ImageInterface $image
  *
  * @return void
  */
 public function setDefaultArticleImage($articleNumber, ArticleImage $image)
 {
     $query = $this->orm->createQuery('UPDATE Newscoop\\Image\\ArticleImage i SET i.isDefault = 0 WHERE i.articleNumber = :articleNumber');
     $query->setParameter('articleNumber', $articleNumber)->execute();
     $image->setIsDefault(true);
     $this->orm->flush($image);
     $this->orm->clear();
 }
 public function setIsDefault($isDefault = false)
 {
     $this->__load();
     return parent::setIsDefault($isDefault);
 }