CRM_Core_BAO_Block
class CRM_Core_BAO_Block
Properties
static | $requiredBlockFields | Fields that are required for a valid block. |
Methods
Given the list of params in the params array, fetch the object and store the values in the values array
Given the list of params in the params array, fetch the object and store the values in the values array
Check if the current block object has any valid data.
Check if the current block exits.
Get all block ids for a contact.
Takes an associative array and creates a block.
Delete block.
Handling for is_primary.
Sort location array so primary element is first.
compare 2 locations to see which should go first based on is_primary (sort function for sortPrimaryFirst)
Details
at line 59
static array
getValues(string $blockName, array $params)
Given the list of params in the params array, fetch the object and store the values in the values array
at line 105
static array
retrieveBlock(Object $block, string $blockName)
Given the list of params in the params array, fetch the object and store the values in the values array
at line 136
static bool
dataExists(array $blockFields, array $params)
Check if the current block object has any valid data.
at line 156
static bool
blockExists(string $blockName, array $params)
Check if the current block exits.
at line 180
static array
getBlockIds(string $blockName, int $contactId = NULL, null $entityElements = NULL, bool $updateBlankLocInfo = FALSE)
Get all block ids for a contact.
at line 222
static object
create(string $blockName, array $params, null $entity = NULL, int $contactId = NULL)
Takes an associative array and creates a block.
at line 362
static
blockDelete(string $blockName, int $params)
Delete block.
at line 401
static
handlePrimary(array $params, $class)
Handling for is_primary.
$params is_primary could be # 1 - find other entries with is_primary = 1 & reset them to 0 # 0 - make sure at least one entry is set to 1 - if no other entry is 1 change to 1 - if one other entry exists change that to 1 - if more than one other entry exists change first one to 1
at line 471
static
sortPrimaryFirst(array $locations)
Sort location array so primary element is first.
at line 482
static int
primaryComparison(array $location1, array $location2)
compare 2 locations to see which should go first based on is_primary (sort function for sortPrimaryFirst)