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: {
- 101: }
- 105: /**
- 106: * Overloaded parent setter. This method checks for invalid control name.
- 110: */
- 112: {
- 114: throw new InvalidArgumentException("Name 'submit' is not allowed due to JavaScript limitations.");
- 115: }
- 117: }
- 121: /**
- 122: * Returns form.
- 125: */
- 127: {
- 129: }
- 133: /**
- 134: * Returns name of control within a Form & INamingContainer scope.
- 136: */
- 138: {
- 147: }
- 149: }
- 151: }
- 155: /**
- 156: * Changes control's HTML id.
- 159: */
- 161: {
- 163: }
- 167: /**
- 168: * Returns control's HTML id.
- 170: */
- 172: {
- 179: }
- 181: }
- 185: /**
- 186: * Sets user-specific option.
- 187: *
- 188: * Common options:
- 189: * - 'rendered' - indicate if method getControl() have been called
- 190: * - 'required' - indicate if ':required' rule has been applied
- 191: * - 'description' - textual or Html object description (recognized by ConventionalRenderer)
- 192: *
- 196: */
- 198: {
- 204: }
- 206: }
- 210: /**
- 211: * Returns user-specific option.
- 215: */
- 217: {
- 219: }
- 223: /**
- 224: * Returns user-specific options.
- 226: */
- 228: {
- 230: }
- 234: /********************* translator ****************d*g**/
- 238: /**
- 239: * Sets translate adapter.
- 242: */
- 244: {
- 246: }
- 250: /**
- 251: * Returns translate adapter.
- 253: */
- 255: {
- 258: }
- 260: }
- 264: /**
- 265: * Returns translated string.
- 268: */
- 270: {
- 273: }
- 277: /********************* interface IFormControl ****************d*g**/
- 281: /**
- 282: * Sets control's value.
- 285: */
- 287: {
- 289: }
- 293: /**
- 294: * Returns control's value.
- 296: */
- 298: {
- 300: }
- 304: /**
- 305: * Loads HTTP data.
- 308: */
- 310: {
- 313: }
- 317: /**
- 318: * Disables or enables control.
- 321: */
- 323: {
- 326: }
- 330: /**
- 331: * Is control disabled?
- 333: */
- 335: {
- 337: }
- 341: /********************* rendering ****************d*g**/
- 345: /**
- 346: * Generates control's HTML element.
- 348: */
- 350: {
- 357: }
- 361: /**
- 362: * Generates label's HTML element.
- 364: */
- 366: {
- 373: }
- 375: }
- 379: /**
- 380: * Returns control's HTML element template.
- 382: */
- 384: {
- 386: }
- 390: /**
- 391: * Returns label's HTML element template.
- 393: */
- 395: {
- 397: }
- 401: /**
- 402: * Sets 'rendered' indicator.
- 406: */
- 408: {
- 411: }
- 415: /**
- 416: * Does method getControl() have been called?
- 419: */
- 421: {
- 423: }
- 427: /********************* rules ****************d*g**/
- 431: /**
- 432: * Adds a validation rule.
- 437: */
- 439: {
- 442: }
- 446: /**
- 447: * Adds a validation condition a returns new branch.
- 451: */
- 453: {
- 455: }
- 459: /**
- 460: * Adds a validation condition based on another control a returns new branch.
- 465: */
- 467: {
- 469: }
- 473: /**
- 475: */
- 477: {
- 479: }
- 483: /**
- 484: * Makes control mandatory.
- 488: */
- 490: {
- 493: }
- 497: /**
- 498: * Is control mandatory?
- 501: */
- 503: {
- 505: }
- 509: /**
- 510: * New rule or condition notification callback.
- 513: */
- 515: {
- 518: }
- 519: }
- 523: /********************* validation ****************d*g**/
- 527: /**
- 528: * Equal validator: are control's value and second parameter equal?
- 532: */
- 534: {
- 542: }
- 543: }
- 545: }
- 549: /**
- 550: * Filled validator: is control filled?
- 553: */
- 555: {
- 557: }
- 561: /**
- 562: * Valid validator: is control valid?
- 565: */
- 567: {
- 569: }
- 573: /**
- 574: * Adds error message to the list.
- 577: */
- 579: {
- 582: }
- 584: }
- 588: /**
- 589: * Returns errors corresponding to control.
- 591: */
- 593: {
- 595: }
- 599: /**
- 601: */
- 603: {
- 605: }
- 609: /**
- 611: */
- 613: {
- 615: }
- 617: }