本文整理汇总了PHP中MessageBox::writeWarning方法的典型用法代码示例。如果您正苦于以下问题:PHP MessageBox::writeWarning方法的具体用法?PHP MessageBox::writeWarning怎么用?PHP MessageBox::writeWarning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageBox
的用法示例。
在下文中一共展示了MessageBox::writeWarning方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _createObjectOperation
protected function _createObjectOperation()
{
if (isset($_FILES[$this->name]['tmp_name']['file'])) {
if ($_FILES[$this->name]['size']['file'] > ini_get('upload_max_filesize') * 1024 * 1024) {
MessageBox::writeWarning('uploaded file size exceeds limit');
return false;
}
$this->object->set('tmp_file_path', $_FILES[$this->name]['tmp_name']['file']);
$this->object->set('file_name', $_FILES[$this->name]['name']['file']);
$this->object->set('mime_type', $_FILES[$this->name]['type']['file']);
}
return parent::_createObjectOperation();
}
示例2: _validPerform
protected function _validPerform($request, $response)
{
$user_object = Limb::toolkit()->createSiteObject('UserObject');
$data = $this->dataspace->export();
try {
$user_object->changeOwnPassword($data['password']);
} catch (SQLException $e) {
throw $e;
} catch (LimbException $e) {
$request->setStatus(Request::STATUS_FAILED);
}
$request->setStatus(Request::STATUS_FORM_SUBMITTED);
Limb::toolkit()->getUser()->logout();
MessageBox::writeWarning(Strings::get('need_relogin', 'user'));
}
示例3: _validPerform
public function _validPerform($request, $response)
{
parent::_validPerform($request, $response);
if ($this->_changingOwnPassword()) {
Limb::toolkit()->getUser()->logout();
MessageBox::writeWarning(Strings::get('need_relogin', 'user'));
} else {
$object_data = $this->_loadObjectData();
Limb::toolkit()->getSession()->storageDestroyUser($object_data['id']);
}
if ($request->getStatus() == Request::STATUS_SUCCESS) {
if ($request->hasAttribute('popup')) {
$response->write(closePopupResponse($request, '/'));
}
}
}