mvccore/ext-view-helper-linebreaks

MvcCore - Extension - View - Helper - Line Breaks - processing any visible text content for non-line breaking spaces.

v5.3.0 2024-11-21 15:01 UTC

This package is auto-updated.

Last update: 2024-11-21 16:01:09 UTC


README

Latest Stable Version License PHP Version

MvcCore View Helper extension for processing any visible text content for non-line breaking spaces. Spaces between digits like 9 999 are replaced into 9 999 automatically.

Installation

composer require mvccore/ext-view-helper-linebreaks

Configuration

You can configure to not break line:

  • after any custom weak word (mostly conjunctions) by language
  • inside custom text shortcuts (example: U. S.) by language
  • between digits and it's configured units

Example

Template code:

<p><?php
	// Earth diameter: 6&nbsp;378&nbsp;km. (or&nbsp;6&nbsp;378&nbsp;000&nbsp;m)
	echo $this->LineBreaks(
		'Earth diameter: 6 378 km (or 6 378 000 m).'
	);
?></p>