コード例 #1
0
 /**
  * Retourne le titre de l'image.
  * 
  * @return string Titre
  */
 public function getTitle()
 {
     if (null !== $this->rectoElement) {
         return $this->rectoElement->getNom();
     }
     if (null !== $this->versoElement) {
         return $this->versoElement->getNom();
     }
     if (null !== $this->element) {
         return $this->element->getNom();
     }
     if (null !== $this->originale) {
         return $this->originale->getTitle();
     }
     if (null !== $this->image) {
         return false !== strpos($this->image, '.') ? substr($this->image, 0, strrpos($this->image, '.')) : $this->image;
     }
     return '#' . $this->id;
 }
コード例 #2
0
ファイル: Element.php プロジェクト: lyssal/collection-bundle
 /**
  * Set elementSuivant
  *
  * @param \Lyssal\CollectionBundle\Entity\Element $elementSuivant
  * @return Element
  */
 public function setElementSuivant(\Lyssal\CollectionBundle\Entity\Element $elementSuivant = null)
 {
     $this->elementSuivant = $elementSuivant;
     $this->elementSuivant->setElementPrecedent($this);
     return $this;
 }
コード例 #3
0
 /**
  * @return string
  */
 public function __toString()
 {
     return $this->element->__toString() . (null !== $this->support ? ' (' . $this->support->__toString() . ')' : (null !== $this->utilisateurSupport ? ' (' . $this->utilisateurSupport->__toString() . ')' : ''));
 }