/**
  * Ends the chaining and returns the parent object, either {@link DisplayLogicCriteria} or {@link FormField}
  * @return FormField/DisplayLogicCriteria
  */
 public function end()
 {
     if ($this->parent) {
         $this->parent->addCriterion($this);
     }
     return $this->slave;
 }
 /**
  * Loads the dependencies and renders the JavaScript-readable logic to the form HTML
  *
  * @return  string
  */
 public function DisplayLogic()
 {
     if ($this->displayLogicCriteria) {
         if (!Config::inst()->get('DisplayLogic', 'jquery_included')) {
             Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
         }
         Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js');
         Requirements::javascript(DISPLAY_LOGIC_DIR . '/javascript/display_logic.js');
         Requirements::css(DISPLAY_LOGIC_DIR . '/css/display_logic.css');
         return $this->displayLogicCriteria->toScript();
     }
     return false;
 }