本文整理汇总了PHP中Alias::sync方法的典型用法代码示例。如果您正苦于以下问题:PHP Alias::sync方法的具体用法?PHP Alias::sync怎么用?PHP Alias::sync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alias
的用法示例。
在下文中一共展示了Alias::sync方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
if (!empty($this->request->data['Admin']['icon'])) {
$this->_saveFavicon();
}
if (!empty($this->request->data['Admin']['export'])) {
$this->SiteExport->_exportSite($this->request->data['Admin']['export']);
}
if (!empty($this->request->data['Upgrade']['all'])) {
$this->SiteUpdate->_runUpdates();
$this->set('runUpdates', true);
}
if (!empty($this->request->data['Update']['index'])) {
$this->view = 'index_upgrade';
}
if (!empty($this->request->data['Alias']['update'])) {
App::uses('Alias', 'Model');
$Alias = new Alias();
$this->set('syncd', $Alias->sync());
$this->view = 'index_upgrade';
}
$complete = $this->Session->read('Updates.complete');
if (!empty($complete)) {
$this->Session->delete('Updates');
$this->Session->setFlash(__('Update check complete!!!'), 'flash_success');
}
$this->set('title_for_layout', 'Admin Dashboard');
$this->set('page_title_for_layout', 'Admin Dashboard');
$this->layout = 'default';
// this is here so we can show "Add Post" links foreach Blog on the dashboard
if (CakePlugin::loaded('Blogs')) {
App::uses('Blog', 'Blogs.Model');
$Blog = new Blog();
$this->set('blogs', $Blog->find('all'));
}
}