文件操作 - NotificationParser.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/fluentform/app/Services/FormBuilder/NotificationParser.php
编辑文件内容
<?php namespace FluentForm\App\Services\FormBuilder; use FluentForm\App\Services\FormBuilder\ShortCodeParser; class NotificationParser { protected static $cache = null; /** * Parse Norifications * * @param array $notifications * @param int $insertId * @param array $data * @param object $form * * @return bool $cache */ public static function parse($notifications, $insertId, $data, $form, $cache = true) { if ($cache && ! is_null(static::$cache)) { return static::$cache; } foreach ($notifications as &$notification) { static::setRecepient($notification, $data); $notification = ShortCodeParser::parse( $notification, $insertId, $data, $form ); } return $cache ? (static::$cache = $notifications) : $notifications; } protected static function setRecepient(&$notification, $data) { if (isset($notification['sendTo']) && 'field' == $notification['sendTo']['type']) { $notification['sendTo']['email'] = $data[$notification['sendTo']['field']]; } } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件