Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 and 403]

   1  <?php
   2  
   3  namespace IMSGlobal\LTI\ToolProvider;
   4  
   5  /**
   6   * Class to represent a content-item placement object
   7   *
   8   * @author  Stephen P Vickers <svickers@imsglobal.org>
   9   * @copyright  IMS Global Learning Consortium Inc
  10   * @date  2016
  11   * @version 3.0.2
  12   * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  13   */
  14  class ContentItemPlacement
  15  {
  16  
  17  /**
  18   * Class constructor.
  19   *
  20   * @param int $displayWidth       Width of item location
  21   * @param int $displayHeight      Height of item location
  22   * @param string $documentTarget  Location to open content in
  23   * @param string $windowTarget    Name of window target
  24   */
  25      function __construct($displayWidth, $displayHeight, $documentTarget, $windowTarget)
  26      {
  27  
  28          if (!empty($displayWidth)) {
  29              $this->displayWidth = $displayWidth;
  30          }
  31          if (!empty($displayHeight)) {
  32              $this->displayHeight = $displayHeight;
  33          }
  34          if (!empty($documentTarget)) {
  35              $this->documentTarget = $documentTarget;
  36          }
  37          if (!empty($windowTarget)) {
  38              $this->windowTarget = $windowTarget;
  39          }
  40  
  41      }
  42  
  43  }