Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
MediumText.php
Go to the documentation of this file.
1 <?php
7 
9 
13 class MediumText implements FactoryInterface
14 {
18  const DEFAULT_TEXT_LENGTH = 16777216;
19 
23  private $objectManager;
24 
28  private $className;
29 
36  public function __construct(
37  ObjectManagerInterface $objectManager,
38  $className = \Magento\Framework\Setup\Declaration\Schema\Dto\Columns\Text::class
39  ) {
40  $this->objectManager = $objectManager;
41  $this->className = $className;
42  }
43 
47  public function create(array $data)
48  {
49  if (!isset($data['length'])) {
50  $data['length'] = self::DEFAULT_TEXT_LENGTH;
51  }
52 
53  return $this->objectManager->create($this->className, $data);
54  }
55 }
$objectManager
Definition: bootstrap.php:17
__construct(ObjectManagerInterface $objectManager, $className=\Magento\Framework\Setup\Declaration\Schema\Dto\Columns\Text::class)
Definition: MediumText.php:36