Skip to content
dante di domenico edited this page Dec 22, 2021 · 31 revisions

BEdita Manager (aka BEM, or Manager) is the official Web application for BEdita API.

This page contains BEM informations for developers.

Install

You can create project via composer or download a release archive file.

To create project via composer:

composer create-project bedita/manager

This will create a new manager folder and install composer dependencies.

To create project from a release archive file, you choose the archive from the Manager Releases and download .zip or .tar.gz release file. Unpack it and then run composer install.

Build

Build JS/CSS bundles with yarn

yarn
yarn build-plugins
yarn build

Setup

Configuration main file is config/app.php. Edit it to suite your needs.

Every module can have a configuration overriding the default; you can modify config/app.php as explained in Modules configuration.

Module access control can be set by role. Look at Module access by role.

You can edit properties display configuration to change the properties organization in templates. For more details, see Properties display.

A BEM instance can use multiple APIs (Projects). How? see Multi project.

Test

You find BEM tests in tests folder.

You can run tests against a docker BEdita API. Check the latest release of bedita/bedita at BEdita Releases. Run the latest bedita/bedita docker image available:

docker run -p 8090:80 \
  --env BEDITA_API_KEY=1234567890 \
  --env BEDITA_ADMIN_USR=bedita \
  --env BEDITA_ADMIN_PWD=bedita \
  bedita/bedita:4.5.0

Create a tests/.env file with proper environment variables, i.e.:

# local docker
export BEDITA_API="http://127.0.0.1:8090"
export BEDITA_API_KEY="1234567890"

# Set admin credentials
export BEDITA_ADMIN_USR="beditatest"
export BEDITA_ADMIN_PWD="beditatestpwd"

Run tests:

composer run test // this runs all tests
vendor/bin/phpunit tests/TestCase/Controller/AppControllerTest.php // this runs tests in a single file
Clone this wiki locally