Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getAjaxEndpointUrl()
 {
     if (!$this->_properties->containsKey(self::$_PROPERTY_URL_AJAX)) {
         /*
          * See if it was defined in boot settings.
          */
         $fromBootSettings = $this->_bootSettings->getUrlAjaxEndpoint();
         if ($fromBootSettings) {
             $this->_properties->put(self::$_PROPERTY_URL_AJAX, $fromBootSettings);
             return $fromBootSettings;
         }
         if ($this->_isWordPress()) {
             $url = $this->_wpFunctionsInterface->admin_url('admin-ajax.php');
         } else {
             $url = $this->getBaseUrl()->getClone()->setPath('/web/php/ajaxEndpoint.php');
         }
         $url = $this->_toUrl($url);
         $this->_properties->put(self::$_PROPERTY_URL_AJAX, $url);
     }
     return $this->_properties->get(self::$_PROPERTY_URL_AJAX);
 }