Example #1
0
 /**
  * Retrieve parent
  * Formats parent ID for custom parents
  * @uses parent::get_parent()
  * @return string Parent ID
  */
 public function get_parent()
 {
     $parent = parent::get_parent();
     return $this->is_parent_custom() ? $this->add_prefix($parent) : $parent;
 }
 /**
  * Validate instance
  * @see `Base_Object::is_valid()`
  * @return bool Valid (TRUE) / Invalid (FALSE)
  */
 public function is_valid()
 {
     $ret = parent::is_valid();
     if ($ret) {
         // Check required component properties
         $props = array_merge($this->props_required_base, $this->props_required);
         foreach ($props as $prop) {
             if (!isset($this->{$prop}) || empty($this->{$prop})) {
                 $ret = false;
                 break;
             }
         }
     }
     return $ret;
 }