403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/bizproc/lib/automation/engine/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/bizproc/lib/automation/engine/condition.php
<?php
namespace Bitrix\Bizproc\Automation\Engine;

use Bitrix\Bizproc;
use Bitrix\Bizproc\Automation\Target\BaseTarget;
use Bitrix\Bizproc\FieldType;

class Condition extends Bizproc\Activity\Condition
{
	protected $object = 'Document';
	protected $field;

	public function __construct(array $params = null)
	{
		parent::__construct($params);

		if ($params && isset($params['field']))
		{
			$this->setField($params['field']);
		}
		if ($params && isset($params['object']))
		{
			$this->setObject($params['object']);
		}
	}

	/**
	 * @param string $field The field name.
	 * @return Condition
	 */
	public function setField(string $field)
	{
		$this->field = (string)$field;
		return $this;
	}

	/**
	 * @return string
	 */
	public function getField()
	{
		return $this->field;
	}

	/**
	 * @param string $objectName The object name.
	 * @return Condition
	 */
	public function setObject(string $objectName)
	{
		$this->object = $objectName;
		return $this;
	}

	/**
	 * @return string
	 */
	public function getObject()
	{
		return $this->object;
	}

	/**
	 * @param mixed $needle The field value to check.
	 * @param string $fieldType Type of the field.
	 * @param BaseTarget $target Automation target.
	 * @param FieldType $fieldTypeObject
	 * @return bool
	 */
	public function check($needle, $fieldType, BaseTarget $target, FieldType $fieldTypeObject)
	{
		$documentId = $target->getDocumentType();
		$documentId[2] = $target->getDocumentId();

		return $this->checkValue($needle, $fieldTypeObject, $documentId);
	}

	/**
	 * @return array Array presentation of condition.
	 */
	public function toArray()
	{
		$array = parent::toArray();
		$array['field'] = $this->getField();
		$array['object'] = $this->getObject();

		return $array;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit