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 https://nette.org
- 12: *
- 19: */
- 29: /**
- 30: * Base class that implements the basic functionality common to form controls.
- 31: *
- 35: */
- 37: {
- 76: /**
- 78: */
- 80: {
- 86: }
- 90: /**
- 91: * Overloaded parent setter. This method checks for invalid control name.
- 95: */
- 97: {
- 99: throw new InvalidArgumentException("Name 'submit' is not allowed due to JavaScript limitations.");
- 100: }
- 102: }
- 106: /**
- 107: * Returns form.
- 110: */
- 112: {
- 114: }
- 118: /**
- 119: * Returns name of control within a Form & INamingContainer scope.
- 121: */
- 123: {
- 132: }
- 134: }
- 136: }
- 140: /**
- 141: * Changes control's HTML id.
- 144: */
- 146: {
- 148: }
- 152: /**
- 153: * Returns control's HTML id.
- 155: */
- 157: {
- 164: }
- 166: }
- 170: /**
- 171: * Sets user-specific option.
- 172: *
- 173: * Common options:
- 174: * - 'rendered' - indicate if method getControl() have been called
- 175: * - 'required' - indicate if ':required' rule has been applied
- 176: * - 'description' - textual or Html object description (recognized by ConventionalRenderer)
- 177: *
- 181: */
- 183: {
- 189: }
- 191: }
- 195: /**
- 196: * Returns user-specific option.
- 200: */
- 202: {
- 204: }
- 208: /**
- 209: * Returns user-specific options.
- 211: */
- 213: {
- 215: }
- 219: /********************* translator ****************d*g**/
- 223: /**
- 224: * Sets translate adapter.
- 227: */
- 229: {
- 231: }
- 235: /**
- 236: * Returns translate adapter.
- 238: */
- 240: {
- 243: }
- 245: }
- 249: /**
- 250: * Returns translated string.
- 253: */
- 255: {
- 258: }
- 262: /********************* interface IFormControl ****************d*g**/
- 266: /**
- 267: * Sets control's value.
- 270: */
- 272: {
- 274: }
- 278: /**
- 279: * Returns control's value.
- 281: */
- 283: {
- 285: }
- 289: /**
- 290: * Loads HTTP data.
- 293: */
- 295: {
- 298: }
- 302: /**
- 303: * Disables or enables control.
- 306: */
- 308: {
- 311: }
- 315: /**
- 316: * Is control disabled?
- 318: */
- 320: {
- 322: }
- 326: /********************* rendering ****************d*g**/
- 330: /**
- 331: * Generates control's HTML element.
- 333: */
- 335: {
- 342: }
- 346: /**
- 347: * Generates label's HTML element.
- 349: */
- 351: {
- 359: }
- 361: }
- 365: /**
- 366: * Returns control's HTML element template.
- 368: */
- 370: {
- 372: }
- 376: /**
- 377: * Returns label's HTML element template.
- 379: */
- 381: {
- 383: }
- 387: /**
- 388: * Sets 'rendered' indicator.
- 392: */
- 394: {
- 397: }
- 401: /**
- 402: * Does method getControl() have been called?
- 405: */
- 407: {
- 409: }
- 413: /********************* rules ****************d*g**/
- 417: /**
- 418: * Adds a validation rule.
- 423: */
- 425: {
- 428: }
- 432: /**
- 433: * Adds a validation condition a returns new branch.
- 437: */
- 439: {
- 441: }
- 445: /**
- 446: * Adds a validation condition based on another control a returns new branch.
- 451: */
- 453: {
- 455: }
- 459: /**
- 461: */
- 463: {
- 465: }
- 469: /**
- 470: * Makes control mandatory.
- 474: */
- 476: {
- 479: }
- 483: /**
- 484: * Is control mandatory?
- 487: */
- 489: {
- 491: }
- 495: /**
- 496: * New rule or condition notification callback.
- 499: */
- 501: {
- 504: }
- 505: }
- 509: /********************* validation ****************d*g**/
- 513: /**
- 514: * Equal validator: are control's value and second parameter equal?
- 518: */
- 520: {
- 528: }
- 529: }
- 531: }
- 535: /**
- 536: * Filled validator: is control filled?
- 539: */
- 541: {
- 543: }
- 547: /**
- 548: * Valid validator: is control valid?
- 551: */
- 553: {
- 555: }
- 559: /**
- 560: * Adds error message to the list.
- 563: */
- 565: {
- 569: }
- 570: }
- 574: /**
- 575: * Returns errors corresponding to control.
- 577: */
- 579: {
- 581: }
- 585: /**
- 587: */
- 589: {
- 591: }
- 595: /**
- 597: */
- 599: {
- 601: }
- 603: }