本文整理汇总了PHP中Pimcore\Logger::alert方法的典型用法代码示例。如果您正苦于以下问题:PHP Logger::alert方法的具体用法?PHP Logger::alert怎么用?PHP Logger::alert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pimcore\Logger
的用法示例。
在下文中一共展示了Logger::alert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$sendingId = $input->getArgument("sendingId");
$tmpStore = Model\Tool\TmpStore::get($sendingId);
if (empty($tmpStore)) {
Logger::alert("No sending configuration for {$sendingId} found. Cannot send newsletter.");
exit;
}
$data = $tmpStore->getData();
if ($data['inProgress']) {
Logger::alert("Cannot send newsletters because there's already one active sending process.");
exit;
}
$data['inProgress'] = 1;
$tmpStore->setData($data);
$tmpStore->update();
$document = Model\Document\Newsletter::getById($data['documentId']);
$addressSourceAdapterName = $data['addressSourceAdapterName'];
$adapterParams = $data['adapterParams'];
$adapterClass = "\\Pimcore\\Document\\Newsletter\\AddressSourceAdapter\\" . ucfirst($addressSourceAdapterName);
/**
* @var $addressAdapter \Pimcore\Document\Newsletter\AddressSourceAdapterInterface
*/
$addressAdapter = new $adapterClass($adapterParams);
if ($document->getSendingMode() == Newsletter::SENDING_MODE_BATCH) {
$this->doSendMailInBatchMode($document, $addressAdapter, $sendingId);
} else {
$this->doSendMailInSingleMode($document, $addressAdapter, $sendingId);
}
Model\Tool\TmpStore::delete($sendingId);
}
示例2: delete
/**
* Deletes from database
*
* @return void
*/
public function delete()
{
if ($this->model->getId() instanceof Model\Search\Backend\Data\Id) {
$this->db->delete("search_backend_data", "id='" . $this->model->getId()->getId() . "' AND maintype ='" . $this->model->getId()->getType() . "'");
} else {
Logger::alert("Cannot delete Search\\Backend\\Data, ID is empty");
}
}
示例3: postDispatch
/**
* @param \Zend_Controller_Request_Abstract $request
*/
public function postDispatch(\Zend_Controller_Request_Abstract $request)
{
$conf = Config::getSystemConfig();
// add scripts to editmode
$debugSuffix = "";
if (PIMCORE_DEVMODE) {
$debugSuffix = "-debug";
}
if (\Pimcore\Tool\Admin::isExtJS6()) {
$editmodeLibraries = ["/pimcore/static6/js/pimcore/namespace.js", "/pimcore/static6/js/lib/prototype-light.js", "/pimcore/static6/js/lib/jquery.min.js", "/pimcore/static6/js/lib/ext/ext-all" . $debugSuffix . ".js", "/pimcore/static6/js/lib/ckeditor/ckeditor.js"];
$editmodeScripts = ["/pimcore/static6/js/pimcore/functions.js", "/pimcore/static6/js/pimcore/element/tag/imagehotspotmarkereditor.js", "/pimcore/static6/js/pimcore/element/tag/imagecropper.js", "/pimcore/static6/js/pimcore/document/edit/helper.js", "/pimcore/static6/js/pimcore/elementservice.js", "/pimcore/static6/js/pimcore/document/edit/dnd.js", "/pimcore/static6/js/pimcore/document/tag.js", "/pimcore/static6/js/pimcore/document/tags/block.js", "/pimcore/static6/js/pimcore/document/tags/date.js", "/pimcore/static6/js/pimcore/document/tags/href.js", "/pimcore/static6/js/pimcore/document/tags/multihref.js", "/pimcore/static6/js/pimcore/document/tags/checkbox.js", "/pimcore/static6/js/pimcore/document/tags/image.js", "/pimcore/static6/js/pimcore/document/tags/input.js", "/pimcore/static6/js/pimcore/document/tags/link.js", "/pimcore/static6/js/pimcore/document/tags/select.js", "/pimcore/static6/js/pimcore/document/tags/snippet.js", "/pimcore/static6/js/pimcore/document/tags/textarea.js", "/pimcore/static6/js/pimcore/document/tags/numeric.js", "/pimcore/static6/js/pimcore/document/tags/wysiwyg.js", "/pimcore/static6/js/pimcore/document/tags/renderlet.js", "/pimcore/static6/js/pimcore/document/tags/table.js", "/pimcore/static6/js/pimcore/document/tags/video.js", "/pimcore/static6/js/pimcore/document/tags/multiselect.js", "/pimcore/static6/js/pimcore/document/tags/areablock.js", "/pimcore/static6/js/pimcore/document/tags/area.js", "/pimcore/static6/js/pimcore/document/tags/pdf.js", "/pimcore/static6/js/pimcore/document/tags/embed.js", "/pimcore/static6/js/pimcore/document/edit/helper.js"];
$editmodeStylesheets = ["/pimcore/static6/css/icons.css", "/pimcore/static6/css/editmode.css?_dc=" . time()];
} else {
$editmodeLibraries = ["/pimcore/static/js/pimcore/namespace.js", "/pimcore/static/js/lib/prototype-light.js", "/pimcore/static/js/lib/jquery.min.js", "/pimcore/static/js/lib/ext/adapter/jquery/ext-jquery-adapter-debug.js", "/pimcore/static/js/lib/ext/ext-all-debug.js", "/pimcore/static/js/lib/ext-plugins/ux/Spinner.js", "/pimcore/static/js/lib/ext-plugins/ux/SpinnerField.js", "/pimcore/static/js/lib/ext-plugins/ux/MultiSelect.js", "/pimcore/static/js/lib/ext-plugins/GridRowOrder/roworder.js", "/pimcore/static/js/lib/ckeditor/ckeditor.js", "/pimcore/static/js/pimcore/libfixes.js"];
$editmodeScripts = ["/pimcore/static/js/pimcore/functions.js", "/pimcore/static/js/pimcore/element/tag/imagehotspotmarkereditor.js", "/pimcore/static/js/pimcore/element/tag/imagecropper.js", "/pimcore/static/js/pimcore/document/edit/helper.js", "/pimcore/static/js/pimcore/document/edit/dnd.js", "/pimcore/static/js/pimcore/document/tag.js", "/pimcore/static/js/pimcore/document/tags/block.js", "/pimcore/static/js/pimcore/document/tags/date.js", "/pimcore/static/js/pimcore/document/tags/href.js", "/pimcore/static/js/pimcore/document/tags/multihref.js", "/pimcore/static/js/pimcore/document/tags/checkbox.js", "/pimcore/static/js/pimcore/document/tags/image.js", "/pimcore/static/js/pimcore/document/tags/input.js", "/pimcore/static/js/pimcore/document/tags/link.js", "/pimcore/static/js/pimcore/document/tags/select.js", "/pimcore/static/js/pimcore/document/tags/snippet.js", "/pimcore/static/js/pimcore/document/tags/textarea.js", "/pimcore/static/js/pimcore/document/tags/numeric.js", "/pimcore/static/js/pimcore/document/tags/wysiwyg.js", "/pimcore/static/js/pimcore/document/tags/renderlet.js", "/pimcore/static/js/pimcore/document/tags/table.js", "/pimcore/static/js/pimcore/document/tags/video.js", "/pimcore/static/js/pimcore/document/tags/multiselect.js", "/pimcore/static/js/pimcore/document/tags/areablock.js", "/pimcore/static/js/pimcore/document/tags/area.js", "/pimcore/static/js/pimcore/document/tags/pdf.js", "/pimcore/static/js/pimcore/document/edit/helper.js"];
$editmodeStylesheets = ["/pimcore/static/css/icons.css", "/pimcore/static/css/editmode.css?asd=" . time()];
}
//add plugin editmode JS and CSS
try {
$pluginConfigs = ExtensionManager::getPluginConfigs();
$jsPaths = [];
$cssPaths = [];
if (!empty($pluginConfigs)) {
//registering plugins
foreach ($pluginConfigs as $p) {
$pluginJsPaths = [];
$pluginVersions = [""];
if (\Pimcore\Tool\Admin::isExtJS6()) {
$pluginVersions = ["-extjs6", ""];
}
foreach ($pluginVersions as $pluginVersion) {
if (array_key_exists("pluginDocumentEditmodeJsPaths" . $pluginVersion, $p['plugin']) && is_array($p['plugin']['pluginDocumentEditmodeJsPaths' . $pluginVersion]) && isset($p['plugin']['pluginDocumentEditmodeJsPaths' . $pluginVersion]['path'])) {
if (is_array($p['plugin']['pluginDocumentEditmodeJsPaths' . $pluginVersion]['path'])) {
$pluginJsPaths = $p['plugin']['pluginDocumentEditmodeJsPaths' . $pluginVersion]['path'];
break;
} elseif ($p['plugin']['pluginDocumentEditmodeJsPaths' . $pluginVersion]['path'] != null) {
$pluginJsPaths[] = $p['plugin']['pluginDocumentEditmodeJsPaths' . $pluginVersion]['path'];
break;
}
}
}
//manipulate path for frontend
if (is_array($pluginJsPaths) and count($pluginJsPaths) > 0) {
for ($i = 0; $i < count($pluginJsPaths); $i++) {
if (is_file(PIMCORE_PLUGINS_PATH . $pluginJsPaths[$i])) {
$jsPaths[] = "/plugins" . $pluginJsPaths[$i];
}
}
}
$pluginCssPaths = [];
foreach ($pluginVersions as $pluginVersion) {
if (array_key_exists("pluginDocumentEditmodeCssPaths" . $pluginVersion, $p['plugin']) && is_array($p['plugin']['pluginDocumentEditmodeCssPaths' . $pluginVersion]) && isset($p['plugin']['pluginDocumentEditmodeCssPaths' . $pluginVersion]['path'])) {
if (is_array($p['plugin']['pluginDocumentEditmodeCssPaths' . $pluginVersion]['path'])) {
$pluginCssPaths = $p['plugin']['pluginDocumentEditmodeCssPaths' . $pluginVersion]['path'];
break;
} elseif ($p['plugin']['pluginDocumentEditmodeCssPaths' . $pluginVersion]['path'] != null) {
$pluginCssPaths[] = $p['plugin']['pluginDocumentEditmodeCssPaths' . $pluginVersion]['path'];
break;
}
}
}
//manipulate path for frontend
if (is_array($pluginCssPaths) and count($pluginCssPaths) > 0) {
for ($i = 0; $i < count($pluginCssPaths); $i++) {
if (is_file(PIMCORE_PLUGINS_PATH . $pluginCssPaths[$i])) {
$cssPaths[] = "/plugins" . $pluginCssPaths[$i];
}
}
}
}
}
$editmodeScripts = array_merge($editmodeScripts, $jsPaths);
$editmodeStylesheets = array_merge($editmodeStylesheets, $cssPaths);
} catch (\Exception $e) {
Logger::alert("there is a problem with the plugin configuration");
Logger::alert($e);
}
$editmodeHeadHtml = "\n\n\n<!-- pimcore editmode -->\n";
$editmodeHeadHtml .= '<meta name="google" value="notranslate">';
$editmodeHeadHtml .= "\n\n";
// include stylesheets
foreach ($editmodeStylesheets as $sheet) {
$editmodeHeadHtml .= '<link rel="stylesheet" type="text/css" href="' . $sheet . '?_dc=' . Version::$revision . '" />';
$editmodeHeadHtml .= "\n";
}
$editmodeHeadHtml .= "\n\n";
$editmodeHeadHtml .= '<script type="text/javascript">var jQueryPreviouslyLoaded = (typeof jQuery == "undefined") ? false : true;</script>' . "\n";
// include script libraries
foreach ($editmodeLibraries as $script) {
$editmodeHeadHtml .= '<script type="text/javascript" src="' . $script . '?_dc=' . Version::$revision . '"></script>';
$editmodeHeadHtml .= "\n";
}
// combine the pimcore scripts in non-devmode
if ($conf->general->devmode) {
foreach ($editmodeScripts as $script) {
$editmodeHeadHtml .= '<script type="text/javascript" src="' . $script . '?_dc=' . Version::$revision . '"></script>';
$editmodeHeadHtml .= "\n";
//.........这里部分代码省略.........