Download the PHP package rocketweb/module-content-update without Composer

On this page you can find all versions of the php package rocketweb/module-content-update. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-content-update

RocketWeb_ContentUpdate

Module takes care of creating and updating static content using data scripts.

Installation

Install using Composer

To install manually download the module contents into app/code/RocketWeb/ContentUpdate

Configuration

Create new module ProjectNamespace/ContentUpdate in the app/code directory using steps below:

Replace ProjectNamespace in the steps below with project or vendor namespace

  1. Create composer.json

  2. Create registration.php

  3. Create etc/module.xml

  4. Clone vendor/rocketweb/module-content-update/Setup/UpgradeData to app/code/ProjectNamespace/ContentUpdate/Setup/UpgradeData.php

  5. Open Setup/UpgradeData.php and replace

with

  1. Clear example functions in UpgradeData.php and add your own (see reference in the next section)

  2. Run

Usage

Adding update functions and triggering them

  1. Open ProjectNamespace_ContentUpdate/etc/module.xml
  2. Change setup_version attribute from x.y.z to x.y.z++ eg. 1.0.9 to 1.0.10
  3. Open ProjectNamespace_ContentUpdate/Setup/UpgradeData.php
  4. Scroll to the bottom of the file
  5. Before the closing braces add your function using a unique name (createUIPage). Use instructions below as a reference for creating and updating various elements.
  6. When done creating function scroll up and find $setup->endSetup();
  7. The last entry before that line should look something like

  8. Duplicate this entry and update both setup version number (to match the one from module.xml) and function name (to the recently created one)
  9. When done save the file and run bin/magento setup:upgrade
  10. Go to the page/block you created to confirm it's working properly

If you need to revert module's setup_version number while making adjustments you can do that by modifying a database entry in setup_module table. Make sure to revert both schema_version in data_version before running magento setup:uprade. Note that you can only change it via db until you commit.

Update functions

Create a new CMS page

Update existing CMS page

Delete existing CMS page

Create a new CMS block

Update existing CMS Block

Delete existing CMS block

Create new configurations

Update existing configuration

Delete existing configuration

Create a widget

Update transactional email template


public function updateEmailTemplate($helperSetup)
{
    // This is an example function
    return;

    $template = $helperSetup->getTemplateByCode('Lore Ipsum Forgot Password');
    if ($template->getId() <= 0) {
        return;
    }

    $text = <<<EOD
{{template config_path="design/email/header_template"}}

<p class="greeting">{{trans "%name," name=\$customer.name}}</p>
<p>{{trans "There was recently a request to change the password for your account."}}</p>
<p>{{trans "If you requested this change, set a new password here:"}}</p>

<table class="button" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td>
        <table class="inner-wrapper" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td align="center">
                    <a href="{{var this.getUrl(\$store,'customer/account/createPassword/',[_query:[id:\$customer.id,token:\$customer.rp_token],_nosid:1])}}" target="_blank">{{trans "Set a New Password"}}</a>
                </td>
            </tr>
        </table>
    </td>
</tr>
</table>

<p>{{trans "If you did not make this request, you can ignore this email and your password will remain the same."}}</p>

{{template config_path="design/email/footer_template"}}

EOD;

    $text = $helperSetup->cleanTemplateText($text);

    $variables = <<<EOD
{
"var customer.name":"Customer Name",
"var this.getUrl(\$store, 'customer/account/createPassword/', [_query:[id:\$customer.id, token:\$customer.rp_token]])":"Reset Password URL"
}
EOD;
    $variables = str_replace("\n", '', $variables);

    $data = [
        'template_text'            => $text,
        'template_styles'          => '',
        'template_type'            => TemplateTypesInterface::TYPE_HTML,
        'template_subject'         => '{{trans "Reset your %store_name password" store_name=$store.getFrontendName()}}',
        'orig_template_code'       => 'customer_password_forgot_email_template',
        'orig_template_variables'  => $variables,
    ];

    $template->addData($data);
    $template->save();
}

All versions of module-content-update with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rocketweb/module-content-update contains the following files

Loading the files please wait ....