Beispiel #1
0
 /**
  * Constructs the content item.
  * The id passed will usually be the primary key of the model data in the
  * database but as this is model specific it can be interpreted in other ways.
  *
  * @param mixed $itemid					- The id of the item
  * @param int $load_flags				- Any required info prenotification
  */
 public function __construct($itemid = false, $load_flags = false)
 {
     if (!$this->package or !$this->class) {
         throw new vB_Exception_Content('No package or contenttype class defined for content item ');
     }
     parent::__construct($itemid, $load_flags);
 }
Beispiel #2
0
	/**
	 * Constructs the content item.
	 * The id passed will usually be the primary key of the model data in the
	 * database but as this is model specific it can be interpreted in other ways.
	 *
	 * @param mixed $itemid					- The id of the item
	 * @param int $load_flags				- Any required info prenotification
	 */
	public function __construct($itemid = false, $load_flags = false)
	{
		if (!$this->package OR !$this->class)
		{
			throw (new vBCms_Exception_Widget('No package or widgettype class defined for widget item \'' . get_class($this) . '\''));
		}

		// Ensure the widgettype is valid
		vBCms_Types::instance()->assertWidgetType(array('package' => $this->package, 'class' => $this->class));

		$this->item_properties = array_merge($this->item_properties, $this->widget_properties);

		parent::__construct($itemid, $load_flags);
	}