本文整理汇总了PHP中WebPage::That方法的典型用法代码示例。如果您正苦于以下问题:PHP WebPage::That方法的具体用法?PHP WebPage::That怎么用?PHP WebPage::That使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebPage
的用法示例。
在下文中一共展示了WebPage::That方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Save
function Save($editor)
{
$comment = $editor->Text;
$editor->Leave();
$this->Controls->Clear();
$this->Controls->Add(new MarkupRegion($comment, 0, 0, '100%', '100%'));
WebPage::That()->Controls->Add(new BlogComment())
->Layout = Layout::Relative;
}
示例2: Track
/**
* Begins tracking this page, that is, reporting to Google servers activity associated with a particular account.
* @param string $accountNumber This is a number given to you by Google that uniquely associates you with your account.
*/
static function Track($accountNumber)
{
// URL to download Google Analytics API JavaScripts. Note that there is a http and a https version.
$url = (isset($_SERVER['HTTPS']) ? 'https://ssl.' : 'http://www.') . 'google-analytics.com/ga.js';
// Add those scripts.
ClientScript::AddSource($url, false);
// The code to report this use of the page to Google servers.
ClientScript::RaceQueue(WebPage::That(), '_gat', "pageTracker = _gat._getTracker('{$accountNumber}');pageTracker._trackPageview();");
// Report back to Google servers every time tokens are changed too.
URL::SetTracker(new RaceClientEvent('pageTracker', 'pageTracker._trackPageview', URL::Tokens));
}
示例3: ContentSlider
function ContentSlider($content=null, $left, $top, $width, $height)
{
parent::Panel($left, $top, $width, $height);
WebPage::That()->CSSFiles->Add(GetRelativePath(getcwd(), dirname(__FILE__)) . '/Styles/default.css');
$this->CSSClasses->Add('ContentSlider');
$this->SlideHolder = new Panel(0, 0, '100%', '100%');
$this->Slides = new Group();
$this->Slides->Change = new ServerEvent($this, 'SlideContent');
$this->SlideHolder->Controls->Add($this->Slides);
if($content)
$this->SetContent($content);
$this->Controls->Add($this->SlideHolder);
$this->SetPrevious();
$this->SetNext();
}
示例4: Show
/**
* Do not call manually! Override of default Show(). Triggers when SyntaxHighlighter instance is initially shown.
*/
function Show()
{
parent::Show();
$relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__));
//Add Non-Minified Version of shCore.js for debugging
// ClientScript::AddSource($relativePath . '/src/shCore.js', false);
ClientScript::AddSource($relativePath . '/scripts/shCore.js', false);
ClientScript::AddSource($relativePath . '/scripts/shBrush' . $this->Language . '.js', false);
WebPage::That()->CSSFiles->Add($relativePath . '/styles/shCore.css');
WebPage::That()->CSSFiles->Add($relativePath . '/styles/shThemeDefault.css');
}
示例5: CreateToolbar
/**
* Create a new global Toolbar that can be used across all CKEditor instances.
*
* After CreateToolbar() is used, you can then set your CKEditor instances to use your new toolbar via $object->Toolbar = $name;.
*
* @param string $name
* @param array|array(arrays) $strips
*/
static function CreateToolbar($name, $strips)
{
ClientScript::RaceQueue(WebPage::That(), 'CKEDITOR.status == "loaded"', 'CKEDITOR.on("toolbar", function(e)' . '{CKEDITOR.config.toolbar_' . $name . '=' . ClientEvent::ClientFormat($strips) . ';});', null, false, Priority::High);
}
示例6: Show
/**
* Do not call manually! Override of default Show(). Triggers when FullCalendar instance is initially shown.
*/
function Show()
{
parent::Show();
$relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__));
//Add FullCalendar CSS
WebPage::That()->CSSFiles->Add($relativePath . '/Vendor/' . self::$CalendarPath . '/fullcalendar/fullcalendar.css');
//Add FullCalendar script files
ClientScript::AddSource($relativePath . 'Vendor/' . self::$CalendarPath . '/jquery/' . 'jquery-1.7.2.min.js', false);
ClientScript::AddSource($relativePath . 'Vendor/' . self::$CalendarPath . '/jquery/' . 'jquery-1.7.2.min.js', false);
ClientScript::RaceAddSource('jQuery', $relativePath . 'Vendor/' . self::$CalendarPath . '/fullcalendar/' . 'fullcalendar.min.js');
$this->Refresh(true);
}