/**
  * Create a new Tfoot object.
  * 
  * @param TrCollection $content A collection of Tr objects with at least one Tr object.
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The lang of the bodyElement.
  * @param string $label The label of the bodyElement.
  */
 public function __construct(TrCollection $content, $id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setContent($content);
 }
Beispiel #2
0
 /**
  * Create a new Object object.
  *
  * @param string $data The URI for locating the data of the object.
  * @param string $type The mime-type of the object.
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws \InvalidArgumentException If any of the arguments above is invalid.
  */
 public function __construct($data, $type, $id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setData($data);
     $this->setType($type);
     $this->setWidth(-1);
     $this->setHeight(-1);
     $this->setContent(new ObjectFlowCollection());
 }
 /**
  * Fill $element with the attributes of $bodyElement.
  *
  * @param DOMElement $element The element from where the atribute values will be
  * @param BodyElement $bodyElement The bodyElement to be fill.
  */
 protected function fillElement(DOMElement $element, BodyElement $bodyElement)
 {
     if (($id = $bodyElement->getId()) !== '') {
         $element->setAttribute('id', $id);
     }
     if (($class = $bodyElement->getClass()) !== '') {
         $element->setAttribute('class', $class);
     }
     if (($lang = $bodyElement->getLang()) !== '') {
         $element->setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:lang', $lang);
     }
     if (($label = $bodyElement->getLabel()) != '') {
         $element->setAttribute('label', $label);
     }
 }
 /**
  * Create a new PrintedVariable object.
  * 
  * @param string $identifier The identifier of the outcome/template variable to print.
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws InvalidArgumentException If one of the arguments is invalid.
  */
 public function __construct($identifier, $id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setIdentifier($identifier);
 }
 /**
  * Create a new Choice object.
  * 
  * @param string $identifier The identifier of the choice.
  * @param string $id The identifier of the body element.
  * @param string $class The class of the body element.
  * @param string $lang The language of the body element.
  * @param string $label The label of the body element.
  */
 public function __construct($identifier, $id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setIdentifier($identifier);
     $this->setFixed(false);
     $this->setTemplateIdentifier('');
     $this->setShowHide(ShowHide::SHOW);
     $this->setObservers(new SplObjectStorage());
 }
 /**
  * Create a new InfoControl object.
  * 
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws \InvalidArgumentException If any of the above arguments is invalid.
  */
 public function __construct($id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setContent(new FlowStaticCollection());
 }
Beispiel #7
0
 /**
  * Create a new RubricBlock object.
  *
  * @param \qtism\data\ViewCollection $views A collection of values from the View enumeration.
  * @param string $id The identifier of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws \InvalidArgumentException If any of the arguments is invalid.
  */
 public function __construct(ViewCollection $views, $id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setViews($views);
     $this->setUse('');
     $this->setStylesheets(new StylesheetCollection());
     $this->setContent(new FlowStaticCollection());
 }
Beispiel #8
0
 /**
  * Fill $element with the attributes of $bodyElement.
  *
  * @param DOMElement $element The element from where the atribute values will be
  * @param BodyElement $bodyElement The bodyElement to be fill.
  */
 protected function fillElement(DOMElement $element, BodyElement $bodyElement)
 {
     if (($id = $bodyElement->getId()) !== '') {
         $element->setAttribute('id', $id);
     }
     if (($class = $bodyElement->getClass()) !== '') {
         $element->setAttribute('class', $class);
     }
     if (($lang = $bodyElement->getLang()) !== '') {
         $element->setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:lang', $lang);
     }
     if (($label = $bodyElement->getLabel()) != '') {
         $element->setAttribute('label', $label);
     }
     $version = $this->getVersion();
     if (Version::compare($version, '2.2.0', '>=') === true && ($dir = $bodyElement->getDir()) !== Direction::AUTO && in_array($bodyElement->getQtiClassName(), self::$dirClasses) === true) {
         $element->setAttribute('dir', Direction::getNameByConstant($dir));
     }
 }
 /**
  * Create a new Table object.
  * 
  * @param TbodyCollection $tbodies A collection of Tbody objects.
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws InvalidArgumentException If any of arguments is invalid.
  */
 public function __construct(TbodyCollection $tbodies, $id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setTbodies($tbodies);
     $this->setColgroups(new ColgroupCollection());
     $this->setCols(new ColCollection());
 }
Beispiel #10
0
 /**
  * Create a new FeedbackBlock object.
  *
  * @param string $outcomeIdentifier The identifier of an outcome variable controlling the visibility of the feedbackElement.
  * @param string $identifier The identifier value that determines the visibility of the feedbackElement in conjunction with $showHide.
  * @param integer $showHide A values of the ShowHide enumeration that determines hot the visibility of the feedbackElement is controlled.
  * @param string $id The identifier of the bodyElement.
  * @param string $class The class(es) of the bodyElement. If multiple classes, separate them with whitespaces (' ').
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws \InvalidArgumentException If any arguments of the constructor is invalid.
  */
 public function __construct($outcomeIdentifier, $identifier, $showHide = ShowHide::SHOW, $id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setOutcomeIdentifier($outcomeIdentifier);
     $this->setIdentifier($identifier);
     $this->setShowHide($showHide);
     $this->setContent(new FlowCollection());
 }
 /**
  * Create a new TableCell object.
  * 
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws InvalidArgumentException If one of the arguments is invalid.
  */
 public function __construct($id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setContent(new FlowCollection());
     $this->setHeaders(new IdentifierCollection());
     $this->setScope(-1);
     $this->setAbbr('');
     $this->setAxis('');
     $this->setRowspan(-1);
     $this->setColspan(-1);
 }
Beispiel #12
0
 /**
  * Create a new Hr object.
  *
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The label of the bodyElement.
  * @throws \InvalidArgumentException If one of the arguments is invalid.
  */
 public function __construct($id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
 }
Beispiel #13
0
 /**
  * Create a new Col object.
  * 
  * @param string $id The id of the bodyElement.
  * @param string $class The class of the bodyElement.
  * @param string $lang The language of the bodyElement.
  * @param string $label The language of the bodyElement.
  * @throws InvalidArgumentException If one of the argument is invalid.
  */
 public function __construct($id = '', $class = '', $lang = '', $label = '')
 {
     parent::__construct($id, $class, $lang, $label);
     $this->setSpan(1);
 }