コード例 #1
0
 /**
  * Returns the block's next sibling.
  *
  * @return Neo_BlockModel|null
  */
 public function getNextSibling()
 {
     // 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['nextSibling'])) {
             $criteria = craft()->neo->getCriteria();
             $criteria->setAllElements($this->_allElements);
             $criteria->nextSiblingOf = $this;
             $criteria->status = null;
             $this->_liveCriteria['nextSibling'] = $criteria->first();
         }
         return $this->_liveCriteria['nextSibling'];
     }
     return parent::getNextSibling();
 }