Inventory Date Field Handler (inventoryfields/Date.php)

YetiForceCRM · modules/Vtiger/inventoryfields/Date.php · php · MIT
crm, database, pos, lang:php, tag:fields

Manages inventory date fields, formatting values for database storage and user display. Reuse when creating custom date attributes for ERP or CRM inventory modules.

// Source: https://github.com/YetiForceCompany/YetiForceCRM | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
<?php

/**
 * Inventory Date Field Class.
 *
 * @package   InventoryField
 *
 * @copyright YetiForce S.A.
 * @license   YetiForce Public License 6.5 (licenses/LicenseEN.txt or yetiforce.com)
 * @author    Mariusz Krzaczkowski <m.krzaczkowski@yetiforce.com>
 * @author    Radosław Skrzypczak <r.skrzypczak@yetiforce.com>
 */
class Vtiger_Date_InventoryField extends Vtiger_Basic_InventoryField
{
	protected $type = 'Date';
	protected $defaultLabel = 'LBL_DATE';
	protected $columnName = 'date';
	protected $dbType = \yii\db\Schema::TYPE_DATE;
	protected $onlyOne = false;
	protected $purifyType = \App\Purifier::DATE_USER_FORMAT;

	/** {@inheritdoc} */
	public 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key