本文整理汇总了PHP中_dh函数的典型用法代码示例。如果您正苦于以下问题:PHP _dh函数的具体用法?PHP _dh怎么用?PHP _dh使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_dh函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Short description of method render
*
* @access public
* @author Jerome Bogaerts, <jerome@taotesting.com>
* @return string
*/
public function render()
{
$returnValue = (string) '';
$widgetName = $this->buildWidgetName();
$widgetContainerId = $this->buildWidgetContainerId();
$returnValue .= "<label class='form_desc' for='{$this->name}'>" . _dh($this->getDescription()) . "</label>";
$returnValue .= "<div id='{$widgetContainerId}' class='form-elt-container file-uploader'>";
if ($this->value instanceof tao_helpers_form_data_FileDescription && ($file = $this->value->getFile()) != null) {
// A file is stored or has just been uploaded.
$shownFileName = $this->value->getName();
$shownFileSize = $this->value->getSize();
$shownFileSize = number_format($shownFileSize / 1000, 2);
// to kb.
$shownFileTxt = sprintf(__('%s (%s kb)'), $shownFileName, $shownFileSize);
$deleteButtonTitle = __("Delete");
$deleteButtonId = $this->buildDeleteButtonId();
$downloadButtonTitle = __("Download");
$downloadButtonId = $this->buildDownloadButtonId();
$iFrameId = $this->buildIframeId();
$returnValue .= "<span class=\"widget_AsyncFile_fileinfo\">{$shownFileTxt}</span>";
$returnValue .= "<button id=\"{$downloadButtonId}\" type=\"button\" class=\"download btn-neutral small icon-download\" title=\"{$downloadButtonTitle}\">";
$returnValue .= "<button id=\"{$deleteButtonId}\" type=\"button\" class=\"delete btn-error small icon-bin\" title=\"{$deleteButtonTitle}\"/>";
$returnValue .= "<iframe style=\"display:none\" id=\"{$iFrameId}\" frameborder=\"0\"/>";
// Inject behaviour of the Delete/Download buttons component in response.
$returnValue .= self::embedBehaviour($this->buildDeleterBehaviour() . $this->buildDownloaderBehaviour());
} else {
// No file stored yet.
// Inject behaviour of the AsyncFileUpload component in response.
$returnValue .= self::embedBehaviour($this->buildUploaderBehaviour());
}
$returnValue .= "</div>";
return (string) $returnValue;
}
示例2: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = (string) '';
// foreach($this->attributes as $key => $value){
//
// if($key === 'class' && $value) {
//
// }
// $returnValue .= " {$key}='{$value}' ";
// }
/***
* this attributes
*/
if (!empty($this->description)) {
$returnValue .= "<label class='form_desc' for='{$this->name}'>" . _dh($this->getDescription()) . "</label>";
}
$content = _dh($this->value);
if ($this->icon) {
$content = $this->iconPosition === 'before' ? $this->icon . ' ' . $content : $content . ' ' . $this->icon;
}
$returnValue .= "<button type='button' name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '">' . $content . '</button>';
return (string) $returnValue;
}
示例3: index
/**
* Display the list of all readiness checks performed on the given test center
* It also allows launching new ones.
*/
public function index()
{
$testCenter = $this->getCurrentTestCenter();
$requestOptions = $this->getRequestOptions();
$this->setData('title', __('Readiness Check for test site %s', _dh($testCenter->getLabel())));
$this->composeView('diagnostic-index', array('testCenter' => $testCenter->getUri(), 'set' => TestCenterHelper::getDiagnostics($testCenter, $requestOptions), 'config' => TestCenterHelper::getDiagnosticConfig($testCenter), 'installedextension' => \common_ext_ExtensionsManager::singleton()->isInstalled('ltiDeliveryProvider')), array(BreadcrumbsHelper::testCenters(), BreadcrumbsHelper::testCenter($testCenter, TestCenterHelper::getTestCenters()), BreadcrumbsHelper::diagnostics($testCenter, array(BreadcrumbsHelper::deliveries($testCenter)))));
}
示例4: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = (string) '';
if (isset($this->attributes['class'])) {
$classes = explode(' ', $this->attributes['class']);
if (!isset($this->attributes['no-format'])) {
if (!in_array('form-elt-info', $classes)) {
$classes[] = 'form-elt-info';
}
}
if (!in_array('form-elt-container', $classes)) {
$classes[] = 'form-elt-container';
}
$this->attributes['class'] = implode(' ', $classes);
} else {
if (isset($this->attributes['no-format'])) {
$this->attributes['class'] = 'form-elt-container';
} else {
$this->attributes['class'] = 'form-elt-info form-elt-container';
}
}
unset($this->attributes['no-format']);
$returnValue .= "<span class='form_desc'>";
if (!empty($this->description)) {
$returnValue .= _dh($this->getDescription());
}
$returnValue .= "</span>";
$returnValue .= "<span ";
$returnValue .= $this->renderAttributes();
$returnValue .= " >";
$returnValue .= isset($this->attributes['htmlentities']) && !$this->attributes['htmlentities'] ? $this->value : _dh($this->value);
$returnValue .= "</span>";
return (string) $returnValue;
}
示例5: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = $this->renderLabel();
$returnValue .= "<input type='password' name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '" />';
return (string) $returnValue;
}
示例6: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = $this->renderLabel();
$returnValue .= "<textarea name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ">" . _dh($this->value) . "</textarea>";
return (string) $returnValue;
}
示例7: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = (string) '';
$returnValue .= "<input type='hidden' name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '" />';
return (string) $returnValue;
}
示例8: render
/**
* Short description of method render
*
* @access public
* @author Somsack Sipasseuth, <somsack.sipasseuth@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = $this->renderLabel();
$returnValue .= "<input type='text' readonly='readonly' disabled='disabled' name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '" />';
return (string) $returnValue;
}
示例9: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = (string) '';
if (is_null($this->value) || empty($this->value)) {
$this->value = __('Save');
}
$returnValue = "<input type='submit' id='{$this->name}' name='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '" />';
return (string) $returnValue;
}
示例10: getGroupTitle
/**
* Returns html for property
* @param $property
* @return string
*/
protected function getGroupTitle($property)
{
if ($this->isParentProperty()) {
foreach ($property->getDomain()->getIterator() as $domain) {
$domainLabel[] = $domain->getLabel();
}
$groupTitle = '<span class="property-heading-label">' . _dh($property->getLabel()) . '</span>' . '<span class="property-heading-toolbar">' . _dh(implode(' ', $domainLabel)) . ' <span class="icon-edit"></span>' . '</span>';
} else {
$groupTitle = '<span class="property-heading-label">' . _dh($property->getLabel()) . '</span>' . '<span class="property-heading-toolbar">' . '<span class="icon-edit"></span>' . '<span class="icon-bin property-deleter" data-uri=\'' . tao_helpers_Display::encodeAttrValue($property->getUri()) . '\'></span>' . '</span>';
}
return $groupTitle;
}
示例11: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = $this->renderLabel();
$content = _dh($this->value);
if ($this->icon) {
$content = $this->iconPosition === 'before' ? $this->icon . ' ' . $content : $content . ' ' . $this->icon;
}
$returnValue .= "<button type='{$this->type}' name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '">' . $content . '</button>';
return $returnValue;
}
示例12: index
/**
* @requiresRight id WRITE
*/
public function index()
{
$resource = new \core_kernel_classes_Resource($this->getRequestParameter('id'));
$revisions = RepositoryProxy::getRevisions($resource->getUri());
$returnRevision = array();
foreach ($revisions as $revision) {
$returnRevision[] = array('id' => $revision->getVersion(), 'modified' => \tao_helpers_Date::displayeDate($revision->getDateCreated()), 'author' => UserHelper::renderHtmlUser($revision->getAuthorId()), 'message' => _dh($revision->getMessage()));
}
$this->setData('resourceLabel', _dh($resource->getLabel()));
$this->setData('id', $resource->getUri());
$this->setData('revisions', $returnRevision);
$this->setView('History/index.tpl');
}
示例13: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = (string) '';
if (!isset($this->attributes['noLabel'])) {
$returnValue .= "<label class='form_desc' for='{$this->name}'>" . _dh($this->getDescription()) . "</label>";
} else {
unset($this->attributes['noLabel']);
}
$returnValue .= "<textarea name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ">" . _dh($this->value) . "</textarea>";
return (string) $returnValue;
}
示例14: render
/**
* Short description of method render
*
* @access public
* @author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = (string) '';
if (!isset($this->attributes['noLabel'])) {
$returnValue .= "<label class='form_desc' for='{$this->name}'>" . _dh($this->getDescription()) . "</label>";
} else {
unset($this->attributes['noLabel']);
}
$returnValue .= "<input type='password' name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '" />';
return (string) $returnValue;
}
示例15: render
/**
* Short description of method render
*
* @access public
* @author Somsack Sipasseuth, <somsack.sipasseuth@tudor.lu>
* @return string
*/
public function render()
{
$returnValue = (string) '';
if (!isset($this->attributes['noLabel'])) {
$returnValue .= "<span class='form_desc'>" . _dh($this->getDescription()) . "</span>";
} else {
unset($this->attributes['noLabel']);
}
$returnValue .= "<input type='text' readonly='readonly' disabled='disabled' name='{$this->name}' id='{$this->name}' ";
$returnValue .= $this->renderAttributes();
$returnValue .= ' value="' . _dh($this->value) . '" />';
return (string) $returnValue;
}