#Inspection Tools with homebrew-php#
##Prerequisites##
- Homebrew is installed
##Step 1: Installing homebrew-php##
brew tap homebrew/dupesbrew tap josegonzalez/homebrew-phpbrew install PHP53(or other version of your choice)
#Inspection Tools with homebrew-php#
##Prerequisites##
##Step 1: Installing homebrew-php##
brew tap homebrew/dupesbrew tap josegonzalez/homebrew-phpbrew install PHP53 (or other version of your choice)| { | |
| // http://eslint.org/docs/rules/ | |
| "ecmaFeatures": { | |
| "binaryLiterals": false, // enable binary literals | |
| "blockBindings": false, // enable let and const (aka block bindings) | |
| "defaultParams": false, // enable default function parameters | |
| "forOf": false, // enable for-of loops | |
| "generators": false, // enable generators | |
| "objectLiteralComputedProperties": false, // enable computed object literal property names |
| {"lastUpload":"2017-08-02T12:09:27.355Z","extensionVersion":"v2.8.2"} |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
| <?php | |
| # Fill our vars and run on cli | |
| # $ php -f db-connect-test.php | |
| $dbname = 'name'; | |
| $dbuser = 'user'; | |
| $dbpass = 'pass'; | |
| $dbhost = 'host'; | |
| $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
| find . -type f -exec chmod 644 {} \; // 644 permission for files | |
| find . -type d -exec chmod 755 {} \; // 755 permission for directory | |
| find ./var -type d -exec chmod 777 {} \; // 777 permission for var folder | |
| find ./pub/media -type d -exec chmod 777 {} \; | |
| find ./pub/static -type d -exec chmod 777 {} \; |
The array of data you can pass to the \Magento\Eav\Setup\EavSetup::addAttribute() method is as follows:
$data = [
'group' => 'General', // Name ofgroup in product admin page to place attribtue
'type' => 'varchar', // database storeage type (varchar|int|text|decimal)
'sort_order' => 1000,
'backend' => '', // backend_model: class name used to retrieve/save the attribute data to the db
'frontend' => '', // frontend_model: ????
'label' => 'UPC', // frontend_label: the label text
| <?php | |
| use Magento\Framework\App\Bootstrap; | |
| include('app/bootstrap.php'); | |
| $bootstrap = Bootstrap::create(BP, $_SERVER); | |
| $objectManager = $bootstrap->getObjectManager(); | |
| $state = $objectManager->get('Magento\Framework\App\State'); | |
| $state->setAreaCode('frontend'); |
| <?xml version="1.0"?> | |
| <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> | |
| <acl> | |
| <resources> | |
| <resource id="Magento_Backend::admin"> | |
| </resource> | |
| </resources> | |
| </acl> | |
| </config> |