setCacheLifetime() public method

Set cache lifetime
public setCacheLifetime ( integer $lifetime ) : Newscoop\Entity\Template
$lifetime integer
return Newscoop\Entity\Template
Exemplo n.º 1
0
 /**
  * Save template
  *
  * @param Newscoop\Entity\Template $template
  * @param array $values
  * @return void
  */
 public function save(Template $template, array $values)
 {
     $template->setCacheLifetime((int) $values['cache_lifetime']);
     $em = $this->getEntityManager();
     $em->persist($template);
 }
 public function setCacheLifetime($lifetime)
 {
     $this->__load();
     return parent::setCacheLifetime($lifetime);
 }