当前位置: 首页>>代码示例>>PHP>>正文


PHP HtmlElement::init方法代码示例

本文整理汇总了PHP中HtmlElement::init方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlElement::init方法的具体用法?PHP HtmlElement::init怎么用?PHP HtmlElement::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HtmlElement的用法示例。


在下文中一共展示了HtmlElement::init方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 function init()
 {
     parent::init();
     $this->set('Problem Loading Google Map');
     $url = 'http://maps.google.com/maps?file=api&v=2&key=' . $this->api->getConfig('map/google/key', 'ABQIAAAA1dw0K5D0tpWLBbZ-SCh2YBS8lnDegradZ_LGHIBXZSRvdsbN5BQJtPnF1vFmNBWgvU-R-TiiESQV2g');
     $this->api->template->append('js_include', '<script type="text/javascript" src="' . $url . '"></script>' . "\n");
 }
开发者ID:romaninsh,项目名称:atkSchool,代码行数:7,代码来源:Map.php

示例2: init

 function init()
 {
     parent::init();
     $this->setElement('img');
     $this->setAttr('src', $this->api->locateURL('template', 'images/PinkElephant.jpg'));
     $this->set('');
 }
开发者ID:vikash124,项目名称:atk4-web,代码行数:7,代码来源:Alex.php

示例3: init

 function init()
 {
     parent::init();
     $this->set('Problem Loading Google Map');
     $url = 'http://maps.googleapis.com/maps/api/js?key=' . $this->api->getConfig('map/google/key', '') . '&sensor=true';
     $this->api->template->appendHTML('js_include', '<script type="text/javascript" src="' . $url . '"></script>' . "\n");
     $this->js(true, ' var map = new google.maps.Map(document.getElementById("' . $this->name . '"),{zoom: 8, center: new google.maps.LatLng(-34.397, 150.644), mapTypeId: google.maps.MapTypeId.ROADMAP});');
 }
开发者ID:xavoctechnocratspvtltd,项目名称:svc,代码行数:8,代码来源:Map.php

示例4: init

 function init()
 {
     parent::init();
     if (!$this->api->template->is_set('js_include')) {
         return;
     }
     // no support in templtae
     $this->set($v = $this->api->getVersion());
     if ($v[0] != 4) {
         return;
     }
     // probably not ATK version
     if (isset($_COOKIE[$this->name . '_' . str_replace('.', '_', $v)])) {
         return;
     }
     $this->api->template->append('js_include', '<script aync="true" onload="try{ atk4_version_check(\'' . $this->name . '\'); } catch(e){ }" type="text/javascript" src="http://agiletoolkit.org/upgrade_check/' . $this->api->getVersion() . '.js"></script>' . "\n");
 }
开发者ID:respond,项目名称:atk4,代码行数:17,代码来源:UpgradeChecker.php

示例5: init

 function init()
 {
     parent::init();
     $this->add('H4')->set('The Hangman Game');
     if (!$_GET[$this->name]) {
         $this->add('P')->set('Select Difficulty');
         $f = $this->add('Form');
         $f->addField('radio', 'difficulty')->setValueList(array(10 => 'Easy', 5 => 'Medium', 3 => 'Hard'));
         $f->addSubmit('Start Game');
         if ($f->isSubmitted()) {
             $this->memorize('word', 'back');
             $this->memorize('tries', $f->get('difficulty'));
             $this->memorize('letters', range('a', 'z'));
             $this->js()->reload(array($this->name => 1))->execute();
         }
         return;
     }
     $letter = $_GET[$this->name];
     $word = $this->recall('word');
     $tries = $this->recall('tries');
     $letters = $this->recall('letters');
     $this->api->stickyGET($this->name);
     if ($letter != 1) {
         unset($letters[array_search($letter, $letters)]);
         if (strpos($word, $letter) === false) {
             $tries--;
         }
         $this->memorize('tries', $tries);
         $this->memorize('letters', $letters);
     }
     $word = str_replace($letters, '-', $word);
     if ($tries < 0) {
         $this->add('P')->set('Game Over');
         return;
     }
     if (strpos($word, '-') === false) {
         $this->add('P')->set('You won!');
         return;
     }
     $this->add('P')->set('Mistakes remaining: ' . $tries);
     foreach ($letters as $i) {
         $l = $this->add('HtmlElement')->setElement('a')->setAttr('href', '#')->set(strtoupper($i))->js('click', $this->js()->reload(array($this->name => $i)));
     }
     $this->add('P')->set('Word: ' . $word);
 }
开发者ID:vikash124,项目名称:atk4-web,代码行数:45,代码来源:Hangman.php

示例6: init

 function init()
 {
     parent::init();
     $this->set($this->default_text);
     $this->addClass('password-checker');
     $field = $this->owner;
     if (!$field instanceof Form_Field) {
         throw $this->exception('You should use StrengthChecker by inserting it into password field');
     }
     $field->js('change')->univ()->ajaxec(array($this->api->url(), $this->name => $field->js()->val()));
     $field->js(true)->univ()->autoChange(1000);
     if (isset($_GET[$this->name]) || isset($_POST[$this->name])) {
         $p = $_POST[$this->name] ? $_POST[$this->name] : $_GET[$this->name];
         // Check
         if ($p) {
             $out = $this->checkByCrackLib($_GET[$this->name]);
         } else {
             $out = '';
         }
         $this->setResponse($p, $out);
     }
 }
开发者ID:xavoctechnocratspvtltd,项目名称:svc,代码行数:22,代码来源:StrengthChecker.php

示例7: init

 function init()
 {
     parent::init();
     $this->setElement('H3');
 }
开发者ID:respond,项目名称:atk4,代码行数:5,代码来源:H3.php

示例8: init

 function init()
 {
     parent::init();
     $this->addClass('atk-buttonset atk-inline');
 }
开发者ID:samratcis,项目名称:atk4,代码行数:5,代码来源:ButtonSet.php

示例9: init

 public function init()
 {
     parent::init();
     $this->setElement('form');
 }
开发者ID:atk4,项目名称:atk4,代码行数:5,代码来源:Plain.php

示例10: init

 function init()
 {
     parent::init();
     $this->setElement('div')->addClass('hr')->set('');
 }
开发者ID:respond,项目名称:atk4,代码行数:5,代码来源:HR.php

示例11: init

 public function init()
 {
     parent::init();
     $this->setElement('hr')->set('');
 }
开发者ID:atk4,项目名称:atk4,代码行数:5,代码来源:HR.php

示例12: init

 protected function init()
 {
     parent::init();
     list($y, $m, $d) = explode('-', date('Y-m-d'));
     $this->setYear($y);
     $this->setMonth($m);
     $this->setDay($d);
     if (null == $this->maxDate) {
         $this->maxDate = intval(date('Y')) + 50 . date('-m-d');
     }
     if (null == $this->minDate) {
         $this->minDate = intval(date('Y')) - 50 . date('-m-d');
     }
 }
开发者ID:kendolabdev,项目名称:kendoplatform,代码行数:14,代码来源:DateField.php

示例13: init

 function init()
 {
     parent::init();
     $this->add('Icon')->set($this->icon)->setColor('nobg');
 }
开发者ID:vikash124,项目名称:atk4-web,代码行数:5,代码来源:box.php


注:本文中的HtmlElement::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。