コード例 #1
0
 protected function writeCalendars(StreamInterface $stream)
 {
     $text = $this->text;
     for ($i = 1; $i <= 12; $i++) {
         $month = DateTime::createFromFormat("Y n j", $this->year->format("Y") . ' ' . $i . ' 1');
         $calendarTemplate = new CalendarTemplate($text, $month, $this->articlesInYear, $this->createLinks);
         $monthName = ucFirst($calendarTemplate->getMonthName($month));
         $yearNumber = $month->format("Y");
         $stream->write('<div class="calender_month_wrapper">');
         $stream->write("<h3>{$monthName} {$yearNumber}</h3>");
         $calendarTemplate->writeText($stream);
         $stream->write('</div>');
     }
 }
コード例 #2
0
ファイル: DatePickerTemplate.php プロジェクト: rutgerkok/rCMS
    public function writeText(StreamInterface $stream)
    {
        $stream->write(<<<TEXT
            <script type="text/javascript">
                {$this->getSendAndCloseFunction()}
            </script>
        
            <form action="datepicker.php" method="post" onchange="this.submit()">
                <p class="result_selector_menu">
                    {$this->getMonthSelector()}
                    {$this->getYearSelector()}
                </p>
            </form>
TEXT
);
        parent::writeText($stream);
    }