Beispiel #1
0
 /**
  * Initialize the various templates.
  */
 public function initializeTemplates()
 {
     if (self::$_requiredTemplate !== NULL) {
         return;
     }
     $config = CRM_Core_Config::singleton();
     $templateDir = $config->templateDir;
     if (is_array($templateDir)) {
         $templateDir = array_pop($templateDir);
     }
     self::$_requiredTemplate = file_get_contents($templateDir . '/CRM/Form/label.tpl');
     self::$_errorTemplate = file_get_contents($templateDir . '/CRM/Form/error.tpl');
 }
Beispiel #2
0
 /**
  * initialize the various templates
  *
  * @param object  $page the CRM_Core_Form page
  *
  * @return void
  * @access public
  */
 function initializeTemplates()
 {
     if (self::$_requiredTemplate !== null) {
         return;
     }
     $config =& CRM_Core_Config::singleton();
     self::$_requiredTemplate = file_get_contents($config->templateDir . '/CRM/Form/label.tpl');
     self::$_errorTemplate = file_get_contents($config->templateDir . '/CRM/Form/error.tpl');
 }