コード例 #1
0
 /**
  * Returns the block's children.
  *
  * @param null $field - This is a deprecated parameter
  * @return ElementCriteriaModel
  */
 public function getChildren($field = null)
 {
     // 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['children'])) {
             $this->_liveCriteria['children'] = $this->getDescendants(1);
         }
         return $this->_liveCriteria['children'];
     }
     return parent::getChildren($field);
 }