예제 #1
0
 /**
  * Method to get contexts via ajax
  */
 protected function __ajaxgetcontexts()
 {
     $letter = $this->getParam('letter');
     $contexts = $this->objContext->getContextStartingWith($letter);
     if (count($contexts) == 0) {
     } else {
         $objDisplayContext = $this->getObject('displaycontext', 'context');
         foreach ($contexts as $context) {
             echo $objDisplayContext->formatContextDisplayBlock($context, FALSE, FALSE) . '<br />';
         }
     }
 }
예제 #2
0
 /**
  * Method to browse for contexts
  */
 private function __browseother()
 {
     $letter = $this->getParam('letter', 'A');
     $results = $this->objContext->getContextStartingWith($letter);
     if (count($results) == 0) {
         $this->setVar('content', 'No search results for ' . $letter);
     } else {
         $this->setVarByRef('contexts', $results);
     }
     $this->setVar('title', ucfirst($this->objLanguage->code2Txt('mod_contextadmin_contextsstartingwith', 'contextadmin', NULL, '[-contexts-] starting with')) . ' ' . $letter);
     return 'main.php';
 }