本文整理匯總了PHP中ca_objects::deriveCurrentLocationForBrowse方法的典型用法代碼示例。如果您正苦於以下問題:PHP ca_objects::deriveCurrentLocationForBrowse方法的具體用法?PHP ca_objects::deriveCurrentLocationForBrowse怎麽用?PHP ca_objects::deriveCurrentLocationForBrowse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ca_objects
的用法示例。
在下文中一共展示了ca_objects::deriveCurrentLocationForBrowse方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: reload_object_current_locations
/**
*
*/
public static function reload_object_current_locations($po_opts = null)
{
require_once __CA_LIB_DIR__ . "/core/Db.php";
require_once __CA_MODELS_DIR__ . "/ca_objects.php";
$o_db = new Db();
$t_object = new ca_objects();
$qr_res = $o_db->query("SELECT * FROM ca_objects");
print CLIProgressBar::start($qr_res->numRows(), _t('Starting...'));
$vn_c = 0;
while ($qr_res->nextRow()) {
$vn_object_id = $qr_res->get('object_id');
if ($t_object->load($vn_object_id)) {
print CLIProgressBar::next(1, _t('Processing %1', $t_object->getWithTemplate("^ca_objects.preferred_labels.name (^ca_objects.idno)")));
$t_object->deriveCurrentLocationForBrowse();
} else {
print CLIProgressBar::next(1, _t('Cannot load object %1', $vn_object_id));
}
$vn_c++;
}
print CLIProgressBar::finish();
CLIUtils::addMessage(_t('Processed %1 objects', $vn_c));
return true;
}