Changeset 1472:994f097572a6
- Timestamp:
- 08/19/13 11:48:41 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/posts_actions.php
r1471 r1472 17 17 $params = array(); 18 18 19 /** 20 * FieldsList - Compatibility class for hidden fields & entries[] fields 21 * 22 */ 19 23 class FieldsList { 24 /** @var array list of hidden fields */ 20 25 protected $hidden; 26 /** @var array list of selected entries */ 21 27 protected $entries; 28 29 30 /** 31 * Class constructor 32 */ 22 33 public function __construct() { 23 34 $this->hidden=array(); 24 35 $this->entries =array(); 25 36 } 26 public function addHidden($name,$value) { 37 38 /** 39 * addHidden - adds a hidden field 40 * 41 * @param string $name the field name. 42 * @param mixed $value the field value. 43 * 44 * @access public 45 * @return the FieldsList instance, enabling to chain requests 46 */ 47 public function addHidden($name,$value) { 27 48 $this->hidden[] = form::hidden($name,$value); 28 49 return $this; 29 50 } 30 public function addEntry($id,$title) { 51 52 /** 53 * addEntry - adds a antry field 54 * 55 * @param string $id the entry id. 56 * @param mixed $title the entry title. 57 * 58 * @access public 59 * @return the FieldsList instance, enabling to chain requests 60 */ 61 public function addEntry($id,$title) { 31 62 $this->entries[$id]=$title; 32 63 return $this; 33 64 } 34 65 35 public function getHidden() { 66 /** 67 * getHidden - returns the list of hidden fields, html encoded 68 * 69 * @access public 70 * @return the list of hidden fields, html encoded 71 */ 72 public function getHidden() { 36 73 return join('',$this->hidden); 37 74 } 38 75 76 /** 77 * getEntries - returns the list of entry fields, html encoded 78 * 79 * @param boolean $hidden if set to true, returns entries as a list of hidden field 80 * if set to false, returns html code displaying the list of entries 81 * with a list of checkboxes to enable to select/deselect entries 82 * @access public 83 * @return the list of entry fields, html encoded 84 */ 39 85 public function getEntries ($hidden=false) { 40 86 $ret = ''; … … 59 105 } 60 106 107 /** 108 * __toString - magic method. -- DEPRECATED here 109 * This method is only used to preserve compatibility with plugins 110 * relying on previous versions of adminPostsActionsContent behavior, 111 * 112 * @access public 113 * @return the list of hidden fields and entries (as hidden fields too), html encoded 114 */ 61 115 public function __toString() { 62 116 return join('',$this->hidden).$this->getEntries(true);
Note: See TracChangeset
for help on using the changeset viewer.