/** * Returns movement_id for the movement with the specified name (and type) or idno (regardless of specified type.) If the movement does not already * exist then it will be created with the specified name, type and locale, as well as with any specified values in the $pa_values array. * $pa_values keys should be either valid movement fields or attributes. * * @param string $ps_movement_name movement label name * @param int $pn_type_id The type_id of the movement type to use if the movement needs to be created * @param int $pn_locale_id The locale_id to use if the movement needs to be created (will be used for both the movement locale as well as the label locale) * @param array $pa_values An optional array of additional values to populate newly created movement records with. These values are *only* used for newly created movements; they will not be applied if the movement named already exists. The array keys should be names of movement fields or valid movement attributes. Values should be either a scalar (for single-value attributes) or an array of values for (multi-valued attributes) * @param array $pa_options An optional array of options. See DataMigrationUtils::_getID() for a list. * @return bool|ca_movements|mixed|null * * @see DataMigrationUtils::_getID() */ static function getMovementID($ps_movement_name, $pn_type_id, $pn_locale_id, $pa_values = null, $pa_options = null) { return DataMigrationUtils::_getID('ca_movements', array('name' => $ps_movement_name), null, $pn_type_id, $pn_locale_id, $pa_values, $pa_options); }