Code Duplication    Length = 8-8 lines in 3 locations

classes/uix/ui/control.php 1 location

@@ 177-184 (lines=8) @@
174
	 * @access public
175
	 * @return string label of control
176
	 */
177
	public function label() {
178
		$output = null;
179
		if ( isset( $this->struct['label'] ) ) {
180
			$output .= '<label for="' . esc_attr( $this->id() ) . '-control"><span class="uix-control-label">' . esc_html( $this->struct['label'] ) . '</span></label>';
181
		}
182
183
		return $output;
184
	}
185
186
	/**
187
	 * Returns the main input field for rendering

classes/uix/ui/control/item.php 1 location

@@ 280-287 (lines=8) @@
277
	 * @access public
278
	 * @return string label of control
279
	 */
280
	public function label() {
281
		$output = null;
282
		if ( isset( $this->struct['label'] ) ) {
283
			$output .= '<label for="' . esc_attr( $this->id() ) . '-control" class="uix-add-row"><span class="uix-control-label">' . esc_html( $this->struct['label'] ) . '</span></label>';
284
		}
285
286
		return $output;
287
	}
288
289
	/**
290
	 * Render the script footer template

classes/uix/ui/control/layout.php 1 location

@@ 189-196 (lines=8) @@
186
	 * @access public
187
	 * @return string label of control
188
	 */
189
	public function label() {
190
		$output = null;
191
		if ( isset( $this->struct['label'] ) ) {
192
			$output .= '<label for="' . esc_attr( $this->id() ) . '-control" class="uix-add-row"><span class="uix-control-label">' . esc_html( $this->struct['label'] ) . '</span></label>';
193
		}
194
195
		return $output;
196
	}
197
198
	/**
199
	 * Returns the main input field for rendering