Ejemplo n.º 1
0
 /**
  * Get options+events JSON
  *
  * @return string
  */
 public function getOptionsJson()
 {
     $options = $this->getOptions();
     $placeholders = $this->getCallbackPlaceholders();
     $parameters = array_merge($options, $placeholders);
     $parameters['events'] = $this->eventCollection->toArray();
     $json = json_encode($parameters);
     if ($placeholders) {
         return $this->replaceCallbackPlaceholders($json, $placeholders);
     }
     return $json;
 }
Ejemplo n.º 2
0
 /**
  * Get options+events JSON
  *
  * @return string
  */
 public function getOptionsJson()
 {
     $options = $this->getOptions();
     $placeholders = $this->getCallbackPlaceholders();
     $parameters = array_merge($options, $placeholders);
     // Allow the user to override the events list with a url
     if (!isset($parameters['events'])) {
         $parameters['events'] = $this->eventCollection->toArray();
     }
     $json = json_encode($parameters);
     if ($placeholders) {
         return $this->replaceCallbackPlaceholders($json, $placeholders);
     }
     return $json;
 }