| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
class CRM_Core_Block {
/**
- * The following blocks are supported
+ * The following blocks are supported.
*
* @var int
*/
FULLTEXT_SEARCH = 7;
/**
- * Template file names for the above blocks
+ * Template file names for the above blocks.
*/
static $_properties = NULL;
/**
- * Class constructor
+ * Class constructor.
*/
public function __construct() {
}
}
/**
- * Creates the info block for drupal
+ * Creates the info block for drupal.
*
* @return array
*/
if ($value['active']) {
if (in_array($id, array(
self::ADD,
- self::CREATE_NEW
+ self::CREATE_NEW,
))) {
$hasAccess = TRUE;
if (!CRM_Core_Permission::check('add contacts') &&
$block[$id] = array(
'info' => $value['info'],
'cache' => $value['cache'],
- 'status' => $value['active'],
'region' => $value['region'],
'visibility' => $value['visibility'],
'pages' => $value['pages'],
$urlArray = array(
'fullTextSearchID' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue',
'CRM_Contact_Form_Search_Custom_FullText', 'value', 'name'
- )
+ ),
);
self::setProperty(self::FULLTEXT_SEARCH, 'templateValues', $urlArray);
break;
}
/**
- * Create the list of options to create New objects for the application and format is as a block
+ * Create the list of options to create New objects for the application and format is as a block.
*
* @return void
*/
'query' => 'action=add&reset=1&context=standalone',
'ref' => 'new-activity',
'title' => ts('Activity'),
- )
+ ),
));
$components = CRM_Core_Component::getEnabledComponents();
'query' => 'atype=3&action=add&reset=1&context=standalone',
'ref' => 'new-email',
'title' => ts('Email'),
- )
+ ),
));
if (CRM_Core_Permission::check('edit groups')) {
'query' => 'reset=1',
'ref' => 'new-group',
'title' => ts('Group'),
- )
+ ),
));
}
'query' => 'reset=1&action=add',
'ref' => 'new-tag',
'title' => ts('Tag'),
- )
+ ),
));
}
}
/**
- * Create the list of dashboard links
+ * Create the list of dashboard links.
*
* @return void
*/
'path' => 'civicrm/user',
'query' => 'reset=1',
'title' => ts('My Contact Dashboard'),
- )
+ ),
);
}
}
/**
- * Create the list of mail urls for the application and format is as a block
+ * Create the list of mail urls for the application and format is as a block.
*
* @return void
*/
}
/**
- * Create the list of shortcuts for the application and format is as a block
+ * Create the list of shortcuts for the application and format is as a block.
*
* @return void
*/
}
/**
- * Create the event blocks for upcoming events
+ * Create the event blocks for upcoming events.
*
* @return void
*/
// return if upgrade mode
$config = CRM_Core_Config::singleton();
if ($config->isUpgradeMode()) {
- return;
+ return NULL;
}
if (!self::getProperty($id, 'active')) {
return $template->fetch('CRM/Block/' . $fileName);
}
+
}