Source of file KnockoutNumericField.php
Size: 1,021 Bytes - Last Modified: 2022-02-21T10:01:54+00:00
/var/www/docs.ssmods.com/process/src/src/KnockoutNumericField.php
123456789101112131415161718192021222324252627282930313233343536373839 | <?php namespace AntonyThorpe\Knockout; require_once('Common.php'); use SilverStripe\Forms\NumericField; /** * KnockoutNumericField * * Creates a {@link NumericField} with an additional data-bind attribute that links to a Knockout observable */ class KnockoutNumericField extends NumericField { use \AntonyThorpe\Knockout\Common; /** * bindingType * * KnockoutNumericField needs either 'value' or 'textInput' as a key for the 'data-bind' HTML attribute * * @var string data-bind attribute key * @example data-bind="input: name, valueUpdate: 'input'" - the binding type is: input. */ protected $bindingType = "textInput"; /** * casting of variables for security purposes * * @see http://docs.silverstripe.org/en/3.1/developer_guides/security/secure_coding/ */ protected $casting = array( "Observable" => "Varchar", "BindingType" => "Varchar", "OtherBindings" => "Varchar", "HasFocus" => "Boolean" ); } |