mvccore/ext-view-helper-linebreaks

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

v5.2.0 2024-05-23 07:22 UTC

This package is auto-updated.

Last update: 2024-10-23 08:36:38 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>