| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* Input parameters to find object.
*
* @return array
- * of $block objects.
- * @static
+ * Array of $block objects.
*/
public static function &getValues($blockName, $params) {
if (empty($params)) {
* Name of the above object.
*
* @return array
- * of $block objects.
- * @static
+ * Array of $block objects.
*/
public static function retrieveBlock(&$block, $blockName) {
// we first get the primary location due to the order by clause
* @param array $params
* Associated array of submitted fields.
*
- * @return boolean
+ * @return bool
* true if the block has data, otherwise false
- * @static
*/
public static function dataExists($blockFields, &$params) {
foreach ($blockFields as $field) {
* @param array $params
* Associated array of submitted fields.
*
- * @return boolean
+ * @return bool
* true if the block exits, otherwise false
- * @static
*/
public static function blockExists($blockName, &$params) {
// return if no data present
* @return array
* formatted array of block ids
*
- * @static
*/
public static function getBlockIds($blockName, $contactId = NULL, $entityElements = NULL, $updateBlankLocInfo = FALSE) {
$allBlocks = array();
*
* @return object
* CRM_Core_BAO_Block object on success, null otherwise
- * @static
*/
public static function create($blockName, &$params, $entity = NULL, $contactId = NULL) {
if (!self::blockExists($blockName, $params)) {
* Associates array.
*
* @return void
- * @static
*/
public static function blockDelete($blockName, $params) {
$name = ucfirst($blockName);
$block = new $baoString();
$block->copyValues($params);
- /*
- * CRM-11006 add call to pre and post hook for delete action
- */
+
+ // CRM-11006 add call to pre and post hook for delete action
CRM_Utils_Hook::pre('delete', $name, $block->id, CRM_Core_DAO::$_nullArray);
$block->delete();
CRM_Utils_Hook::post('delete', $name, $block->id, $block);
* @param $class
*
* @throws API_Exception
- * @static
*/
public static function handlePrimary(&$params, $class) {
$table = CRM_Core_DAO_AllCoreTables::getTableForClass($class);
* (sort function for sortPrimaryFirst)
* @param array $location1
* @param array $location2
- * @return number
+ * @return int
*/
public static function primaryComparison($location1, $location2) {
$l1 = CRM_Utils_Array::value('is_primary', $location1);
}
return ($l1 < $l2) ? -1 : 1;
}
+
}