/** * This ajax.js should NOT be rendered all the time * @param Component $component * @param HeaderContainer $headerContainer * @param HeaderResponse $headerResponse */ public function renderHead(Component &$component, HeaderContainer $headerContainer, HeaderResponse $headerResponse) { parent::renderHead($component, $headerContainer, $headerResponse); $headerResponse->renderJavaScriptResourceReference(new ResourceReference('ajax.js', AbstractAjaxBehaviour::getIdentifier())); }
public function onComponentTag(Component &$component, ComponentTag &$tag) { parent::onComponentTag($component, $tag); $tag->put($this->event, $this->generateCallbackScript()); }