Beispiel #1
0
 /**
  * get values for mapped parent
  * @return extrafs_value_collection
  */
 function get_field_values()
 {
     if (!isset($this->_extra_fs_values_collection)) {
         // fetch values for current parent *pid*
         $this->_extra_fs_values_collection = core::module('extrafs')->get_value_handle()->set_where('pid = %d AND ctype_id = %d', $this->_parent->get_id(), $this->_parent->get_ctype_id())->load();
     }
     foreach ($this as $v) {
         $v->get_field_value();
     }
     return $this->_extra_fs_values_collection;
 }
Beispiel #2
0
 function __construct(IAbs_Collection $container, $config = false, $data = false, $verified = false)
 {
     $return = parent::__construct($container, $config, $data, $verified);
     $this->active = time() < $this->time + $this->till;
     $this->ip_string = long2ip($this->ip);
     return $return;
 }
Beispiel #3
0
 /**
  * Avatar test 
  */
 function render()
 {
     if (false !== ($data = $this->get_render_cache())) {
         return $data;
     }
     $this->gender_string = $this->container->get_gender_by_id($this->gender);
     $this->gender_translated = core::module('users')->translate('gender_' . $this->get_data('gender_string'));
     $this->level_string = $this->container->get_level_by_id($this->level);
     $this->level_translated = core::module('users')->translate('level_' . $this->get_data('level_string'));
     // test avatars
     // $this->avatar = '/uploads/avatars/' . rand(1, 4) . '.jpg';
     return parent::render();
 }
Beispiel #4
0
 function __construct(IAbs_Collection $container, $config = false, $data = false, $verified = false)
 {
     $return = parent::__construct($container, $config, $data, $verified);
     $this->_is_cached = !empty($this->expire_time);
     return $return;
 }
Beispiel #5
0
 /**
  * @param abs_collection_item $item
  * @param bool $id
  * @return $this
  */
 function append(abs_collection_item $item, $id = false)
 {
     // if external
     $item->set_container($this);
     if (false === $id) {
         $this->items[] = $item;
     } else {
         $this->items[$id] = $item;
     }
     return $this;
 }
Beispiel #6
0
 function render2edt($a = 0, $b = 0)
 {
     $this->uip = long2ip($this->uip);
     return parent::render2edt($a, $b);
 }
Beispiel #7
0
 function virtual_parent($type)
 {
     if ($type == 'view') {
         return $this->get_parent() ? sprintf('<a href="%s" target="_blank">%s</a>', $this->_parent->get_url('self'), $this->_parent->id . '| ' . $this->_parent->title) : i18n::T('deleted');
     }
 }
Beispiel #8
0
 /** clean up */
 function remove_before()
 {
     if ($t = $this->get_children()) {
         $t->remove_all();
     }
     if ($t = $this->get_files()) {
         $t->remove_all();
     }
     if ($t = $this->get_node_files()) {
         $t->remove_all();
     }
     if ($t = $this->get_node_images()) {
         $t->remove_all();
     }
     parent::remove_before();
 }
Beispiel #9
0
 function prepare2edt()
 {
     $data = parent::prepare2edt();
     $data['data'] = str_replace("\n", '<br/>', $this->data);
     return $data;
 }
Beispiel #10
0
 /**
  * Remove
  */
 public function remove()
 {
     // Deletes links to post
     $this->get_results(true)->remove_all();
     return parent::remove();
 }