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 NForm.
- 110: */
- 112: {
- 115: }
- 116: }
- 120: /**
- 121: * Overloaded parent setter. This method checks for invalid control name.
- 125: */
- 127: {
- 129: throw new InvalidArgumentException("Name 'submit' is not allowed due to JavaScript limitations.");
- 130: }
- 132: }
- 136: /**
- 137: * Returns form.
- 140: */
- 142: {
- 144: }
- 148: /**
- 149: * Returns name of control within a NForm & INamingContainer scope.
- 151: */
- 153: {
- 162: }
- 164: }
- 166: }
- 170: /**
- 171: * Changes control's HTML id.
- 174: */
- 176: {
- 179: }
- 183: /**
- 184: * Returns control's HTML id.
- 186: */
- 188: {
- 195: }
- 197: }
- 201: /**
- 202: * Sets user-specific option.
- 203: *
- 204: * Common options:
- 205: * - 'rendered' - indicate if method getControl() have been called
- 206: * - 'required' - indicate if ':required' rule has been applied
- 207: * - 'description' - textual or NHtml object description (recognized by NConventionalRenderer)
- 208: *
- 212: */
- 214: {
- 220: }
- 222: }
- 226: /**
- 227: * Returns user-specific option.
- 231: */
- 233: {
- 235: }
- 239: /**
- 240: * Returns user-specific options.
- 242: */
- 244: {
- 246: }
- 250: /********************* translator ****************d*g**/
- 254: /**
- 255: * Sets translate adapter.
- 258: */
- 260: {
- 263: }
- 267: /**
- 268: * Returns translate adapter.
- 270: */
- 272: {
- 275: }
- 277: }
- 281: /**
- 282: * Returns translated string.
- 285: */
- 287: {
- 290: }
- 294: /********************* interface IFormControl ****************d*g**/
- 298: /**
- 299: * Sets control's value.
- 302: */
- 304: {
- 307: }
- 311: /**
- 312: * Returns control's value.
- 314: */
- 316: {
- 318: }
- 322: /**
- 323: * Loads HTTP data.
- 325: */
- 327: {
- 330: }
- 334: /**
- 335: * Disables or enables control.
- 338: */
- 340: {
- 343: }
- 347: /**
- 348: * Is control disabled?
- 350: */
- 352: {
- 354: }
- 358: /********************* rendering ****************d*g**/
- 362: /**
- 363: * Generates control's HTML element.
- 365: */
- 367: {
- 374: }
- 378: /**
- 379: * Generates label's HTML element.
- 382: */
- 384: {
- 395: }
- 397: }
- 401: /**
- 402: * Returns control's HTML element template.
- 404: */
- 406: {
- 408: }
- 412: /**
- 413: * Returns label's HTML element template.
- 415: */
- 417: {
- 419: }
- 423: /**
- 424: * Sets 'rendered' indicator.
- 428: */
- 430: {
- 433: }
- 437: /**
- 438: * Does method getControl() have been called?
- 441: */
- 443: {
- 445: }
- 449: /********************* rules ****************d*g**/
- 453: /**
- 454: * Adds a validation rule.
- 459: */
- 461: {
- 464: }
- 468: /**
- 469: * Adds a validation condition a returns new branch.
- 473: */
- 475: {
- 477: }
- 481: /**
- 482: * Adds a validation condition based on another control a returns new branch.
- 487: */
- 489: {
- 491: }
- 495: /**
- 497: */
- 499: {
- 501: }
- 505: /**
- 506: * Makes control mandatory.
- 510: */
- 512: {
- 515: }
- 519: /**
- 520: * Is control mandatory?
- 523: */
- 525: {
- 527: }
- 531: /**
- 532: * New rule or condition notification callback.
- 535: */
- 537: {
- 540: }
- 541: }
- 545: /********************* validation ****************d*g**/
- 549: /**
- 550: * Equal validator: are control's value and second parameter equal?
- 554: */
- 556: {
- 564: }
- 565: }
- 567: }
- 571: /**
- 572: * Filled validator: is control filled?
- 575: */
- 577: {
- 579: }
- 583: /**
- 584: * Valid validator: is control valid?
- 587: */
- 589: {
- 591: }
- 595: /**
- 596: * Adds error message to the list.
- 599: */
- 601: {
- 604: }
- 606: }
- 610: /**
- 611: * Returns errors corresponding to control.
- 613: */
- 615: {
- 617: }
- 621: /**
- 623: */
- 625: {
- 627: }
- 631: /**
- 633: */
- 635: {
- 637: }
- 639: }