当前位置: 首页>>代码示例>>PHP>>正文


PHP Task::getTitle方法代码示例

本文整理汇总了PHP中Task::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Task::getTitle方法的具体用法?PHP Task::getTitle怎么用?PHP Task::getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Task的用法示例。


在下文中一共展示了Task::getTitle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: date

    if ($formattedDeadline !== false) {
        $formattedDeadline = date("Y-m-d H:i:s", $formattedDeadline);
        $task->setDeadline($formattedDeadline);
    }
    if ($numNeeded != '') {
        $task->setNumNeeded($numNeeded);
    }
    $task->save();
    // save uploaded files to database
    foreach ($_POST['file'] as $stored => $orig) {
        $stored = Filter::text($stored);
        $orig = Filter::text($orig);
        Upload::saveToDatabase($orig, $stored, Upload::TYPE_TASK, $task->getID(), $project->getID());
    }
    // log it
    $logEvent = new Event(array('event_type_id' => 'create_task', 'project_id' => $project->getID(), 'user_1_id' => Session::getUserID(), 'item_1_id' => $task->getID(), 'data_1' => $task->getTitle(), 'data_2' => $task->getDescription()));
    $logEvent->save();
    // we're done here
    Session::setMessage('You created a new task.');
    $json = array('success' => '1', 'successUrl' => Url::task($task->getID()));
    echo json_encode($json);
} elseif ($action == 'edit') {
    // flag default is false; assume nothing is modified to start
    $modified = false;
    // is title modified?
    if ($title != $task->getTitle()) {
        // save changes
        $oldTitle = $task->getTitle();
        $task->setTitle($title);
        $task->save();
        // log it
开发者ID:malimu,项目名称:Pipeline,代码行数:31,代码来源:task.process.php

示例2: shouldCreateNewTask

 /**
  * @test
  */
 public function shouldCreateNewTask()
 {
     $task = new Task('Sample Title', 'Sample Description');
     $this->assertEquals('Sample Title', $task->getTitle());
     $this->assertEquals('Sample Description', $task->getDescription());
 }
开发者ID:mybuilder,项目名称:conductor,代码行数:9,代码来源:TaskTest.php

示例3: updateTask

    /**
     * Update the task clicked on
     * @param $userId the user editing
     * @param Task $task object containing task
     * @return bool true if updated
     */
    public function updateTask($userId, Task $task)
    {
        $sql = <<<SQL
UPDATE {$this->tableName}
SET title=?, notes=?, priority=?
WHERE userid=? AND id=?
SQL;
        $pdo = $this->pdo();
        $statement = $pdo->prepare($sql);
        $statement->execute(array($task->getTitle(), $task->getNotes(), $task->getPriority(), $userId, $task->getId()));
        if ($statement->rowCount() === 0) {
            return false;
        }
        return true;
    }
开发者ID:patelas7,项目名称:mi362ss16,代码行数:21,代码来源:Tasks.php

示例4: InsertNewTask

 public function InsertNewTask(Task $task = null)
 {
     if ($task == null || !$task instanceof Task) {
         return null;
     }
     $props = array("UserID," => $task->getUserID(), "ProjectID," => $task->getProjectID(), "Title," => $task->getTitle(), "Date," => $task->getDate(), "TargetHours," => $task->getTargetHours(), "ActualHours," => $task->getActualHours(), "Description," => $task->getDescription(), "IsComplete" => $task->getIsComplete());
     foreach ($props as $k => $v) {
         if ($v != null) {
             if ($k == "IsComplete") {
                 $_props[$k] = "{$v}";
             } else {
                 if (gettype($v) == "string") {
                     $_props[$k] = "'" . $v . "', ";
                 } else {
                     $_props[$k] = "{$v}, ";
                 }
             }
         }
     }
     $this->_dbAdapt->IStatement($this->dbTbl, $_props);
     $tmp = $this->_dbAdapt->getLnk();
     $tmp->query($this->_dbAdapt->getQry());
     unset($tmp);
     return true;
 }
开发者ID:B4RN3SCODE,项目名称:ASPM,代码行数:25,代码来源:TaskServiceAdapter.php

示例5: equals

 public function equals(Task $that)
 {
     return $this->getTitle() === $that->getTitle() && $this->getDescription() === $that->getDescription();
 }
开发者ID:mybuilder,项目名称:conductor,代码行数:4,代码来源:Task.php


注:本文中的Task::getTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。