b2evolution PHP Cross Reference Blogging Systems

Source: /inc/widgets/widgets/_coll_page_list.widget.php - 118 lines - 3198 bytes - Summary - Text - Print

Description: This file implements the Page list Widget class. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the Page list Widget class.
   4   *
   5   * This file is part of the evoCore framework - {@link http://evocore.net/}
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
   9   *
  10   * {@internal License choice
  11   * - If you have received this file as part of a package, please find the license.txt file in
  12   *   the same folder or the closest folder above for complete license terms.
  13   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  14   *   then you must choose one of the following licenses before using the file:
  15   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  16   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  17   * }}
  18   *
  19   * @package evocore
  20   *
  21   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  22   * @author fplanque: Francois PLANQUE.
  23   *
  24   * @version $Id: _coll_page_list.widget.php 6136 2014-03-08 07:59:48Z manuel $
  25   */
  26  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  27  
  28  load_class( 'widgets/widgets/_coll_item_list.widget.php','coll_item_list_Widget');
  29  
  30  /**
  31   * ComponentWidget Class
  32   *
  33   * A ComponentWidget is a displayable entity that can be placed into a Container on a web page.
  34   *
  35   * @package evocore
  36   */
  37  class coll_page_list_Widget extends coll_item_list_Widget
  38  {
  39      /**
  40       * Constructor
  41       */
  42  	function coll_page_list_Widget( $db_row = NULL )
  43      {
  44          // Call parent constructor:
  45          parent::ComponentWidget( $db_row, 'core', 'coll_page_list' );
  46      }
  47  
  48  
  49      /**
  50       * Get definitions for editable params
  51       *
  52       * @see Plugin::GetDefaultSettings()
  53       * @param local params like 'for_editing' => true
  54       */
  55  	function get_param_definitions( $params )
  56      {
  57          // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
  58          $r = parent::get_param_definitions( $params );
  59          // We only change the defaults and hide some params.
  60          $r['title']['defaultvalue'] = T_('Pages');
  61          $r['title_link']['no_edit'] = true;
  62          $r['item_type']['no_edit'] = true;
  63          $r['follow_mainlist']['no_edit'] = true;
  64          $r['blog_ID']['no_edit'] = true;
  65          $r['item_title_link_type']['no_edit'] = true;
  66          $r['disp_excerpt']['no_edit'] = true;
  67          $r['disp_teaser']['no_edit'] = true;
  68          $r['disp_teaser_maxwords']['no_edit'] = true;
  69          $r['widget_css_class']['no_edit'] = true;
  70          $r['widget_ID']['no_edit'] = true;
  71  
  72          return $r;
  73      }
  74  
  75  
  76      /**
  77       * Get name of widget
  78       */
  79  	function get_name()
  80      {
  81          return T_('Simple Page list');
  82      }
  83  
  84  
  85      /**
  86       * Get a very short desc. Used in the widget list.
  87       */
  88  	function get_short_desc()
  89      {
  90          return format_to_output($this->disp_params['title']);
  91      }
  92  
  93  
  94      /**
  95       * Get short description
  96       */
  97  	function get_desc()
  98      {
  99          return T_('Simplified Item list for listing pages.');
 100      }
 101  
 102  
 103      /**
 104       * Prepare display params
 105       *
 106       * @param array MUST contain at least the basic display params
 107       */
 108  	function init_display( $params )
 109      {
 110          // Force some params (because this is a simplified widget):
 111          $params['item_type'] = '1000';    // Use item types 1000 (pages) only
 112  
 113          parent::init_display( $params );
 114      }
 115  
 116  }
 117  
 118  ?>

title

Description

title

Description

title

Description

title

title

Body