mvccore/ext-view-helper-linebreaks

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

v5.0.2 2021-07-13 14:44 UTC

This package is auto-updated.

Last update: 2024-04-17 17:56:24 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>