Source for file FormControl.php
Documentation is available at FormControl.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 18: */
- 28: /**
- 29: * Base class that implements the basic functionality common to form controls.
- 30: *
- 34: *
- 50: */
- 52: {
- 91: /**
- 93: */
- 95: {
- 102: }
- 106: /**
- 107: * This method will be called when the component becomes attached to Form.
- 110: */
- 112: {
- 116: }
- 117: }
- 121: /**
- 122: * Overloaded parent setter. This method checks for invalid control name.
- 126: */
- 128: {
- 130: throw new InvalidArgumentException("Name 'submit' is not allowed due to JavaScript limitations.");
- 131: }
- 133: }
- 137: /**
- 138: * Returns form.
- 141: */
- 143: {
- 145: }
- 149: /**
- 150: * Returns name of control within a Form & INamingContainer scope.
- 152: */
- 154: {
- 163: }
- 165: }
- 167: }
- 171: /**
- 172: * Changes control's HTML id.
- 175: */
- 177: {
- 180: }
- 184: /**
- 185: * Returns control's HTML id.
- 187: */
- 189: {
- 196: }
- 198: }
- 202: /**
- 203: * Sets user-specific option.
- 204: *
- 205: * Common options:
- 206: * - 'rendered' - indicate if method getControl() have been called
- 207: * - 'required' - indicate if ':required' rule has been applied
- 208: * - 'description' - textual or Html object description (recognized by ConventionalRenderer)
- 209: *
- 213: */
- 215: {
- 221: }
- 223: }
- 227: /**
- 228: * Returns user-specific option.
- 232: */
- 234: {
- 236: }
- 240: /**
- 241: * Returns user-specific options.
- 243: */
- 245: {
- 247: }
- 251: /********************* translator ****************d*g**/
- 255: /**
- 256: * Sets translate adapter.
- 259: */
- 261: {
- 264: }
- 268: /**
- 269: * Returns translate adapter.
- 271: */
- 273: {
- 276: }
- 278: }
- 282: /**
- 283: * Returns translated string.
- 286: */
- 288: {
- 291: }
- 295: /********************* interface IFormControl ****************d*g**/
- 299: /**
- 300: * Sets control's value.
- 303: */
- 305: {
- 308: }
- 312: /**
- 313: * Returns control's value.
- 315: */
- 317: {
- 319: }
- 323: /**
- 324: * Sets control's default value.
- 327: */
- 329: {
- 333: }
- 335: }
- 339: /**
- 340: * Loads HTTP data.
- 342: */
- 344: {
- 347: }
- 351: /**
- 352: * Disables or enables control.
- 355: */
- 357: {
- 360: }
- 364: /**
- 365: * Is control disabled?
- 367: */
- 369: {
- 371: }
- 375: /********************* rendering ****************d*g**/
- 379: /**
- 380: * Generates control's HTML element.
- 382: */
- 384: {
- 391: }
- 395: /**
- 396: * Generates label's HTML element.
- 399: */
- 401: {
- 412: }
- 414: }
- 418: /**
- 419: * Returns control's HTML element template.
- 421: */
- 423: {
- 425: }
- 429: /**
- 430: * Returns label's HTML element template.
- 432: */
- 434: {
- 436: }
- 440: /**
- 441: * Sets 'rendered' indicator.
- 445: */
- 447: {
- 450: }
- 454: /**
- 455: * Does method getControl() have been called?
- 458: */
- 460: {
- 462: }
- 466: /********************* rules ****************d*g**/
- 470: /**
- 471: * Adds a validation rule.
- 476: */
- 478: {
- 481: }
- 485: /**
- 486: * Adds a validation condition a returns new branch.
- 490: */
- 492: {
- 494: }
- 498: /**
- 499: * Adds a validation condition based on another control a returns new branch.
- 504: */
- 506: {
- 508: }
- 512: /**
- 514: */
- 516: {
- 518: }
- 522: /**
- 523: * Makes control mandatory.
- 527: */
- 529: {
- 532: }
- 536: /**
- 537: * Is control mandatory?
- 540: */
- 542: {
- 544: }
- 548: /**
- 549: * New rule or condition notification callback.
- 552: */
- 554: {
- 557: }
- 558: }
- 562: /********************* validation ****************d*g**/
- 566: /**
- 567: * Equal validator: are control's value and second parameter equal?
- 571: */
- 573: {
- 581: }
- 582: }
- 584: }
- 588: /**
- 589: * Filled validator: is control filled?
- 592: */
- 594: {
- 596: }
- 600: /**
- 601: * Valid validator: is control valid?
- 604: */
- 606: {
- 608: }
- 612: /**
- 613: * Adds error message to the list.
- 616: */
- 618: {
- 621: }
- 623: }
- 627: /**
- 628: * Returns errors corresponding to control.
- 630: */
- 632: {
- 634: }
- 638: /**
- 640: */
- 642: {
- 644: }
- 648: /**
- 650: */
- 652: {
- 654: }
- 656: }