本文整理汇总了PHP中ProjectTasks::getArrayInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectTasks::getArrayInfo方法的具体用法?PHP ProjectTasks::getArrayInfo怎么用?PHP ProjectTasks::getArrayInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectTasks
的用法示例。
在下文中一共展示了ProjectTasks::getArrayInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_tasks
function get_tasks()
{
ajx_current("empty");
$data = array();
$tasks_array = array();
$tasks_ids = array_map('intval', json_decode(array_var($_REQUEST, 'tasks_ids', null)));
if (is_array($tasks_ids)) {
$conditions = " AND `object_id` IN (" . implode(',', $tasks_ids) . ")";
$tasks = ProjectTasks::instance()->listing(array("extra_conditions" => $conditions, "count_results" => false, "raw_data" => true))->objects;
$tasks_array = array();
foreach ($tasks as $task) {
$tasks_array[] = ProjectTasks::getArrayInfo($task);
}
}
$data['tasks'] = $tasks_array;
ajx_extra_data($data);
}
示例2: array
foreach($all_templates as $template) {
$all_templates_array[] = $template->getArrayInfo();
}
}
if (isset($project_templates) && !is_null($project_templates)) {
foreach($project_templates as $template) {
$project_templates_array[] = $template->getArrayInfo();
}
}
if (isset($tasks)) {
$ids = array();
foreach($tasks as $task) {
$ids[] = $task['id'];
$tasks_array[] = ProjectTasks::getArrayInfo($task);
}
$read_objects = ReadObjects::getReadByObjectList($ids, logged_user()->getId());
foreach($tasks_array as &$data) {
$data['isread'] = isset($read_objects[$data['id']]);
}
}
if (is_array($internalMilestones)) {
foreach($internalMilestones as $milestone) {
$internal_milestones_array[] = $milestone->getArrayInfo();
}
}
if (is_array($externalMilestones)) {
示例3: getArrayInfo
/**
* End task templates
*/
function getArrayInfo($full = false)
{
$task = $this;
$col_names = $task->getColumns();
$ob_col_names = $task->getObject()->getColumns();
$raw_data = array();
foreach ($ob_col_names as $ob_col_name) {
$raw_data[$ob_col_name] = $task->getColumnValue($ob_col_name);
}
foreach ($col_names as $col_name) {
$raw_data[$col_name] = $task->getColumnValue($col_name);
}
foreach ($raw_data as $key => $raw) {
if ($raw instanceof DateTimeValue) {
$raw_data[$key] = $raw->toMySQL();
}
}
//is read
$raw_data['isread'] = $task->getIsRead(logged_user()->getId());
return ProjectTasks::getArrayInfo($raw_data, $full);
}