/ LJCPHPCodeDoc / LJCGenTextSectionLib / LJCSections / AddReplacement


Parameters
$item - The Item object.
$name - The Replacement name.
$value - The Replacement value.

Syntax

PHP
public static function AddReplacement(LJCItem &$item, string $name
, string $value) : void

Adds a Replacement to an Item.

Example

PHP
 $webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon";
 require_once "$webCommonPath/LJCGenTextSectionLib.php";
 
 $sections = new LJCSections();
 $section = new LJCSection("SectionName");
 $sections->Add($section, $section->Name);
 
 $item = new LJCItem("ItemName");
 $section->Items[] = $item;
 $sections::AddReplacement($item, "_ClassName_", "ClassName");

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.