Changeset 2566:9bf417837888 for inc/admin/lib.admincombos.php
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.admincombos.php
r2154 r2566 14 14 @ingroup DC_CORE 15 15 @nosubgrouping 16 @brief Admin combo library 16 @brief Admin combo library 17 17 18 18 Dotclear utility class that provides reuseable combos across all admin … … 23 23 /** @var dcCore dcCore instance */ 24 24 public static $core; 25 25 26 26 /** 27 27 Returns an hierarchical categories combo from a category record 28 28 29 29 @param categories <b>record</b> the category record 30 30 @return <b>array</b> the combo box (form::combo -compatible format) … … 44 44 return $categories_combo; 45 45 } 46 46 47 47 /** 48 Returns available post status combo 49 48 Returns available post status combo 49 50 50 @return <b>array</b> the combo box (form::combo -compatible format) 51 51 */ … … 57 57 return $status_combo; 58 58 } 59 59 60 60 /** 61 61 Returns an users combo from a users record 62 62 63 63 @param users <b>record</b> the users record 64 64 @return <b>array</b> the combo box (form::combo -compatible format) … … 70 70 $user_cn = dcUtils::getUserCN($users->user_id,$users->user_name, 71 71 $users->user_firstname,$users->user_displayname); 72 72 73 73 if ($user_cn != $users->user_id) { 74 74 $user_cn .= ' ('.$users->user_id.')'; 75 75 } 76 77 $users_combo[$user_cn] = $users->user_id; 76 77 $users_combo[$user_cn] = $users->user_id; 78 78 } 79 79 return $users_combo; 80 80 } 81 81 82 82 /** 83 83 Returns an date combo from a date record 84 84 85 85 @param dates <b>record</b> the dates record 86 86 @return <b>array</b> the combo box (form::combo -compatible format) 87 */ 87 */ 88 88 public static function getDatesCombo($dates) { 89 89 $dt_m_combo= array(); 90 90 while ($dates->fetch()) { 91 91 $dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month(); 92 } 92 } 93 93 return $dt_m_combo; 94 94 } 95 95 96 96 /** 97 97 Returns an lang combo from a lang record 98 98 99 99 @param langs <b>record</b> the langs record 100 100 @param with_available <b>boolean</b> if false, only list items from record 101 101 if true, also list available languages 102 102 @return <b>array</b> the combo box (form::combo -compatible format) 103 */ 103 */ 104 104 public static function getLangsCombo($langs,$with_available=false) { 105 105 $all_langs = l10n::getISOcodes(0,1); … … 124 124 return $langs_combo; 125 125 } 126 126 127 127 /** 128 128 Returns a combo containing all available and installed languages for administration pages 129 129 130 130 @return <b>array</b> the combo box (form::combo -compatible format) 131 */ 131 */ 132 132 public static function getAdminLangsCombo() { 133 133 $lang_combo = array(); … … 139 139 return $lang_combo; 140 140 } 141 141 142 142 /** 143 143 Returns a combo containing all available formaters in admin 144 144 145 145 @return <b>array</b> the combo box (form::combo -compatible format) 146 */ 146 */ 147 147 public static function getFormatersCombo() { 148 148 foreach (self::$core->getFormaters() as $v) { … … 151 151 return $formaters_combo; 152 152 } 153 153 154 154 /** 155 155 Returns a combo containing available blog statuses 156 156 157 157 @return <b>array</b> the combo box (form::combo -compatible format) 158 */ 158 */ 159 159 public static function getBlogStatusesCombo() { 160 160 $status_combo = array(); … … 164 164 return $status_combo; 165 165 } 166 166 167 167 /** 168 168 Returns a combo containing available comment statuses 169 169 170 170 @return <b>array</b> the combo box (form::combo -compatible format) 171 */ 171 */ 172 172 public static function getCommentStatusescombo() { 173 173 $status_combo = array();
Note: See TracChangeset
for help on using the changeset viewer.