Example #1
0
 /**
  * returns a (default) name of the object
  *
  * The name is constructed by the object class and the object's ID.
  *
  * @api
  * @return string
  */
 public function name()
 {
     $classArray = explode('\\', get_class($this));
     return method_exists($this->getParent(), 'id') ? sprintf('%s-%s', end($classArray), $this->getParent()->id()) : parent::name();
 }
Example #2
0
 /**
  * returns a (default) name of the object
  *
  * The name is constructed by the object class and the object's ID.
  *
  * @api
  * @return string
  */
 public function name()
 {
     return method_exists($this->getParent(), 'id') ? sprintf('%s-%s', get_class($this), $this->getParent()->id()) : parent::name();
 }