/**
  * Used to draw the entry's title in each cell.
  * @param CONTENT_OBJECT $obj
  * @return TITLE_FORMATTER
  * @access private
  */
 public function title_formatter($obj)
 {
     $Result = $obj->title_formatter();
     $Result->max_visible_output_chars = 0;
     if (!empty($this->app->search_text)) {
         $Result->add_argument('search_text', $this->app->search_text);
     }
     return $Result;
 }
 /**
  * @param CONTENT_OBJECT $obj
  * @param MAIL_OBJECT_RENDERER_OPTIONS $options
  * @access private
  */
 protected function _echo_text_content($obj, $options)
 {
     $f = $obj->title_formatter();
     $f->max_visible_output_chars = 0;
     echo $this->line($obj->title_as_plain_text($f));
     echo $this->sep();
     echo $this->line($obj->object_url_as_text($this->app->mail_options->object_separator));
     echo $this->line('<' . $obj->home_page() . '>');
     echo $this->sep();
     $renderer = $obj->handler_for(Handler_text_renderer, $options);
     $renderer->display($obj);
 }
Exemple #3
0
 /**
  * Return default handler objects for supported tasks.
  * @param string $handler_type Specific functionality required.
  * @param OBJECT_RENDERER_OPTIONS $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 'webcore/gui/user_renderer.php';
             return new USER_RENDERER($this->app, $options);
         case Handler_commands:
             include_once 'webcore/cmd/user_commands.php';
             return new USER_COMMANDS($this);
         case Handler_history_item:
             include_once 'webcore/obj/webcore_history_items.php';
             return new USER_HISTORY_ITEM($this->app);
         case Handler_subscriptions:
             include_once 'webcore/gui/subscription_renderer.php';
             return new USER_SUBSCRIPTION_RENDERER($this->app, $options);
         default:
             return parent::_default_handler_for($handler_type, $options);
     }
 }
 /**
  * Read in the description from this object.
  * Descendents can decide which description (HTML or plain text) to use based
  * on the {@link $html} flag or other properties.
  * @param CONTENT_OBJECT $obj
  */
 public function set_description_from($obj)
 {
     switch ($this->article_format) {
         case Newsfeed_content_html:
         case Newsfeed_content_full_html:
             $this->description = $obj->description_as_html();
             break;
         case Newsfeed_content_text:
             $this->description = $obj->description_as_plain_text();
             break;
     }
 }
Exemple #5
0
 /**
  * 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_commands:
             include_once 'webcore/cmd/group_commands.php';
             return new GROUP_COMMANDS($this);
         case Handler_history_item:
             include_once 'webcore/obj/webcore_history_items.php';
             return new GROUP_HISTORY_ITEM($this->app);
         default:
             return parent::_default_handler_for($handler_type, $options);
     }
 }
 /**
  * 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 'webcore/gui/search_renderer.php';
             return new SEARCH_RENDERER($this->app, $options);
         case Handler_commands:
             include_once 'webcore/cmd/search_commands.php';
             return new SEARCH_COMMANDS($this);
         default:
             return parent::_default_handler_for($handler_type, $options);
     }
 }
 /**
  * Read in the description from this object.
  * RSS always uses plain text for descriptions (HTML is not allowed).
  * @param CONTENT_OBJECT $obj
  */
 public function set_description_from($obj)
 {
     $this->description = $obj->description_as_plain_text();
 }
 /**
  * Copy properties from the given object.
  * @param OBJECT_IN_FOLDER $other
  * @access private
  */
 protected function copy_from($other)
 {
     parent::copy_from($other);
     $this->_parent_folder = $other->_parent_folder;
 }