Exemple #1
0
 static function find($search_id)
 {
     //Set up a null property
     $found_task = null;
     //Acquire all of our task row information
     $tasks = TASK::getAll();
     //Sift through tasks and pull out the one matching our id
     foreach ($tasks as $task) {
         $task_id = $task->getId();
         if ($task_id == $search_id) {
             $found_task = $task;
         }
     }
     //Return the found task
     return $found_task;
 }
 /**
  * Execute the form.
  * @param TASK $obj
  * @access private
  */
 public function commit($obj)
 {
     $obj->verbose = $this->value_for('verbose');
     $obj->testing = $this->value_for('testing');
     $obj->stop_on_error = $this->value_for('stop_on_error');
     $obj->log_debug = $this->value_for('debug');
     $obj->log_database = $this->value_for('database');
     $obj->run_as_console = $this->value_for('console');
     $obj->owns_page = false;
     $obj->execute();
 }
 /**
  * @param FRAMEWORK_INFO
  */
 public function __construct($info)
 {
     parent::__construct($info->context);
     $this->info = $info;
     $this->ignore_from_version = !$this->info->exists();
 }
 /**
  * Initialize any loggers needed for the migration process.
  * @access private
  */
 protected function _finish()
 {
     $t = $this->_folder->title_formatter();
     $t->text = 'View pictures';
     $t->add_argument('time_frame', 'recent');
     $t->add_argument('panel', 'picture');
     $link_text = $this->_folder->title_as_link($t);
     $this->_log("Imported [{$this->_num_pictures_imported}] pictures. ({$link_text})", Msg_type_info, true);
     parent::_finish();
 }