本文整理匯總了PHP中Runalyze\Configuration::DataBrowser方法的典型用法代碼示例。如果您正苦於以下問題:PHP Configuration::DataBrowser方法的具體用法?PHP Configuration::DataBrowser怎麽用?PHP Configuration::DataBrowser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Runalyze\Configuration
的用法示例。
在下文中一共展示了Configuration::DataBrowser方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
if ($this->DayCount < 25) {
$weekSeparator = ' top-separated';
$monthSeparator = ' top-separated-light';
} else {
$weekSeparator = ' top-separated-light';
$monthSeparator = ' top-separated';
}
$Context = new \Runalyze\Dataset\Context(new Runalyze\Model\Activity\Entity(), $this->AccountID);
$Table = new \Runalyze\View\Dataset\Table($this->DatasetConfig);
?>
<div id="data-browser-container">
<table class="zebra-style">
<?php
if (\Runalyze\Configuration::DataBrowser()->showLabels()) {
?>
<thead class="data-browser-labels">
<tr class="small">
<td colspan="<?php
echo 2 + $this->ShowEditLink + $this->ShowPublicLink;
?>
"></td>
<?php
echo $Table->codeForColumnLabels();
?>
</tr>
</thead>
<?php
}
?>
示例2: showNewTimerangeInDB
/**
* Reload data browser for new timerange
*/
public static function showNewTimerangeInDB()
{
$mode = \Runalyze\Configuration::DataBrowser()->mode();
$rel = $mode->showMonth() ? 'month-link' : 'week-link';
echo Ajax::wrapJSasFunction('$("#data-browser .panel-heading a[rel=\'' . $rel . '\']").click();');
}
示例3: allCategories
/**
* All categories
* @return ConfigurationCategory[]
*/
private function allCategories()
{
return array(Configuration::General(), Configuration::Privacy(), Configuration::ActivityView(), Configuration::ActivityForm(), Configuration::Design(), Configuration::DataBrowser(), Configuration::Vdot(), Configuration::Trimp(), Configuration::BasicEndurance(), Configuration::Misc());
}
示例4: initTimestamps
/**
* Init private timestamps from request
*/
protected function initTimestamps()
{
if (!isset($_GET['start']) || !isset($_GET['end'])) {
$Mode = Configuration::DataBrowser()->mode();
if ($Mode->showMonth()) {
$this->timestamp_start = mktime(0, 0, 0, date("m"), 1, date("Y"));
$this->timestamp_end = mktime(23, 59, 50, date("m") + 1, 0, date("Y"));
} else {
$this->timestamp_start = Time::weekstart(time());
$this->timestamp_end = Time::weekend(time());
}
} else {
$this->timestamp_start = $_GET['start'];
$this->timestamp_end = $_GET['end'];
}
$this->day_count = round(($this->timestamp_end - $this->timestamp_start) / 86400);
}
示例5: dateString
/**
* Get date string for given timestamp
* @param int $timestamp
* @return string
*/
protected function dateString($timestamp)
{
$date = date('d.m.', $timestamp);
$addLink = '';
$weekDay = Time::weekday(date('w', $timestamp), true);
if (Configuration::DataBrowser()->showCreateLink() && !FrontendShared::$IS_SHOWN) {
$addLink = ImporterWindow::linkForDate($timestamp);
}
if (Time::isToday($timestamp)) {
$weekDay = '<strong>' . $weekDay . '</strong>';
}
return $date . ' ' . $addLink . ' ' . $weekDay;
}
示例6: displayEditLink
/**
* Display edit link if used in DataBrowser
*/
public function displayEditLink()
{
if (Configuration::DataBrowser()->showEditLink()) {
if ($this->isSummary || FrontendShared::$IS_SHOWN) {
echo HTML::emptyTD();
} else {
echo HTML::td($this->Linker->smallEditLink());
}
}
}