Changeset 28259
- Timestamp:
- 02/25/10 00:26:15 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/csGlossaryPlugin/trunk/lib/csGlossary.class.php
r17508 r28259 27 27 return str_split($this->alphabet); 28 28 } 29 29 30 public function getGlossaryCollection() 30 31 { … … 36 37 return $this->glossary; 37 38 } 39 38 40 public function getForLetter($letter) 39 41 { … … 45 47 return $this->glossary[$letter]; 46 48 } 49 47 50 public function getActiveAlphabet() 48 51 { … … 61 64 // = Private Functions = 62 65 // ===================== 63 pr ivatefunction addCollectionToGlossary($collection)66 protected function addCollectionToGlossary($collection) 64 67 { 65 68 foreach ($collection as $object) … … 68 71 } 69 72 } 70 private function addObjectToGlossary($object) 73 74 protected function addObjectToGlossary($object) 71 75 { 72 76 $value = $this->getObjectValue($object); … … 90 94 } 91 95 92 p rivatefunction getGlossaryQuery($table, $field, $letter = null)96 public function getGlossaryQuery($table, $field, $letter = null) 93 97 { 94 98 $q = Doctrine::getTable($table) … … 103 107 return $q; 104 108 } 105 private function getLettersQuery($table, $field) 109 110 public function getLettersQuery($table, $field) 106 111 { 107 112 $q = Doctrine::getTable($table) … … 112 117 return $q; 113 118 } 114 private function getObjectValue($object) 119 120 protected function getObjectValue($object) 115 121 { 116 122 $field = $this->fields[get_class($object)]; 117 123 return $object->$field; 118 124 } 119 private function processConfig($glossary) 125 126 protected function processConfig($glossary) 120 127 { 121 128 foreach(sfConfig::get('app_glossary_'.$glossary) as $key => $value) … … 133 140 } 134 141 } 135 private function initGlossary() 142 143 protected function initGlossary() 136 144 { 137 145 $glossary = array(); … … 142 150 return $glossary; 143 151 } 144 private function hasMultipleTables() 152 153 protected function hasMultipleTables() 145 154 { 146 155 return (count($this->tables) > 1); 147 156 } 148 private function insertArrayIndex($array, $new_element, $index) 157 158 protected function insertArrayIndex($array, $new_element, $index) 149 159 { 150 160 $start = array_slice($array, 0, $index);