コード例 #1
0
 /**
  * Show search details for an object.
  * @param DRAFTABLE_ENTRY $obj
  * @access private
  */
 protected function _echo_details($obj)
 {
     if ($obj->unpublished()) {
         parent::_echo_details($obj);
     } else {
         $this->_echo_user_information('Published by', $obj->publisher(), $obj->time_published);
     }
 }
コード例 #2
0
ファイル: recipe.php プロジェクト: mvonballmo/earthli-webcore
 /**
  * Return default handler objects for supported tasks.
  * @param string $handler_type Specific functionality required.
  * @param object $options
  * @return object
  * @access private
  */
 protected function _default_handler_for($handler_type, $options = null)
 {
     switch ($handler_type) {
         case Handler_print_renderer:
         case Handler_html_renderer:
         case Handler_text_renderer:
             include_once 'recipes/gui/recipe_renderer.php';
             return new RECIPE_RENDERER($this->app, $options);
         case Handler_commands:
             include_once 'recipes/cmd/recipe_commands.php';
             return new RECIPE_COMMANDS($this);
         case Handler_history_item:
             include_once 'recipes/obj/recipe_history_items.php';
             return new RECIPE_HISTORY_ITEM($this->app);
         default:
             return parent::_default_handler_for($handler_type, $options);
     }
 }
コード例 #3
0
 /**
  * Show created/updated information in plain text.
  * @param DRAFTABLE_ENTRY $entry
  * @access private
  */
 protected function _echo_plain_text_users($entry)
 {
     if ($entry->time_published->is_valid()) {
         $this->_echo_plain_text_user('Published', $entry->publisher(), $entry->time_published);
         if ($entry->modified()) {
             $this->_echo_plain_text_user('Updated', $entry->modifier(), $entry->time_modified);
         }
     } else {
         parent::_echo_plain_text_users($entry);
     }
 }