[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blocks/rss_client/classes/output/ -> footer.php (source)

   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * Contains class block_rss_client\output\footer
  19   *
  20   * @package   block_rss_client
  21   * @copyright 2015 Howard County Public School System
  22   * @author    Brendan Anderson <brendan_anderson@hcpss.org>
  23   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  24   */
  25  
  26  namespace block_rss_client\output;
  27  
  28  defined('MOODLE_INTERNAL') || die();
  29  
  30  /**
  31   * Class to help display an RSS Block footer
  32   *
  33   * @package   block_rss_client
  34   * @copyright 2015 Howard County Public School System
  35   * @author    Brendan Anderson <brendan_anderson@hcpss.org>
  36   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  37   */
  38  class footer implements \renderable, \templatable {
  39  
  40      /**
  41       * The link provided in the RSS channel
  42       *
  43       * @var \moodle_url
  44       */
  45      protected $channelurl;
  46  
  47      /**
  48       * Constructor
  49       *
  50       * @param \moodle_url $channelurl The link provided in the RSS channel
  51       */
  52      public function __construct(\moodle_url $channelurl) {
  53          $this->channelurl = $channelurl;
  54      }
  55  
  56      /**
  57       * Set the channel url
  58       *
  59       * @param \moodle_url $channelurl
  60       * @return \block_rss_client\output\footer
  61       */
  62      public function set_channelurl(\moodle_url $channelurl) {
  63          $this->channelurl = $channelurl;
  64  
  65          return $this;
  66      }
  67  
  68      /**
  69       * Get the channel url
  70       *
  71       * @return \moodle_url
  72       */
  73      public function get_channelurl() {
  74          return $this->channelurl;
  75      }
  76  
  77      /**
  78       * Export context for use in mustache templates
  79       *
  80       * @see templatable::export_for_template()
  81       * @param renderer_base $output
  82       * @return stdClass
  83       */
  84      public function export_for_template(\renderer_base $output) {
  85          $data = new \stdClass();
  86          $data->channellink = clean_param($this->channelurl, PARAM_URL);
  87  
  88          return $data;
  89      }
  90  }


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1