本文整理匯總了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'));
}
}