Example #1
0
 /**
  * Saves the ordering of all the fields.  Accepts an NUMERIC array of
  * ORDERRANK => FIELDNAME. (see getOrders)
  *
  * @param array orderArray
  */
 public function setOrders($orderArray)
 {
     global $g_ado_db;
     foreach ($orderArray as $order => $field) {
         $field = new ArticleTypeField($this->m_data['type_name'], $field);
         if ($field->exists()) {
             $field->setProperty('field_weight', $order);
         }
     }
 }
Example #2
0
 /**
  * Return TRUE if comments are enabled for this article type.
  *
  * @param boolean $p_value
  */
 public function setCommentsEnabled($p_value)
 {
     $p_value = $p_value ? '1' : '0';
     return $this->m_metadata->setProperty('comments_enabled', $p_value);
 }