Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sage10 support #112

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8b6cb30
remove unused files && add sage10 support
danlapteacru Jun 3, 2020
4da191d
sageflbuilder container to roots/app
danlapteacru Jun 3, 2020
06ba097
remove richtext
danlapteacru Jun 4, 2020
b7959f6
remove aliases
danlapteacru Jun 8, 2020
38c1c78
get compiled
danlapteacru Jun 9, 2020
81383f6
remove abstract functions
danlapteacru Jun 9, 2020
6e405f8
Remove redundant packages. Min stab dev
codepuncher Jun 10, 2020
42835ef
add ServiceProvider
danlapteacru Jun 11, 2020
f37c20f
sage flbuilder themer support
danlapteacru Jun 12, 2020
543ac81
remove redundant functions
danlapteacru Jun 12, 2020
6b52721
add layout
danlapteacru Jun 15, 2020
7317763
change views dir
danlapteacru Jun 15, 2020
fe18cd9
changes
danlapteacru Jun 15, 2020
1a194d5
double quotes to single quotes
danlapteacru Jun 16, 2020
af30e1b
cr php:^7.4
codepuncher Jul 28, 2020
4657bd7
Pass data to templates and type properties
codepuncher Jul 28, 2020
ad04af1
Cleanup templates
codepuncher Jul 28, 2020
4990ec9
Don't ignore resources directory
codepuncher Jul 28, 2020
a702eb1
Use a View Composer to pass data to views
codepuncher Jul 28, 2020
0e4def9
Rename view namespaces
codepuncher Jul 28, 2020
a76421b
Cast string IDs to int
codepuncher Jul 28, 2020
362fb41
Fix not loading theme namespace
codepuncher Jul 28, 2020
f484236
export-ignore
codepuncher Jul 31, 2020
9cee759
Allow filtering Post ID passed to template
codepuncher Aug 2, 2020
295a86f
array
danlapteacru Nov 18, 2020
7d061fe
remove array #view
danlapteacru Nov 18, 2020
d8bf8f3
loading view from the sage-flbuilder Modules directory
danlapteacru Dec 17, 2020
395ad60
Merge pull request #113 from ItinerisLtd/sage10-load-view-from-sagefl…
danlapteacru Dec 17, 2020
afdb9ca
cr roots/acorn:2.0.0-alpha.0
codepuncher Jul 4, 2021
125c40e
cr 'php:^7.4 || ^8.0'
codepuncher Dec 7, 2022
a916360
cr roots/acorn
codepuncher Dec 7, 2022
2d63750
roots/acorn is a bedrock dependency
codepuncher Dec 7, 2022
bea2d6f
cr php:^8.1 -W
codepuncher Dec 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
"require": {
"php": "^7.1",
"illuminate/support": "^5.4",
"roots/sage-lib": "^9.0"
"roots/acorn": "^1.0.1"
},
"require-dev": {
"automattic/vipwpcs": "dev-master",
"beaver-builder/bb-plugin": "*",
"beaver-builder/bb-theme-builder": "*",
"roave/security-advisories": "dev-master",
"roots/sage": "*",
"wp-coding-standards/wpcs": "^1.0"
},
"config": {
Expand All @@ -28,32 +27,6 @@
"Itineris\\SageFLBuilder\\": "src/"
}
},
"repositories": [
{
"type": "package",
"package": {
"name": "beaver-builder/bb-plugin",
"type": "wordpress-plugin",
"version": "999.999.999",
"dist": {
"type": "zip",
"url": "https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&download=bb-plugin-pro.zip&license=78682e62702e6676657261766776407a7667"
}
}
},
{
"type": "package",
"package": {
"name": "beaver-builder/bb-theme-builder",
"type": "wordpress-plugin",
"version": "999.999.999",
"dist": {
"type": "zip",
"url": "https://updates.wpbeaverbuilder.com/?fl-api-method=composer_download&download=bb-theme-builder.zip&license=78682e62702e6676657261766776407a7667"
}
}
}
],
"prefer-stable": true,
"scripts": {
"check-style": "phpcs --standard=ruleset.xml --colors -p -s",
Expand Down
4 changes: 2 additions & 2 deletions src/AbstractBladeModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Itineris\SageFLBuilder;

use FLBuilderModule;
use function App\sage;
use function Roots\app;

/**
* Add Laravel Blade support.
Expand All @@ -32,7 +32,7 @@ public static function renderFrontendTemplate(string $file, FLBuilderModule $mod
}

/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);
$path = $helper->templatePath($module->dir . 'includes/frontend.blade.php');

echo $helper->template($path, [
Expand Down
14 changes: 5 additions & 9 deletions src/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Itineris\SageFLBuilder;

use function Roots\view;
use function Roots\asset;

abstract class AbstractHelper
{
/**
Expand All @@ -14,7 +17,7 @@ abstract class AbstractHelper
*/
public function template($file, $data = []): string
{
return \App\template($file, $data);
return view($file, $data);
}

/**
Expand All @@ -37,7 +40,7 @@ public function templatePath($file, $data = []): string
*/
public function assetPath($asset): string
{
return \App\asset_path($asset);
return asset($asset)->uri();
}

public function getModuleGroup(): string
Expand Down Expand Up @@ -124,11 +127,4 @@ abstract public function videoEmbed($video_url, $width = null, $height = null);
abstract public function getSecondaryNav();

abstract public function getGravityForms(): array;

/**
* Full path to PostGrid template directory.
*
* @return string
*/
abstract public function getPostGridTemplateDir(): string;
}
114 changes: 0 additions & 114 deletions src/God.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/Modules/Accordion/Accordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FLBuilder;
use Itineris\SageFLBuilder\AbstractHelper;
use Itineris\SageFLBuilder\AbstractModule;
use function App\sage;
use function Roots\app;

/**
* Generic Bootstrap accordion widget
Expand Down Expand Up @@ -87,7 +87,7 @@ public static function register(): void
public function __construct()
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

parent::__construct([
'name' => __('Accordion', 'fabric'),
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/Alert/Alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FLBuilder;
use Itineris\SageFLBuilder\AbstractBladeModule;
use Itineris\SageFLBuilder\AbstractHelper;
use function App\sage;
use function Roots\app;

/**
* Class Alert
Expand Down Expand Up @@ -55,7 +55,7 @@ public static function register(): void
public function __construct()
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

parent::__construct([
'name' => __('Alert', 'fabric'),
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/Breadcrumbs/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FLBuilder;
use Itineris\SageFLBuilder\AbstractHelper;
use Itineris\SageFLBuilder\AbstractModule;
use function App\sage;
use function Roots\app;

/**
* Class Breadcrumbs
Expand All @@ -28,7 +28,7 @@ public static function register(): void
public function __construct()
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

parent::__construct([
'name' => __('Breadcrumbs', 'fabric'),
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/Breadcrumbs/includes/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
declare(strict_types=1);

use Itineris\SageFLBuilder\AbstractHelper;
use function App\sage;
use function Roots\app;

/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

echo $helper->breadcrumbs();
6 changes: 3 additions & 3 deletions src/Modules/Button/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FLBuilder;
use Itineris\SageFLBuilder\AbstractHelper;
use Itineris\SageFLBuilder\AbstractModule;
use function App\sage;
use function Roots\app;

/**
* Generic Bootstrap button widget
Expand All @@ -19,7 +19,7 @@ class Button extends AbstractModule
public static function register(): void
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

FLBuilder::register_module(__CLASS__, [
'general' => [
Expand Down Expand Up @@ -66,7 +66,7 @@ public static function register(): void
public function __construct()
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

parent::__construct([
'name' => __('Button', 'fabric'),
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/Button/includes/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
*/

use Itineris\SageFLBuilder\AbstractHelper;
use function App\sage;
use function Roots\app;

/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant? Maybe try making it a blade file.

Copy link
Author

@danlapteacru danlapteacru Jun 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codepuncher We will convert all these files into Blade later.


?>
<?php if (! empty($settings->link) && ! empty($settings->text)) : ?>
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/ContentImage/ContentImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FLBuilder;
use Itineris\SageFLBuilder\AbstractBladeModule;
use Itineris\SageFLBuilder\AbstractHelper;
use function App\sage;
use function Roots\app;

/**
* Generic Bootstrap button widget
Expand Down Expand Up @@ -39,7 +39,7 @@ public static function register(): void
public function __construct()
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

parent::__construct([
'name' => __('Content image', 'fabric'),
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/FilterBar/FilterBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FLBuilder;
use Itineris\SageFLBuilder\AbstractHelper;
use Itineris\SageFLBuilder\AbstractModule;
use function App\sage;
use function Roots\app;

/**
* @class FilterBar
Expand Down Expand Up @@ -103,7 +103,7 @@ public static function register(): void
public function __construct()
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

parent::__construct([
'name' => __('Filter bar', 'fabric'),
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/Gallery/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FLBuilder;
use Itineris\SageFLBuilder\AbstractBladeModule;
use Itineris\SageFLBuilder\AbstractHelper;
use function App\sage;
use function Roots\app;

/**
* Class Gallery
Expand Down Expand Up @@ -61,7 +61,7 @@ public static function register(): void
public function __construct()
{
/** @var AbstractHelper $helper */
$helper = sage(AbstractHelper::class);
$helper = app(AbstractHelper::class);

parent::__construct([
'name' => __('Gallery', 'fabric'),
Expand Down
Loading