Esempio n. 1
0
 /**
  * Function to set variables up before form is built
  *
  * @access public
  */
 public function preProcess()
 {
     parent::preProcess();
     $unmet = CRM_Volunteer_Upgrader::checkExtensionDependencies();
     if (in_array('com.ginkgostreet.multiform', $unmet)) {
         $msg = CRM_Volunteer_Upgrader::getUnmetDependencyErrorMessage('com.ginkgostreet.multiform');
         $this->assign('msg', $msg);
     }
     $this->assign('isModulePermissionSupported', CRM_Core_Config::singleton()->userPermissionClass->isModulePermissionSupported());
 }
function _volunteer_prereqCheck()
{
    $unmet = CRM_Volunteer_Upgrader::checkExtensionDependencies();
    CRM_Volunteer_Upgrader::displayDependencyErrors($unmet);
}
Esempio n. 3
0
/**
 * Delegated implementation of hook_civicrm_alterTemplateFile
 *
 * Don't load the volunteer tab if Multiform prereq is missing.
 *
 * @param type $formName
 * @param type $form
 * @param type $context
 * @param string $tplName
 */
function _volunteer_civicrm_alterTemplateFile_CRM_Volunteer_Form_Volunteer($formName, &$form, $context, &$tplName)
{
    $unmet = CRM_Volunteer_Upgrader::checkExtensionDependencies();
    if (in_array('com.ginkgostreet.multiform', $unmet)) {
        $tplName = 'CRM/Volunteer/MissingDependency.tpl';
    }
}
Esempio n. 4
0
 /**
  * Display dependency error messages.
  * This upgrade-step counter should be incremented for each upgrade, not duplicated.
  *
  * @return boolean TRUE on success
  */
 public function upgrade_1402()
 {
     $this->ctx->log->info('Checking extension dependencies');
     $unmet = CRM_Volunteer_Upgrader::checkExtensionDependencies();
     self::displayDependencyErrors($unmet);
     return TRUE;
 }