Jump to content

Form Helper -> CustomTemplate - unused variable?


Recommended Posts

Helpers - Form - function CustomTemplate() (part)

		foreach ( $this->elements as $tab => $elements )
		{
			$html[ $tab ] = '';
			foreach ( $elements as $k => $element )
			{
				if ( $element instanceof Form\Matrix )
				{
					$html[ $tab ] .= \IPS\Theme::i()->getTemplate( 'forms', 'core' )->emptyRow( $element->nested(), $k );
					continue;
				}
				if ( !\is_string( $element ) and $element->error ) { $errorTabs[] = $tab; }
				$html[ $tab ] .= ( $element instanceof \IPS\Helpers\Form\FormAbstract ) ? $element->rowHtml( $this ) : (string) $element;
			}
        }

		$templateArguments = array_merge( $args, array( $this->id, $this->action, $this->elements, $this->hiddenValues, $this->actionButtons, 
			$this->uploadField, $this->class, $this->attributes, $this->sidebar, $this, $errorTabs ) );
		return $template( ...$templateArguments );
	}

Variable $html don't use later.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...