Composer and M2: http://devdocs.magento.com/guides/v2.0/extension-dev-guide/build/composer-integration.html
Dependency Injection (and di.xml details): http://devdocs.magento.com/guides/v2.1/extension-dev-guide/depend-inj.html
Object Manager:
Composer and M2: http://devdocs.magento.com/guides/v2.0/extension-dev-guide/build/composer-integration.html
Dependency Injection (and di.xml details): http://devdocs.magento.com/guides/v2.1/extension-dev-guide/depend-inj.html
Object Manager:
Credit: https://www.sslshopper.com/article-most-common-openssl-commands.html
SSL Tools: https://www.sslshopper.com/ssl-certificate-tools.html
The Most Common OpenSSL Commands
One of the most versatile SSL tools is OpenSSL which is an open source implementation of the SSL protocol. There are versions of OpenSSL for nearly every platform, including Windows, Linux, and Mac OS X. OpenSSL is commonly used to create the CSR and private key for many different platforms, including Apache. However, it also has hundreds of different functions that allow you to view the details of a CSR or certificate, compare an MD5 hash of the certificate and private key (to make sure they match), verify that a certificate is installed properly on any website, and convert the certificate to a different format. A compiled version of OpenSSL for Windows can be found here.
If you don't want to bother with OpenSSL, you can do many of the same things with our SSL Certificate Tools. Below, we have listed the most common OpenSSL command
The array of data you can pass to the \Magento\Eav\Setup\EavSetup::addAttribute() method is as follows:
Some of the attribute keys are remapped using the Magento\Eav\Model\Entity\Setup\PropertyMapper class. We indicate what it's mapped to in [] brackets
$data = [
'type' => 'varchar',
// (string)[eav_attribute][backend_type]: database storage type (varchar|int|text|decimal)
'backend' => NULL,
// (string)[eav_attribute][backend_model]: class name used to retrieve/save the attribute data to the db
'frontend' => NULL,
Clear Magento 1 Data
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
#!/bin/bash | |
### VARIABLES ### | |
PRE_PACK="openssl-devel pcre-devel make gcc" | |
VER="1.7.0" | |
# Setup Colours | |
black='\E[30;40m' | |
red='\E[31;40m' | |
green='\E[32;40m' |
Various methods to drop all tables in a database without droping the database. NOTE you should test these on your own, they are copied from https://stackoverflow.com/questions/3476765/mysql-drop-all-tables-ignoring-foreign-keys
echo "DATABASE_NAME"| xargs -i{} sh -c "mysql -h HOST -u USER -p -Nse 'show tables' {}| xargs -i[] mysql -h HOST -u USER -p -e 'SET FOREIGN_KEY_CHECKS=0; drop table []' {}"
DB_HOST=xxx
DB_USERNAME=xxx