Lines Matching refs:call
131 foreach ($this->calls as $call) {
132 $this->markHiddenReferences($call);
133 $this->markReferenceGroups($call);
134 $this->markScopeLimits($call);
135 $this->extractStyles($call);
136 $this->extractMappings($call);
137 $this->collectIncludedPages($call);
144 private function markHiddenReferences($call) {
145 switch ($call->getName()) {
153 foreach ($this->paragraphReferences as $call) {
154 $call->setRefnotesAttribute('hidden', true);
160 if (!$this->inReference && !empty(trim($call->getData(0)))) {
166 switch ($call->getPluginData(0)) {
173 $this->paragraphReferences[] = $call;
189 private function markReferenceGroups($call) {
190 if (($call->getName() == 'plugin_refnotes_references') && ($call->getPluginData(0) == 'render')) {
194 if ($call->getRefnotesAttribute('ns') != $groupNamespace) {
199 $this->referenceGroup[] = $call;
203 if ($call->getName() == 'cdata' && empty(trim($call->getData(0)))) {
233 private function markScopeLimits($call) {
234 switch ($call->getName()) {
236 if ($call->getPluginData(0) == 'render') {
237 $this->core->markScopeStart($call->getRefnotesAttribute('ns'), $call->getIndex());
242 $this->core->markScopeEnd($call->getRefnotesAttribute('ns'), $call->getIndex());
250 private function extractStyles($call) {
251 if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'split')) {
252 $this->core->addStyle($call->getRefnotesAttribute('ns'), $call->getPluginData(2));
254 $call->setPluginData(0, 'render');
255 $call->unsetPluginData(2);
262 private function extractMappings($call) {
263 if ($call->getName() == 'plugin_refnotes_notes') {
264 $map = $call->getRefnotesAttribute('map');
267 $this->core->addMapping($call->getRefnotesAttribute('ns'), $map);
268 $call->unsetRefnotesAttribute('map');
276 private function collectIncludedPages($call) {
277 if ($call->getName() == 'plugin_include_include') {
278 $this->includedPages[] = $call;
300 * Insert render call at the very bottom of the page
304 foreach ($this->includedPages as $call) {
305 $call->insertBefore(new refnotes_notes_render_block_instruction('enter'));
306 $call->insertAfter(new refnotes_notes_render_block_instruction('exit'));
318 foreach ($this->calls as $call) {
319 $this->styleNamespaces($call);
320 $this->setNamespaceMappings($call);
321 $this->addReferences($call);
322 $this->rewriteReferences($call);
329 private function styleNamespaces($call) {
330 if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'style')) {
331 $this->core->styleNamespace($call->getRefnotesAttribute('ns'), $call->getPluginData(2));
338 private function setNamespaceMappings($call) {
339 if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'map')) {
340 $this->core->setNamespaceMapping($call->getRefnotesAttribute('ns'), $call->getPluginData(2));
347 private function addReferences($call) {
348 if (($call->getName() == 'plugin_refnotes_references') && ($call->getPluginData(0) == 'render')) {
349 $attributes = $call->getPluginData(1);
350 $data = (count($call->getData(1)) > 2) ? $call->getPluginData(2) : array();
351 $reference = $this->core->addReference($attributes, $data, $call);
353 if ($call->getPrevious()->getName() != 'plugin_refnotes_references') {
362 private function rewriteReferences($call) {
363 if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'render')) {
364 $this->core->rewriteReferences($call->getRefnotesAttribute('ns'), $call->getRefnotesAttribute('limit'));