/** * This is a wrapper for the protected _create_new_templates function * * @param string $messenger_name * @param string $message_type_name message type that the templates are being created for * @param int $GRP_ID * @param bool $global * @return array * @throws \EE_Error */ public static function create_new_templates($messenger_name, $message_type_name, $GRP_ID = 0, $global = false) { /** @type EE_Message_Resource_Manager $Message_Resource_Manager */ $Message_Resource_Manager = EE_Registry::instance()->load_lib('Message_Resource_Manager'); $messenger = $Message_Resource_Manager->valid_messenger($messenger_name); $message_type = $Message_Resource_Manager->valid_message_type($message_type_name); if (!EEH_MSG_Template::message_type_has_active_templates_for_messenger($messenger, $message_type, $global)) { return array(); } //whew made it this far! Okay, let's go ahead and create the templates then return EEH_MSG_Template::_create_new_templates($messenger, $message_type, $GRP_ID, $global); }