Answer the question
In order to leave comments, you need to log in
How to define that the class was connected?
This error pops up Placed the mailing
Class 'Bitrix\Sender\MailingTable' not found (0)
class in the /local/php_interface/lib folder an
excerpt from the mailing class
<?php
/**
* Bitrix Framework
* @package bitrix
* @subpackage sender
* @copyright 2001-2012 Bitrix
*/
namespace Bitrix\Sender;
use Bitrix\Main\DB\SqlExpression;
use Bitrix\Main\Entity;
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\Type as MainType;
use Bitrix\Sender\Internals\Model;
Loc::loadMessages(__FILE__);
class MailingTable extends Entity\DataManager
{
/**
* @return string
*/
public static function getTableName()
{
return 'b_sender_mailing';
}
<?
Bitrix\Main\Loader::registerAutoLoadClasses(null, [
'Bitrix\Sender\Subscription' => '/local/php_interface/lib/subscription.php'
]);
Bitrix\Main\Loader::registerAutoLoadClasses(null, [
'Bitrix\Sender\mailing' => '/local/php_interface/lib/mailing.php'
]);
?>
require_once( $_SERVER['DOCUMENT_ROOT'] . '/local/php_interface/autoload.php');
<?
namespace Newssend;
use Bitrix\Sender\mailing;
class class_news extends \CBitrixComponent
{
function OnAfterIBlockElementAddHandler(&$arFields)
{
$arrSITE="s1";
$data = array(
'order' => array ("ID"=>"ASC"),
'filter' => array("RUBRIC"=>$aPostRub,
"CONFIRMED"=>"Y",
"ACTIVE"=>"Y",
"FORMAT"=>$post_arr["SUBSCR_FORMAT"],
"EMAIL"=>$post_arr["EMAIL_FILTER"],
"RUBRIC"=>array("CONFIRMED"=>"Y",
"ACTIVE"=>"Y",
"ID"=>"1"))
);
$subscr = \Bitrix\Sender\Subscription::getList($data);
}
}
?>
Class 'Bitrix\Sender\MailingTable' not found (0)
use Bitrix\Sender\mailing;
Answer the question
In order to leave comments, you need to log in
'Bitrix\Sender\mailing'
class MailingTable
use Bitrix\Sender\MailingTable;
Placed the mailing class in the /local/php_interface/lib folder
excerpt from the mailing class
class MailingTable extends Entity\DataManager
if (class_exists('MyClass')) {
$myclass = new MyClass();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question