Ejemplo n.º 1
0
 /**
  * Returns the block's parent.
  *
  * @return Neo_BlockModel|null
  */
 public function getParent()
 {
     // If the request is in Live Preview mode, use the Neo-extended criteria model, which supports Live Preview mode
     if (craft()->neo->isPreviewMode()) {
         if (!isset($this->_liveCriteria['parent'])) {
             $this->_liveCriteria['parent'] = $this->getAncestors(1)->status(null)->first();
         }
         return $this->_liveCriteria['parent'];
     }
     return parent::getParent();
 }