本文整理汇总了PHP中Zend\View\Renderer\PhpRenderer::basepath方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpRenderer::basepath方法的具体用法?PHP PhpRenderer::basepath怎么用?PHP PhpRenderer::basepath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\View\Renderer\PhpRenderer
的用法示例。
在下文中一共展示了PhpRenderer::basepath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderPost
public function renderPost(Renderer $renderer)
{
$coreformsjs = $renderer->basepath('/Core/js/core.forms.js');
$javaScript = <<<JS
\$(document).ready(function() {
console.log('attached yk.forms.done to ', \$('form'));
\$('form').on('yk.forms.done', function(event, data) {
//if (typeof data != 'undefined' && typeof data['data'] != 'undefined') {}
if (typeof data != 'undefined' && typeof data['data'] != 'undefined') {
if (typeof data['data']['jobvalid'] != 'undefined' && data['data']['jobvalid'] === true) {
\$('#job_incomplete').hide();
\$('#finalize_jobentry').show();
}
else {
\$('#job_incomplete').show();
\$('#finalize_jobentry').hide();
}
}
\$('#job_errormessages').empty();
if (typeof data['data']['errorMessage'] != 'undefined') {
\$('#job_errormessages').append(data['data']['errorMessage']);
}
console.debug('job-form-inline', event, data);
});
});
JS;
$renderer->headScript()->appendScript($javaScript);
return parent::renderPost($renderer);
}
示例2: renderPost
public function renderPost(Renderer $renderer)
{
$coreformsjs = $renderer->basepath('/Core/js/core.forms.js');
$javaScript = <<<JS
\$(document).ready(function() {
console.log('attached yk.forms.done to ', \$('form'));
\$('form').on('yk.forms.done', function(event, data) {
//if (typeof data != 'undefined' && typeof data['data'] != 'undefined') {}
if (typeof data != 'undefined' && typeof data['data'] != 'undefined') {
if (typeof data['data']['jobvalid'] != 'undefined' && data['data']['jobvalid'] === true) {
\$('#job_incomplete').hide();
\$('.wizard-container .finish').removeClass('disabled');
}
else {
\$('#job_incomplete').show();
\$('.wizard-container .finish').addClass('disabled');
}
}
\$('#job_errormessages').empty();
if (typeof data['data']['errorMessage'] != 'undefined') {
\$('#job_errormessages').append(data['data']['errorMessage']);
}
console.debug('job-form-inline', event, data);
});
\$('.wizard-container').on('wizard:tabShow.jobcontainer', function(e, \$tab, \$nav, index) {
var \$link = \$tab.find('a');
var href = \$link.attr('href');
var \$target = \$(href);
var \$iframe = \$target.find('iframe');
\$iframe.each(function() { this.contentDocument.location.reload(true); });
var \$productList = \$target.find('#product-list-wrapper');
if (\$productList.length) {
\$productList.html('').load('/' + lang + '/jobs/channel-list?id=' + \$('#general-nameForm-job').val());
}
});
\$('.wizard-container .finish a').click(function (e) {
if (\$(e.currentTarget).parent().hasClass('disabled')) {
e.preventDefault();
return false;
}
});
});
JS;
$renderer->headScript()->appendScript($javaScript);
return parent::renderPost($renderer);
}