├── .gitignore ├── README.md ├── composer.json ├── composer.lock └── src ├── Block.php └── helpers.php /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ACF Block Builder 2 | 3 | A light wrapper around ACF Builder for registering ACF Blocks. 4 | Default usage is for Sage 10, however, other themes are 5 | supported. 6 | 7 | ## Installation 8 | 9 | Within your theme or plugin: 10 | 11 | ```shell 12 | $ composer require kmdigital/acf-block-builder 13 | ``` 14 | 15 | ## Usage 16 | 17 | ```php 18 | use KMDigital\AcfBlockBuilder\Block; 19 | 20 | $testimonial = new Block('testimonial'); 21 | 22 | $testimonial 23 | ->addWysiwyg('content') 24 | ->addText('person') 25 | ->addText('where') 26 | ->addText('when'); 27 | 28 | add_action('acf/init', function () use ($testimonial) { 29 | acf_add_local_field_group($testimonial->build()); 30 | }); 31 | ``` 32 | 33 | There are additional methods you can use for setting and 34 | overriding block options: 35 | 36 | ```php 37 | $testimonial 38 | // Allows you to set a custom title for the block. 39 | // Default is the block name/slug titlized. 40 | ->setTitle('Review') 41 | 42 | // Allows you to set the block description. Default is none. 43 | ->setDescription('A review with meta.') 44 | 45 | // Allows you to set the block description. Default is a block. 46 | ->setIcon('star-half') 47 | 48 | // Allows you to set the block category. Default is none. 49 | ->setCategory('common') 50 | 51 | // Allows you to set the block keywords. Default is none. 52 | ->setKeywords('review', 'testimonial') 53 | 54 | // Allows you to use a different rendering function. Default is Sage 10 (Acorn). 55 | ->renderWith(['Me\\View\\', 'render']); 56 | ``` 57 | 58 | ## Default rendering function 59 | 60 | The default rendering function is for Sage 10 or projects using 61 | Acorn. It searches for templates in `resources/views/blocks` (if 62 | `resources/views` is your default views path). 63 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kmdigital/acf-block-builder", 3 | "description": "A wrapper around ACF Builder for registering ACF Blocks.", 4 | "type": "library", 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Nathan Knowler", 9 | "email": "nathan@knowler.me" 10 | } 11 | ], 12 | "autoload": { 13 | "psr-4": { 14 | "KMDigital\\AcfBlockBuilder\\": "src/" 15 | }, 16 | "files": [ 17 | "src/helpers.php" 18 | ] 19 | }, 20 | "require": { 21 | "roots/acorn": "dev-master", 22 | "roots/support": "dev-master", 23 | "stoutlogic/acf-builder": "^1.8" 24 | }, 25 | "require-dev": { 26 | "squizlabs/php_codesniffer": "^3.0" 27 | }, 28 | "scripts": { 29 | "lint": [ 30 | "phpcs --ignore=vendor --extensions=php --standard=PSR12 ." 31 | ] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "d09f88bcf650aae457b0cb9a963957af", 8 | "packages": [ 9 | { 10 | "name": "doctrine/inflector", 11 | "version": "v1.3.0", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/doctrine/inflector.git", 15 | "reference": "5527a48b7313d15261292c149e55e26eae771b0a" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", 20 | "reference": "5527a48b7313d15261292c149e55e26eae771b0a", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": "^7.1" 25 | }, 26 | "require-dev": { 27 | "phpunit/phpunit": "^6.2" 28 | }, 29 | "type": "library", 30 | "extra": { 31 | "branch-alias": { 32 | "dev-master": "1.3.x-dev" 33 | } 34 | }, 35 | "autoload": { 36 | "psr-4": { 37 | "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" 38 | } 39 | }, 40 | "notification-url": "https://packagist.org/downloads/", 41 | "license": [ 42 | "MIT" 43 | ], 44 | "authors": [ 45 | { 46 | "name": "Roman Borschel", 47 | "email": "roman@code-factory.org" 48 | }, 49 | { 50 | "name": "Benjamin Eberlei", 51 | "email": "kontakt@beberlei.de" 52 | }, 53 | { 54 | "name": "Guilherme Blanco", 55 | "email": "guilhermeblanco@gmail.com" 56 | }, 57 | { 58 | "name": "Jonathan Wage", 59 | "email": "jonwage@gmail.com" 60 | }, 61 | { 62 | "name": "Johannes Schmitt", 63 | "email": "schmittjoh@gmail.com" 64 | } 65 | ], 66 | "description": "Common String Manipulations with regard to casing and singular/plural rules.", 67 | "homepage": "http://www.doctrine-project.org", 68 | "keywords": [ 69 | "inflection", 70 | "pluralize", 71 | "singularize", 72 | "string" 73 | ], 74 | "time": "2018-01-09T20:05:19+00:00" 75 | }, 76 | { 77 | "name": "doctrine/instantiator", 78 | "version": "1.0.5", 79 | "source": { 80 | "type": "git", 81 | "url": "https://github.com/doctrine/instantiator.git", 82 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" 83 | }, 84 | "dist": { 85 | "type": "zip", 86 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", 87 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", 88 | "shasum": "" 89 | }, 90 | "require": { 91 | "php": ">=5.3,<8.0-DEV" 92 | }, 93 | "require-dev": { 94 | "athletic/athletic": "~0.1.8", 95 | "ext-pdo": "*", 96 | "ext-phar": "*", 97 | "phpunit/phpunit": "~4.0", 98 | "squizlabs/php_codesniffer": "~2.0" 99 | }, 100 | "type": "library", 101 | "extra": { 102 | "branch-alias": { 103 | "dev-master": "1.0.x-dev" 104 | } 105 | }, 106 | "autoload": { 107 | "psr-4": { 108 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 109 | } 110 | }, 111 | "notification-url": "https://packagist.org/downloads/", 112 | "license": [ 113 | "MIT" 114 | ], 115 | "authors": [ 116 | { 117 | "name": "Marco Pivetta", 118 | "email": "ocramius@gmail.com", 119 | "homepage": "http://ocramius.github.com/" 120 | } 121 | ], 122 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 123 | "homepage": "https://github.com/doctrine/instantiator", 124 | "keywords": [ 125 | "constructor", 126 | "instantiate" 127 | ], 128 | "time": "2015-06-14T21:17:01+00:00" 129 | }, 130 | { 131 | "name": "illuminate/config", 132 | "version": "v5.8.14", 133 | "source": { 134 | "type": "git", 135 | "url": "https://github.com/illuminate/config.git", 136 | "reference": "6dac1dee3fb51704767c69a07aead1bc75c12368" 137 | }, 138 | "dist": { 139 | "type": "zip", 140 | "url": "https://api.github.com/repos/illuminate/config/zipball/6dac1dee3fb51704767c69a07aead1bc75c12368", 141 | "reference": "6dac1dee3fb51704767c69a07aead1bc75c12368", 142 | "shasum": "" 143 | }, 144 | "require": { 145 | "illuminate/contracts": "5.8.*", 146 | "illuminate/support": "5.8.*", 147 | "php": "^7.1.3" 148 | }, 149 | "type": "library", 150 | "extra": { 151 | "branch-alias": { 152 | "dev-master": "5.8-dev" 153 | } 154 | }, 155 | "autoload": { 156 | "psr-4": { 157 | "Illuminate\\Config\\": "" 158 | } 159 | }, 160 | "notification-url": "https://packagist.org/downloads/", 161 | "license": [ 162 | "MIT" 163 | ], 164 | "authors": [ 165 | { 166 | "name": "Taylor Otwell", 167 | "email": "taylor@laravel.com" 168 | } 169 | ], 170 | "description": "The Illuminate Config package.", 171 | "homepage": "https://laravel.com", 172 | "time": "2019-02-14T12:51:50+00:00" 173 | }, 174 | { 175 | "name": "illuminate/container", 176 | "version": "v5.8.14", 177 | "source": { 178 | "type": "git", 179 | "url": "https://github.com/illuminate/container.git", 180 | "reference": "9405989993a48c2cd50ad1e5b2b08a33383c3807" 181 | }, 182 | "dist": { 183 | "type": "zip", 184 | "url": "https://api.github.com/repos/illuminate/container/zipball/9405989993a48c2cd50ad1e5b2b08a33383c3807", 185 | "reference": "9405989993a48c2cd50ad1e5b2b08a33383c3807", 186 | "shasum": "" 187 | }, 188 | "require": { 189 | "illuminate/contracts": "5.8.*", 190 | "illuminate/support": "5.8.*", 191 | "php": "^7.1.3", 192 | "psr/container": "^1.0" 193 | }, 194 | "type": "library", 195 | "extra": { 196 | "branch-alias": { 197 | "dev-master": "5.8-dev" 198 | } 199 | }, 200 | "autoload": { 201 | "psr-4": { 202 | "Illuminate\\Container\\": "" 203 | } 204 | }, 205 | "notification-url": "https://packagist.org/downloads/", 206 | "license": [ 207 | "MIT" 208 | ], 209 | "authors": [ 210 | { 211 | "name": "Taylor Otwell", 212 | "email": "taylor@laravel.com" 213 | } 214 | ], 215 | "description": "The Illuminate Container package.", 216 | "homepage": "https://laravel.com", 217 | "time": "2019-04-22T13:12:35+00:00" 218 | }, 219 | { 220 | "name": "illuminate/contracts", 221 | "version": "v5.8.14", 222 | "source": { 223 | "type": "git", 224 | "url": "https://github.com/illuminate/contracts.git", 225 | "reference": "0b3cbe19051c9a8c247091cc0867d3b65250d093" 226 | }, 227 | "dist": { 228 | "type": "zip", 229 | "url": "https://api.github.com/repos/illuminate/contracts/zipball/0b3cbe19051c9a8c247091cc0867d3b65250d093", 230 | "reference": "0b3cbe19051c9a8c247091cc0867d3b65250d093", 231 | "shasum": "" 232 | }, 233 | "require": { 234 | "php": "^7.1.3", 235 | "psr/container": "^1.0", 236 | "psr/simple-cache": "^1.0" 237 | }, 238 | "type": "library", 239 | "extra": { 240 | "branch-alias": { 241 | "dev-master": "5.8-dev" 242 | } 243 | }, 244 | "autoload": { 245 | "psr-4": { 246 | "Illuminate\\Contracts\\": "" 247 | } 248 | }, 249 | "notification-url": "https://packagist.org/downloads/", 250 | "license": [ 251 | "MIT" 252 | ], 253 | "authors": [ 254 | { 255 | "name": "Taylor Otwell", 256 | "email": "taylor@laravel.com" 257 | } 258 | ], 259 | "description": "The Illuminate Contracts package.", 260 | "homepage": "https://laravel.com", 261 | "time": "2019-04-21T18:51:09+00:00" 262 | }, 263 | { 264 | "name": "illuminate/database", 265 | "version": "v5.8.14", 266 | "source": { 267 | "type": "git", 268 | "url": "https://github.com/illuminate/database.git", 269 | "reference": "a68f2ea08627af047b9d58feb2b1e3697a8bf298" 270 | }, 271 | "dist": { 272 | "type": "zip", 273 | "url": "https://api.github.com/repos/illuminate/database/zipball/a68f2ea08627af047b9d58feb2b1e3697a8bf298", 274 | "reference": "a68f2ea08627af047b9d58feb2b1e3697a8bf298", 275 | "shasum": "" 276 | }, 277 | "require": { 278 | "ext-json": "*", 279 | "illuminate/container": "5.8.*", 280 | "illuminate/contracts": "5.8.*", 281 | "illuminate/support": "5.8.*", 282 | "php": "^7.1.3" 283 | }, 284 | "suggest": { 285 | "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", 286 | "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", 287 | "illuminate/console": "Required to use the database commands (5.8.*).", 288 | "illuminate/events": "Required to use the observers with Eloquent (5.8.*).", 289 | "illuminate/filesystem": "Required to use the migrations (5.8.*).", 290 | "illuminate/pagination": "Required to paginate the result set (5.8.*)." 291 | }, 292 | "type": "library", 293 | "extra": { 294 | "branch-alias": { 295 | "dev-master": "5.8-dev" 296 | } 297 | }, 298 | "autoload": { 299 | "psr-4": { 300 | "Illuminate\\Database\\": "" 301 | } 302 | }, 303 | "notification-url": "https://packagist.org/downloads/", 304 | "license": [ 305 | "MIT" 306 | ], 307 | "authors": [ 308 | { 309 | "name": "Taylor Otwell", 310 | "email": "taylor@laravel.com" 311 | } 312 | ], 313 | "description": "The Illuminate Database package.", 314 | "homepage": "https://laravel.com", 315 | "keywords": [ 316 | "database", 317 | "laravel", 318 | "orm", 319 | "sql" 320 | ], 321 | "time": "2019-04-22T19:09:23+00:00" 322 | }, 323 | { 324 | "name": "illuminate/events", 325 | "version": "v5.8.14", 326 | "source": { 327 | "type": "git", 328 | "url": "https://github.com/illuminate/events.git", 329 | "reference": "a85d7c273bc4e3357000c5fc4812374598515de3" 330 | }, 331 | "dist": { 332 | "type": "zip", 333 | "url": "https://api.github.com/repos/illuminate/events/zipball/a85d7c273bc4e3357000c5fc4812374598515de3", 334 | "reference": "a85d7c273bc4e3357000c5fc4812374598515de3", 335 | "shasum": "" 336 | }, 337 | "require": { 338 | "illuminate/container": "5.8.*", 339 | "illuminate/contracts": "5.8.*", 340 | "illuminate/support": "5.8.*", 341 | "php": "^7.1.3" 342 | }, 343 | "type": "library", 344 | "extra": { 345 | "branch-alias": { 346 | "dev-master": "5.8-dev" 347 | } 348 | }, 349 | "autoload": { 350 | "psr-4": { 351 | "Illuminate\\Events\\": "" 352 | } 353 | }, 354 | "notification-url": "https://packagist.org/downloads/", 355 | "license": [ 356 | "MIT" 357 | ], 358 | "authors": [ 359 | { 360 | "name": "Taylor Otwell", 361 | "email": "taylor@laravel.com" 362 | } 363 | ], 364 | "description": "The Illuminate Events package.", 365 | "homepage": "https://laravel.com", 366 | "time": "2019-02-18T18:37:54+00:00" 367 | }, 368 | { 369 | "name": "illuminate/filesystem", 370 | "version": "v5.8.14", 371 | "source": { 372 | "type": "git", 373 | "url": "https://github.com/illuminate/filesystem.git", 374 | "reference": "e3c7302b147704420041c07aac538b9de67ebb8f" 375 | }, 376 | "dist": { 377 | "type": "zip", 378 | "url": "https://api.github.com/repos/illuminate/filesystem/zipball/e3c7302b147704420041c07aac538b9de67ebb8f", 379 | "reference": "e3c7302b147704420041c07aac538b9de67ebb8f", 380 | "shasum": "" 381 | }, 382 | "require": { 383 | "illuminate/contracts": "5.8.*", 384 | "illuminate/support": "5.8.*", 385 | "php": "^7.1.3", 386 | "symfony/finder": "^4.2" 387 | }, 388 | "suggest": { 389 | "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0).", 390 | "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", 391 | "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", 392 | "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", 393 | "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0)." 394 | }, 395 | "type": "library", 396 | "extra": { 397 | "branch-alias": { 398 | "dev-master": "5.8-dev" 399 | } 400 | }, 401 | "autoload": { 402 | "psr-4": { 403 | "Illuminate\\Filesystem\\": "" 404 | } 405 | }, 406 | "notification-url": "https://packagist.org/downloads/", 407 | "license": [ 408 | "MIT" 409 | ], 410 | "authors": [ 411 | { 412 | "name": "Taylor Otwell", 413 | "email": "taylor@laravel.com" 414 | } 415 | ], 416 | "description": "The Illuminate Filesystem package.", 417 | "homepage": "https://laravel.com", 418 | "time": "2019-04-08T12:56:11+00:00" 419 | }, 420 | { 421 | "name": "illuminate/support", 422 | "version": "v5.8.14", 423 | "source": { 424 | "type": "git", 425 | "url": "https://github.com/illuminate/support.git", 426 | "reference": "e1b62fbf219dc1fa7154b0abef3975a41038bca7" 427 | }, 428 | "dist": { 429 | "type": "zip", 430 | "url": "https://api.github.com/repos/illuminate/support/zipball/e1b62fbf219dc1fa7154b0abef3975a41038bca7", 431 | "reference": "e1b62fbf219dc1fa7154b0abef3975a41038bca7", 432 | "shasum": "" 433 | }, 434 | "require": { 435 | "doctrine/inflector": "^1.1", 436 | "ext-json": "*", 437 | "ext-mbstring": "*", 438 | "illuminate/contracts": "5.8.*", 439 | "nesbot/carbon": "^1.26.3 || ^2.0", 440 | "php": "^7.1.3" 441 | }, 442 | "conflict": { 443 | "tightenco/collect": "<5.5.33" 444 | }, 445 | "suggest": { 446 | "illuminate/filesystem": "Required to use the composer class (5.8.*).", 447 | "moontoast/math": "Required to use ordered UUIDs (^1.1).", 448 | "ramsey/uuid": "Required to use Str::uuid() (^3.7).", 449 | "symfony/process": "Required to use the composer class (^4.2).", 450 | "symfony/var-dumper": "Required to use the dd function (^4.2).", 451 | "vlucas/phpdotenv": "Required to use the env helper (^3.3)." 452 | }, 453 | "type": "library", 454 | "extra": { 455 | "branch-alias": { 456 | "dev-master": "5.8-dev" 457 | } 458 | }, 459 | "autoload": { 460 | "psr-4": { 461 | "Illuminate\\Support\\": "" 462 | }, 463 | "files": [ 464 | "helpers.php" 465 | ] 466 | }, 467 | "notification-url": "https://packagist.org/downloads/", 468 | "license": [ 469 | "MIT" 470 | ], 471 | "authors": [ 472 | { 473 | "name": "Taylor Otwell", 474 | "email": "taylor@laravel.com" 475 | } 476 | ], 477 | "description": "The Illuminate Support package.", 478 | "homepage": "https://laravel.com", 479 | "time": "2019-04-22T13:12:35+00:00" 480 | }, 481 | { 482 | "name": "illuminate/view", 483 | "version": "v5.8.14", 484 | "source": { 485 | "type": "git", 486 | "url": "https://github.com/illuminate/view.git", 487 | "reference": "a62ef6b6c4392a8bb5cf3af5f5076459525286c5" 488 | }, 489 | "dist": { 490 | "type": "zip", 491 | "url": "https://api.github.com/repos/illuminate/view/zipball/a62ef6b6c4392a8bb5cf3af5f5076459525286c5", 492 | "reference": "a62ef6b6c4392a8bb5cf3af5f5076459525286c5", 493 | "shasum": "" 494 | }, 495 | "require": { 496 | "ext-json": "*", 497 | "illuminate/container": "5.8.*", 498 | "illuminate/contracts": "5.8.*", 499 | "illuminate/events": "5.8.*", 500 | "illuminate/filesystem": "5.8.*", 501 | "illuminate/support": "5.8.*", 502 | "php": "^7.1.3", 503 | "symfony/debug": "^4.2" 504 | }, 505 | "type": "library", 506 | "extra": { 507 | "branch-alias": { 508 | "dev-master": "5.8-dev" 509 | } 510 | }, 511 | "autoload": { 512 | "psr-4": { 513 | "Illuminate\\View\\": "" 514 | } 515 | }, 516 | "notification-url": "https://packagist.org/downloads/", 517 | "license": [ 518 | "MIT" 519 | ], 520 | "authors": [ 521 | { 522 | "name": "Taylor Otwell", 523 | "email": "taylor@laravel.com" 524 | } 525 | ], 526 | "description": "The Illuminate View package.", 527 | "homepage": "https://laravel.com", 528 | "time": "2019-04-17T14:14:38+00:00" 529 | }, 530 | { 531 | "name": "league/flysystem", 532 | "version": "1.0.51", 533 | "source": { 534 | "type": "git", 535 | "url": "https://github.com/thephpleague/flysystem.git", 536 | "reference": "755ba7bf3fb9031e6581d091db84d78275874396" 537 | }, 538 | "dist": { 539 | "type": "zip", 540 | "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/755ba7bf3fb9031e6581d091db84d78275874396", 541 | "reference": "755ba7bf3fb9031e6581d091db84d78275874396", 542 | "shasum": "" 543 | }, 544 | "require": { 545 | "ext-fileinfo": "*", 546 | "php": ">=5.5.9" 547 | }, 548 | "conflict": { 549 | "league/flysystem-sftp": "<1.0.6" 550 | }, 551 | "require-dev": { 552 | "phpspec/phpspec": "^3.4", 553 | "phpunit/phpunit": "^5.7.10" 554 | }, 555 | "suggest": { 556 | "ext-fileinfo": "Required for MimeType", 557 | "ext-ftp": "Allows you to use FTP server storage", 558 | "ext-openssl": "Allows you to use FTPS server storage", 559 | "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", 560 | "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", 561 | "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", 562 | "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", 563 | "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", 564 | "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", 565 | "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", 566 | "league/flysystem-webdav": "Allows you to use WebDAV storage", 567 | "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", 568 | "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", 569 | "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" 570 | }, 571 | "type": "library", 572 | "extra": { 573 | "branch-alias": { 574 | "dev-master": "1.1-dev" 575 | } 576 | }, 577 | "autoload": { 578 | "psr-4": { 579 | "League\\Flysystem\\": "src/" 580 | } 581 | }, 582 | "notification-url": "https://packagist.org/downloads/", 583 | "license": [ 584 | "MIT" 585 | ], 586 | "authors": [ 587 | { 588 | "name": "Frank de Jonge", 589 | "email": "info@frenky.net" 590 | } 591 | ], 592 | "description": "Filesystem abstraction: Many filesystems, one API.", 593 | "keywords": [ 594 | "Cloud Files", 595 | "WebDAV", 596 | "abstraction", 597 | "aws", 598 | "cloud", 599 | "copy.com", 600 | "dropbox", 601 | "file systems", 602 | "files", 603 | "filesystem", 604 | "filesystems", 605 | "ftp", 606 | "rackspace", 607 | "remote", 608 | "s3", 609 | "sftp", 610 | "storage" 611 | ], 612 | "time": "2019-03-30T13:22:34+00:00" 613 | }, 614 | { 615 | "name": "nesbot/carbon", 616 | "version": "2.17.1", 617 | "source": { 618 | "type": "git", 619 | "url": "https://github.com/briannesbitt/Carbon.git", 620 | "reference": "96acbc0c03782e8115156dd4dd8b736267155066" 621 | }, 622 | "dist": { 623 | "type": "zip", 624 | "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/96acbc0c03782e8115156dd4dd8b736267155066", 625 | "reference": "96acbc0c03782e8115156dd4dd8b736267155066", 626 | "shasum": "" 627 | }, 628 | "require": { 629 | "ext-json": "*", 630 | "php": "^7.1.8 || ^8.0", 631 | "symfony/translation": "^3.4 || ^4.0" 632 | }, 633 | "require-dev": { 634 | "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", 635 | "kylekatarnls/multi-tester": "^1.1", 636 | "phpmd/phpmd": "^2.6", 637 | "phpstan/phpstan": "^0.11", 638 | "phpunit/phpunit": "^7.5 || ^8.0", 639 | "squizlabs/php_codesniffer": "^3.4" 640 | }, 641 | "type": "library", 642 | "extra": { 643 | "laravel": { 644 | "providers": [ 645 | "Carbon\\Laravel\\ServiceProvider" 646 | ] 647 | } 648 | }, 649 | "autoload": { 650 | "psr-4": { 651 | "Carbon\\": "src/Carbon/" 652 | } 653 | }, 654 | "notification-url": "https://packagist.org/downloads/", 655 | "license": [ 656 | "MIT" 657 | ], 658 | "authors": [ 659 | { 660 | "name": "Brian Nesbitt", 661 | "email": "brian@nesbot.com", 662 | "homepage": "http://nesbot.com" 663 | } 664 | ], 665 | "description": "A simple API extension for DateTime.", 666 | "homepage": "http://carbon.nesbot.com", 667 | "keywords": [ 668 | "date", 669 | "datetime", 670 | "time" 671 | ], 672 | "time": "2019-04-27T18:04:27+00:00" 673 | }, 674 | { 675 | "name": "psr/container", 676 | "version": "1.0.0", 677 | "source": { 678 | "type": "git", 679 | "url": "https://github.com/php-fig/container.git", 680 | "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" 681 | }, 682 | "dist": { 683 | "type": "zip", 684 | "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", 685 | "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", 686 | "shasum": "" 687 | }, 688 | "require": { 689 | "php": ">=5.3.0" 690 | }, 691 | "type": "library", 692 | "extra": { 693 | "branch-alias": { 694 | "dev-master": "1.0.x-dev" 695 | } 696 | }, 697 | "autoload": { 698 | "psr-4": { 699 | "Psr\\Container\\": "src/" 700 | } 701 | }, 702 | "notification-url": "https://packagist.org/downloads/", 703 | "license": [ 704 | "MIT" 705 | ], 706 | "authors": [ 707 | { 708 | "name": "PHP-FIG", 709 | "homepage": "http://www.php-fig.org/" 710 | } 711 | ], 712 | "description": "Common Container Interface (PHP FIG PSR-11)", 713 | "homepage": "https://github.com/php-fig/container", 714 | "keywords": [ 715 | "PSR-11", 716 | "container", 717 | "container-interface", 718 | "container-interop", 719 | "psr" 720 | ], 721 | "time": "2017-02-14T16:28:37+00:00" 722 | }, 723 | { 724 | "name": "psr/log", 725 | "version": "1.1.0", 726 | "source": { 727 | "type": "git", 728 | "url": "https://github.com/php-fig/log.git", 729 | "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" 730 | }, 731 | "dist": { 732 | "type": "zip", 733 | "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", 734 | "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", 735 | "shasum": "" 736 | }, 737 | "require": { 738 | "php": ">=5.3.0" 739 | }, 740 | "type": "library", 741 | "extra": { 742 | "branch-alias": { 743 | "dev-master": "1.0.x-dev" 744 | } 745 | }, 746 | "autoload": { 747 | "psr-4": { 748 | "Psr\\Log\\": "Psr/Log/" 749 | } 750 | }, 751 | "notification-url": "https://packagist.org/downloads/", 752 | "license": [ 753 | "MIT" 754 | ], 755 | "authors": [ 756 | { 757 | "name": "PHP-FIG", 758 | "homepage": "http://www.php-fig.org/" 759 | } 760 | ], 761 | "description": "Common interface for logging libraries", 762 | "homepage": "https://github.com/php-fig/log", 763 | "keywords": [ 764 | "log", 765 | "psr", 766 | "psr-3" 767 | ], 768 | "time": "2018-11-20T15:27:04+00:00" 769 | }, 770 | { 771 | "name": "psr/simple-cache", 772 | "version": "1.0.1", 773 | "source": { 774 | "type": "git", 775 | "url": "https://github.com/php-fig/simple-cache.git", 776 | "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" 777 | }, 778 | "dist": { 779 | "type": "zip", 780 | "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", 781 | "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", 782 | "shasum": "" 783 | }, 784 | "require": { 785 | "php": ">=5.3.0" 786 | }, 787 | "type": "library", 788 | "extra": { 789 | "branch-alias": { 790 | "dev-master": "1.0.x-dev" 791 | } 792 | }, 793 | "autoload": { 794 | "psr-4": { 795 | "Psr\\SimpleCache\\": "src/" 796 | } 797 | }, 798 | "notification-url": "https://packagist.org/downloads/", 799 | "license": [ 800 | "MIT" 801 | ], 802 | "authors": [ 803 | { 804 | "name": "PHP-FIG", 805 | "homepage": "http://www.php-fig.org/" 806 | } 807 | ], 808 | "description": "Common interfaces for simple caching", 809 | "keywords": [ 810 | "cache", 811 | "caching", 812 | "psr", 813 | "psr-16", 814 | "simple-cache" 815 | ], 816 | "time": "2017-10-23T01:57:42+00:00" 817 | }, 818 | { 819 | "name": "roots/acorn", 820 | "version": "dev-master", 821 | "source": { 822 | "type": "git", 823 | "url": "https://github.com/roots/acorn.git", 824 | "reference": "94fa6dcb34991015281e76c4f46a18f0013a9dc9" 825 | }, 826 | "dist": { 827 | "type": "zip", 828 | "url": "https://api.github.com/repos/roots/acorn/zipball/94fa6dcb34991015281e76c4f46a18f0013a9dc9", 829 | "reference": "94fa6dcb34991015281e76c4f46a18f0013a9dc9", 830 | "shasum": "" 831 | }, 832 | "require": { 833 | "illuminate/config": "^5.8", 834 | "illuminate/container": "^5.8", 835 | "illuminate/contracts": "^5.8", 836 | "illuminate/database": "^5.8", 837 | "illuminate/events": "^5.8", 838 | "illuminate/filesystem": "^5.8", 839 | "illuminate/support": "^5.8", 840 | "illuminate/view": "^5.8", 841 | "league/flysystem": "^1.0", 842 | "php": "^7.1.3", 843 | "roots/support": "dev-master" 844 | }, 845 | "require-dev": { 846 | "mikey179/vfsstream": "^1.6", 847 | "phpunit/phpunit": "^7.5|^8.0", 848 | "roave/security-advisories": "dev-master", 849 | "squizlabs/php_codesniffer": "^3.3" 850 | }, 851 | "type": "library", 852 | "autoload": { 853 | "psr-4": { 854 | "Roots\\": "src/" 855 | }, 856 | "files": [ 857 | "src/helpers.php" 858 | ] 859 | }, 860 | "notification-url": "https://packagist.org/downloads/", 861 | "license": [ 862 | "MIT" 863 | ], 864 | "authors": [ 865 | { 866 | "name": "QWp6t", 867 | "email": "hi@qwp6t.me" 868 | } 869 | ], 870 | "description": "Lazy-loaded framework for Roots WordPress projects", 871 | "homepage": "https://roots.io/acorn/", 872 | "keywords": [ 873 | "sage", 874 | "wordpress" 875 | ], 876 | "time": "2019-04-22T04:38:13+00:00" 877 | }, 878 | { 879 | "name": "roots/support", 880 | "version": "dev-master", 881 | "source": { 882 | "type": "git", 883 | "url": "https://github.com/roots/support.git", 884 | "reference": "0c5231dc194407e32bfee000d49a36775040289a" 885 | }, 886 | "dist": { 887 | "type": "zip", 888 | "url": "https://api.github.com/repos/roots/support/zipball/0c5231dc194407e32bfee000d49a36775040289a", 889 | "reference": "0c5231dc194407e32bfee000d49a36775040289a", 890 | "shasum": "" 891 | }, 892 | "require": { 893 | "php": ">=5.6" 894 | }, 895 | "require-dev": { 896 | "phpunit/phpunit": "^7.2", 897 | "squizlabs/php_codesniffer": "^3.3" 898 | }, 899 | "type": "library", 900 | "autoload": { 901 | "files": [ 902 | "helpers.php" 903 | ] 904 | }, 905 | "notification-url": "https://packagist.org/downloads/", 906 | "license": [ 907 | "MIT" 908 | ], 909 | "authors": [ 910 | { 911 | "name": "QWp6t", 912 | "email": "hi@qwp6t.me" 913 | } 914 | ], 915 | "homepage": "https://github.com/roots/support/", 916 | "time": "2019-01-28T09:46:14+00:00" 917 | }, 918 | { 919 | "name": "stoutlogic/acf-builder", 920 | "version": "1.8.0", 921 | "source": { 922 | "type": "git", 923 | "url": "https://github.com/StoutLogic/acf-builder.git", 924 | "reference": "68e3705505bc85b2d75e8e8d7fbb31181004b4cb" 925 | }, 926 | "dist": { 927 | "type": "zip", 928 | "url": "https://api.github.com/repos/StoutLogic/acf-builder/zipball/68e3705505bc85b2d75e8e8d7fbb31181004b4cb", 929 | "reference": "68e3705505bc85b2d75e8e8d7fbb31181004b4cb", 930 | "shasum": "" 931 | }, 932 | "require": { 933 | "doctrine/inflector": "~1.1", 934 | "doctrine/instantiator": "~1.0.0", 935 | "php": ">=5.4.0" 936 | }, 937 | "require-dev": { 938 | "phpdocumentor/reflection-docblock": "2.*", 939 | "phpunit/phpunit": "4.*", 940 | "squizlabs/php_codesniffer": "^2.6" 941 | }, 942 | "type": "library", 943 | "autoload": { 944 | "psr-4": { 945 | "StoutLogic\\AcfBuilder\\": "src/" 946 | } 947 | }, 948 | "notification-url": "https://packagist.org/downloads/", 949 | "license": [ 950 | "GPL-2.0+" 951 | ], 952 | "authors": [ 953 | { 954 | "name": "Steve Pfisterer", 955 | "email": "steve@stoutlogic.com" 956 | } 957 | ], 958 | "description": "An Advanced Custom Field Configuration Builder", 959 | "time": "2018-09-14T16:55:15+00:00" 960 | }, 961 | { 962 | "name": "symfony/contracts", 963 | "version": "v1.0.2", 964 | "source": { 965 | "type": "git", 966 | "url": "https://github.com/symfony/contracts.git", 967 | "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" 968 | }, 969 | "dist": { 970 | "type": "zip", 971 | "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", 972 | "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", 973 | "shasum": "" 974 | }, 975 | "require": { 976 | "php": "^7.1.3" 977 | }, 978 | "require-dev": { 979 | "psr/cache": "^1.0", 980 | "psr/container": "^1.0" 981 | }, 982 | "suggest": { 983 | "psr/cache": "When using the Cache contracts", 984 | "psr/container": "When using the Service contracts", 985 | "symfony/cache-contracts-implementation": "", 986 | "symfony/service-contracts-implementation": "", 987 | "symfony/translation-contracts-implementation": "" 988 | }, 989 | "type": "library", 990 | "extra": { 991 | "branch-alias": { 992 | "dev-master": "1.0-dev" 993 | } 994 | }, 995 | "autoload": { 996 | "psr-4": { 997 | "Symfony\\Contracts\\": "" 998 | }, 999 | "exclude-from-classmap": [ 1000 | "**/Tests/" 1001 | ] 1002 | }, 1003 | "notification-url": "https://packagist.org/downloads/", 1004 | "license": [ 1005 | "MIT" 1006 | ], 1007 | "authors": [ 1008 | { 1009 | "name": "Nicolas Grekas", 1010 | "email": "p@tchwork.com" 1011 | }, 1012 | { 1013 | "name": "Symfony Community", 1014 | "homepage": "https://symfony.com/contributors" 1015 | } 1016 | ], 1017 | "description": "A set of abstractions extracted out of the Symfony components", 1018 | "homepage": "https://symfony.com", 1019 | "keywords": [ 1020 | "abstractions", 1021 | "contracts", 1022 | "decoupling", 1023 | "interfaces", 1024 | "interoperability", 1025 | "standards" 1026 | ], 1027 | "time": "2018-12-05T08:06:11+00:00" 1028 | }, 1029 | { 1030 | "name": "symfony/debug", 1031 | "version": "v4.2.7", 1032 | "source": { 1033 | "type": "git", 1034 | "url": "https://github.com/symfony/debug.git", 1035 | "reference": "2d279b6bb1d582dd5740d4d3251ae8c18812ed37" 1036 | }, 1037 | "dist": { 1038 | "type": "zip", 1039 | "url": "https://api.github.com/repos/symfony/debug/zipball/2d279b6bb1d582dd5740d4d3251ae8c18812ed37", 1040 | "reference": "2d279b6bb1d582dd5740d4d3251ae8c18812ed37", 1041 | "shasum": "" 1042 | }, 1043 | "require": { 1044 | "php": "^7.1.3", 1045 | "psr/log": "~1.0" 1046 | }, 1047 | "conflict": { 1048 | "symfony/http-kernel": "<3.4" 1049 | }, 1050 | "require-dev": { 1051 | "symfony/http-kernel": "~3.4|~4.0" 1052 | }, 1053 | "type": "library", 1054 | "extra": { 1055 | "branch-alias": { 1056 | "dev-master": "4.2-dev" 1057 | } 1058 | }, 1059 | "autoload": { 1060 | "psr-4": { 1061 | "Symfony\\Component\\Debug\\": "" 1062 | }, 1063 | "exclude-from-classmap": [ 1064 | "/Tests/" 1065 | ] 1066 | }, 1067 | "notification-url": "https://packagist.org/downloads/", 1068 | "license": [ 1069 | "MIT" 1070 | ], 1071 | "authors": [ 1072 | { 1073 | "name": "Fabien Potencier", 1074 | "email": "fabien@symfony.com" 1075 | }, 1076 | { 1077 | "name": "Symfony Community", 1078 | "homepage": "https://symfony.com/contributors" 1079 | } 1080 | ], 1081 | "description": "Symfony Debug Component", 1082 | "homepage": "https://symfony.com", 1083 | "time": "2019-04-11T11:27:41+00:00" 1084 | }, 1085 | { 1086 | "name": "symfony/finder", 1087 | "version": "v4.2.7", 1088 | "source": { 1089 | "type": "git", 1090 | "url": "https://github.com/symfony/finder.git", 1091 | "reference": "e45135658bd6c14b61850bf131c4f09a55133f69" 1092 | }, 1093 | "dist": { 1094 | "type": "zip", 1095 | "url": "https://api.github.com/repos/symfony/finder/zipball/e45135658bd6c14b61850bf131c4f09a55133f69", 1096 | "reference": "e45135658bd6c14b61850bf131c4f09a55133f69", 1097 | "shasum": "" 1098 | }, 1099 | "require": { 1100 | "php": "^7.1.3" 1101 | }, 1102 | "type": "library", 1103 | "extra": { 1104 | "branch-alias": { 1105 | "dev-master": "4.2-dev" 1106 | } 1107 | }, 1108 | "autoload": { 1109 | "psr-4": { 1110 | "Symfony\\Component\\Finder\\": "" 1111 | }, 1112 | "exclude-from-classmap": [ 1113 | "/Tests/" 1114 | ] 1115 | }, 1116 | "notification-url": "https://packagist.org/downloads/", 1117 | "license": [ 1118 | "MIT" 1119 | ], 1120 | "authors": [ 1121 | { 1122 | "name": "Fabien Potencier", 1123 | "email": "fabien@symfony.com" 1124 | }, 1125 | { 1126 | "name": "Symfony Community", 1127 | "homepage": "https://symfony.com/contributors" 1128 | } 1129 | ], 1130 | "description": "Symfony Finder Component", 1131 | "homepage": "https://symfony.com", 1132 | "time": "2019-04-06T13:51:08+00:00" 1133 | }, 1134 | { 1135 | "name": "symfony/polyfill-mbstring", 1136 | "version": "v1.11.0", 1137 | "source": { 1138 | "type": "git", 1139 | "url": "https://github.com/symfony/polyfill-mbstring.git", 1140 | "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" 1141 | }, 1142 | "dist": { 1143 | "type": "zip", 1144 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", 1145 | "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", 1146 | "shasum": "" 1147 | }, 1148 | "require": { 1149 | "php": ">=5.3.3" 1150 | }, 1151 | "suggest": { 1152 | "ext-mbstring": "For best performance" 1153 | }, 1154 | "type": "library", 1155 | "extra": { 1156 | "branch-alias": { 1157 | "dev-master": "1.11-dev" 1158 | } 1159 | }, 1160 | "autoload": { 1161 | "psr-4": { 1162 | "Symfony\\Polyfill\\Mbstring\\": "" 1163 | }, 1164 | "files": [ 1165 | "bootstrap.php" 1166 | ] 1167 | }, 1168 | "notification-url": "https://packagist.org/downloads/", 1169 | "license": [ 1170 | "MIT" 1171 | ], 1172 | "authors": [ 1173 | { 1174 | "name": "Nicolas Grekas", 1175 | "email": "p@tchwork.com" 1176 | }, 1177 | { 1178 | "name": "Symfony Community", 1179 | "homepage": "https://symfony.com/contributors" 1180 | } 1181 | ], 1182 | "description": "Symfony polyfill for the Mbstring extension", 1183 | "homepage": "https://symfony.com", 1184 | "keywords": [ 1185 | "compatibility", 1186 | "mbstring", 1187 | "polyfill", 1188 | "portable", 1189 | "shim" 1190 | ], 1191 | "time": "2019-02-06T07:57:58+00:00" 1192 | }, 1193 | { 1194 | "name": "symfony/translation", 1195 | "version": "v4.2.7", 1196 | "source": { 1197 | "type": "git", 1198 | "url": "https://github.com/symfony/translation.git", 1199 | "reference": "46c0dede1f925383d13dc783857be2c41efd0b24" 1200 | }, 1201 | "dist": { 1202 | "type": "zip", 1203 | "url": "https://api.github.com/repos/symfony/translation/zipball/46c0dede1f925383d13dc783857be2c41efd0b24", 1204 | "reference": "46c0dede1f925383d13dc783857be2c41efd0b24", 1205 | "shasum": "" 1206 | }, 1207 | "require": { 1208 | "php": "^7.1.3", 1209 | "symfony/contracts": "^1.0.2", 1210 | "symfony/polyfill-mbstring": "~1.0" 1211 | }, 1212 | "conflict": { 1213 | "symfony/config": "<3.4", 1214 | "symfony/dependency-injection": "<3.4", 1215 | "symfony/yaml": "<3.4" 1216 | }, 1217 | "provide": { 1218 | "symfony/translation-contracts-implementation": "1.0" 1219 | }, 1220 | "require-dev": { 1221 | "psr/log": "~1.0", 1222 | "symfony/config": "~3.4|~4.0", 1223 | "symfony/console": "~3.4|~4.0", 1224 | "symfony/dependency-injection": "~3.4|~4.0", 1225 | "symfony/finder": "~2.8|~3.0|~4.0", 1226 | "symfony/http-kernel": "~3.4|~4.0", 1227 | "symfony/intl": "~3.4|~4.0", 1228 | "symfony/var-dumper": "~3.4|~4.0", 1229 | "symfony/yaml": "~3.4|~4.0" 1230 | }, 1231 | "suggest": { 1232 | "psr/log-implementation": "To use logging capability in translator", 1233 | "symfony/config": "", 1234 | "symfony/yaml": "" 1235 | }, 1236 | "type": "library", 1237 | "extra": { 1238 | "branch-alias": { 1239 | "dev-master": "4.2-dev" 1240 | } 1241 | }, 1242 | "autoload": { 1243 | "psr-4": { 1244 | "Symfony\\Component\\Translation\\": "" 1245 | }, 1246 | "exclude-from-classmap": [ 1247 | "/Tests/" 1248 | ] 1249 | }, 1250 | "notification-url": "https://packagist.org/downloads/", 1251 | "license": [ 1252 | "MIT" 1253 | ], 1254 | "authors": [ 1255 | { 1256 | "name": "Fabien Potencier", 1257 | "email": "fabien@symfony.com" 1258 | }, 1259 | { 1260 | "name": "Symfony Community", 1261 | "homepage": "https://symfony.com/contributors" 1262 | } 1263 | ], 1264 | "description": "Symfony Translation Component", 1265 | "homepage": "https://symfony.com", 1266 | "time": "2019-04-10T16:20:36+00:00" 1267 | } 1268 | ], 1269 | "packages-dev": [ 1270 | { 1271 | "name": "squizlabs/php_codesniffer", 1272 | "version": "dev-master", 1273 | "source": { 1274 | "type": "git", 1275 | "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", 1276 | "reference": "1d7c6576a578fb57723c8c0fbc716cb88dae4f13" 1277 | }, 1278 | "dist": { 1279 | "type": "zip", 1280 | "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1d7c6576a578fb57723c8c0fbc716cb88dae4f13", 1281 | "reference": "1d7c6576a578fb57723c8c0fbc716cb88dae4f13", 1282 | "shasum": "" 1283 | }, 1284 | "require": { 1285 | "ext-simplexml": "*", 1286 | "ext-tokenizer": "*", 1287 | "ext-xmlwriter": "*", 1288 | "php": ">=5.4.0" 1289 | }, 1290 | "require-dev": { 1291 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" 1292 | }, 1293 | "bin": [ 1294 | "bin/phpcs", 1295 | "bin/phpcbf" 1296 | ], 1297 | "type": "library", 1298 | "extra": { 1299 | "branch-alias": { 1300 | "dev-master": "3.x-dev" 1301 | } 1302 | }, 1303 | "notification-url": "https://packagist.org/downloads/", 1304 | "license": [ 1305 | "BSD-3-Clause" 1306 | ], 1307 | "authors": [ 1308 | { 1309 | "name": "Greg Sherwood", 1310 | "role": "lead" 1311 | } 1312 | ], 1313 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", 1314 | "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", 1315 | "keywords": [ 1316 | "phpcs", 1317 | "standards" 1318 | ], 1319 | "time": "2019-04-16T03:35:30+00:00" 1320 | } 1321 | ], 1322 | "aliases": [], 1323 | "minimum-stability": "stable", 1324 | "stability-flags": { 1325 | "roots/acorn": 20, 1326 | "roots/support": 20, 1327 | "squizlabs/php_codesniffer": 20 1328 | }, 1329 | "prefer-stable": false, 1330 | "prefer-lowest": false, 1331 | "platform": [], 1332 | "platform-dev": [] 1333 | } 1334 | -------------------------------------------------------------------------------- /src/Block.php: -------------------------------------------------------------------------------- 1 | setLocation('block', '===', "acf/{$this->name}"); 14 | } 15 | 16 | public function build() 17 | { 18 | if (function_exists('acf_register_block_type')) { 19 | acf_register_block_type([ 20 | 'name' => $this->name, 21 | 'title' => $this->title ?? $this->generateLabel($this->name), 22 | 'description' => $this->description ?? null, 23 | 'icon' => $this->icon ?? null, 24 | 'category' => $this->category ?? 'common', 25 | 'keywords' => $this->keywords ?? [], 26 | 'render_callback' => isset($this->renderCallback) 27 | ? function ($block) { 28 | call_user_func($this->renderCallback, $block); 29 | } 30 | : [$this, 'render'], 31 | 'align' => $this->align ?? '', 32 | 'mode' => $this->mode ?? 'preview', 33 | 'post_types' => $this->postTypes ?? null, 34 | 'supports' => $this->supports ?? null, 35 | ]); 36 | } 37 | 38 | return parent::build(); 39 | } 40 | 41 | /** 42 | * Render for Sage 10 43 | * 44 | * @param $block [] 45 | */ 46 | public function render($block) 47 | { 48 | $group = ltrim($block['name'], 'acf/'); 49 | $block['acf'] = get_fields($block['id']); 50 | 51 | echo \Roots\view("blocks.{$this->name}", $block); 52 | } 53 | 54 | public function renderWith(callable $renderCallback) 55 | { 56 | $this->renderCallback = $renderCallback; 57 | 58 | return $this; 59 | } 60 | 61 | public function setTitle(string $title) 62 | { 63 | $this->title = $title; 64 | 65 | return $this; 66 | } 67 | 68 | public function setDescription(string $description) 69 | { 70 | $this->description = $description; 71 | 72 | return $this; 73 | } 74 | 75 | public function setCategory(string $category) 76 | { 77 | $this->category = $category; 78 | 79 | return $this; 80 | } 81 | 82 | public function setIcon(string $icon) 83 | { 84 | $this->icon = $icon; 85 | 86 | return $this; 87 | } 88 | 89 | public function setKeywords(...$keywords) 90 | { 91 | $this->keywords = $keywords; 92 | 93 | return $this; 94 | } 95 | 96 | public function setAlign(string $align) 97 | { 98 | $this->align = $align; 99 | 100 | return $this; 101 | } 102 | 103 | public function setMode(string $mode) 104 | { 105 | $this->mode = $mode; 106 | 107 | return $this; 108 | } 109 | 110 | public function setSupports(array $supports) 111 | { 112 | $this->supports = $supports; 113 | 114 | return $this; 115 | } 116 | 117 | public function setPostTypes(...$postTypes) 118 | { 119 | $this->postTypes = $postTypes; 120 | 121 | return $this; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/helpers.php: -------------------------------------------------------------------------------- 1 |