Download the PHP package itineris/sage-flbuilder without Composer
On this page you can find all versions of the php package itineris/sage-flbuilder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sage-flbuilder
itineris/sage-flbuilder
- Minimum Requirements
- Installation
- Rules
- Caveats
- Module Names
- Customizing
PostGrid
- Templates
- Subclass
- Usage - Minimum
- Step 1 - Define helper class
- Step 2
- Usage - Custom PHP Module
- Step 1 - Define module class
- Step 2 - Frontend Template
- Step 3 - Add custom module into
SageFLBuilder
- Usage - Custom Blade Module
- Step 1 - Inherit from
AbstractBladeModule
. - Step 2 - Frontend Template
- Step 3
- Step 1 - Inherit from
- Usage - Custom Settings
- Step 1 - Define Setting Class
- Step 2
- Usage - Extra Settings
- Usage - Exclude Default Modules / Settings
- Migrating from Fabric
Minimum Requirements
- PHP v7.1
- Sage v9.0.0-beta.4
- illuminate/support v5.4
- Advanced Custom Fields PRO v5.6.9
- Beaver Builder Plugin (Pro Version) v2.1.1.1
- Beaver Themer v1.1.1
- Gravity Forms v2.2.6.5
You must ensure these 3 required plugins installed via Bedrock's composer.json.
Installation
Rules
- Follow PSR-4
- Follow PSR-1
- Do not copy and paste from default modules - huge technical debt in this package
- Do not use
God
class - it is pure technical debt
Caveats
Module Names
Beaver Builder can't accept 2 modules with the same file name even they follow PSR-4.
For example, these 3 modules conflict each other:
vendor/itineris/sage-flbuilder/src/Modules/Button/Button.php
app/Plugins/FLBuilder/Modules/BrainHouse/Button/Button.php
app/Plugins/FLBuilder/Modules/Trinity/Button/Button.php
Solution - Use unique class names:
vendor/itineris/sage-flbuilder/src/Modules/Button/Button.php
app/Plugins/FLBuilder/Modules/BrainHouseButton/BrainHouseButton.php
app/Plugins/FLBuilder/Modules/TrinityButton/TrinityButton.php
Customizing PostGrid
Templates
Deprecated: Prior to v0.5.0, PostGrid::DIR
is used to locate template directory. This is replaced with AbstractHelper::getPostGridTemplateDir
.
Filter bar and post theme templates are customizable in projects, both Blade and normal .php
are supported.
For example:
Subclass
Important: Overriding PostGrid
is not recommended. Tweak your project to fit in default PostGrid
whenever possible.
If you must override PostGrid
with a subclass as a last resort, you have to put it into Sage's container after SageFLBuilder::init
:
Usage - Minimum
Step 1 - Define helper class
Step 2
Within app/setup.php
/ app/farbic.php
:
Tips: Put these lines into a class method.
Usage - Custom PHP Module
Step 1 - Define module class
See: https://kb.wpbeaverbuilder.com/article/124-custom-module-developer-guide
Step 2 - Frontend Template
Create includes/frontend.php
:
Step 3 - Add custom module into SageFLBuilder
Usage - Custom Blade Module
Similar to custom PHP module.
Step 1 - Inherit from AbstractBladeModule
.
Step 2 - Frontend Template
Create includes/frontend.blade.php
:
Step 3
Usage - Custom Settings
Step 1 - Define Setting Class
Step 2
Usage - Extra Settings
The following settings are disabled by default:
ProductsArchive
FourOFourThemeLayout
SearchThemeLayout
WooCommerceThemeLayout
To enable them:
Usage - Exclude Default Modules / Settings
Migrating from Fabric
Since sage-flbuilder
uses PSR-4 while Fabric
doesn't, module names are changed.
When migrating from Fabric
, you have to search and replace all module name saved in database:
This is a bash script for sage-flbuilder
's default modules: