コード例 #1
0
/**
 * Populate object inspector
 *
 * @param IInspectorImplementation $inspector
 * @param IInspector $object
 * @param IUser $user
 * @param string $interface
 */
function frosso_tasks_tab_mod_handle_on_object_inspector(IInspectorImplementation &$inspector, IInspector &$object, IUser &$user, $interface)
{
    if ($object instanceof Task) {
        $inspector->addProperty('subscribed_users', lang('Subscribed users'), new TaskSubscribedInspectorProperty($object));
    }
    // if
}
コード例 #2
0
/**
 * Populate object inspector
 *
 * @param IInspectorImplementation $inspector
 * @param IInspector $object
 * @param IUser $user
 * @param string $interface
 */
function frosso_estimated_cost_handle_on_object_inspector(IInspectorImplementation &$inspector, IInspector &$object, IUser &$user, $interface)
{
    if ($object instanceof Milestone) {
        if ($object->assignees()->isResponsible($user) || $object->getProject()->canEdit($user)) {
            $inspector->addProperty('percent_complete', lang('Percent complete'), new MilestonePercentCompleteInspectorProperty(new RemediaMilestone($object->getId())));
            if (AngieApplication::isModuleLoaded('tracking')) {
                $inspector->addProperty('milestone_estimate', lang('Estimation'), new MilestoneEstimateInspectorProperty(new RemediaMilestone($object->getId())));
            }
        }
    }
    // if
}