function block_patterns_export_all_block_node_types in Patterns 7.2
Returns a set of PATTERNS_CREATE actions with the relationship between blocks and node types currently stored in the system.
Parameters
array $args Set of arguments received from the form.:
string $result Current set of actions for the whole process.:
Return value
array $result Set of actions after performing the changes.
1 string reference to 'block_patterns_export_all_block_node_types'
- block_patterns in patterns_components/
components/ block.inc
File
- patterns_components/
components/ block.inc, line 132
Code
function block_patterns_export_all_block_node_types($args = NULL, &$result = NULL) {
$result = array();
$block_node_types = db_query('SELECT * from block_node_type');
//In this case the export is only as a set of modifys
foreach ($block_node_types as $node_type) {
$data = array(
'tag' => 'block_node_type',
);
foreach ($node_type as $key => $value) {
$data[$key] = $value;
}
$action = array(
PATTERNS_CREATE => $data,
);
array_push($result, $action);
}
return $result;
}