diff --git a/.travis.yml b/.travis.yml index 31c7946798cc4e0c188277cba70c89b047fb3fb6..96feeb102481148b542be1f6967d4bda4a241f78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_script: # Disable xDebug - echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini # Create DB for Integration tests - - sh -c "if [ '$TEST_SUITE' = 'integration' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then mysql -e 'create database magento_integration_tests;'; mv dev/tests/integration/etc/local-mysql.travis.xml.dist dev/tests/integration/etc/local-mysql.xml; fi" + - sh -c "if [ '$TEST_SUITE' = 'integration' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then mysql -e 'create database magento_integration_tests;'; mv dev/tests/integration/etc/install-config-mysql.travis.php.dist dev/tests/integration/etc/install-config-mysql.php; fi" # Install tools for static tests - sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ] || [ '$TEST_SUITE' = 'static_annotation' ]; then pear install pear/PHP_CodeSniffer-1.5.2; fi" # Change memmory_limit for travis server diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e44d1f6098e7b0406f61d7e224659d1998dce5..868b7a35b288688be70792fb975a9751e5c9084a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,51 @@ +0.1.0-alpha103 +============= +* Fixed bugs: + * Fixed an issue where an error message was displayed after successful product mass actions + * Fixed an issue where it is impossible to create a tax rate for all states (“*†in the State field) + * Fixed an issue where FPT was not shown on the storefront if a customer state did not match the default state from configuration + * Fixed the benchmark scenario + * Fixed an issue where the expand arrow next to Advanced Settings tab label was not clickable + * Fixed an issue where the Category menu disappeared when resizing a browser window + * Fixed an issue where the order additional info was not available for a guest customer + * Fixed an issue where a fatal error was thrown when trying to get a coupon report with Shopping Cart Price Rule set to Specified + * Fixed an issue where the URL of an attribute set for attribute mapping changed after resetting filter for the grid on the Google Contents Attributes page + * Fixed the implementation of the wishlist RSS-feed + * Fixed the incorrect name escaping in wishlist RSS + * Fixed an issue where a RSS feed for shared wishlist was not accessible + * Fixed an issue caused by REST POST/PUT requests with empty body + * Fixed an issues where postal code was still mandatory for non-US addresses that do not use it, even if set to be optional + * Fixed an issue where it was impossible to find a wishlist by using Wishlist Search + * Fixed an issue where no password validation was requested during customer registration on the storefront +* Updated setup tools: + * Added the install script in the CatalogInventory module + * Removed old installation: Web and CLI, the Magento_Install module, install theme, install configuration scope + * Added usage of the new setup installation in all tests + * Added the ability to insert custom directory paths in the setup tools + * Added the uninstall tool: php -f setup/index.php uninstall + * Removed dependency on intl PHP extension until translations are re-introduced in the setup tool + * Made notification about unnecessarily writable directories after installation more specific +* UI improvements: + * Improved UI for the Order by SKU, Invitation and Recurring Payments pages + * Implemented usage of Microdata and Schema vocabulary for product content + * Implemented UI for Catalog New Products List, Recently Compared Products, Recently Viewed Products widgets + * Implemented a new focus indicator + * Implemented the <label> element for form inputs + * Put in order the usage of the <fieldset> and <legend> tags + * Implemented the ability to skip to main content +* Added the following functional tests: + * Add products to order from recently viewed products section + * Update configurable product +* Various improvements: + * Stabilize URL rewrite module + * Moved getAdditional request into the basic one in OnePageCheckout + * Created a cron job in the Customer module for cleaning the customer_visitor table +* Framework improvements: + * Refactored data builders auto-generation + * Implemented the Customer module interfaces + * Ported existing integration tests from Customer services + * Removed quote saving on GET requests (checkout/cart, checkout/onepage) + 0.1.0-alpha102 ============= * Fixed bugs: @@ -572,7 +620,7 @@ * Placing the order on frontend if enter in the street address line 1 and 2 255 symbols * Using @357.farm domain emails in registration form * Validation for country_id/region_id and percentage_rate during Tax Rate creation - * Declaration of getSortOrders in Magento\Framework\Service\V1\Data\SearchCriteria + * Declaration of getSortOrders in Magento\Framework\Api\SearchCriteria * Order cancellation for online payment methods * Order online processing for Authorize.net Direct Post * Backend grids while search diff --git a/README.md b/README.md index 280143a0b770af3dd2df8342841d7a98c129f7d1..ca681723a810cbd446e410dbacb90421ac5ffdbe 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,798 @@ -[](https://travis-ci.org/magento/magento2) +Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results. -Magento Community Edition is perfect if you’re a developer who wants to build your own solution on a proven, flexible platform. You can modify the core code, and add features and new functionality on your own. +#### Contents -All Submissions you make to Magento, an eBay Inc. company (“Magentoâ€) through GitHub are subject to the following terms and conditions: +* <a href="#magento-2-system-requirements">Magento 2 system requirements</a> +* <a href="#composer-and-magento">Composer and Magento</a> +* <a href="#high-level-installation-roadmap">High-level installation roadmap</a> +* <a href="#required-server-permissions">Required server permissions</a> +* <a href="#prerequisites">Prerequisites</a> +* <a href="#installing-composer">Installing Composer</a> +* <a href="#cloning-the-magento-2-github-repository">Cloning the Magento 2 GitHub repository</a> +* <a href="#installing-or-reinstalling-the-magento-2-software">Installing or reinstalling the Magento software</a> +* <a href="#verifying-the-installation">Verifying the installation</a> +* <a href="#troubleshooting">Troubleshooting</a> -1. You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submissionâ€) you submit through GitHub. -2. Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. -3. You agree to the [Contributor License Agreement](https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html). +<h2>Magento 2 system requirements</h2> + +Before you install Magento 2, make sure your system meets or exceeds the following requirements: + +* Operating systems + + Linux distributions such as RedHat Enterprise Linux (RHEL), CentOS, Ubuntu, Debian, and so on + +* <a href="https://getcomposer.org/download/" >Composer</a> (latest stable version) +* <a href="http://httpd.apache.org/download.cgi" >Apache 2.2</a> or later +* PHP 5.4.11 or 5.5.x (<a href="http://php.net/downloads.php" >installation</a> instructions, <a href="http://phpave.com/upgrade-php-5-3-php-5-5-ubuntu-12-04-lts/" >upgrade</a> instructions) +* Required PHP extensions: + + * PDO/MySQL + * mbstring + * mcrypt + * mhash + * simplexml + * curl + * gd2, ImageMagick 6.3.7 (or later) or both + * soap + +* <a href="http://dev.mysql.com/doc/refman/5.5/en/installing.html" >MySQL 5.5</a> or later +* Mail Transfer Agent (MTA) or an SMTP server +* Optional but recommended: + + * <a href="http://xdebug.org/download.php" >php_xdebug2.2.0</a> or later (development environments only; can have an adverse effect on performance) + * PHPUnit (as a command-line tool) 3.7 or later + + + +<h2 id="instgde-overview-composer">Composer and Magento</h2> + +We now use <a href="https://getcomposer.org/" >Composer</a> to install the Magento 2 software. Composer enables us to manage Magento 2, extensions, and their dependencies. + +Composer provides you with the following advantages: + +* Enables you to reuse third-party libraries without bundling them with source code +* Component-based architecture with robust dependency management +* Manages dependencies to reduce extension conflicts and compatibility issues +* Versioned dependencies +* <a href="https://getcomposer.org/doc/01-basic-usage.md#package-versions" >Semantic versioning</a> +* Supports PHP Framework Interoperability standards + +We'll have more information soon on how developers can use Composer to package extensions to distribute to Magento merchants and to other developers. + +<h2 id="instgde-overview-roadmap">High-level installation roadmap</h2> + +Following is a brief overview of how to install the Magento 2 software. + +<h3>Step 1: Verify your prerequisites</h3> + +Use the following table to verify you have the correct prerequisites to install the Magento 2 software. + +<table> + <tbody> + <tr> + <th>Prerequisite</th> + <th>How to check</th> + <th>For more information</th> + </tr> + <tr> + <td>Apache 2.2 or later</td> + <td>Ubuntu: <code>apache -v</code><br> + CentOS: <code>httpd -v</code></td> + <td><a href="#apache" >Apache</a></td> + </tr> + <tr> + <td>PHP 5.4.11 or 5.5.x</td> + <td><code>php -v</code></td> + <td><a href="#php" >PHP</a></td> + </tr> + <tr><td>MySQL 5.5 or later</td> + <td><code>mysql -u [root user name] -p</code></td> + <td><a href="#mysql" >MySQL</a></td> + </tr> +</tbody> +</table> + +<h3>Step 2: Prepare to install</h3> + +After verifying your prerequisites, perform the following tasks in order to prepare to install the Magento 2 software. + +1. <a href="#installing-composer">Installing Composer</a> +2. <a href="#cloning-the-magento-2-github-repository">Cloning the Magento 2 GitHub repository</a> + +<h3>Step 3: Install and verify</h3> + +1. <a href="#installing-or-reinstalling-the-magento-2-software">Installing or reinstalling the Magento software</a> +2. <a href="#verifying-the-installation">Verifying the installation</a> + +<h2>Required server permissions</h2> + +Unless otherwise noted, all commands in this Readme must be entered as a user with `root` privileges and permission to write to the web server docroot. Depending on your system, that might mean you must use different user accounts or add users to the web server user group—provided that group has sufficient privileges. + +Installing software on Linux typically requires `root` privileges. You should generally not install the Magento 2 software in the web server docroot using `root` privileges; however, that is up to you. + +<h2 id="readme-prereq">Prerequisites</h2> + +This section discusses how to install software required to install Magento 2. + +See one of the following sections: + +* <a href="#before-you-begin">Before you begin</a> +* <a href="#apache">Apache</a> +* <a href="#php">PHP</a> +* <a href="#mysql">MySQL</a> + + +<h3 id="instgde-prereq-overview">Before you begin</h3> + +Before you install Magento, you must do all of the following: + +* Set up one or more hosts that meet the <a href="#magento-2-system-requirements">Magento 2 system requirements</a>. +* Make sure you can back up your entire system at various points during the installation so you can roll back in the event of issues. + +<h3>Apache</h3> + +<h4>Installing Apache on Ubuntu</h4> + +<ol><li>Install Apache using the guidelines on the <a href="https://help.ubuntu.com/10.04/serverguide/httpd.html" target="_blank">Ubuntu site</a>. </li> +<li>Enable server rewrites: +<ul><li>Apache 2.2: Use the guidelines on <a href="http://askubuntu.com/questions/48362/how-to-enable-mod-rewrite-in-apache" target="_blank">askubuntu</a>.</li> +<li>Apache 2.4: Enter the following command: <code>a2enmod rewrite</code></li></ul> +</li> +<li>Specify the type of directives that can be used in <code>.htaccess</code>. Magento uses <code>.htaccess</code> for redirects. For guidelines, see: +<ul><li>Apache 2.2: The <a href="http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride" target="_blank">Apache 2.2 documentation</a>.</li> +<li>Apache 2.4: The <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank">Apache 2.4 documentation</a>.<br> +Note that in Apache 2.4, the server's default site configuration file is <code>/etc/apache2/sites-available/000-default.conf</code><br> +For example, you can add the following to the bottom of <code>000-default.conf</code>:<br> +<pre><Directory "/var/www"> +AllowOverride [value from Apache site] +</Directory></pre> +<strong>Note</strong>: You must change the value of <code>AllowOverride</code> in the directive for the directory to which you expect to install the Magento software. For example, to install in the web server docroot, edit the directive in <code><Directory /var/www></code>.</li></ul> +</li> +<li>Restart Apache: <code>service apache2 restart</code></li></ol> + +<h4>Installing Apache on CentOS</h4> + +1. Install Apache: + + `yum -y install httpd` + + For additional information, see the <a href="http://httpd.apache.org/docs/2.4/platform/rpm.html" target="_blank">Apache site</a>. + +2. Enable <a href="http://unix.stackexchange.com/questions/57946/enable-apache-mod-rewrites-to-load-clean-urls" target="_blank">server rewrites</a>. + + **Note**: You must change the value of <code>Allow Override</code> in the directive for the directory to which you expect to install the Magento software. For example, to install in the web server docroot, edit the directive in <code><Directory "/var/www/html"></code>. + +2. Set the type of directives that can be used in `.htaccess`. Magento uses `.htaccess` for redirects. <a href="http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride" target="_blank">Apache documentation</a>. + +3. Restart Apache: `service httpd restart` + +<h3>MySQL</h3> + +<h4>Installing MySQL on Ubuntu</h4> + +1. Use the guidelines on the <a href="https://help.ubuntu.com/12.04/serverguide/mysql.html" target="_blank">Ubuntu site</a>. +2. Configure the database instance. + +<h4>Installing and configuring MySQL on CentOS</h4> + +1. Install and configure MySQL as discussed on the <a href="http://centoshelp.org/servers/database/installing-configuring-mysql-server/" target="_blank">CentOS help site</a>. +2. Configure the database instance as discussed in the next section. + +<h4>Configuring the Magento database instance</h4> + +This section discusses how to create a new database instance for Magento. Although a new database instance is recommended, you can optionally install Magento into an existing database instance. + +To configure a MySQL database instance: + +1. Log in to your database server as any user. +2. Enter the following command to get to a MySQL command prompt: + + `mysql -u root -p` + +3. Enter the MySQL `root` user's password when prompted. +4. Enter the following commands in the order shown to create a database instance named `magento` with user name `magento`: + <pre>create database magento; +CREATE USER 'magento'@'localhost' IDENTIFIED BY 'magento'; +GRANT USAGE ON *.* TO magento@localhost IDENTIFIED BY 'magento'; +GRANT ALL ON magento.* TO magento@localhost;</pre> + +5. Enter `exit` to quit the command prompt. + +<h3>PHP</h3> + +Magento 2 requires PHP 5.4.11 or later or PHP 5.5.x. + +**Note**: Magento 2 does not support PHP 5.6. + +<h3>PHP on Ubuntu</h3> + +<h4>Install PHP 5.5 on Ubuntu 14</h4> + +To install PHP 5.5 on Ubuntu 14: + +1. Enter the following command: + + `apt-get -y install php5` + +2. Verify the PHP version by entering `php -v`. Messages similar to the following should display: + + <pre>PHP 5.5.9-1ubuntu4.4 (cli) (built: Sep 4 2014 06:56:34) + Copyright (c) 1997-2014 The PHP Group + Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies + with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies</pre> + +<h4>Install PHP 5.4 on Ubuntu 12</h4> + +To install PHP 5.4 on Ubuntu 12: + +1. Use the following instructions from <a href="http://askubuntu.com/questions/109404/how-do-i-install-latest-php-in-supported-ubuntu-versions-like-5-4-x-in-ubuntu-1" target="_blank">askubuntu</a>: + + <pre>add-apt-repository ppa:ondrej/php5-oldstable + apt-get update + apt-get upgrade + apt-get install php5</pre> + +2. Verify the PHP version by entering `php -v`. Messages similar to the following should display: + + <pre>PHP 5.4.33-2+deb.sury.org~precise+1 (cli) (built: Sep 25 2014 09:06:25) + Copyright (c) 1997-2014 The PHP Group + Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies</pre> + +3. Restart Apache: `service apache2 restart` + +<h4>Upgrade to PHP 5.4 on Ubuntu</h4> + +To upgrade to PHP 5.4 on Ubuntu: + +1. Use the instructions on <a href="http://phpave.com/upgrade-php-5-3-php-5-5-ubuntu-12-04-lts/" target="_blank">phpave</a>. +2. After upgrading, verify the PHP version by entering `php -v`. Messages similar to the following should display: + + <pre>PHP 5.4.33-2+deb.sury.org~precise+1 (cli) (built: Sep 25 2014 09:06:25) + Copyright (c) 1997-2014 The PHP Group + Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies</pre> + +3. Restart Apache: `service apache2 restart` + +<h4>Install required PHP extensions on Ubuntu</h4> + +Enter the following command to install required PHP extensions: + +<pre>apt-get -y install php5 php5-mhash php5-mcrypt php5-curl php5-cli php5-mysql php5-gd</pre> + +<h4>Ubuntu 14 only: workaround for mcrypt issue</h4> + +There is a <a href="https://bugs.launchpad.net/ubuntu/+source/php-mcrypt/+bug/1240590" target="_blank">known issue</a> in Ubuntu 14 with the `mcrypt` PHP extension. To work around the issue, see <a href="http://askubuntu.com/questions/450825/ubuntu-14-04-phpmyadmin-cant-find-mcrypt-extension" target="_blank">askubuntu</a>. + +<h4>Upgrade to PHP 5.4 on CentOS</h4> + +PHP 5.3 is the default PHP version on CentOS distributions. Upgrade to PHP 5.4 using a repository like <a href="http://blog.famillecollet.com/pages/Config-en" target="_blank">remi</a>. + +The following resources are also available: + +* <a href="http://kb.parallels.com/en/115875" target="_blank">kb.parallels</a> +* <a href="http://stackoverflow.com/questions/21502656/upgrading-php-on-centos-6-5-final" target="_blank">stackoverflow</a> +* <a href="http://rpms.famillecollet.com/" target="_blank">remi repository</a> + +To upgrade to PHP 5.4: + +1. Enter the following commands: + + <pre>cd /tmp + rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm + rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm + yum -y --enablerepo=remi install httpd php php-common</pre> + +2. To verify PHP 5.4 is installed, enter `php -v`. The command displays results similar to the following: + + <pre>PHP 5.4.33 (cli) (built: Sep 20 2014 16:20:03) + Copyright (c) 1997-2014 The PHP Group + Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies</pre> + +3. Restart Apache: `service httpd restart` + +<h4>Install required PHP extensions on CentOS</h4> + +Enter the following command to install required PHP extensions: + +`yum -y --enablerepo=remi install php-xml php-mcrypt.x86_64 gd gd-devel php-gd php-mysql` + +<h4>Setting the PHP timezone (all operating systems)</h4> + +Before you install Magento, you might need to set the system time zone for PHP; otherwise, errors like the following display during the installation and time-related operations like cron might not work: + +`PHP Warning: date(): It is not safe to rely on the system's timezone settings.` [more messages follow] + +To set your time zone: + +1. Locate your server's time zone in the available <a href="http://php.net/manual/en/timezones.php" target="_blank">time zone settings</a>. +2. Locate `php.ini` by entering the following command: + + `php -i | grep "Loaded Configuration File"` + + Typical locations follow: + + Ubuntu: `/etc/php5/cli/php.ini` + + CentOS: `/etc/php.ini` + +3. Open `php.ini` in a text editor. + +4. Locate the following setting and uncomment it if necessary: + + `date.timezone =` + +5. Add the time zone setting you found in step 1. +6. Save your changes to `php.ini` and exit the text editor. + +<h4>Setting the PHP memory limit (all operating systems)</h4> + +Increase `memory_limit` in `php.ini` to at least 512MB for normal operation or 2GB for testing: + +1. Open one of the following in a text editor: + + * Ubuntu: `/etc/php5/apache2/php.ini` + * CentOS: `/etc/php.ini` +2. Change `memory_limit` to: + + `memory_limit = 512M` or more for normal operation + + `memory_limit = 2G` or more for testing + +3. Save your changes and exit the text editor. + +4. Restart Apache: + + Ubuntu: `service apache2 restart` + + CentOS: `service httpd restart` + + +<h2 id="installing-composer">Installing Composer</h2> + +To install Composer: + +1. Change to or create an empty directory on your Magento server. + +2. Enter the following commands: + + <pre>curl -sS https://getcomposer.org/installer | php + mv composer.phar /usr/local/bin/composer</pre> + + For additional installation options, see the <a href="https://getcomposer.org/download/" target="_blank">Composer installation documentation</a>. + +<h2 id="instgde-prereq-compose-clone">Cloning the Magento 2 GitHub repository</h2> + +To clone the Magento 2 GitHub repository: + +1. Change to your web server's docroot directory. + + Typically, for Ubuntu, it's `/var/www` and for CentOS it's `/var/www/html`. + +2. Enter any of the following commands as a user with privileges to write to the web server docroot: + + To clone using HTTPS, use either of the following: + + `git clone https://github.com/magento/magento2.git` + + `git clone https://[your github.com user name]:[password]@github.com/magento/magento2.git` + + To clone using SSH: `git clone git@github.com:magento/magento2.git` + +3. Wait for the repository to clone on your server. + +**Note**: If you get an error that includes `Permission denied (publickey)`, see <a href="#troubleshooting">Troubleshooting</a>. + +<h2>Installing or reinstalling the Magento 2 software</h2> + +Before you begin, make sure that: + +1. Your system meets the requirements discussed in <a href="#magento-2-system-requirements">Magento 2 system requirements</a>. +2. You completed all prerequisite tasks discussed in <a href="#prerequisites">Prerequisites.</a> +3. You <a href="#installing-composer">installed Composer</a>. +4. You <a href="#cloning-the-magento-2-github-repository">cloned the Magento 2 GitHub repository</a>. + +<h3>Setting file system permissions and ownership before you install</h3> + +To make sure the installation completes successfully, we suggest the following file system permissions and ownership: + +* All files and directories owned by the web server user +* Certain directories must be writable + +<h4>Finding the web server user</h4> + +To find the web server user, enter one of the following commands: + +* Ubuntu: `ps -ef | grep apache2` +* CentOS: `grep User /etc/httpd/conf/httpd.conf` + +<h4>Pre-installation permissions and ownership</h4> + +Before the installation, set the following permissions: + +* All directories have 700 permissions `(drwx------)`. + + 700 permissions give full control (that is, read/write/execute) to the owner and no permissions to anyone else. + +* All files have 600 permissions `(-rw-------)`. + + 600 permissions mean the owner can read and write but other users have no permissions. + +<h4>Setting permissions and ownership</h4> + +1. To set ownership, enter the following commands as a user with `root` privileges: + + <pre>cd [your Magento installation directory] + chown -R [web server user name] .</pre> + + CentOS example: + + <pre>cd /var/www/html/magento2 + chown -R apache .</pre> + + Ubuntu example: + + <pre>cd /var/www/magento2 + chown -R www-data .</pre> + +2. Set file and directory permissions: + + <pre>find . -type d -exec chmod 700 {} \; + find . -type f -exec chmod 600 {} \;</pre> + +<h3>Getting started with your installation</h3> + +After you complete the tasks discussed in the preceding section, update Composer and run the installer: + +1. Log in to your Magento server as a user with `root` privileges. +2. Change to the Magento 2 installation directory. For example, + + `cd /var/www/html/magento2` + + **Note**: On Ubuntu, you might have to use the `sudo -s` or equivalent command to access this directory. + +3. As user with privileges to write to the web server docroot, enter `composer install` + + This command updates package dependencies and can take a few minutes to complete. + +4. Change to the Magento 2 `setup` subdirectory and enter `composer install`. + +**Note**: You must run `composer install` from *both* directories. + +<h3>Running the Magento 2 installer</h3> + +This section discusses how to run the command-line installer for Magento 2. + +**Note**: You must install Magento from its `setup` subdirectory. + +The installer is designed to be run multiple times if necessary so you can: + +* Provide different values + + For example, after you configure your web server for Secure Sockets Layer (SSL), you can run the installer to set SSL options. +* Correct mistakes in previous installations +* Install Magento in a different database instance + +**Note**: By default, the installer doesn't overwrite the Magento database if you install the Magento software in the same database instance. You can use the optional <tt>clean_database</tt> parameter to change this behavior. + +**Note**: If you get errors during the installation, see <a href="#troubleshooting">Troubleshooting</a>. + +Before you begin, you can run the following commands to find values for some required options: + +<table> + <tbody> + <tr> + <th>Installer option</th> + <th>Command</th> + </tr> + <tr> + <td>Language</td> + <td><code>php -f index.php help languages</code></td> + </tr> + <tr> + <td>Time zone</td> + <td><code>php -f index.php help timezones</code></td> + </tr> + <tr> + <td>Currency</td> + <td><code>php -f index.php help currencies</code></td> + </tr> + </tbody> + </table> + + <p>The format of the command follows:</p> + + <code>php -f index.php install [--[installation option name]=[installation option value] ...</code> + + <p>The following table discusses the meanings of installation option names and values. An example is provided in <a href="#sample-localhost-installation">Sample localhost installation</a>.</p> + +<table> + <tbody> + <tr> + <th>Name</th> + <th>Value</th> + <th>Required?</th> + </tr> + <tr> + <td>base_url</td> + <td><p>Base URL to use to access your Magento Admin and storefront in the format <tt>http[s]://[host or ip]/[your Magento base dir]/</tt>.</p> + <p><strong>Note</strong>: The scheme (<code>http://</code> or <code>https://</code>) and a trailing slash are <em>both</em> required.</p> + <p><tt>[your Magento base dir]</tt> is the docroot-relative path in which to install the Magento 2 software. Depending on how you set up your web server and virtual hosts, the path might be <tt>magento2</tt> or it might be blank.</p> + <p>To access Magento on localhost, you can use either <code>http://localhost/[your Magento base dir]/</code> or <code>http://127.0.0.1/[your Magento base dir]/</code>.</p> + </td> + <td>Yes</td> + </tr> + <tr> + <td>backend_frontname</td> + <td>Path to access the Magento Admin. This path is appended to Base URL. +For example, if Base URL is http://www.example.com and Admin Path is <code>admin</code>, the Admin Panel's URL is <code>http://www.example.com/admin</code>—provided you configured your web server for server rewrites.</td> + <td>Yes</td> + </tr> + <tr> + <tr> + <td>db_host</td> + <td><p>Use any of the following:</p> + <ul><li>The database server's fully qualified host name or IP address.</li> + <li><code>localhost</code> if your database serve is on the same host as your web server.</li> + <li>UNIX socket; for example, <code>/var/run/mysqld/mysqld.sock</code></li></ul> + <p><strong>Note</strong>: You can optionally specify the database server port in its host name like <code>www.example.com:9000</code></p> +</td> + <td>Yes</td> + </tr> + <tr> + <td>db_name</td> + <td>Name of the Magento database instance in which you want to install the Magento database tables.</td> + <td>Yes</td> + </tr> + <tr> + <td>db_user</td> + <td>User name of the Magento database instance owner.</td> + <td>Yes</td> + </tr> + <tr> + <td>db_pass</td> + <td>Magento database instance owner's password.</td> + <td>No</td> + </tr> + <tr> + <td>db_prefix</td> + <td><p>Use only if you're installing the Magento database tables in a database instance that has Magento tables in it already.</p> + <p>In that case, use a prefix to identify the Magento tables for this installation. Some customers have more than one Magento instance running on a server with all tables in the same database.</p> + <p>This option enables those customers to share the database server with more than one Magento installation.</p></td> + <td>No</td> + </tr> + + <td>admin_firstname</td> + <td>Magento administrator user's first name.</td> + <td>Yes</td> + </tr> + <tr> + <td>admin_lastname</td> + <td>Magento administrator user's last name.</td> + <td>Yes</td> + </tr> + <tr> + <td>admin_email</td> + <td>Magento administrator user's e-mail address.</td> + <td>Yes</td> + </tr> + <tr> + <td>admin_username</td> + <td>Magento administrator user name.</td> + <td>Yes</td> + </tr> + <tr> + <td>admin_password</td> + <td>Magento administrator user password.</td> + <td>Yes</td> + </tr> + <tr> + <td>language</td> + <td>Language code to use in the Admin and storefront. (If you have not done so already, you can view the list of language codes by entering <code>php -f index.php help languages</code> from the <code>setup</code> directory.)</td> + <td>Yes</td> + </tr> + <tr> + <td>currency</td> + <td>Default currency to use in the storefront. (If you have not done so already, you can view the list of currencies by entering <code>php -f index.php help currencies</code> from the <code>setup</code> directory.)</td> + <td>Yes</td> + </tr> + <tr> + <td>timezone</td> + <td>Default time zone to use in the Admin and storefront. (If you have not done so already, you can view the list of time zones by entering <code>php -f index.php help timezones</code> from the <code>setup</code> directory.)</td> + <td>Yes</td> + </tr> + <tr> + <td>use_secure</td> + <td><p><code>1</code> enables the use of Secure Sockets Layer (SSL) in all URLs (both Admin and storefront). Make sure your web server supports SSL before you select this option.</p> + <p><code>0</code> disables the use of SSL with Magento. In this case, all other secure URL options are assumed to also be <code>0</code>.</p></td> + <td>No</td> + </tr> + <tr> + <td>base_secure_url</td> + <td><p><code>1</code> means SSL is preferred in Magento URLs designed to use it (for example, the checkout page). Make sure your web server supports SSL before you select this option.</p> + <p><code>0</code> means SSL is not used.</p></td> + <td>No</td> + </tr> + + <tr> + <td>use_secure_admin</td> + <td><p><code>1</code> means you use SSL to access the Magento Admin. Make sure your web server supports SSL before you select this option.</p> + <p><code>0</code> means you do not use SSL with the Admin.</p></td> + <td>No</td> + </tr> + <tr> + <td>admin_use_security_key</td> + <td><p><code>1</code> causes the Magento software to use a randomly generated key value to access pages in the Magento Admin and in forms. These key values help prevent <a href="https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29" target="_blank">cross-site script forgery attacks</a>.</p> + <p><code>0</code> disables the use of the key.</p></td> + <td>No</td> + </tr> + <tr> + <td>session_save</td> + <td><p>Use any of the following:</p> + <ul><li><code>files</code> to store session data in the file system. File-based session storage is appropriate unless the Magento file system access is slow or you have a clustered database.</li> + <li><code>db.files</code> to store session data in the database. Choose database storage if you have a clustered database; otherwise, there might not be much benefit over file-based storage.</li></ul></td> + <td>No</td> + </tr> + <tr> + <td>key</td> + <td>If you have one, specify a key to encrypt sensitive data in the Magento database. (This includes passwords and personally identifiable customer information.) If you don't have one, Magento generates one for you.</td> + <td>No</td> + </tr> + <tr> + <td>cleanup_database</td> + <td>To drop database tables before installing the Magento 2 software, specify this parameter without a value. Otherwise, the Magento database is left intact.</td> + <td>No</td> + </tr> + <tr> + <td>db_init_statements</td> + <td>Advanced MySQL configuration parameter. Uses database initialization statements to run when connecting to the MySQL database. Consult a reference similar to <a href="http://dev.mysql.com/doc/refman/5.6/en/server-options.html" target="_blank">this one</a> before you set any values.</td> + <td>No</td> + </tr> + <tr> + <td>sales_order_increment_prefix</td> + <td>Specify a string value to use as a prefix for sales orders. Typically, this is used to guarantee unique order numbers for payment processors.</td> + <td>No</td> + </tr> + + </tbody> +</table> + +<h4>Sample localhost installation</h4> + +The following example installs Magento with the following options: + +* The Magento software is installed in the `magento2` directory relative to the web server docroot on `localhost` and the path to the Magento Admin is `admin`; therefore: + + Your storefront URL is `http://localhost` and you can access the Magento Admin at `http://localhost/admin` + +* The database server is on the same host as the web server. + + The database name is `magento`, and the user name and password are both `magento` + +* The Magento administrator has the following properties: + + * First and last name are is `Magento User` + * User name is `admin` and the password is `iamtheadmin` + * E-mail address is `user@example.com` + +* Default language is `en_US` (U.S. English) +* Default currency is U.S. dollars +* Default time zone is U.S. Central (America/Chicago) + +<pre>php -f index.php install --base_url=http://localhost/magento2/ + --backend_frontname=admin + --db_host=localhost --db_name=magento + --db_user=magento --db_pass=magento + --admin_firstname=Magento --admin_lastname=User + --admin_email=user@example.com --admin_username=admin + --admin_password=iamtheadmin --language=en_US + --currency=USD --timezone=America/Chicago</pre> + +<h3 id="instgde-install-magento-reinstall">Reinstalling the Magento 2 software</h3> + +This section discusses how to install the Magento 2 software after you installed it previously. You might do this in an development environment especially to get all the latest code changes. + +To reinstall the Magento 2 software: + +1. Optionally delete and re-create the database instance. +2. Log in to your Magento server as a user with permissions to modify files in the Magento file system. +3. Enter the following commands in the order shown: + + <pre>cd [your Magento install dir] +git pull +composer install +cd setup +composer install</pre> + +4. Repeat the tasks discussed in <a href="#installing-or-reinstalling-the-magento-2-software">Installing or reinstalling the Magento 2 software</a>. + +<h2>Verifying the installation</h2> + +<h3>Verifying the storefront</h3> + +Go to the storefront in a web browser. For example, if your Magento 2 installation base URL is `http://www.example.com`, enter it in your browser's address or location bar. + +The following figure shows a sample storefront page. If it displays as follows, your installation was a success! + +<p><img src="success.png" alt="Magento storefront which verifies a successful installation"></p> + +If the page appears unconfigured (no styles, only text), see <a href="troubleshooting">Troubleshooting</a>. + +<h3>Verifying the Magento Admin</h3> + +Go to the Magento Admin in a web browser. For example, if your Magento 2 installation base URL is `http://www.example.com`, and the Admin URL is `admin`, enter `http://www.example.com/admin` in your browser's address or location bar. + +(The Admin URL is specified by the value of the `backend_frontname` installation parameter.) + +When prompted, log in as a Magento Administrator. + +The following figure shows a sample Magento Admin page. If it displays as follows, your installation was a success! + +<p><img src="success_admin.png" alt="Magento Admin which verifies a successful installation"></p> + +If the page appears unconfigured (no styles, only text), see <a href="troubleshooting">Troubleshooting</a>. + +If you get a 404 (Not Found) error similar to the following, see <a href="troubleshooting">Troubleshooting</a>: + +`The requested URL /magento2index.php/admin/admin/dashboard/index/key/0c81957145a968b697c32a846598dc2e/ was not found on this server.` + +<h2>Troubleshooting</h2> + +### Problem: Cannot clone the Magento 2 GitHub repository + +**Detail**: Error is similar to the following: + +<pre>Cloning into 'magento2'... +Permission denied (publickey). +fatal: The remote end hung up unexpectedly</pre> + +**Solution**: Upload your SSH key to GitHub as discussed in <a href="https://help.github.com/articles/generating-ssh-keys" target="_blank">the GitHub help page</a>. + +### Problem: Cannot run 'composer install' + +**Suggestion**: Change to the directory in which you installed Composer and enter the following command: + +`mv composer.phar /usr/local/bin/composer` + +### Problem: During installation, PHP date warning + +**Details**: During the installation, the following message displays: + +`PHP Warning: date(): It is not safe to rely on the system's timezone settings. [more]` + +**Solution**: <a href="#php">Set the PHP timezone properly</a>. + +### Problem: During installation, the following fatal error displays: + +`PHP Fatal error: Class 'PDO' not found in /var/www/html/magento2/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php on line 44` + +**Solution**: Make sure you installed all required <a href="#php">PHP extensions</a>. + +### Problem: You cannot access Magento in a web browser + +**Details**: The following message displays when you try to access the Magento storefront or Admin: + +<pre>Whoops, it looks like you have an invalid PHP version. +Magento supports PHP 5.4.11 or newer. </pre> + +**Solution**: Either <a href="#php">upgrade PHP</a> or restart Apache (Apache might not be using the same PHP version as is on the file system). + +To restart Apache: + +* Ubuntu: `service apache2 restart` +* CentOS: `service httpd restart` + +### Problem: Error after logging in to the Magento Admin: + +`The requested URL /magento2index.php/admin/admin/dashboard/index/key/0c81957145a968b697c32a846598dc2e/ was not found on this server.` + +Note the lack of a slash character between <tt>magento2</tt> and <tt>index.php</tt> in the URL. + +**Solution**: The base URL is not correct. The base URL must start with <tt>http://</tt> or <tt>https://</tt> *and* it must end with a slash (/). Run the installation again with a valid value. + +### Problem: After installing, images and stylesheets do not load; only text displays, no graphics. + +**Details**: The path to images and stylesheets is not correct, either because of an incorrect base URL or because <a href="#apache">server rewrites</a> are not set up properly. To confirm this is the case, use a web browser inspector to check the paths to static assets and verify those assets are located on the Magento file system. + +Magento 2 static assets should be located under `[your Magento install dir]/pub/static/` (there should be `frontend` and `adminhtml` directories). + +Verify your server rewrites setting and your base URL and try again. \ No newline at end of file diff --git a/app/autoload.php b/app/autoload.php index 0f6e9f7060f783bb2413b7f1dcfab68b3d11cd09..bb250c9ee757b54255a3a621eb8add564947455f 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -34,14 +34,3 @@ $vendorAutoload = BP . "/{$vendorDir}/autoload.php"; if (file_exists($vendorAutoload)) { require_once $vendorAutoload; } -require_once BP . '/lib/internal/Magento/Framework/Autoload/IncludePath.php'; -$includePath = new \Magento\Framework\Autoload\IncludePath(); -$includePath->addIncludePath([BP . '/app/code', BP . '/lib/internal']); -spl_autoload_register([$includePath, 'load']); -$classMapPath = BP . '/var/classmap.ser'; -if (file_exists($classMapPath)) { - require_once BP . '/lib/internal/Magento/Framework/Autoload/ClassMap.php'; - $classMap = new \Magento\Framework\Autoload\ClassMap(BP); - $classMap->addMap(unserialize(file_get_contents($classMapPath))); - spl_autoload_register(array($classMap, 'load'), true, true); -} diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php index 57ff524528fea2e952d381bc879698202f310395..49fa68a72d149895af6f5f6e0c4abb14ac9acae5 100644 --- a/app/code/Magento/AdminNotification/Model/Feed.php +++ b/app/code/Magento/AdminNotification/Model/Feed.php @@ -57,15 +57,24 @@ class Feed extends \Magento\Framework\Model\AbstractModel /** * @var \Magento\Framework\HTTP\Adapter\CurlFactory + * */ protected $curlFactory; + /** + * Application arguments + * + * @var \Magento\Framework\App\Arguments + */ + protected $_args; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Backend\App\ConfigInterface $backendConfig * @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\App\Arguments $args * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param \Magento\Framework\HTTP\Adapter\curlFactory $curlFactory * @param array $data @@ -76,6 +85,7 @@ class Feed extends \Magento\Framework\Model\AbstractModel \Magento\Backend\App\ConfigInterface $backendConfig, \Magento\AdminNotification\Model\InboxFactory $inboxFactory, \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory, + \Magento\Framework\App\Arguments $args, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() @@ -84,6 +94,7 @@ class Feed extends \Magento\Framework\Model\AbstractModel $this->_backendConfig = $backendConfig; $this->_inboxFactory = $inboxFactory; $this->curlFactory = $curlFactory; + $this->_args = $args; } /** @@ -124,7 +135,7 @@ class Feed extends \Magento\Framework\Model\AbstractModel $feedXml = $this->getFeedData(); - $installDate = $this->_appState->getInstallDate(); + $installDate = strtotime($this->_args->get('install_date')); if ($feedXml && $feedXml->channel && $feedXml->channel->item) { foreach ($feedXml->channel->item as $item) { diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index e4b264fd749caa176ad8c5bf65eed71a361ce721..3dffdb3ab9fb53d9af4795391d0631567fbb6eef 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php b/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php index 267f919aaed1998e0ac42e21e5ade847a727a03e..3da34cd529f41514fdcb040f8cff4314bbc41b46 100644 --- a/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php +++ b/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php @@ -27,8 +27,9 @@ * * @author Magento Core Team <core@magentocommerce.com> */ + +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); /** diff --git a/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php b/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php index f5d9f065bd48abc70ceabd9ff4c076977a8a3cc2..824da0b7cfc7d5a1faa94d90e14d0eeae28fbc71 100644 --- a/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php +++ b/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php @@ -21,8 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); /** diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json index 3718bab0174bacfe74a8835a6e47d5decd896472..5113d36a73598545ebb2d68ac966394c534180d5 100644 --- a/app/code/Magento/Authorization/composer.json +++ b/app/code/Magento/Authorization/composer.json @@ -3,12 +3,12 @@ "description": "Authorization module provides access to Magento ACL functionality.", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Authorization/data/authorization_setup/data-install-1.0.0.0.php b/app/code/Magento/Authorization/data/authorization_setup/data-install-1.0.0.0.php index 483a6ee18fca6afb470ffabb2f6dd62e36f2302f..0d7ce6e367b94e83c667e9d7b591263ef44a5a99 100644 --- a/app/code/Magento/Authorization/data/authorization_setup/data-install-1.0.0.0.php +++ b/app/code/Magento/Authorization/data/authorization_setup/data-install-1.0.0.0.php @@ -28,7 +28,7 @@ use Magento\Authorization\Model\UserContextInterface; * Save administrators group role and rules */ -/** @var \Magento\Authorization\Model\Resource\Setup $this */ +/** @var $this \Magento\Authorization\Model\Resource\Setup */ $roleCollection = $this->createRoleCollection() ->addFieldToFilter('parent_id', 0) diff --git a/app/code/Magento/Authorization/sql/authorization_setup/install-1.0.0.0.php b/app/code/Magento/Authorization/sql/authorization_setup/install-1.0.0.0.php index eb6661c9dc29a560fb212ec3fd6306886404cd4b..f239fa232e4600cb6191501ff6ce10d090f17290 100644 --- a/app/code/Magento/Authorization/sql/authorization_setup/install-1.0.0.0.php +++ b/app/code/Magento/Authorization/sql/authorization_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Authorizenet/composer.json b/app/code/Magento/Authorizenet/composer.json index f44c2948e8c9cadde1a2cac37675b2f8478c83bb..37ef6cf7b4d6cf6fb62b3fe9f96da534bf33150c 100644 --- a/app/code/Magento/Authorizenet/composer.json +++ b/app/code/Magento/Authorizenet/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-centinel": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-centinel": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Container.php b/app/code/Magento/Backend/Block/Widget/Grid/Container.php index 3c2b92c574792ece31f08b89fa6ded6fa7766cb8..f1330c62cdb555264ce28a660df9d70b0a9c8078 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Container.php @@ -103,7 +103,7 @@ class Container extends \Magento\Backend\Block\Widget\Container $this->getLayout()->createBlock( str_replace( '_', - \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR, + '\\', $this->_blockGroup ) . '\\Block\\' . str_replace( ' ', diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard/AjaxBlock.php b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard/AjaxBlock.php index 3cfa2b4bb1378b4d930c18332b55dd9f6a33ecca..1b03594c6526dfbde285c4046e2a368d68605cd3 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Dashboard/AjaxBlock.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Dashboard/AjaxBlock.php @@ -60,7 +60,7 @@ class AjaxBlock extends \Magento\Backend\Controller\Adminhtml\Dashboard $blockTab = $this->getRequest()->getParam('block'); $blockClassSuffix = str_replace( ' ', - \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR, + '\\', ucwords(str_replace('_', ' ', $blockTab)) ); if (in_array($blockTab, array('tab_orders', 'tab_amounts', 'totals'))) { diff --git a/app/code/Magento/Backend/Model/Search/Customer.php b/app/code/Magento/Backend/Model/Search/Customer.php index 84f8009e5cce2c1613aada5ea1d757da2f92da82..2d5f256f804c6c2ece600f49723827ac5a781be3 100644 --- a/app/code/Magento/Backend/Model/Search/Customer.php +++ b/app/code/Magento/Backend/Model/Search/Customer.php @@ -53,12 +53,12 @@ class Customer extends \Magento\Framework\Object protected $_customerService; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $_searchCriteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ protected $_filterBuilder; @@ -72,15 +72,15 @@ class Customer extends \Magento\Framework\Object * * @param \Magento\Backend\Helper\Data $adminhtmlData * @param \Magento\Customer\Service\V1\CustomerAccountService $customerService - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder * @param \Magento\Customer\Helper\View $customerViewHelper */ public function __construct( \Magento\Backend\Helper\Data $adminhtmlData, \Magento\Customer\Service\V1\CustomerAccountService $customerService, - \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder, - \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder, + \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, + \Magento\Framework\Api\FilterBuilder $filterBuilder, \Magento\Customer\Helper\View $customerViewHelper ) { $this->_adminhtmlData = $adminhtmlData; diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 7fcea80adbc41d4b9069336fa637cbc7d7b22367..d994c01355c1d810966c99bc243198f250b4865a 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -3,26 +3,26 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-cron": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-reports": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-user": "0.1.0-alpha102", - "magento/module-backup": "0.1.0-alpha102", - "magento/module-email": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-translation": "0.1.0-alpha102", - "magento/module-require-js": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-cron": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-reports": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-user": "0.1.0-alpha103", + "magento/module-backup": "0.1.0-alpha103", + "magento/module-email": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-translation": "0.1.0-alpha103", + "magento/module-require-js": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json index f134ec476bc469409e22b180cf5c9300e658af7b..b6c59756af7ed0a03f431e385fbebde34b3a4e99 100644 --- a/app/code/Magento/Backup/composer.json +++ b/app/code/Magento/Backup/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-cron": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-cron": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Bundle/Service/V1/Data/Product/Link.php b/app/code/Magento/Bundle/Service/V1/Data/Product/Link.php index f2742c824555808919ead58f0aab303010115b37..53d096c924faff6e5c8a40012712443f05936a78 100644 --- a/app/code/Magento/Bundle/Service/V1/Data/Product/Link.php +++ b/app/code/Magento/Bundle/Service/V1/Data/Product/Link.php @@ -23,7 +23,7 @@ */ namespace Magento\Bundle\Service\V1\Data\Product; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Bundle/Service/V1/Data/Product/LinkBuilder.php b/app/code/Magento/Bundle/Service/V1/Data/Product/LinkBuilder.php index 1b57e7724e2f63b9d5d25bfbfdcf8b7d3dcd8f59..ec13fa53550839cea056cad0b03af77cfef9f235 100644 --- a/app/code/Magento/Bundle/Service/V1/Data/Product/LinkBuilder.php +++ b/app/code/Magento/Bundle/Service/V1/Data/Product/LinkBuilder.php @@ -23,12 +23,12 @@ */ namespace Magento\Bundle\Service\V1\Data\Product; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class LinkBuilder extends AbstractExtensibleObjectBuilder +class LinkBuilder extends ExtensibleObjectBuilder { /** * @param string $value diff --git a/app/code/Magento/Bundle/Service/V1/Data/Product/Option.php b/app/code/Magento/Bundle/Service/V1/Data/Product/Option.php index 6dfe329e47cb818d039415f6d5dc5036d1bec9b0..56603db45b8ddfa13c3d52128eaee95de6b5e910 100644 --- a/app/code/Magento/Bundle/Service/V1/Data/Product/Option.php +++ b/app/code/Magento/Bundle/Service/V1/Data/Product/Option.php @@ -23,7 +23,7 @@ */ namespace Magento\Bundle\Service\V1\Data\Product; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Bundle/Service/V1/Data/Product/Option/Type.php b/app/code/Magento/Bundle/Service/V1/Data/Product/Option/Type.php index cc66a6c4467480ca595f162c27d776eed52bf69c..dd68528029d9411a8fea36d8a6bade6521cf2fbd 100644 --- a/app/code/Magento/Bundle/Service/V1/Data/Product/Option/Type.php +++ b/app/code/Magento/Bundle/Service/V1/Data/Product/Option/Type.php @@ -23,7 +23,7 @@ */ namespace Magento\Bundle\Service\V1\Data\Product\Option; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Bundle/Service/V1/Data/Product/Option/TypeBuilder.php b/app/code/Magento/Bundle/Service/V1/Data/Product/Option/TypeBuilder.php index 4d9c5bae52f8b149c6219f39d31664f3df921a34..573f518d51d32d1b8455eca25078a36443d5f276 100644 --- a/app/code/Magento/Bundle/Service/V1/Data/Product/Option/TypeBuilder.php +++ b/app/code/Magento/Bundle/Service/V1/Data/Product/Option/TypeBuilder.php @@ -23,12 +23,12 @@ */ namespace Magento\Bundle\Service\V1\Data\Product\Option; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class TypeBuilder extends AbstractExtensibleObjectBuilder +class TypeBuilder extends ExtensibleObjectBuilder { /** * Set type label diff --git a/app/code/Magento/Bundle/Service/V1/Data/Product/OptionBuilder.php b/app/code/Magento/Bundle/Service/V1/Data/Product/OptionBuilder.php index 5247907144e6b163640348377ea94aa386a1b006..adaa4dd4ef162eb9db3465733c6000a1e372d1cb 100644 --- a/app/code/Magento/Bundle/Service/V1/Data/Product/OptionBuilder.php +++ b/app/code/Magento/Bundle/Service/V1/Data/Product/OptionBuilder.php @@ -23,12 +23,12 @@ */ namespace Magento\Bundle\Service\V1\Data\Product; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class OptionBuilder extends AbstractExtensibleObjectBuilder +class OptionBuilder extends ExtensibleObjectBuilder { /** * Set option id diff --git a/app/code/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessor.php b/app/code/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessor.php index 0a5f6032a9b5947cc18c9aa5f323ca2c98c3b670..aeeeab547b04f51d88ee8fb54c3e2393d740fe66 100644 --- a/app/code/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessor.php +++ b/app/code/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessor.php @@ -27,7 +27,7 @@ namespace Magento\Bundle\Service\V1\Product; use Magento\Bundle\Service\V1\Data\Product\Option; use Magento\Bundle\Service\V1\Product\Option\ReadService as OptionReadService; use Magento\Bundle\Service\V1\Product\Option\WriteService as OptionWriteService; -use Magento\Framework\Service\Data\Eav\AttributeValue; +use Magento\Framework\Api\Eav\AttributeValue; use Magento\Catalog\Model\Product as ProductModel; use Magento\Catalog\Model\ProductRepository; use Magento\Catalog\Model\Product\Type as ProductType; diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json index 99a9eadd3bb553afd21e79d277537f5ab9dbac71..d6d155375dce71156fd8c53da3b244610c0cd4e2 100644 --- a/app/code/Magento/Bundle/composer.json +++ b/app/code/Magento/Bundle/composer.json @@ -3,24 +3,24 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-catalog-rule": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-gift-message": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", - "magento/module-webapi": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-catalog-rule": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-gift-message": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", + "magento/module-webapi": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Bundle/data/bundle_setup/data-install-1.6.0.0.php b/app/code/Magento/Bundle/data/bundle_setup/data-install-1.6.0.0.php index 7b8ff93e3a2f1438531a4505fa836cad29c363b4..0ef5bf28b00ec97a939ffcee63262e79e5dfc911 100644 --- a/app/code/Magento/Bundle/data/bundle_setup/data-install-1.6.0.0.php +++ b/app/code/Magento/Bundle/data/bundle_setup/data-install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$installer = $this; /** @var $installer \Magento\Catalog\Model\Resource\Setup */ +$installer = $this; $fieldList = array( 'price', diff --git a/app/code/Magento/Bundle/etc/data_object.xml b/app/code/Magento/Bundle/etc/data_object.xml index 115fb11887372b68907100e13e1ff8572bbee9ed..7562bf50540172c7a4bee965a000b99a1c6b482d 100644 --- a/app/code/Magento/Bundle/etc/data_object.xml +++ b/app/code/Magento/Bundle/etc/data_object.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Service/etc/data_object.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Api/etc/data_object.xsd"> <custom_attributes for="Magento\Catalog\Service\V1\Data\Product"> <attribute code="bundle_product_options" type="Magento\Bundle\Service\V1\Data\Product\Option[]" /> </custom_attributes> diff --git a/app/code/Magento/Bundle/sql/bundle_setup/install-1.6.0.0.php b/app/code/Magento/Bundle/sql/bundle_setup/install-1.6.0.0.php index 117b1ba18a8c5278732730cb5f8cc4985f175a07..4c4baf4480044c734c16b6d9e905571b5ab7b2c5 100644 --- a/app/code/Magento/Bundle/sql/bundle_setup/install-1.6.0.0.php +++ b/app/code/Magento/Bundle/sql/bundle_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/Magento/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php index 73b513ffa677b11775817198d47afefb3340deb3..b0a15a2e209175949b57c1d5fb445e6628d521db 100644 --- a/app/code/Magento/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php +++ b/app/code/Magento/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php @@ -22,9 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/** @var $connection \Magento\Framework\DB\Adapter\Pdo\Mysql */ $connection = $installer->getConnection(); $priceIndexerTables = array('catalog_product_index_price_bundle_idx', 'catalog_product_index_price_bundle_tmp'); diff --git a/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml b/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml index 5704e1868b85d6699939ccc79ebca381d0761246..41a46bdb133c60f70d516c9463b6559a651b5270 100644 --- a/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml +++ b/app/code/Magento/Bundle/view/frontend/layout/catalog_product_view_type_bundle.xml @@ -67,7 +67,7 @@ </action> </referenceBlock> <referenceContainer name="content"> - <container name="bundle.options.container" label="invisible" htmlTag="div" htmlClass="bundle-options-container" after="product.info.main"/> + <container name="bundle.options.container" htmlTag="div" htmlClass="bundle-options-container" after="product.info.main"/> </referenceContainer> <referenceContainer name="product.info.type"> <block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle" name="product.info.bundle" as="product_type_data" template="catalog/product/view/type/bundle.phtml"/> diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json index 0185b91bd91072b3fbbd533c8f24cf5826e84bbe..cc309049acfaa2a043c1407adc3e2d4abfb94a81 100644 --- a/app/code/Magento/Captcha/composer.json +++ b/app/code/Magento/Captcha/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Captcha/sql/captcha_setup/install-1.7.0.0.0.php b/app/code/Magento/Captcha/sql/captcha_setup/install-1.7.0.0.0.php index dc38f8455c7e791df6ae16fab5e6bdf48f15f89a..c770164918abfde1d2ed078eae28162e9ebd4f2b 100644 --- a/app/code/Magento/Captcha/sql/captcha_setup/install-1.7.0.0.0.php +++ b/app/code/Magento/Captcha/sql/captcha_setup/install-1.7.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php b/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php index 1f32d4042745b1f0ccf18821801ab69c6c2f9084..f966c6bdf53743d1d7668e622af305f1a3257f86 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Rss/NotifyStock.php @@ -113,4 +113,12 @@ class NotifyStock extends \Magento\Backend\Block\AbstractBlock implements DataPr { return array(); } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return true; + } } diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php index 7a134829deca13ecb9e2ffbd0504f77d8d001725..6b447738a3e9747b5a59edc0496a82f699ca9528 100644 --- a/app/code/Magento/Catalog/Block/Product/View.php +++ b/app/code/Magento/Catalog/Block/Product/View.php @@ -121,6 +121,16 @@ class View extends AbstractProduct implements \Magento\Framework\View\Block\Iden ); } + /** + * Return wishlist widget options + * + * @return array + */ + public function getWishlistOptions() + { + return ['productType' => $this->getProduct()->getTypeId()]; + } + /** * Add meta information from product to head block * diff --git a/app/code/Magento/Catalog/Block/Rss/Category.php b/app/code/Magento/Catalog/Block/Rss/Category.php index e9ca79966f6dcff06dd03d5e28207785e863a4d9..f9cd7a35ddac018daca9aae1958fcf701b425624 100644 --- a/app/code/Magento/Catalog/Block/Rss/Category.php +++ b/app/code/Magento/Catalog/Block/Rss/Category.php @@ -263,4 +263,12 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements } return $result; } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return false; + } } diff --git a/app/code/Magento/Catalog/Block/Rss/Product/NewProducts.php b/app/code/Magento/Catalog/Block/Rss/Product/NewProducts.php index e249f0a016c2cd5c1e4a5649f5056dfa1d0893a5..5cc798bfd5c071ccd7a46155a9b09df8d8e66c57 100644 --- a/app/code/Magento/Catalog/Block/Rss/Product/NewProducts.php +++ b/app/code/Magento/Catalog/Block/Rss/Product/NewProducts.php @@ -215,4 +215,12 @@ class NewProducts extends \Magento\Framework\View\Element\AbstractBlock implemen return $data; } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return false; + } } diff --git a/app/code/Magento/Catalog/Block/Rss/Product/Special.php b/app/code/Magento/Catalog/Block/Rss/Product/Special.php index cab115dbe860473dd1d145e15a4c97294472453d..6afff50d20bf300e02c48edc2231954ebbbd61cb 100644 --- a/app/code/Magento/Catalog/Block/Rss/Product/Special.php +++ b/app/code/Magento/Catalog/Block/Rss/Product/Special.php @@ -264,4 +264,12 @@ class Special extends \Magento\Framework\View\Element\AbstractBlock implements D } return $data; } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return false; + } } diff --git a/app/code/Magento/Catalog/Helper/Product/Inventory.php b/app/code/Magento/Catalog/Helper/Product/Inventory.php index d51037b1ef227f097915e141647d9f4d03081ca9..1857eb1746da1978f169d2d79bb2193169babcca 100644 --- a/app/code/Magento/Catalog/Helper/Product/Inventory.php +++ b/app/code/Magento/Catalog/Helper/Product/Inventory.php @@ -100,8 +100,8 @@ class Inventory extends \Magento\Framework\App\Helper\AbstractHelper public function getDoFieldData($field, StockItem $dataObject) { $possibleMethods = array( - 'get' . \Magento\Framework\Service\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($field), - 'is' . \Magento\Framework\Service\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($field) + 'get' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($field), + 'is' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($field) ); foreach ($possibleMethods as $method) { diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows.php index 8ee5949f63c955410eedc7270eec8407d2bc4b5c..55eb1a16c79b81cd0422c403b53a27f7504581d1 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows.php @@ -80,9 +80,12 @@ class Rows extends \Magento\Catalog\Model\Indexer\Product\Flat\AbstractAction throw new \Magento\Framework\Model\Exception(__('Bad value was supplied.')); } foreach ($this->_storeManager->getStores() as $store) { + $tableExists = $this->_isFlatTableExists($store->getId()); $idsBatches = array_chunk($ids, \Magento\Catalog\Helper\Product\Flat\Indexer::BATCH_SIZE); foreach ($idsBatches as $changedIds) { - $this->flatItemEraser->removeDeletedProducts($changedIds, $store->getId()); + if ($tableExists) { + $this->flatItemEraser->removeDeletedProducts($changedIds, $store->getId()); + } if (!empty($changedIds)) { $this->_reindex($store->getId(), $changedIds); } diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableData.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableData.php index 69b8777f73a766cdd09b2977c48c56403f8bb089..5fe06335c2e76a64da1584cef70bee867b47b2b2 100644 --- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableData.php +++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableData.php @@ -68,7 +68,7 @@ class TableData implements \Magento\Catalog\Model\Indexer\Product\Flat\TableData $connection = $this->_resource->getConnection('write'); if (!$connection->isTableExists($flatTable)) { $connection->dropTable($flatDropName); - $connection->renameTablesBatch(array('oldName' => $temporaryFlatTableName, 'newName' => $flatTable)); + $connection->renameTablesBatch(array(['oldName' => $temporaryFlatTableName, 'newName' => $flatTable])); $connection->dropTable($flatDropName); } else { $describe = $connection->describeTable($flatTable); diff --git a/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadService.php b/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadService.php index d87dd83d78b2470ca03a42eaa1772461896d4cc9..2629a6fd08afe11270d4873c6a667b6ba4649e8d 100644 --- a/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadService.php +++ b/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadService.php @@ -70,7 +70,7 @@ class ReadService implements ReadServiceInterface /** * {@inheritdoc} */ - public function search(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria) + public function search(\Magento\Framework\Api\SearchCriteria $searchCriteria) { return $this->metadataService->getAllAttributeMetadata( MetadataServiceInterface::ENTITY_TYPE, diff --git a/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadServiceInterface.php b/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadServiceInterface.php index a65081a204c0f9025dd088629ff1a244890bee96..946958e59b1852b1d7ef9a53ce4211b46bb3bf7a 100644 --- a/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadServiceInterface.php +++ b/app/code/Magento/Catalog/Service/V1/Category/Attribute/ReadServiceInterface.php @@ -51,8 +51,8 @@ interface ReadServiceInterface /** * Retrieve the list of product attributes * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Catalog\Service\V1\Data\Product\Attribute\SearchResults containing Data\Eav\Attribute objects */ - public function search(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function search(\Magento\Framework\Api\SearchCriteria $searchCriteria); } diff --git a/app/code/Magento/Catalog/Service/V1/Category/MetadataService.php b/app/code/Magento/Catalog/Service/V1/Category/MetadataService.php index 87a18ed9e704bf34a481977da8318dacf28a88f5..49634c4c609bff6b4a0c9360d14019c269f5ef61 100644 --- a/app/code/Magento/Catalog/Service/V1/Category/MetadataService.php +++ b/app/code/Magento/Catalog/Service/V1/Category/MetadataService.php @@ -24,7 +24,7 @@ namespace Magento\Catalog\Service\V1\Category; use Magento\Catalog\Service\V1\Data\Eav\AttributeMetadata; -use Magento\Framework\Service\Config\MetadataConfig; +use Magento\Framework\Api\Config\MetadataConfig; /** * Class AttributeMetadataService @@ -35,12 +35,12 @@ class MetadataService implements MetadataServiceInterface protected $metadataService; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ private $searchCriteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ private $filterBuilder; @@ -53,14 +53,14 @@ class MetadataService implements MetadataServiceInterface * Initialize dependencies. * * @param \Magento\Catalog\Service\V1\MetadataServiceInterface $metadataService - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder * @param MetadataConfig $metadataConfig */ public function __construct( \Magento\Catalog\Service\V1\MetadataServiceInterface $metadataService, - \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder, - \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder, + \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, + \Magento\Framework\Api\FilterBuilder $filterBuilder, MetadataConfig $metadataConfig ) { $this->metadataService = $metadataService; diff --git a/app/code/Magento/Catalog/Service/V1/Category/MetadataServiceInterface.php b/app/code/Magento/Catalog/Service/V1/Category/MetadataServiceInterface.php index cc66b443f41fecc1cc0f898a095a7ba28c169689..e51478b84fb207fbceb92a36fd6391569944eb2d 100644 --- a/app/code/Magento/Catalog/Service/V1/Category/MetadataServiceInterface.php +++ b/app/code/Magento/Catalog/Service/V1/Category/MetadataServiceInterface.php @@ -28,7 +28,7 @@ use Magento\Catalog\Service\V1\Data\Eav\AttributeMetadata; /** * Class Category MetadataServiceInterface */ -interface MetadataServiceInterface extends \Magento\Framework\Service\Data\MetadataServiceInterface +interface MetadataServiceInterface extends \Magento\Framework\Api\MetadataServiceInterface { /**#@+ * Predefined constants diff --git a/app/code/Magento/Catalog/Service/V1/Data/Category.php b/app/code/Magento/Catalog/Service/V1/Data/Category.php index 8c41726db07632890187db940f8675e1e2ad3ea8..4c9dc79048db6f8c2b92644fed21a1d1433e7618 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Category.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Category.php @@ -23,7 +23,7 @@ */ namespace Magento\Catalog\Service\V1\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Data/Category/Mapper.php b/app/code/Magento/Catalog/Service/V1/Data/Category/Mapper.php index 1e11b17123999d25f5d29bc4bd8245531563110e..a384ade3e0e90276851b2dded2b1d195ee14564b 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Category/Mapper.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Category/Mapper.php @@ -23,7 +23,7 @@ */ namespace Magento\Catalog\Service\V1\Data\Category; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensibleDataObjectConverter; use Magento\Catalog\Model\CategoryFactory; use Magento\catalog\Service\V1\Data\Category as CategoryDataObject; diff --git a/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLink.php b/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLink.php index 725b979607a44006c24c30e1300fdb3ad05e44e6..91ddadbbf7618cab4a0883fba1280ef2ca73a537 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLink.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLink.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data\Category; /** * @codeCoverageIgnore */ -class ProductLink extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class ProductLink extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array diff --git a/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLinkBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLinkBuilder.php index a63b8695ec70371315c16f4f72ee60bae14d1287..1134354f73fbfa88b8cc169e81fe63f68206babd 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLinkBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Category/ProductLinkBuilder.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data\Category; /** * @codeCoverageIgnore */ -class ProductLinkBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ProductLinkBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param string $value diff --git a/app/code/Magento/Catalog/Service/V1/Data/CategoryBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/CategoryBuilder.php index 9a55920dc9494e558f646ddb7687edce74bc102d..c8d7ba60b021cc9441351d71d498d5c311c513f2 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/CategoryBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/CategoryBuilder.php @@ -23,21 +23,21 @@ */ namespace Magento\Catalog\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * @codeCoverageIgnore */ -class CategoryBuilder extends AbstractExtensibleObjectBuilder +class CategoryBuilder extends ExtensibleObjectBuilder { /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param \Magento\Catalog\Service\V1\Category\MetadataServiceInterface $metadataService */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, \Magento\Catalog\Service\V1\Category\MetadataServiceInterface $metadataService ) { diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Attribute.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Attribute.php index 503596d7879a7407ed0e4455379d864f0c7ec39c..f83886057ee0934f2a8309a6b0e835b69c12a7c3 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Attribute.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Attribute.php @@ -23,7 +23,7 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeBuilder.php index a7eb967ee409f567f4d20a22bba27e53a0866a78..e373ca62442d25ad0d29660a2578e308a6e64778 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeBuilder.php @@ -23,12 +23,12 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class AttributeBuilder extends AbstractExtensibleObjectBuilder +class AttributeBuilder extends ExtensibleObjectBuilder { /** * Set attribute ID diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroup.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroup.php index 48a1b8fe4460d0e2a10a8276c57294ebfd44f64b..b041bd3dca12686c367acb96c4c2a3aa0ed1ffa8 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroup.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroup.php @@ -28,7 +28,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; /** * @codeCoverageIgnore */ -class AttributeGroup extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class AttributeGroup extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, make typos less likely diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroupBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroupBuilder.php index c18def37b86677920d122ee050c3a2d554bfd16a..cf6138eaac3ed26c4b1a2d1d078344e73fbf38a9 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroupBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeGroupBuilder.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; /** * @codeCoverageIgnore */ -class AttributeGroupBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class AttributeGroupBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set Id diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadata.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadata.php index b30fcfb7000da174d6c8a9bc48050ed6949d87ee..42af9f31917735f5d3c04adb15dbaea1f5c64dd0 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadata.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadata.php @@ -23,8 +23,8 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Service\Data\MetadataObjectInterface; +use \Magento\Framework\Api\AbstractExtensibleObject; +use Magento\Framework\Api\MetadataObjectInterface; /** * Class AttributeMetadata diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataBuilder.php index bea2ad72a043b363a9f2cab49437e598202756f6..8f8964e48b3ce99ab15fc8a7ef737db6471d05f9 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataBuilder.php @@ -23,15 +23,15 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeMetadataBuilderInterface; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeMetadataBuilderInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Class AttributeMetadataBuilder */ -class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implements AttributeMetadataBuilderInterface +class AttributeMetadataBuilder extends ExtensibleObjectBuilder implements AttributeMetadataBuilderInterface { /** * Option builder @@ -55,7 +55,7 @@ class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implement /** * Initializes builder. * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param OptionBuilder $optionBuilder @@ -63,7 +63,7 @@ class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implement * @param Product\Attribute\FrontendLabelBuilder $frontendLabelBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, OptionBuilder $optionBuilder, @@ -74,9 +74,9 @@ class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implement $this->optionBuilder = $optionBuilder; $this->validationRuleBuilder = $validationRuleBuilder; $this->frontendLabelBuilder = $frontendLabelBuilder; - $this->_data[AttributeMetadata::OPTIONS] = array(); - $this->_data[AttributeMetadata::VALIDATION_RULES] = array(); - $this->_data[AttributeMetadata::FRONTEND_LABEL] = array(); + $this->data[AttributeMetadata::OPTIONS] = array(); + $this->data[AttributeMetadata::VALIDATION_RULES] = array(); + $this->data[AttributeMetadata::FRONTEND_LABEL] = array(); } /** diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet.php index c94b6d7024409ba025e26d1c97f1dfed9bae7b4d..2ab5a6171fe157cd3d0c768fd5b01619dd5ecdcd 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet.php @@ -28,7 +28,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; * * @codeCoverageIgnore */ -class AttributeSet extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class AttributeSet extends \Magento\Framework\Api\AbstractExtensibleObject { /** * table field for id diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/Attribute.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/Attribute.php index 9d4151b8af6907b03c05783064811e6cfebcdb9a..f88d2d5187c14d5695f6892e252460d8929cc070 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/Attribute.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/Attribute.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\AttributeSet; /** * @codeCoverageIgnore */ -class Attribute extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Attribute extends \Magento\Framework\Api\AbstractExtensibleObject { /** * table field for attribute_id diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/AttributeBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/AttributeBuilder.php index e0f788b1b8cacebb06fd07636c2a3024eaef6c62..0039073c385df93763c81c4130f6c7bc3eacaa8e 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/AttributeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSet/AttributeBuilder.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\AttributeSet; /** * @codeCoverageIgnore */ -class AttributeBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class AttributeBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set attribute group id diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSetBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSetBuilder.php index 2175dc6674f1a47740f2e9aeef583b3fe4404ea2..433e35ac688ddac6f93c804bb93962782054a311 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSetBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/AttributeSetBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; * * @codeCoverageIgnore */ -class AttributeSetBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class AttributeSetBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set attribute set id diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadata.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadata.php index e8a31950757993388338ba69a27d9ece83dfbfd9..ec86ba2ccc5a5e79521c77c721a87dd8cdb6e0c3 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadata.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadata.php @@ -23,8 +23,8 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav\Category; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Service\Data\MetadataObjectInterface; +use \Magento\Framework\Api\AbstractExtensibleObject; +use Magento\Framework\Api\MetadataObjectInterface; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadataBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadataBuilder.php index 2af311e560c58259718a58c87d16b8cb1172540b..6aff86ee3c37b5fe70dadcbd2155529fc6e407bf 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadataBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/AttributeMetadataBuilder.php @@ -23,13 +23,13 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav\Category; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeMetadataBuilderInterface; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeMetadataBuilderInterface; /** * @codeCoverageIgnore */ -class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implements AttributeMetadataBuilderInterface +class AttributeMetadataBuilder extends ExtensibleObjectBuilder implements AttributeMetadataBuilderInterface { /** * Set attribute id diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php index ce74fbf6b6db57d72cdf8e2a91c05551b070b67a..7e96863a912eedf0a66bda89908ca9fdca17bb1a 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php @@ -23,7 +23,7 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav\Category\Info; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Class Metadata diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/MetadataBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/MetadataBuilder.php index 798d8ece0b17034d3c03400414ef8f72eb16d2c8..1cee62ac05eaf765a38bc394fa8054baa88718d1 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/MetadataBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/MetadataBuilder.php @@ -24,23 +24,23 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Category\Info; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * Class MetadataBuilder * * @codeCoverageIgnore */ -class MetadataBuilder extends AbstractExtensibleObjectBuilder +class MetadataBuilder extends ExtensibleObjectBuilder { /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param \Magento\Catalog\Service\V1\Category\MetadataServiceInterface $metadataService */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, \Magento\Catalog\Service\V1\Category\MetadataServiceInterface $metadataService ) { diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Tree.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Tree.php index 21e270b08b2bae25aefec2421553eca7eb54f581..a0c36bb8550013252b307155b3e52b0f00ad53bb 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Tree.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Tree.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Category; /** * @codeCoverageIgnore */ -class Tree extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Tree extends \Magento\Framework\Api\AbstractExtensibleObject { const ID = 'id'; const PARENT_ID = 'parent_id'; diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/TreeBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/TreeBuilder.php index 7cc9724f3a3e6ff0f8b0bdba2c6f8500091b49e8..cc90406fcce76449e558f1901516ae6a4eb9cdb3 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/TreeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/TreeBuilder.php @@ -23,12 +23,12 @@ */ namespace Magento\Catalog\Service\V1\Data\Eav\Category; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class TreeBuilder extends AbstractExtensibleObjectBuilder +class TreeBuilder extends ExtensibleObjectBuilder { /** * Set category ID diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Option.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Option.php index 67dc0a91b71555dba079d184456bea57e49840ba..c5453b69c048d14ce1143d0c05189e13e870d75c 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Option.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Option.php @@ -30,7 +30,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; * * @codeCoverageIgnore */ -class Option extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Option extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Constants used as keys into $_data diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/Label.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/Label.php index bb25976471e91d5a173c7edff2efe6e55ca0e196..93f144792f9a725234b68d7d6cdbd07b46c80b9d 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/Label.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/Label.php @@ -30,7 +30,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Option; * * @codeCoverageIgnore */ -class Label extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Label extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Constants used as keys into $_data diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/LabelBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/LabelBuilder.php index 7c9bc1ab85c97f57211634a1ef67efc5b53767fa..1c0b08f895658ae67dccfa2796667084353eb8c2 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/LabelBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Option/LabelBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Option; * * @codeCoverageIgnore */ -class LabelBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class LabelBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set option label diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/OptionBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/OptionBuilder.php index 854ea099da7814e1be0fa8d8c30ff0364eddc2f7..e6c3851de0aa17f6a4f7d1b5821710bae36c1d89 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/OptionBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/OptionBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; * * @codeCoverageIgnore */ -class OptionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class OptionBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set option label diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabel.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabel.php index 4a04d359f5a6ae2f07fa27dd1bce2b0a98876a2b..5efbbc83029ff3a6b45ac2024ef8d9d532230137 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabel.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabel.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Product\Attribute; * @package Magento\Catalog\Service\V1\Data\Eav\Product\Attribute * @codeCoverageIgnore */ -class FrontendLabel extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class FrontendLabel extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Constants used as keys into $_data diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabelBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabelBuilder.php index dd8b393b1258fdcacac230c11e1f316493b7df2f..5c1fa0da7bdd5126ecc62eb63580c1a0e5fddcc8 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabelBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/FrontendLabelBuilder.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Product\Attribute; * @package Magento\Catalog\Service\V1\Data\Eav\Product\Attribute * @codeCoverageIgnore */ -class FrontendLabelBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class FrontendLabelBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set store id value diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/Type.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/Type.php index 13f1c38274f6c8de30f871198ef4d0ce8a0043c5..33d9aff9c6f5fa257ccf67c5d908ecab617e6771 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/Type.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/Type.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Product\Attribute; * @package Magento\Catalog\Service\V1\Data\Eav\Product\Attribute * @codeCoverageIgnore */ -class Type extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Type extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Constants used as keys into $_data diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/TypeBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/TypeBuilder.php index 233616b0ec07d25231826fe877e45bdbeb8f3231..f38bb1868850d31e2bf29fd00c6cdb119252cf3e 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/TypeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Product/Attribute/TypeBuilder.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav\Product\Attribute; * @package Magento\Catalog\Service\V1\Data\Eav\Product\Attribute * @codeCoverageIgnore */ -class TypeBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class TypeBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set option label diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRule.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRule.php index 265b19057e9423354f9d6abc2fdf3255ac1b4357..0fad8ac8140ad65bf0c29b85e8de9785444c0db1 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRule.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRule.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; /** * @codeCoverageIgnore */ -class ValidationRule extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class ValidationRule extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Constants used as keys into $_data diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRuleBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRuleBuilder.php index 63f299fa2b950533cd5325b731cc0df733f656d7..54ab5d63ecb8ee325e4b85a5d88840617d13dfd9 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRuleBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/ValidationRuleBuilder.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; /** * @codeCoverageIgnore */ -class ValidationRuleBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ValidationRuleBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set validation rule name diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product.php b/app/code/Magento/Catalog/Service/V1/Data/Product.php index 5590880ffac83b6e00a1948203862cb747f86acd..cd22db48b77e5da33882787b3125be59667c79e2 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Data; /** * @codeCoverageIgnore */ -class Product extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Product extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResults.php b/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResults.php index bf20f550096030bbcf9edffce3231f5e6d00eea1..e3d9a8530066e739731fe542d47aa20e46e97e49 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResults.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResults.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Data\Product\Attribute; * * @codeCoverageIgnore */ -class SearchResults extends \Magento\Framework\Service\V1\Data\SearchResults +class SearchResults extends \Magento\Framework\Api\SearchResults { /** * Get items diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResultsBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResultsBuilder.php index 86c79bda7f2f9b92ce7012e8e803810b3341d78a..3d00f39f349e0b14ec8aee66553262482a2a1e54 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResultsBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/Attribute/SearchResultsBuilder.php @@ -25,10 +25,10 @@ namespace Magento\Catalog\Service\V1\Data\Product\Attribute; use Magento\Catalog\Service\V1\Data\Eav\AttributeBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; /** * Builder for the SearchResults Service Data Object @@ -36,7 +36,7 @@ use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; * @method \Magento\Catalog\Service\V1\Data\Product\Attribute\SearchResults create() * @codeCoverageIgnore */ -class SearchResultsBuilder extends \Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder +class SearchResultsBuilder extends \Magento\Framework\Api\AbstractSearchResultsBuilder { /** * Constructor diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPrice.php b/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPrice.php index 9ffeebbadcf279a2936441ff7f557b1dcafec4ce..da2036c621d2b253093409dc0580e23b5c43bc60 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPrice.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPrice.php @@ -24,7 +24,7 @@ */ namespace Magento\Catalog\Service\V1\Data\Product; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPriceBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPriceBuilder.php index f025577451cb58bbf8c1d920acb26ba2b9ecdf7e..3b74591fa45ae2ecfa027d081c157c370777758d 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPriceBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/GroupPriceBuilder.php @@ -24,12 +24,12 @@ */ namespace Magento\Catalog\Service\V1\Data\Product; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class GroupPriceBuilder extends AbstractExtensibleObjectBuilder +class GroupPriceBuilder extends ExtensibleObjectBuilder { /** * Set customer group id diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResults.php b/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResults.php index 82d953376fa08d0480679fed33646ef92facf355..7cd52ee84fcfa3b0c4d0697b52b7abbadd3eccf9 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResults.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResults.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Data\Product; * * @codeCoverageIgnore */ -class SearchResults extends \Magento\Framework\Service\V1\Data\SearchResults +class SearchResults extends \Magento\Framework\Api\SearchResults { /** * Get items diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResultsBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResultsBuilder.php index 9d95dad05fb4f558b5ce299650ecf15f1655ad81..67ef9d794759a6da9c1068bcf291b5845c2666eb 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResultsBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/SearchResultsBuilder.php @@ -24,11 +24,11 @@ namespace Magento\Catalog\Service\V1\Data\Product; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\AbstractSearchResultsBuilder; use Magento\Catalog\Service\V1\Data\ProductBuilder; /** diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/TierPrice.php b/app/code/Magento/Catalog/Service/V1/Data/Product/TierPrice.php index 411a2ebce6a178d0e82e10101d13faa4d94d041c..948b8af2128be95495ac2bf2752032b5cd65aa77 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/TierPrice.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/TierPrice.php @@ -24,7 +24,7 @@ */ namespace Magento\Catalog\Service\V1\Data\Product; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Data/Product/TierPriceBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/Product/TierPriceBuilder.php index 9a96025e5ee58c15da4240ad3014f20e4450e1a8..f9d933d0f7e1c24afcaec4d6ea0943feba04bc75 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/Product/TierPriceBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/Product/TierPriceBuilder.php @@ -24,12 +24,12 @@ */ namespace Magento\Catalog\Service\V1\Data\Product; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class TierPriceBuilder extends AbstractExtensibleObjectBuilder +class TierPriceBuilder extends ExtensibleObjectBuilder { /** * Set Quantity diff --git a/app/code/Magento/Catalog/Service/V1/Data/ProductBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/ProductBuilder.php index c9d9eed7a824944349d5dfebae14ca4057cf4d15..f1f7977c173d061a9e6c363effce5dad3dfcfc61 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/ProductBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/ProductBuilder.php @@ -24,20 +24,20 @@ namespace Magento\Catalog\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * @codeCoverageIgnore */ -class ProductBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ProductBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param \Magento\Catalog\Service\V1\Product\MetadataServiceInterface $metadataService */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, \Magento\Catalog\Service\V1\Product\MetadataServiceInterface $metadataService ) { diff --git a/app/code/Magento/Catalog/Service/V1/Data/ProductMapper.php b/app/code/Magento/Catalog/Service/V1/Data/ProductMapper.php index 77d992841d07cd2b74e6b5e0cb7747e1a2281339..034f6db876c0e2d5ad962d748af2d8b433b7819e 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/ProductMapper.php +++ b/app/code/Magento/Catalog/Service/V1/Data/ProductMapper.php @@ -23,7 +23,7 @@ */ namespace Magento\Catalog\Service\V1\Data; -use \Magento\Framework\Service\ExtensibleDataObjectConverter; +use \Magento\Framework\Api\ExtensibleDataObjectConverter; class ProductMapper { diff --git a/app/code/Magento/Catalog/Service/V1/Data/ProductType.php b/app/code/Magento/Catalog/Service/V1/Data/ProductType.php index ee91af0418d4574c965967d8592def80a6668f8e..47f458447df85e018359e52a183d3a44cae4d1be 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/ProductType.php +++ b/app/code/Magento/Catalog/Service/V1/Data/ProductType.php @@ -25,7 +25,7 @@ */ namespace Magento\Catalog\Service\V1\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Data/ProductTypeBuilder.php b/app/code/Magento/Catalog/Service/V1/Data/ProductTypeBuilder.php index 22267af754e030006c34f42cdff75e9483a41505..3663f147deeb92352f3cb454286e46cb96a9bd8c 100644 --- a/app/code/Magento/Catalog/Service/V1/Data/ProductTypeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Data/ProductTypeBuilder.php @@ -25,12 +25,12 @@ */ namespace Magento\Catalog\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class ProductTypeBuilder extends AbstractExtensibleObjectBuilder +class ProductTypeBuilder extends ExtensibleObjectBuilder { /** * Set product type name diff --git a/app/code/Magento/Catalog/Service/V1/MetadataService.php b/app/code/Magento/Catalog/Service/V1/MetadataService.php index 6e0429f3ea6dcb9e181889eabd8f1d6e93ca5a0e..f9ee4c10ada4e3d9c46a71368580c860700e2f3f 100644 --- a/app/code/Magento/Catalog/Service/V1/MetadataService.php +++ b/app/code/Magento/Catalog/Service/V1/MetadataService.php @@ -28,9 +28,9 @@ use Magento\Eav\Model\Resource\Entity\Attribute\Collection; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Catalog\Service\V1\Data\Eav\AttributeMetadata; use Magento\Catalog\Service\V1\Data\Eav\Product\Attribute\FrontendLabel; -use Magento\Framework\Service\V1\Data\Search\FilterGroup; -use Magento\Framework\Service\V1\Data\SearchCriteria; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SortOrder; /** * Class MetadataService @@ -241,7 +241,7 @@ class MetadataService implements MetadataServiceInterface /** * Helper function that adds a FilterGroup to the collection. * - * @param \Magento\Framework\Service\V1\Data\Search\FilterGroup $filterGroup + * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup * @param \Magento\Eav\Model\Resource\Entity\Attribute\Collection $collection * @return void * @throws \Magento\Framework\Exception\InputException diff --git a/app/code/Magento/Catalog/Service/V1/MetadataServiceInterface.php b/app/code/Magento/Catalog/Service/V1/MetadataServiceInterface.php index 176d8c0359aca9777977612a2a2c513656db339c..4137f899c697177091e5627c1564e74102256af7 100644 --- a/app/code/Magento/Catalog/Service/V1/MetadataServiceInterface.php +++ b/app/code/Magento/Catalog/Service/V1/MetadataServiceInterface.php @@ -24,8 +24,8 @@ namespace Magento\Catalog\Service\V1; use Magento\Catalog\Service\V1\Data\Eav\AttributeMetadata; -use Magento\Framework\Service\V1\Data\SearchCriteria; -use Magento\Framework\Service\V1\Data\SearchResults; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchResults; /** * Class MetadataServiceInterface diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntry.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntry.php index 9e9bf884f0450b1b58f3ff0169c308363f1e4749..526805353c8db445e4268d7ebcf408afe8a6f2ff 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntry.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntry.php @@ -25,7 +25,7 @@ */ namespace Magento\Catalog\Service\V1\Product\Attribute\Media\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryBuilder.php index bc87b1b7763f5e4813b949d5416a407a87252360..0e415da677d7991063d3368527dde6c3cde2afaa 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryBuilder.php @@ -25,12 +25,12 @@ */ namespace Magento\Catalog\Service\V1\Product\Attribute\Media\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class GalleryEntryBuilder extends AbstractExtensibleObjectBuilder +class GalleryEntryBuilder extends ExtensibleObjectBuilder { /** * Set gallery entity ID diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContent.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContent.php index f99accf31caebce8380d57406f400971a6820ec7..b1a04226e4aedc03406dd5a4ccba255c727bebf3 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContent.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContent.php @@ -25,7 +25,7 @@ */ namespace Magento\Catalog\Service\V1\Product\Attribute\Media\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContentBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContentBuilder.php index 564694564a949618f885cdea8882050e73d4a0b5..c255cadeb1ba3211530acf68444f20c25e781b68 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContentBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/GalleryEntryContentBuilder.php @@ -25,12 +25,12 @@ */ namespace Magento\Catalog\Service\V1\Product\Attribute\Media\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class GalleryEntryContentBuilder extends AbstractExtensibleObjectBuilder +class GalleryEntryContentBuilder extends ExtensibleObjectBuilder { /** * Set media data (base64 encoded content) diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImage.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImage.php index 9a521b5c5e4a225525399d0da693f64394ff62f9..dfb0bfdabe5f5d604826c626cb53ea1c18eb03c3 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImage.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImage.php @@ -28,7 +28,7 @@ namespace Magento\Catalog\Service\V1\Product\Attribute\Media\Data; * * @codeCoverageIgnore */ -class MediaImage extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class MediaImage extends \Magento\Framework\Api\AbstractExtensibleObject { const CODE = 'code'; diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImageBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImageBuilder.php index cbdfb89f2076c2edef1c890d622449110d0f5a72..20a5f362257f803b453a3cb1828be89478586418 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImageBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/Data/MediaImageBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Catalog\Service\V1\Product\Attribute\Media\Data; * * @codeCoverageIgnore */ -class MediaImageBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class MediaImageBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set attribute code diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadService.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadService.php index c6940527c6856065f7593194b11f809205226bf1..0b837838d2c659bfe7f96f0864870e77a14379a4 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadService.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadService.php @@ -94,7 +94,7 @@ class ReadService implements ReadServiceInterface /** * {@inheritdoc} */ - public function search(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria) + public function search(\Magento\Framework\Api\SearchCriteria $searchCriteria) { return $this->metadataService->getAllAttributeMetadata( ProductMetadataServiceInterface::ENTITY_TYPE, diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceInterface.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceInterface.php index c9e17e77c1628ed45b62df3be28c4eff0c1aab78..7af415f863a52b0149ec386fb61371720ab0369e 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceInterface.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceInterface.php @@ -49,8 +49,8 @@ interface ReadServiceInterface /** * Retrieve the list of product attributes * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Catalog\Service\V1\Data\Product\Attribute\SearchResults containing Data\Eav\Attribute objects */ - public function search(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function search(\Magento\Framework\Api\SearchCriteria $searchCriteria); } diff --git a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option.php b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option.php index 4e023813289a59dcfefd0bb7daf2e057ddf846e0..cbd06da93bee7a2fd00aa036eef12d63df1f9b3e 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option.php +++ b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Service\V1\Product\CustomOptions\Data; /** * @codeCoverageIgnore */ -class Option extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Option extends \Magento\Framework\Api\AbstractExtensibleObject { const OPTION_ID = 'option_id'; const TITLE = 'title'; diff --git a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata.php b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata.php index 6f50f3adbb0c81623cdd704cbb616a3ad7f74fe7..8cf6d86e2bb198c4567531ab8d9c498d69ec01bd 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata.php +++ b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Service\V1\Product\CustomOptions\Data\Option; /** * @codeCoverageIgnore */ -class Metadata extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Metadata extends \Magento\Framework\Api\AbstractExtensibleObject { const PRICE = 'price'; const PRICE_TYPE = 'price_type'; diff --git a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/MetadataBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/MetadataBuilder.php index 85112474ff57db9657d4c93324233f729fff0ca3..d11d9083256c9f72e5f0b25d3b697cfa7a3b5cdb 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/MetadataBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/MetadataBuilder.php @@ -24,12 +24,12 @@ namespace Magento\Catalog\Service\V1\Product\CustomOptions\Data\Option; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * @codeCoverageIgnore */ -class MetadataBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class MetadataBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @var string[] @@ -45,15 +45,15 @@ class MetadataBuilder extends \Magento\Framework\Service\Data\AbstractExtensible ]; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder - * @param \Magento\Framework\Service\Config\MetadataConfig $metadataService + * @param \Magento\Framework\Api\Config\MetadataConfig $metadataService * @param array $customAttributeCodes */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, - \Magento\Framework\Service\Config\MetadataConfig $metadataService, + \Magento\Framework\Api\Config\MetadataConfig $metadataService, array $customAttributeCodes = array() ) { parent::__construct($objectFactory, $valueBuilder, $metadataService); diff --git a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionBuilder.php index bdf1a1da447a8f96f237dfd6877ec21629403547..a66eb1c646733a461a74fb8e2b1fd14ed34b2c56 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionBuilder.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Service\V1\Product\CustomOptions\Data; /** * @codeCoverageIgnore */ -class OptionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class OptionBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set option id diff --git a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionType.php b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionType.php index b6492c11620782c64615e02b8ad918b568f988ad..46b542b96cad0b4da33f4a14c4c8bda71e35f0d2 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionType.php +++ b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionType.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Service\V1\Product\CustomOptions\Data; /** * @codeCoverageIgnore */ -class OptionType extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class OptionType extends \Magento\Framework\Api\AbstractExtensibleObject { const LABEL = 'label'; const CODE = 'code'; diff --git a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionTypeBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionTypeBuilder.php index 131f1848a89a4880199b8c5fedf8cf49cfe9e348..9d0d4b75efd211dbdff79a4f9eaa61d44a643828 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionTypeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/CustomOptions/Data/OptionTypeBuilder.php @@ -27,7 +27,7 @@ namespace Magento\Catalog\Service\V1\Product\CustomOptions\Data; /** * @codeCoverageIgnore */ -class OptionTypeBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class OptionTypeBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set option type label diff --git a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttribute.php b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttribute.php index 4d7d318f044a69f5abf36d6ddb62184579c4bd74..33809b9a546c35f6d6d45a3ab9215b453f90a15b 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttribute.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttribute.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Product\Link\Data; * * @codeCoverageIgnore */ -class LinkAttribute extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class LinkAttribute extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants for Data Object keys diff --git a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttributeBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttributeBuilder.php index 39972be2a78ff7aab3fe9f4d158ec23f4a0ff6eb..dbd586280b3b286502b56b05fc0e0fc8f45c3bc2 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttributeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkAttributeBuilder.php @@ -30,7 +30,7 @@ namespace Magento\Catalog\Service\V1\Product\Link\Data; * @method LinkAttribute create() * @codeCoverageIgnore */ -class LinkAttributeBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class LinkAttributeBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set attribute code diff --git a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkType.php b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkType.php index 3505e7d44ac4a0d112e08cd515b6bc9e69332c2c..89d9d939f7d0b43f9033f2d78e60544de409ef19 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkType.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkType.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Product\Link\Data; * * @codeCoverageIgnore */ -class LinkType extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class LinkType extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants for Data Object keys diff --git a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkTypeBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkTypeBuilder.php index cddc0c785f6317e89635865465b378885bd67410..72707d51958648003036fa61b37f9fcdc1ad44b0 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkTypeBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/LinkTypeBuilder.php @@ -30,7 +30,7 @@ namespace Magento\Catalog\Service\V1\Product\Link\Data; * @method LinkType create() * @codeCoverageIgnore */ -class LinkTypeBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class LinkTypeBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set type diff --git a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLink.php b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLink.php index d2ee5181ddd3349ba92f98afcdd7ad6c42847048..8af117306112807e776439249b5780467e01f127 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLink.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLink.php @@ -29,7 +29,7 @@ namespace Magento\Catalog\Service\V1\Product\Link\Data; * * @codeCoverageIgnore */ -class ProductLink extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class ProductLink extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants for Data Object keys diff --git a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLinkBuilder.php b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLinkBuilder.php index 4cb3781d1b43f5f412dba40e77598cd950c4122a..f74eecf46457d4c73b113e3c508578a204c6d995 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLinkBuilder.php +++ b/app/code/Magento/Catalog/Service/V1/Product/Link/Data/ProductLinkBuilder.php @@ -24,7 +24,7 @@ namespace Magento\Catalog\Service\V1\Product\Link\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * Builder for the ProductLink Service Data Object @@ -32,7 +32,7 @@ use Magento\Framework\Service\Data\AttributeValueBuilder; * @method ProductLink create() * @codeCoverageIgnore */ -class ProductLinkBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ProductLinkBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @var array @@ -40,21 +40,21 @@ class ProductLinkBuilder extends \Magento\Framework\Service\Data\AbstractExtensi protected $customAttributes = []; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder - * @param \Magento\Framework\Service\Config\MetadataConfig $metadataService + * @param \Magento\Framework\Api\Config\MetadataConfig $metadataService * @param array $customAttributesCodes */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, - \Magento\Framework\Service\Config\MetadataConfig $metadataService, + \Magento\Framework\Api\Config\MetadataConfig $metadataService, array $customAttributesCodes = array() ) { $this->customAttributes = $customAttributesCodes; parent::__construct($objectFactory, $valueBuilder, $metadataService); } - + /** * Set type * diff --git a/app/code/Magento/Catalog/Service/V1/Product/MetadataService.php b/app/code/Magento/Catalog/Service/V1/Product/MetadataService.php index 4f6760add2ea76df81ee53fc69ce0312048038cd..0913cec277f5983f9858df7242d947a3b0036aa4 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/MetadataService.php +++ b/app/code/Magento/Catalog/Service/V1/Product/MetadataService.php @@ -24,7 +24,7 @@ namespace Magento\Catalog\Service\V1\Product; use Magento\Catalog\Service\V1\Data\Eav\AttributeMetadata; -use Magento\Framework\Service\Config\MetadataConfig; +use Magento\Framework\Api\Config\MetadataConfig; /** * Class AttributeMetadataService @@ -35,12 +35,12 @@ class MetadataService implements MetadataServiceInterface protected $metadataService; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ private $searchCriteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ private $filterBuilder; @@ -53,14 +53,14 @@ class MetadataService implements MetadataServiceInterface * Initialize dependencies. * * @param \Magento\Catalog\Service\V1\MetadataServiceInterface $metadataService - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder * @param MetadataConfig $metadataConfig */ public function __construct( \Magento\Catalog\Service\V1\MetadataServiceInterface $metadataService, - \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder, - \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder, + \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, + \Magento\Framework\Api\FilterBuilder $filterBuilder, MetadataConfig $metadataConfig ) { $this->metadataService = $metadataService; @@ -89,7 +89,7 @@ class MetadataService implements MetadataServiceInterface */ public function getProductAttributesMetadata($attributeSetId = self::DEFAULT_ATTRIBUTE_SET_ID) { - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteria */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteria */ $this->searchCriteriaBuilder->addFilter( [ $this->filterBuilder diff --git a/app/code/Magento/Catalog/Service/V1/Product/MetadataServiceInterface.php b/app/code/Magento/Catalog/Service/V1/Product/MetadataServiceInterface.php index 856262034bc5b26213d7db9fd7c2e638aa07dbaa..ad2ecd32ed96dd3b5aaff5e2e1dbcc8594539528 100644 --- a/app/code/Magento/Catalog/Service/V1/Product/MetadataServiceInterface.php +++ b/app/code/Magento/Catalog/Service/V1/Product/MetadataServiceInterface.php @@ -26,7 +26,7 @@ namespace Magento\Catalog\Service\V1\Product; /** * Class Product MetadataServiceInterface */ -interface MetadataServiceInterface extends \Magento\Framework\Service\Data\MetadataServiceInterface +interface MetadataServiceInterface extends \Magento\Framework\Api\MetadataServiceInterface { /**#@+ * Predefined constants diff --git a/app/code/Magento/Catalog/Service/V1/ProductService.php b/app/code/Magento/Catalog/Service/V1/ProductService.php index 839ca2fc5894712cc9b03783290d8dfac2324ff1..6f253cd2fe685b2ab62c2fe3c73f5fa8c7bd6b98 100644 --- a/app/code/Magento/Catalog/Service/V1/ProductService.php +++ b/app/code/Magento/Catalog/Service/V1/ProductService.php @@ -25,12 +25,12 @@ namespace Magento\Catalog\Service\V1; use Magento\Catalog\Controller\Adminhtml\Product; use Magento\Catalog\Service\V1\Data\Converter; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; use Magento\Catalog\Service\V1\Data\Product as ProductData; -use Magento\Framework\Service\V1\Data\Search\FilterGroup; +use Magento\Framework\Api\Search\FilterGroup; use Magento\Catalog\Model\Resource\Product\Collection; use Magento\Catalog\Service\V1\Product\MetadataServiceInterface as ProductMetadataServiceInterface; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\SortOrder; /** * Class ProductService diff --git a/app/code/Magento/Catalog/Service/V1/ProductServiceInterface.php b/app/code/Magento/Catalog/Service/V1/ProductServiceInterface.php index 5d44ee353e3de71d00312b6629714ef9991ea4c1..b5336b43e6c0dc7fd3737f9584e255a902ba1607 100644 --- a/app/code/Magento/Catalog/Service/V1/ProductServiceInterface.php +++ b/app/code/Magento/Catalog/Service/V1/ProductServiceInterface.php @@ -74,8 +74,8 @@ interface ProductServiceInterface /** * Get product list * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Catalog\Service\V1\Data\Product\SearchResults containing Data\Product objects */ - public function search(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function search(\Magento\Framework\Api\SearchCriteria $searchCriteria); } diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json index 89194dacc1fd8895a012948ddcb70a5d1999da34..079a2c5188483843f7590bfbdf0e3ceb30dc868b 100644 --- a/app/code/Magento/Catalog/composer.json +++ b/app/code/Magento/Catalog/composer.json @@ -3,33 +3,33 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-indexer": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-log": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-widget": "0.1.0-alpha102", - "magento/module-wishlist": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-msrp": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-catalog-rule": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-product-alert": "0.1.0-alpha102", - "magento/module-url-rewrite": "0.1.0-alpha102", - "magento/module-catalog-url-rewrite": "0.1.0-alpha102", - "magento/module-page-cache": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-indexer": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-log": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-widget": "0.1.0-alpha103", + "magento/module-wishlist": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-msrp": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-catalog-rule": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-product-alert": "0.1.0-alpha103", + "magento/module-url-rewrite": "0.1.0-alpha103", + "magento/module-catalog-url-rewrite": "0.1.0-alpha103", + "magento/module-page-cache": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.1-1.6.0.0.2.php b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.1-1.6.0.0.2.php index 9d77cc7d9166ffdcdf6340ecb0c6800dc4952744..ec040bd6b70bb9b37b8a551cb48efd6259560fd4 100644 --- a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.1-1.6.0.0.2.php +++ b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.1-1.6.0.0.2.php @@ -22,6 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** @var $installer \Magento\Catalog\Model\Resource\Setup */ $installer = $this; $installer->addAttribute( \Magento\Catalog\Model\Product::ENTITY, diff --git a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.13-1.6.0.0.14.php b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.13-1.6.0.0.14.php index e321aa5608eead5fdb2c78958bc9fdc0aa475bf6..74639c8a0a55975cdb8ea07aa4635459ade587cb 100644 --- a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.13-1.6.0.0.14.php +++ b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.13-1.6.0.0.14.php @@ -21,6 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** @var $installer \Magento\Catalog\Model\Resource\Setup */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.16-1.6.0.0.17.php b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.16-1.6.0.0.17.php index 3addfce14852a1509ffbbd82297c80c333f09e4c..64e3753492211a7931d738c8653a42592eabe160 100644 --- a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.16-1.6.0.0.17.php +++ b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.16-1.6.0.0.17.php @@ -23,8 +23,6 @@ */ /** @var $this \Magento\Catalog\Model\Resource\Setup */ - -/** @var $installer \Magento\Framework\Module\Setup\Migration */ $installer = $this->createMigrationSetup(); $installer->startSetup(); diff --git a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.24-1.6.0.0.25.php b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.24-1.6.0.0.25.php index b468241f098c657a8effc51ae6ef4345083f2153..1202e785c6b07fd819befddbd7e62d29396db85f 100644 --- a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.24-1.6.0.0.25.php +++ b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.24-1.6.0.0.25.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Catalog\Model\Resource\Setup $this */ +/** @var $this \Magento\Catalog\Model\Resource\Setup */ $this->updateAttribute( \Magento\Catalog\Model\Product::ENTITY, 'status', diff --git a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.28-1.6.0.0.29.php b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.28-1.6.0.0.29.php index 7c64beec9686da6830729a1197b126c6f42c26e1..e3fd6521cb6ba3ff8c7e6b8d24bbd2d0e363ef5c 100644 --- a/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.28-1.6.0.0.29.php +++ b/app/code/Magento/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.28-1.6.0.0.29.php @@ -21,6 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** @var $this \Magento\Catalog\Model\Resource\Setup */ $oldTabName = 'Search Optimization'; $newTabName = 'Search Engine Optimization'; diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml index 7c56db0754c112ddfb9a633889a4a9b91892907a..3ee2a5e3df8b37ecdb2f3d2a490c215c7f21a5eb 100644 --- a/app/code/Magento/Catalog/etc/di.xml +++ b/app/code/Magento/Catalog/etc/di.xml @@ -451,7 +451,7 @@ </argument> </arguments> </type> - <virtualType name="Magento\Catalog\Service\Config\ProductMetadataConfig" type="Magento\Framework\Service\Config\MetadataConfig"> + <virtualType name="Magento\Catalog\Service\Config\ProductMetadataConfig" type="Magento\Framework\Api\Config\MetadataConfig"> <arguments> <argument name="attributeMetadataBuilder" xsi:type="object">Magento\Catalog\Service\V1\Data\Eav\AttributeMetadataBuilder</argument> </arguments> @@ -462,7 +462,7 @@ <argument name="metadataConfig" xsi:type="object">Magento\Catalog\Service\Config\ProductMetadataConfig</argument> </arguments> </type> - <virtualType name="Magento\Catalog\Service\Config\CategoryMetadataConfig" type="Magento\Framework\Service\Config\MetadataConfig"> + <virtualType name="Magento\Catalog\Service\Config\CategoryMetadataConfig" type="Magento\Framework\Api\Config\MetadataConfig"> <arguments> <argument name="attributeMetadataBuilder" xsi:type="object">Magento\Catalog\Service\V1\Data\Eav\AttributeMetadataBuilder</argument> </arguments> diff --git a/app/code/Magento/Catalog/sql/catalog_setup/install-1.6.0.0.0.php b/app/code/Magento/Catalog/sql/catalog_setup/install-1.6.0.0.0.php index f72a40e876802852e8db6ee5190866d6988a5e22..faf56feb30d4189d923a5a05ee3f952d6401041f 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/install-1.6.0.0.0.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/install-1.6.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Catalog\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.11-1.6.0.0.12.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.11-1.6.0.0.12.php index 53e55512a95521aa9e549684b2f7ef1b06810c62..23e7f5ecd9744424040b31ab86d82851909f75fb 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.11-1.6.0.0.12.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.11-1.6.0.0.12.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $indexFields = array('website_id', 'customer_group_id', 'min_price'); $installer->getConnection()->addIndex( diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php index 3c4bc11bd86e87f801b7151d78120a243cb3996a..ef3572333cb6c96da74acc15001fbbcf0909132a 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php @@ -22,6 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $tableName = $installer->getTable('catalog_product_index_eav_decimal'); $indexName = $installer->getConnection()->getPrimaryKeyName($tableName); diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.25-1.6.0.0.26.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.25-1.6.0.0.26.php index 3821233d4891771b19250a94f3b93b4569450dc4..fe4401d846063368d5ec3886a1f831ce37115b41 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.25-1.6.0.0.26.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.25-1.6.0.0.26.php @@ -22,10 +22,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */ +/** @var $this \Magento\Setup\Module\SetupModule */ $connection = $this->getConnection(); -/** @var \Magento\Catalog\Model\Resource\Setup $this */ $connection->dropForeignKey( $this->getTable('catalog_category_product_index'), $this->getFkName('catalog_category_product_index', 'category_id', 'catalog_category_entity', 'entity_id') diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.26-1.6.0.0.27.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.26-1.6.0.0.27.php index ee142dd7d99904ddf78eb87cc06c8acc9cf83044..d96ff3e253e5cecdeac547d06c9b0febc015a3ab 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.26-1.6.0.0.27.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.26-1.6.0.0.27.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Eav\Model\Entity\Setup */ +/** @var $this \Magento\Setup\Module\SetupModule */ $this->startSetup(); diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.27-1.6.0.0.28.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.27-1.6.0.0.28.php index 1ca835e240afae14c33a0313150cbe364fd1f61b..2c6b5eaf8ef8e0ec23508c81de980c7a4958b667 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.27-1.6.0.0.28.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.27-1.6.0.0.28.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Catalog\Model\Resource\Setup */ +/** @var $this \Magento\Setup\Module\SetupModule */ $this->getConnection()->addColumn( $this->getTable('catalog_eav_attribute'), 'is_required_in_admin_store', diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php index 850501e9ad029507f37fec8e06161d221e9c9579..03e31c841eac90e44a3d54824d83f9069c67dfe2 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php @@ -22,8 +22,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ + $installer->getConnection()->modifyColumn( $installer->getTable('catalog_category_product_index'), 'position', diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php index 12ba10f88ad873b02559dc19b8f3e4d615303be3..ce665c866361724f2588a9a503c8277210277861 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php index cf82005f2b4b79aa9def64bc96c418f60cf44d7e..0eafd3ea2c44fcd797fa01a8517fa3e0dfb144b7 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.8-1.6.0.0.9.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.8-1.6.0.0.9.php index 15426e897850ba0dbfe1706a48edbf1a7646dcd2..c0f00870705a91b6b7bc88f32c89846a3066f5c7 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.8-1.6.0.0.9.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.8-1.6.0.0.9.php @@ -22,10 +22,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/** @var $connection \Magento\Framework\DB\Adapter\Pdo\Mysql */ $connection = $installer->getConnection(); $memoryTables = array( 'catalog_category_anc_categs_index_tmp', diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php index fbefe27b35c84a3526af2586f6e3f8094a4f15bd..5822843b1292412f76b7be2b9f00a66bf7999fcf 100644 --- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php +++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Catalog/view/adminhtml/web/catalog/category-selector.css b/app/code/Magento/Catalog/view/adminhtml/web/catalog/category-selector.css index 523e983f91394bcf03529f012d963c4fe0ab29da..ab81222f5d3c20b856c35ae8fd86e19433356df7 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/catalog/category-selector.css +++ b/app/code/Magento/Catalog/view/adminhtml/web/catalog/category-selector.css @@ -71,10 +71,6 @@ border: none; } -.mage-suggest-search-label input:focus { - outline: 0; -} - /* Category Selector in "Create New Category" popup */ .mage-new-category-dialog .mage-suggest { border: none; @@ -132,7 +128,6 @@ width: 100%; height: 22px; line-height: 22px; - outline: 0 none; border: 0 none; box-shadow: none; padding: 0 3px; diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml index 3e99f4be3b11c53dc2b06c3b385594e843fd2793..6777ea5d4187286f63a018fa46a2879c801d4225 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml @@ -25,16 +25,21 @@ <?php /** @var \Magento\Framework\Pricing\Render\Amount $this */ ?> -<span class="price-container <?php echo $this->getAdjustmentCssClasses() ?>"> +<span class="price-container <?php echo $this->getAdjustmentCssClasses() ?>" + <?php echo $this->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>> <?php if ($this->getDisplayLabel()): ?> <span class="price-label"><?php echo $this->getDisplayLabel(); ?></span> <?php endif; ?> <span<?php if ($this->getPriceId()): ?> id="<?php echo $this->getPriceId() ?>"<?php endif;?> <?php echo ($this->getPriceDisplayLabel()) ? 'data-label="' . $this->getPriceDisplayLabel() . $this->getPriceDisplayInclExclTaxes() . '"' : '' ?> - class="price-wrapper <?php echo $this->getPriceWrapperCss(); ?>"> + class="price-wrapper <?php echo $this->getPriceWrapperCss(); ?>" + <?php echo $this->getSchema() ? ' itemprop="price"' : '' ?>> <?php echo $this->convertAndFormatCurrency($this->getDisplayValue(), (bool)$this->getIncludeContainer()) ?> </span> <?php if ($this->hasAdjustmentsHtml()): ?> <?php echo $this->getAdjustmentsHtml() ?> <?php endif; ?> + <?php if ($this->getSchema()): ?> + <meta itemprop="priceCurrency" content="<?php echo $this->getDisplayCurrencyCode()?>" /> + <?php endif; ?> </span> diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/configured_price.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/configured_price.phtml index e18efbf504c7a3b0e00d1463ea8a64b7fb910e53..17f67976e3f5bed5632f4c03ef99bbbfcdcffbd2 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/configured_price.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/configured_price.phtml @@ -26,14 +26,16 @@ /** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $this */ /** @var \Magento\Catalog\Pricing\Price\ConfiguredPrice $configuredPrice */ $configuredPrice = $this->getPrice(); -$priceLabel = ($this->getPriceLabel() !== null) - ? $this->getPriceLabel() - : __('Price as configured'); +$schema = ($this->getZone() == 'item_view') ? true : false; +$priceLabel = ($this->getPriceLabel() !== null) + ? $this->getPriceLabel() + : __('Price as configured'); ?> <p class="price-as-configured"> <?php echo $this->renderAmount($configuredPrice->getAmount(), [ 'display_label' => $priceLabel, 'price_id' => $this->getPriceId('product-price-'), - 'include_container' => false + 'include_container' => false, + 'schema' => $schema ]); ?> </p> diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml index 798e8f8eb615647c9bdc6d68b1cf5ccd8028e481..9c496eae89382dde0ff509e19f25b8782799d516 100644 --- a/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml +++ b/app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml @@ -34,13 +34,15 @@ $priceModel = $this->getPriceType('regular_price'); /** @var \Magento\Catalog\Pricing\Price\FinalPrice $finalPriceModel */ $finalPriceModel = $this->getPriceType('final_price'); $idSuffix = $this->getIdSuffix() ? $this->getIdSuffix() : ''; +$schema = ($this->getZone() == 'item_view') ? true : false; ?> <?php if ($this->hasSpecialPrice()): ?> <span class="special-price"> <?php echo $this->renderAmount($finalPriceModel->getAmount(), [ 'display_label' => __('Special Price'), 'price_id' => $this->getPriceId('product-price-' . $idSuffix), - 'include_container' => true + 'include_container' => true, + 'schema' => $schema ]); ?> </span> <span class="old-price"> @@ -54,7 +56,8 @@ $idSuffix = $this->getIdSuffix() ? $this->getIdSuffix() : ''; <?php else: ?> <?php echo $this->renderAmount($finalPriceModel->getAmount(), [ 'price_id' => $this->getPriceId('product-price-' . $idSuffix), - 'include_container' => true + 'include_container' => true, + 'schema' => $schema ]); ?> <?php endif; ?> diff --git a/app/code/Magento/Install/view/install/layout/install_wizard_config.xml b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_opengraph.xml similarity index 68% rename from app/code/Magento/Install/view/install/layout/install_wizard_config.xml rename to app/code/Magento/Catalog/view/frontend/layout/catalog_product_opengraph.xml index 569bfd08bf5dc6a02a0d3fa030907e73a7120514..a9058b5334d04db9e455c3477934826315a7c835 100644 --- a/app/code/Magento/Install/view/install/layout/install_wizard_config.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_opengraph.xml @@ -24,16 +24,14 @@ */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> + <head> + <attribute name="prefix" value="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# product: http://ogp.me/ns/product#" /> + </head> <body> - <referenceBlock name="database"> - <action method="setTemplate"> - <argument name="template" xsi:type="string">db/main.phtml</argument> - </action> - <action method="addDatabaseBlock"> - <argument name="type" xsi:type="string">mysql4</argument> - <argument name="block" xsi:type="string">Magento\Install\Block\Db\Type\Mysql4</argument> - <argument name="template" xsi:type="string">db/mysql4.phtml</argument> - </action> + <referenceBlock name="head.additional"> + <block class="Magento\Catalog\Block\Product\View" name="opengraph.general" template="Magento_Catalog::product/view/opengraph/general.phtml"> + <block class="Magento\Directory\Block\Currency" name="opengraph.currency" as="meta.currency" template="Magento_Catalog::product/view/opengraph/currency.phtml"/> + </block> </referenceBlock> </body> </page> diff --git a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml index 7e0cc292e608bb48263e80fa11b4cfffa1cf1e79..f8bdd5eb8ff56e1357a610a441559e24275ca488 100644 --- a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml @@ -23,12 +23,15 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> +<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <head> <css src="mage/gallery.css"/> </head> + <update handle="catalog_product_opengraph" /> <update handle="page_calendar"/> <body> + <attribute name="itemtype" value="http://schema.org/Product" /> + <attribute name="itemscope" value="itemscope"/> <referenceBlock name="head.components"> <block class="Magento\Framework\View\Element\Js\Components" name="checkout_page_head_components" template="Magento_Catalog::js/components.phtml"/> </referenceBlock> @@ -44,14 +47,13 @@ </arguments> </referenceBlock> <referenceContainer name="content"> - <container name="product.info.media" label="invisible" htmlTag="div" htmlClass="product media" before="-"> + <container name="product.info.media" htmlTag="div" htmlClass="product media" before="-"> <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image" template="product/view/base-image.phtml"> <block class="Magento\Catalog\Block\Product\Image" name="product.image.main"/> <block class="Magento\Catalog\Block\Product\Image" name="product.image.thumbs"/> </block> </container> - - <container name="product.info.main" label="invisible" htmlTag="div" htmlClass="product-info-main" after="product.info.media"> + <container name="product.info.main" htmlTag="div" htmlClass="product-info-main" after="product.info.media"> <block class="Magento\Catalog\Block\Product\View" name="product.info.review" template="product/view/review.phtml" before="-" /> <container name="product.info.price" label="Product info auxiliary container" htmlTag="div" htmlClass="product-info-price" after="product.info.review"> <block class="Magento\Catalog\Pricing\Render" name="product.price.final" after="product.info.sku"> @@ -62,7 +64,7 @@ </arguments> </block> <container name="product.info.stock.sku" label="Product auxiliary info" htmlTag="div" htmlClass="product-info-stock-sku"> - <container name="product.info.type" label="invisible" before="-"/> + <container name="product.info.type" before="-"/> <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.sku" template="product/view/attribute.phtml" after="product.info.type"> <arguments> <argument name="at_call" xsi:type="string">getSku</argument> @@ -83,7 +85,7 @@ </block> <container name="alert.urls" as="alert_urls" label="Alert Urls" after="product.price.tier"/> <block class="Magento\Catalog\Block\Product\View" name="product.info" template="product/view/form.phtml" after="alert.urls"> - <container name="product.info.form.content" label="invisible" as="product_info_form_content"> + <container name="product.info.form.content" as="product_info_form_content"> <block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart" as="addtocart" template="product/view/addtocart.phtml"/> </container> <block class="Magento\Framework\View\Element\Template" name="product.info.form.options" as="options_container"> @@ -119,7 +121,6 @@ </arguments> </block> </container> - <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.details" template="product/view/details.phtml" after="product.info.main"> <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" template="product/view/attribute.phtml" group="detailed_info"> <arguments> diff --git a/app/code/Magento/Catalog/view/frontend/layout/default.xml b/app/code/Magento/Catalog/view/frontend/layout/default.xml index 226caa2128efe8019ed2f0e36095f08eba038e51..d20b7c46b35200d6a9c6f05f5348e98c2ed3593d 100644 --- a/app/code/Magento/Catalog/view/frontend/layout/default.xml +++ b/app/code/Magento/Catalog/view/frontend/layout/default.xml @@ -34,5 +34,6 @@ <referenceContainer name="after.body.start"> <block class="Magento\Framework\View\Element\Js\Components" name="head.components" as="components" template="Magento_Catalog::js/components.phtml"/> </referenceContainer> + <block class="Magento\Framework\View\Element\Template" name="head.additional" as="head.additional" template="Magento_Theme::html/container.phtml"/> </body> </page> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml index 2a64f5a7dafbb7be1316df74b9d4d3ab1235a724..7a6d53099982a500e502582c98062d9313dc445e 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml @@ -85,9 +85,9 @@ </button> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> @@ -145,5 +145,5 @@ </table> </div> <?php else: ?> - <p class="empty"><?php echo __('You have no items to compare.') ?></p> + <div class="message info empty"><div><?php echo __('You have no items to compare.') ?></div></div> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml index 28fa39d52db85745e492e5812924116d6b765a74..55179dbc4edfbb336249a4812e318f822c17335e 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/sidebar.phtml @@ -28,16 +28,16 @@ $_helper = $this->helper('Magento\Catalog\Helper\Product\Compare'); $_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null; $count = $_helper->getItemCount(); ?> -<div class="block compare"> - <div class="title"> +<div class="block block-compare"> + <div class="block-title"> <strong><?php echo __('Compare Products') ?></strong> <?php if($count > 0): ?> <span class="counter qty"><?php echo ($count == 1) ? __('1 item') : __('%1 items',$count) ?></span> <?php endif; ?> </div> - <div class="content"> + <div class="block-content"> <?php if($_helper->getItemCount() > 0): ?> - <ol id="compare-items" class="items compare" + <ol id="compare-items" class="product-items product-items-names" data-mage-init='{"compareItems":{ "removeConfirmMessage":"<?php echo __("Are you sure you would like to remove this item from the compare products?") ?>", "removeSelector":"#compare-items a.action.delete", @@ -45,14 +45,15 @@ $count = $_helper->getItemCount(); "clearAllSelector":"#compare-clear-all" }}'> <?php foreach($_items as $_index => $_item): ?> - <li class="item"> + <li class="product-item"> <input type="hidden" class="compare-item-id" value="<?php echo $_item->getId() ?>"/> - <strong class="product name"> - <a href="<?php echo $this->getProductUrl($_item) ?>"> + <strong class="product-item-name"> + <a href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-link"> <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_item, $_item->getName(), 'name') ?> </a> </strong> <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?> + <a href="#" data-post='<?php echo $compareHelper->getPostDataRemove($_item); ?>' title="<?php echo __('Remove This Item') ?>" class="action delete"> @@ -71,7 +72,7 @@ $count = $_helper->getItemCount(); </div> </div> <?php else: ?> - <p class="empty"><?php echo __('You have no items to compare.') ?></p> - <?php endif; ?> + <div class="empty"><?php echo __('You have no items to compare.') ?></div> + <?php endif; ?> </div> </div> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index d8450ba684b7577fff45014ac68627217cdc90aa..37f48340ef42c34e7ee96b048d8f45172d4a31df 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -89,9 +89,9 @@ $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im </button> <?php else: ?> <?php if ($_product->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml index ad8d2c97953cac878890d816254ad968c32812bb..e37391c330f77e5d9e1103fae8f51c711c9f3b65 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml @@ -255,9 +255,9 @@ switch($type = $this->getType()) { <?php endif; ?> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml index 520640d501149841afd64ec326237e8a50f1bf2e..a5514ad5ebc2195bf8c671533f0997b52cfc9043 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar/limiter.phtml @@ -30,15 +30,19 @@ */ use \Magento\Catalog\Model\Product\ProductList\Toolbar; ?> -<div class="limiter"> - <strong class="limiter-label"><?php echo __('Show') ?></strong> - <select id="limiter" data-role="limiter" class="limiter-options"> - <?php foreach ($this->getAvailableLimit() as $_key => $_limit): ?> - <option value="<?php echo $_key ?>"<?php if ($this->isLimitCurrent($_key)): ?> - selected="selected"<?php endif ?>> - <?php echo $_limit ?> - </option> - <?php endforeach; ?> - </select> +<div class="field limiter"> + <label class="label" for="limiter"> + <span><?php echo __('Show') ?></span> + </label> + <div class="control"> + <select id="limiter" data-role="limiter" class="limiter-options"> + <?php foreach ($this->getAvailableLimit() as $_key => $_limit): ?> + <option value="<?php echo $_key ?>"<?php if ($this->isLimitCurrent($_key)): ?> + selected="selected"<?php endif ?>> + <?php echo $_limit ?> + </option> + <?php endforeach; ?> + </select> + </div> <span class="limiter-text"><?php echo __('per page') ?></span> </div> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml index 8f583b7c97e5d33f69feb156e1fdd07f1cb4cf7d..bb885963d18efeacd10fdccb894612e13dcfc5b8 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml @@ -80,8 +80,8 @@ $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im . ' data-mage-redirect="{event: \'click\', url: \'' . $this->getAddToCartUrl($_product) . '\'}">' . '<span>' . __('Add to Cart') . '</span></button>'; } else { - $info['button'] = $_product->getIsSalable() ? '<p class="stock available"><span>' . __('In stock') . '</span></p>' : - '<p class="stock unavailable"><span>' . __('Out of stock') . '</span></p>'; + $info['button'] = $_product->getIsSalable() ? '<div class="stock available"><span>' . __('In stock') . '</span></div>' : + '<div class="stock unavailable"><span>' . __('Out of stock') . '</span></div>'; } $info['links'] = '<div class="product links" data-role="add-to-links">' diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml index e281ff390b29e80c8db55ccce9db4e1decb1ce8e..b61412321627a73b96a514f74950097c49d1caa8 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/addto.phtml @@ -44,11 +44,11 @@ $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); </div> <script type="text/javascript"> require([ - "jquery", - "mage/mage" + "jquery", + "mage/mage" ], function(jQuery){ - - jQuery('body').mage('addToWishlist', <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode(array('productType' => $_product->getTypeId()))?>); - + jQuery('body').mage('addToWishlist', + <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode($this->getWishlistOptions())?> + ); }); </script> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml index b56190d641466e5a38bb970ec615fadeb99e75f3..b202cbd9adea4f5ca2782bf1c40aac5e9480f9c1 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/attribute.phtml @@ -54,4 +54,3 @@ if ( $_attributeType && $_attributeType == 'text' ) { <div class="value" <?php echo $_attributeAddAttribute;?>><?php echo $_attributeValue; ?></div> </div> <?php endif; ?> - diff --git a/dev/tests/integration/etc/integration-tests-config.xml b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/currency.phtml similarity index 83% rename from dev/tests/integration/etc/integration-tests-config.xml rename to app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/currency.phtml index 987960129b6b3945a1e3f9643c64471fa5426024..8a564741cb777ed27fd8f41b14c24f97242fb5c5 100644 --- a/dev/tests/integration/etc/integration-tests-config.xml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/currency.phtml @@ -1,5 +1,4 @@ -<?xml version="1.0"?> -<!-- +<?php /** * Magento * @@ -22,6 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ---> -<config> -</config> + +/** @var $this \Magento\Directory\Block\Currency */ +?> +<meta property="product:price:currency" content="<?php echo $this->stripTags($this->getCurrentCurrencyCode()); ?>"/> diff --git a/app/code/Magento/Install/view/adminhtml/web/survey_notification.js b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml similarity index 54% rename from app/code/Magento/Install/view/adminhtml/web/survey_notification.js rename to app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml index c008c47217a2d7649628c7da25d5c6613f830667..7c20fe10221a3fbe2ee8ac462d0c122e06758217 100644 --- a/app/code/Magento/Install/view/adminhtml/web/survey_notification.js +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml @@ -1,3 +1,4 @@ +<?php /** * Magento * @@ -20,22 +21,16 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/*jshint jquery:true*/ -require(["jquery"], function($){ - "use strict"; - $(document).ready(function(){ - $('body').on('surveyYes surveyNo', function(e, data) { - if (e.type == 'surveyYes') { - var win = window.open(data.surveyUrl, '', 'width=900,height=600,resizable=1,scrollbars=1'); - win.focus(); - } - $.ajax({ - url: data.surveyAction, - type: 'post', - data: {decision: data.decision} - }); - }); - }); +/** @var $this \Magento\Catalog\Block\Product\View */ +?> -}); +<meta property="og:type" content="og:product" /> +<meta property="og:title" content="<?php echo $this->stripTags($this->getProduct()->getName()); ?>" /> +<meta property="og:image" content="<?php echo $this->stripTags($this->getBaseImageUrl($this->getProduct())); ?>" /> +<meta property="og:description" content="<?php echo $this->stripTags($this->getProduct()->getShortDescription()); ?>" /> +<meta property="og:url" content="<?php echo $this->stripTags($this->getProduct()->getProductUrl()); ?>" /> +<?php if ($priceAmount = $this->getProduct()->getFinalPrice()):?> + <meta property="product:price:amount" content="<?php echo $priceAmount; ?>"/> + <?php echo $this->getChildHtml('meta.currency'); ?> +<?php endif;?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml index bb2a44d3be67004e52e255776b8f6d4c0e70a37b..97e5b3d87f6c11eedb62de6ed672b09d1811e195 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/type/default.phtml @@ -27,12 +27,12 @@ <?php if ($this->displayProductStockStatus()): ?> <?php if ($_product->isAvailable()): ?> - <p class="stock available" title="<?php echo __('Availability') ?>"> + <div class="stock available" title="<?php echo __('Availability') ?>"> <span><?php echo __('In stock') ?></span> - </p> + </div> <?php else: ?> - <p class="stock unavailable" title="<?php echo __('Availability') ?>"> + <div class="stock unavailable" title="<?php echo __('Availability') ?>"> <span><?php echo __('Out of stock') ?></span> - </p> + </div> <?php endif; ?> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml index 976f2aafa2c6296b3eb5671bf161658e9372d95a..8ce9a1732214e85f5319e10c208c659f1d21c0ed 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml @@ -24,35 +24,35 @@ ?> <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?> <?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image');?> - <div class="block widget new minilist"> - <div class="title"> + <div class="block widget block-new-products-list"> + <div class="block-title"> <strong><?php echo __('New Products') ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> <?php $iterator = 1; ?> - <ol class="items minilist products" id="widget-new-products-<?php echo $suffix; ?>"> + <ol class="product-items" id="widget-new-products-<?php echo $suffix; ?>"> <?php foreach ($_products->getItems() as $_product): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a class="product photo" href="<?php echo $_product->getProductUrl() ?>" + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a class="product-item-photo" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> <?php echo $imageBlock->init($_product, 'side_column_widget_product_thumbnail')->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a href="<?php echo $_product->getProductUrl() ?>" - title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"> + title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)" class="product-item-link"> <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> </a> </strong> <?php echo $this->getProductPriceHtml($_product, '-widget-new-' . $suffix) ?> - <div class="product actions"> - <div class="primary"> + <div class="product-item-actions"> + <div class="actions-primary"> <?php if($_product->isSaleable()): ?> <?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?> - <button type="button" title="<?php echo __('Add to Cart') ?>" class="action tocart" + <button type="button" title="<?php echo __('Add to Cart') ?>" + class="action tocart primary" data-mage-init='{"redirectUrl":{"url":"<?php echo $this->getAddToCartUrl($_product) ?>"}}'> <span><?php echo __('Add to Cart') ?></span> </button> @@ -61,23 +61,21 @@ $postDataHelper = $this->helper('Magento\Core\Helper\PostData'); $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); ?> - <button type="button" title="<?php echo __('Add to Cart') ?>" class="action tocart" - data-post='<?php echo $postData; ?>'> - <span><?php echo __('Add to Cart') ?></span> - </button> - <?php endif; ?> - <a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="action tocart"> - <span><?php echo __('Add to Cart') ?></span> - </a> + <button type="button" title="<?php echo __('Add to Cart') ?>" + class="action tocart primary" + data-post='<?php echo $postData; ?>'> + <span><?php echo __('Add to Cart') ?></span> + </button> + <?php endif; ?> <?php else: ?> <?php if ($_product->getIsSalable()): ?> - <p class="stock available" title="<?php echo __('Availability') ?>"> + <div class="stock available" title="<?php echo __('Availability') ?>"> <span><?php echo __('In stock') ?></span> - </p> + </div> <?php else: ?> - <p class="stock unavailable" title="<?php echo __('Availability') ?>"> + <div class="stock unavailable" title="<?php echo __('Availability') ?>"> <span><?php echo __('Out of stock') ?></span> - </p> + </div> <?php endif; ?> <?php endif; ?> </div> @@ -87,6 +85,7 @@ <?php echo ($iterator==count($_products->getItems())+1) ? '</li>' : '' ?> <?php endforeach; ?> </ol> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml index dd85b50584c45e22599edabfc29180ffa7a067e6..e1e3a8130e61eaeb2132dfab37c47dfdb7b38adb 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_images_list.phtml @@ -24,17 +24,16 @@ ?> <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?> <?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); ?> - <div class="widget block new photos"> - <div class="title"> + <div class="block widget block-new-products-images"> + <div class="block-title"> <strong><?php echo __('New Products') ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> - <ol class="items" id="widget-new-products-<?php echo $suffix; ?>"> + <ol id="widget-new-products-<?php echo $suffix; ?>" class="product-items product-items-images"> <?php foreach ($_products->getItems() as $_product): ?> - <li class="item"> - <a class="product photo" href="<?php echo $_product->getProductUrl() ?>" + <li class="product-item"> + <a class="product-item-photo" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> <?php /* new_products_images_only_widget */ ?> <?php echo $imageBlock->init($_product, 'new_products_images_only_widget')->toHtml() ?> @@ -42,6 +41,7 @@ </li> <?php endforeach; ?> </ol> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml index 11291f4451c24de2af05c335c9b06fa6df734e7c..f9a47f59b0ee21c3d2ba4330293ffc822240cdf1 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_names_list.phtml @@ -23,25 +23,26 @@ */ ?> <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?> - <div class="widget block new names"> - <div class="title"> + <div class="block widget block-new-products-names"> + <div class="block-title"> <strong><?php echo __('New Products') ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> - <ol class="items" id="widget-new-products-<?php echo $suffix; ?>"> + <ol id="widget-new-products-<?php echo $suffix; ?>" class="product-items product-items-names"> <?php foreach ($_products->getItems() as $_product): ?> - <li class="item"> - <strong class="product name"> + <li class="product-item"> + <strong class="product-item-name"> <a href="<?php echo $_product->getProductUrl() ?>" - title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"> + title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)" + class="product-item-link"> <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName() , 'name') ?> </a> </strong> </li> <?php endforeach; ?> </ol> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml index 3189aa6e55cb9593fae78a531d14ccb5cca8029a..817475ef2a59408f8eac6eb9610e93cf731f35f5 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml @@ -47,26 +47,26 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge ?> <?php if ($exist):?> - <div class="block widget new <?php echo $mode; ?>"> - <div class="title"> + <div class="block widget block-new-products <?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php echo '<!-- ' . $image . '-->' ?> - <div class="products wrapper <?php echo $mode; ?>"> - <ol class="products list items <?php echo $type; ?>"> + <div class="products-<?php echo $mode; ?> <?php echo $mode; ?>"> + <ol class="product-items <?php echo $type; ?>"> <?php $iterator = 1; ?> <?php foreach($items as $_item): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a href="<?php echo $this->getProductUrl($_item) ?>" class="product photo"> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-photo"> <?php echo $imageBlock->init($_item, $image)->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" - href="<?php echo $this->getProductUrl($_item) ?>"> + href="<?php echo $this->getProductUrl($_item) ?>" + class="product-item-link"> <?php echo $this->escapeHtml($_item->getName()) ?> </a> </strong> @@ -79,9 +79,9 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge <?php endif; ?> <?php if($showWishlist || $showCompare || $showCart): ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if($showCart): ?> - <div class="primary"> + <div class="actions-primary"> <?php if($_item->isSaleable()): ?> <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?> <button class="action tocart primary" @@ -102,15 +102,15 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge <?php endif; ?> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if($showWishlist || $showCompare): ?> - <div class="secondary-addto-links" data-role="add-to-links"> + <div class="actions-secondary" data-role="add-to-links"> <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> <a href="#" data-post='<?php echo $this->getAddToWishlistParams($_item); ?>' @@ -137,6 +137,7 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge <?php endforeach ?> </ol> </div> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif;?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml index 3c827400063c656bde2abf77a325a8f6940fae3b..b42a64d2d9c353bb91538b400522c991381b537f 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml @@ -37,6 +37,7 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge $image ='new_products_content_widget_list'; $title = __('New Products'); $items = $this->getProductCollection()->getItems(); + $_helper = $this->helper('Magento\Catalog\Helper\Output'); $showWishlist = true; $showCompare = true; @@ -47,26 +48,26 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge ?> <?php if ($exist):?> - <div class="block widget new <?php echo $mode; ?>"> - <div class="title"> + <div class="block widget block-new-products <?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php echo '<!-- ' . $image . '-->' ?> - <div class="products wrapper <?php echo $mode; ?>"> - <ol class="products list items <?php echo $type; ?>"> + <div class="products-<?php echo $mode; ?> <?php echo $mode; ?>"> + <ol class="product-items <?php echo $type; ?>"> <?php $iterator = 1; ?> <?php foreach($items as $_item): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a href="<?php echo $this->getProductUrl($_item) ?>" class="product photo"> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-photo"> <?php echo $imageBlock->init($_item, $image)->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" - href="<?php echo $this->getProductUrl($_item) ?>"> + href="<?php echo $this->getProductUrl($_item) ?>" + class="product-item-link"> <?php echo $this->escapeHtml($_item->getName()) ?> </a> </strong> @@ -77,9 +78,9 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge <?php endif; ?> <?php if($showWishlist || $showCompare || $showCart): ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if($showCart): ?> - <div class="primary"> + <div class="actions-primary"> <?php if($_item->isSaleable()): ?> <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?> <button class="action tocart primary" @@ -100,15 +101,15 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge <?php endif; ?> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if($showWishlist || $showCompare): ?> - <div class="secondary-addto-links" data-role="add-to-links"> + <div class="actions-secondary" data-role="add-to-links"> <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> <a href="#" data-post='<?php echo $this->getAddToWishlistParams($_item); ?>' @@ -129,12 +130,21 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge <?php endif; ?> </div> <?php endif; ?> + <?php if($description):?> + <div class="product-item-description"> + <?php echo $_helper->productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" + href="<?php echo $this->getProductUrl($_item) ?>" + class="action more"><?php echo __('Learn More') ?></a> + </div> + <?php endif; ?> </div> </div> <?php echo ($iterator==count($items)+1) ? '</li>' : '' ?> <?php endforeach ?> </ol> </div> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif;?> diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json index be52aced3e2984634db05de278b85239355dee4a..7d98b3c2e297d06b1371a17eddcd304e55dd1f4e 100644 --- a/app/code/Magento/CatalogImportExport/composer.json +++ b/app/code/Magento/CatalogImportExport/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-core": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-import-export": "0.1.0-alpha102", - "magento/module-indexer": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-core": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-import-export": "0.1.0-alpha103", + "magento/module-indexer": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "ext-ctype": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteria.php b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteria.php index 577a57c5d86605529438b56416993c73d3ff2472..83852ba605c2c06c2938b3d553490845f5500ac0 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteria.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteria.php @@ -23,7 +23,7 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Low stock criteria data object diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteriaBuilder.php b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteriaBuilder.php index cbd01980909c6efd1139a200ac6abd42a2dffc99..a8ce76f69e1835f72294bcd8e95b66041f0f4268 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteriaBuilder.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockCriteriaBuilder.php @@ -28,7 +28,7 @@ namespace Magento\CatalogInventory\Service\V1\Data; * * @codeCoverageIgnore */ -class LowStockCriteriaBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class LowStockCriteriaBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set page size diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResult.php b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResult.php index 91b5961c8772098097d769049d8867ae3a42a7d6..02b8067efa32a3acc428b9763d907af68d91a5c2 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResult.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResult.php @@ -23,7 +23,7 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Low stock search result data object diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResultBuilder.php b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResultBuilder.php index 2d168f9dd2fc0c49fbf3e0fb7d352ad644d966c5..4009d8c11804c2d6c1ed630fc28a297e436a8955 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResultBuilder.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/LowStockResultBuilder.php @@ -28,7 +28,7 @@ namespace Magento\CatalogInventory\Service\V1\Data; * * @codeCoverageIgnore */ -class LowStockResultBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class LowStockResultBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set search criteria diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItem.php b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItem.php index d4b68935033312914ffc3cad5150d73c080a5160..6cfb76d491b89a1e1dc72fcb6db71113b1387c72 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItem.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItem.php @@ -23,7 +23,7 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Stock item data object diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemBuilder.php b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemBuilder.php index 17eed4917ee1bdc83287ab64310d8a350ac97758..2e96602d3c431d7c52770694e1314657bee9077c 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemBuilder.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemBuilder.php @@ -23,11 +23,11 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * Stock item data builder */ -class StockItemBuilder extends AbstractExtensibleObjectBuilder +class StockItemBuilder extends ExtensibleObjectBuilder { } diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetails.php b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetails.php index 880588758a64292b9af5127a8e568b0d23156b18..cf43022b544bb289754f4847c94ff484673faeec 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetails.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetails.php @@ -23,7 +23,7 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Stock item details data object diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetailsBuilder.php b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetailsBuilder.php index 4b29e608a3e20da796fca78b058abee787126868..e0f449637a0818218d83e0de7c6691ebb284c939 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetailsBuilder.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/StockItemDetailsBuilder.php @@ -23,14 +23,14 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * Stock item details data builder * * @codeCoverageIgnore */ -class StockItemDetailsBuilder extends AbstractExtensibleObjectBuilder +class StockItemDetailsBuilder extends ExtensibleObjectBuilder { /** * @param int $qty diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatus.php b/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatus.php index 4846d4701b4794bf483afab9d4df6397e27ac36e..b09c83f292bc46760498aea0331e7b2cbc04a5a7 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatus.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatus.php @@ -23,7 +23,7 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Stock status data object diff --git a/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatusBuilder.php b/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatusBuilder.php index e5ab3e3e7b8ee9b42efdc26d65ede0a83e280a49..24e5fd4b65f0c603a33a291236e9d6d5aff57eb6 100644 --- a/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatusBuilder.php +++ b/app/code/Magento/CatalogInventory/Service/V1/Data/StockStatusBuilder.php @@ -23,11 +23,11 @@ */ namespace Magento\CatalogInventory\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * Stock status data builder */ -class StockStatusBuilder extends AbstractExtensibleObjectBuilder +class StockStatusBuilder extends ExtensibleObjectBuilder { } diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json index cedbdbc01a9a7a34650fe4f59364928a90e586f5..859be9a5e016bdc0f4d736a282890981368b437b 100644 --- a/app/code/Magento/CatalogInventory/composer.json +++ b/app/code/Magento/CatalogInventory/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-indexer": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-indexer": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogInventory/data/cataloginventory_setup/data-upgrade-1.6.0.0.3-1.6.0.0.4.php b/app/code/Magento/CatalogInventory/data/cataloginventory_setup/data-upgrade-1.6.0.0.3-1.6.0.0.4.php index e526aedb298322fc845922b36066d495326d916a..d8151d15dc749e27dc2e32070c2e2cd878efb654 100644 --- a/app/code/Magento/CatalogInventory/data/cataloginventory_setup/data-upgrade-1.6.0.0.3-1.6.0.0.4.php +++ b/app/code/Magento/CatalogInventory/data/cataloginventory_setup/data-upgrade-1.6.0.0.3-1.6.0.0.4.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Catalog\Model\Resource\Setup */ +/** @var $this \Magento\Eav\Model\Entity\Setup */ $groupName = 'Product Details'; $entityTypeId = $this->getEntityTypeId(\Magento\Catalog\Model\Product::ENTITY); diff --git a/app/code/Magento/CatalogInventory/etc/module.xml b/app/code/Magento/CatalogInventory/etc/module.xml index 3125cc3629c15b0bfe202482a7edf1f6112f05fb..e486b82fdf9308314313b8dd6eefa437fac844ad 100644 --- a/app/code/Magento/CatalogInventory/etc/module.xml +++ b/app/code/Magento/CatalogInventory/etc/module.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> - <module name="Magento_CatalogInventory" schema_version="1.6.0.0.4" active="true"> + <module name="Magento_CatalogInventory" schema_version="1.6.0.0.5" active="true"> <sequence> <module name="Magento_Catalog"/> </sequence> diff --git a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php index 963c66b7213212e000a6227c974e3d6b1a9835d5..d21a28102b9a6e9e18ce65e2a2a0f43388728d6a 100644 --- a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php +++ b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Eav\Model\Entity\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0-1.6.0.0.1.php index 187a3bb8444fcc37365a2615eeed6c9386d76673..51ffd840a461ed51c6b60d1f30153ffa5953a80b 100644 --- a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0-1.6.0.0.1.php +++ b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0-1.6.0.0.1.php @@ -22,9 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Eav\Model\Entity\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/** @var $connection \Magento\Framework\DB\Adapter\Pdo\Mysql */ $connection = $installer->getConnection(); $connection->changeTableEngine( $installer->getTable('cataloginventory_stock_status_tmp'), diff --git a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php index 118d5d3cf3549c5515a7ba2c6e8cad7b551b5573..e4a68a03caecae2657a35b9ef3e2c20863dc6dbb 100644 --- a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php +++ b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Eav\Model\Entity\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /** diff --git a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php index 6b40b1c3474f95e7405ffe84f86d165fc4422adf..d65adec44b3bfe7bfc4295351da421e91a07e766 100644 --- a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php +++ b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Eav\Model\Entity\Setup */ +/** @var $this \Magento\Setup\Module\SetupModule */ $this->getConnection()->changeColumn( $this->getTable('cataloginventory_stock_item'), diff --git a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php index eb950ab693f28667080927b6051c340295db642a..57885f100b93c06baaced7e34119319dca4d04e4 100644 --- a/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php +++ b/app/code/Magento/CatalogInventory/sql/cataloginventory_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Eav\Model\Entity\Setup */ +/** @var $this \Magento\Setup\Module\SetupModule */ $this->startSetup(); diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json index e7f21fa4506461677134adfc1cee7f53fefeac3a..653131508c7d3755729fdb7ec9fa37dd57866a4d 100644 --- a/app/code/Magento/CatalogRule/composer.json +++ b/app/code/Magento/CatalogRule/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-rule": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-rule": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php b/app/code/Magento/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php index 87808ba427f79cf6daa1d8d55153fbfe0acf2cfb..e977263942fb0b74d88df094761d2d2073d4be72 100644 --- a/app/code/Magento/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php +++ b/app/code/Magento/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php @@ -23,8 +23,7 @@ */ -/* @var $installer \Magento\Framework\Module\Setup */ - +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php index 474e434f839febd8cd50956059d3868e9372d8e9..5cd49cf98feceba47cd024fcdffdf51db2173553 100644 --- a/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $tableName = $installer->getTable('catalogrule'); diff --git a/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php index ef440864e16c809163bbb04dfebd6fd2b6d47b01..708576300b1e6c08d1bd9915678039a8eb679659 100644 --- a/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.2-1.6.0.3.php index c221480ba3a689e8cc7844a934ac5f5ff09964ba..3d0c905c37ba6bab89173f2dc5d75ef962ded438 100644 --- a/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json index 4b29ff64c5906b8c6b7935b5bc178d46b2b08c2a..f5caacd09782ffdae3960a4f7beeef575f205f25 100644 --- a/app/code/Magento/CatalogSearch/composer.json +++ b/app/code/Magento/CatalogSearch/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-search": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-indexer": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-search": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-indexer": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php b/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php index b593ecfe741026a950397ba9d6146e20679a7ba5..d253fa275c6c5d6cf3c13fb47be539009105324d 100644 --- a/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php +++ b/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json index d16fd733c3bca93edcca581663a0b34f7924e67f..3333a8d3f81b1e1de054729ae1110cdb4a371ecf 100644 --- a/app/code/Magento/CatalogUrlRewrite/composer.json +++ b/app/code/Magento/CatalogUrlRewrite/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-catalog-import-export": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-import-export": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/module-url-rewrite": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-catalog-import-export": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-import-export": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/module-url-rewrite": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/CatalogUrlRewrite/data/catalogurlrewrite_setup/data-install-1.0.0.0.php b/app/code/Magento/CatalogUrlRewrite/data/catalogurlrewrite_setup/data-install-1.0.0.0.php index 7a51d3f0190f236f7b65b09ebddac52dd2369b8d..30afee397609c28361820ccf2be2450e8bdd6247 100644 --- a/app/code/Magento/CatalogUrlRewrite/data/catalogurlrewrite_setup/data-install-1.0.0.0.php +++ b/app/code/Magento/CatalogUrlRewrite/data/catalogurlrewrite_setup/data-install-1.0.0.0.php @@ -21,6 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** @var $this \Magento\Catalog\Model\Resource\Setup */ $this->addAttribute( \Magento\Catalog\Model\Category::ENTITY, diff --git a/app/code/Magento/CatalogUrlRewrite/etc/install/di.xml b/app/code/Magento/CatalogUrlRewrite/etc/install/di.xml deleted file mode 100644 index 51d426c2e2b19f26aa3330630c2c06bd1d35f3a5..0000000000000000000000000000000000000000 --- a/app/code/Magento/CatalogUrlRewrite/etc/install/di.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <type name="Magento\CatalogImportExport\Model\Import\Product"> - <plugin name="import_save_plugin" type="Magento\CatalogUrlRewrite\Model\Product\Plugin\Import"/> - </type> - <type name="Magento\Catalog\Model\Resource\Category"> - <plugin name="category_move_plugin" type="Magento\CatalogUrlRewrite\Model\Category\Plugin\Category\Move"/> - </type> - <type name="Magento\UrlRewrite\Model\StorageInterface"> - <plugin name="storage_plugin" type="Magento\CatalogUrlRewrite\Model\Category\Plugin\Storage"/> - </type> -</config> diff --git a/app/code/Magento/CatalogUrlRewrite/etc/install/events.xml b/app/code/Magento/CatalogUrlRewrite/etc/install/events.xml deleted file mode 100644 index 39b12d18bcc16f051b123de69c0fb46a294150b0..0000000000000000000000000000000000000000 --- a/app/code/Magento/CatalogUrlRewrite/etc/install/events.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> - <event name="catalog_category_prepare_save"> - <observer name="category_save_rewrites_history_setter" instance="Magento\CatalogUrlRewrite\Observer\CategorySaveRewritesHistorySetter" method="invoke"/> - </event> - <event name="catalog_category_save_before"> - <observer name="category_url_path_autogeneration" instance="Magento\CatalogUrlRewrite\Observer\CategoryUrlPathAutogenerator" method="invoke"/> - </event> - <event name="catalog_category_save_after"> - <observer name="process_url_rewrite_saving" instance="Magento\CatalogUrlRewrite\Model\Category\Observer" method="processUrlRewriteSaving"/> - </event> - <event name="catalog_product_save_before"> - <observer name="product_url_key_autogeneration" instance="Magento\CatalogUrlRewrite\Observer\ProductUrlKeyAutogenerator" method="invoke"/> - </event> - <event name="catalog_product_save_after"> - <observer name="process_url_rewrite_saving" instance="Magento\CatalogUrlRewrite\Model\Product\Observer" method="processUrlRewriteSaving"/> - </event> -</config> diff --git a/app/code/Magento/CatalogUrlRewrite/sql/catalogurlrewrite_setup/install-1.0.0.0.php b/app/code/Magento/CatalogUrlRewrite/sql/catalogurlrewrite_setup/install-1.0.0.0.php index 8d0157ef98034a783c5dd2f95527741b6a6d762c..1f4e6d07e8804c27f46fa7f917398abaf6c736f5 100644 --- a/app/code/Magento/CatalogUrlRewrite/sql/catalogurlrewrite_setup/install-1.0.0.0.php +++ b/app/code/Magento/CatalogUrlRewrite/sql/catalogurlrewrite_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Centinel/composer.json b/app/code/Magento/Centinel/composer.json index fed59975419aef235c3cac88a0a4f82597170282..d5b7d880aa0144163876a0b42ccc884859ed2be8 100644 --- a/app/code/Magento/Centinel/composer.json +++ b/app/code/Magento/Centinel/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Checkout/Block/Onepage/Review.php b/app/code/Magento/Checkout/Block/Onepage/Review.php index 946a9662220ee6931ef6410ce3ef3edbe3668920..55939e2d8b9f007f0a2185e62fe46f87edaacb10 100644 --- a/app/code/Magento/Checkout/Block/Onepage/Review.php +++ b/app/code/Magento/Checkout/Block/Onepage/Review.php @@ -23,12 +23,7 @@ */ namespace Magento\Checkout\Block\Onepage; -/** - * One page checkout status - * - * @author Magento Core Team <core@magentocommerce.com> - */ -class Review extends \Magento\Checkout\Block\Onepage\AbstractOnepage +class Review extends AbstractOnepage { /** * @return void @@ -40,7 +35,5 @@ class Review extends \Magento\Checkout\Block\Onepage\AbstractOnepage array('label' => __('Order Review'), 'is_show' => $this->isShow()) ); parent::_construct(); - - $this->getQuote()->collectTotals()->save(); } } diff --git a/app/code/Magento/Checkout/Model/Cart/Access/ReadPlugin.php b/app/code/Magento/Checkout/Model/Cart/Access/ReadPlugin.php index ec5eacba063f4ca91b793c494f5aaf407c23eaf9..bcde4d6496e9f8dd5c83c07e62ebedd2cfa59d3e 100644 --- a/app/code/Magento/Checkout/Model/Cart/Access/ReadPlugin.php +++ b/app/code/Magento/Checkout/Model/Cart/Access/ReadPlugin.php @@ -25,7 +25,7 @@ namespace Magento\Checkout\Model\Cart\Access; use Magento\Authorization\Model\UserContextInterface; -use \Magento\Framework\Service\V1\Data\SearchCriteria; +use \Magento\Framework\Api\SearchCriteria; use \Magento\Framework\Exception\AuthorizationException; class ReadPlugin diff --git a/app/code/Magento/Checkout/Model/Type/Onepage.php b/app/code/Magento/Checkout/Model/Type/Onepage.php index c9890bc9eeca2517f96826cf4ae1e0eda0a42c10..8ffe5fbcac0b0c82a2a1021869dc51e94f9e9894 100644 --- a/app/code/Magento/Checkout/Model/Type/Onepage.php +++ b/app/code/Magento/Checkout/Model/Type/Onepage.php @@ -363,7 +363,7 @@ class Onepage $address = $this->getQuote()->getBillingAddress(); $addressForm = $this->_formFactory->create( - \Magento\Customer\Service\V1\AddressMetadataServiceInterface::ENTITY_TYPE_ADDRESS, + \Magento\Customer\Api\AddressMetadataInterface::ENTITY_TYPE_ADDRESS, 'customer_address_edit', array(), $this->_request->isAjax(), @@ -512,7 +512,7 @@ class Onepage $quote = $this->getQuote(); $isCustomerNew = !$quote->getCustomerId(); $customer = $quote->getCustomerData(); - $customerData = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer); + $customerData = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer); /** @var Form $customerForm */ $customerForm = $this->_formFactory->create( @@ -577,7 +577,7 @@ class Onepage $this->_objectCopyService->copyFieldsetToTarget( 'customer_account', 'to_quote', - \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer), + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer), $quote ); diff --git a/app/code/Magento/Checkout/Service/V1/Address/Converter.php b/app/code/Magento/Checkout/Service/V1/Address/Converter.php index b1202eb98fed74f90a4eb65a1c9b718568ef50d7..45c849cbeafa6d5d8e8f5f29e2a3161f07f8151a 100644 --- a/app/code/Magento/Checkout/Service/V1/Address/Converter.php +++ b/app/code/Magento/Checkout/Service/V1/Address/Converter.php @@ -27,8 +27,8 @@ use Magento\Checkout\Service\V1\Data\Cart\Address; use Magento\Checkout\Service\V1\Data\Cart\AddressBuilder; use Magento\Checkout\Service\V1\Data\Cart\Address\Region; use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; -use Magento\Framework\Service\Data\AttributeValue; -use Magento\Framework\Service\SimpleDataObjectConverter; +use Magento\Framework\Api\AttributeValue; +use Magento\Framework\Api\SimpleDataObjectConverter; /** Quote shipping address converter service. */ class Converter @@ -114,7 +114,7 @@ class Converter //set custom attributes $customAttributes = $dataObject->getCustomAttributes(); - /** @var \Magento\Framework\Service\Data\AttributeValue $attributeData */ + /** @var \Magento\Framework\Api\AttributeValue $attributeData */ foreach ($customAttributes as $attributeData) { $address->setData($attributeData->getAttributeCode(), $attributeData->getValue()); } diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php index 3a5885f7cde3f376069ebffe4f223d524f5b6cc9..adfb0ceed57c06e695c531127e682cb11435bbf7 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php @@ -23,13 +23,13 @@ */ namespace Magento\Checkout\Service\V1\Cart; -use \Magento\Framework\Service\V1\Data\SearchCriteria; +use \Magento\Framework\Api\SearchCriteria; use \Magento\Sales\Model\Quote; use \Magento\Sales\Model\QuoteRepository; use \Magento\Sales\Model\Resource\Quote\Collection as QuoteCollection; use \Magento\Framework\Exception\InputException; -use \Magento\Framework\Service\V1\Data\Search\FilterGroup; +use \Magento\Framework\Api\Search\FilterGroup; use \Magento\Checkout\Service\V1\Data; /** @@ -137,7 +137,7 @@ class ReadService implements ReadServiceInterface /** * {@inheritDoc} * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Checkout\Service\V1\Data\CartSearchResults Cart search results object. */ public function getCartList(SearchCriteria $searchCriteria) diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php index 90ee6e54e6e8b9550860dcd4034d7c3b2258ff6d..624b5769c5770a34714d118011410c9b6d1dec94 100644 --- a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php +++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php @@ -23,7 +23,7 @@ */ namespace Magento\Checkout\Service\V1\Cart; -use \Magento\Framework\Service\V1\Data\SearchCriteria; +use \Magento\Framework\Api\SearchCriteria; /** * Cart read service interface. @@ -51,7 +51,7 @@ interface ReadServiceInterface /** * Enables administrative users to list carts that match specified search criteria. * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Checkout\Service\V1\Data\CartSearchResults Cart search results object. */ public function getCartList(SearchCriteria $searchCriteria); diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart.php b/app/code/Magento/Checkout/Service/V1/Data/Cart.php index aac85942d9e3cc1579ebbbdb343ba2fc50073951..9a16c8b8cc51a34dcf4e3ff4d77c06dd207fcd84 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data; * * @codeCoverageIgnore */ -class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Cart extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Cart ID. diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php index 682ff364d3c33b8f399d4ed4c783bd0d45d85748..852d9ced69cf561f2c11fa34911df2cf3e76dcc9 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class Address extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Address extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php index 3f11e19f1bf5829ef7788c00c3541a1cd8b36695..af4bd3587730b0a76cf531405d6e88e409eb949a 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php @@ -26,7 +26,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart\Address; /** * @codeCoverageIgnore */ -class Region extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Region extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Array keys diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php index 355d91d09649a7c3c9224eeab76ca64fae1afafc..59fe4b3af21fc8378c4d110d1904f127cff960fb 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/AddressBuilder.php @@ -26,15 +26,15 @@ namespace Magento\Checkout\Service\V1\Data\Cart; use Magento\Checkout\Service\V1\Data\Cart\Address\Region; use Magento\Checkout\Service\V1\Data\Cart\Address\RegionBuilder; use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * Quote address data object builder * * @codeCoverageIgnore */ -class AddressBuilder extends AbstractExtensibleObjectBuilder +class AddressBuilder extends ExtensibleObjectBuilder { /** * Region builder @@ -44,20 +44,20 @@ class AddressBuilder extends AbstractExtensibleObjectBuilder protected $_regionBuilder; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param CustomerMetadataServiceInterface $metadataService * @param RegionBuilder $regionBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, CustomerMetadataServiceInterface $metadataService, RegionBuilder $regionBuilder ) { parent::__construct($objectFactory, $valueBuilder, $metadataService); $this->_regionBuilder = $regionBuilder; - $this->_data[Address::KEY_REGION] = $regionBuilder->create(); + $this->data[Address::KEY_REGION] = $regionBuilder->create(); } /** diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php index 5b4c401d48df664eeb79b763b12f8ecae25913f1..055cff682d9773b161acc70a6a7490b547d6e418 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class Coupon extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Coupon extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Coupon code. diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php index 01e18267be55816ede4b41b6a74e0fccbffbc4bf..c9306c78c37191f7b4829bc191a8593a6f48602b 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/CouponBuilder.php @@ -27,7 +27,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; /** * @codeCoverageIgnore */ -class CouponBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class CouponBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param string $value diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php index 9559c5a33b34e2e85b7e3c7823d9e05e0d75ca67..2e4725a0a73143b45ed75806f60ee269481b121b 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Currency.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class Currency extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Currency extends \Magento\Framework\Api\AbstractExtensibleObject { const GLOBAL_CURRENCY_CODE = 'global_currency_code'; diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php index 0a2357fec14f9e0d46221f30e010809d6bff8ced..599ef2e87d485d1f9478a1a5ad5c4f4a9b241a83 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class Customer extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Customer extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Customer ID. diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php index b8fe64c4743a0e4c6b9f185499b818bdcdc5cbcc..6b989bfa0c75633c95b7790f1b7ff4c9c16c72dd 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/CustomerBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class CustomerBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class CustomerBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set customer id diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php index e74a7b4c5ee8bb0cc6aa40b89f218a8d230f2524..4e6eb1768c1eb44303b8c6338a5589435de8d4d3 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php @@ -29,7 +29,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Item extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Item ID. diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php index ea3eb475b8f5ac12c3e28b39000b572840bc7429..14ba6685731e5c933289856d590a08a64464c4ac 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/PaymentMethod.php @@ -27,7 +27,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; /** * @codeCoverageIgnore */ -class PaymentMethod extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class PaymentMethod extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Payment method diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php index 7975c482fe890b4d229fdaf7d63c495e0ca85948..d3dab50fb8aa7ed665f072598d634822eb3f9539 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class ShippingMethod extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Shipping carrier code. diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php index d7cb780dcb74e5cf49931f3e7eec84e62e9e98e4..e56a5dc6fe4b9701a1dc67502c6cf69a397fa41b 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart; * * @codeCoverageIgnore */ -class Totals extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Totals extends \Magento\Framework\Api\AbstractExtensibleObject { /* TOTALS */ const GRAND_TOTAL = 'grand_total'; diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php index d81f628688ae32968436499276a0865e62f4420f..9f7c98cf7f4e7730e0d463bc65956beba2cf5aab 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php +++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php @@ -28,7 +28,7 @@ namespace Magento\Checkout\Service\V1\Data\Cart\Totals; * * @codeCoverageIgnore */ -class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject +class Item extends \Magento\Framework\Api\AbstractSimpleObject { /** * Price. diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php index 12c768395d5b813efc4df95fabd0592851a9294e..d9a81cd262d1d5b90cce630af25a599e591d636c 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartBuilder.php @@ -30,7 +30,7 @@ use \Magento\Checkout\Service\V1\Data\Cart\Currency; * * @codeCoverageIgnore */ -class CartBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class CartBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Cart/quote id diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php b/app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php index 19442cccb8bf10415836f6e377fba5443ae6577c..cd9738416b1c69a00eb88c5d0da62c451c3e5219 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartSearchResults.php @@ -26,7 +26,7 @@ namespace Magento\Checkout\Service\V1\Data; /** * @codeCoverageIgnore */ -class CartSearchResults extends \Magento\Framework\Service\V1\Data\SearchResults +class CartSearchResults extends \Magento\Framework\Api\SearchResults { /** * Get items diff --git a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php b/app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php index 8fb67d717cbecb56fbfaa36c1e15010a22660a55..31005a60fa8fdd3498d78039f22d71c5a6eddd06 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php +++ b/app/code/Magento/Checkout/Service/V1/Data/CartSearchResultsBuilder.php @@ -23,11 +23,11 @@ */ namespace Magento\Checkout\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\AbstractSearchResultsBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php b/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php index 2e7b6271c2c4bf7f5c48d0ce35d1d4578199001b..6e446caa3a3d4c9aaed2368ff13ab1e806e3393d 100644 --- a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php +++ b/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod.php @@ -27,7 +27,7 @@ namespace Magento\Checkout\Service\V1\Data; /** * @codeCoverageIgnore */ -class PaymentMethod extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class PaymentMethod extends \Magento\Framework\Api\AbstractExtensibleObject { const CODE = 'code'; diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json index c038af054af9fb827cd2840efb4397d3cb1ec051..01939494ff4d9c6fc116e3ce067123a81d1a1bee 100644 --- a/app/code/Magento/Checkout/composer.json +++ b/app/code/Magento/Checkout/composer.json @@ -3,27 +3,27 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-authorization": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-gift-message": "0.1.0-alpha102", - "magento/module-wishlist": "0.1.0-alpha102", - "magento/module-page-cache": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-msrp": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-authorization": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-gift-message": "0.1.0-alpha103", + "magento/module-wishlist": "0.1.0-alpha103", + "magento/module-page-cache": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-msrp": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml index 083c782c5986d10eb67c90ef91318c98bac8ac6d..6a42d6bd3f9590be71e606a55db8a8bd877cfdf0 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml @@ -29,7 +29,7 @@ <body> <referenceContainer name="content"> <block class="Magento\Checkout\Block\Cart" name="checkout.cart" template="cart.phtml"> - <container name="checkout.cart.items" label="invisible" as="with-items"> + <container name="checkout.cart.items" as="with-items"> <container name="checkout.cart.form.before" as="form_before" label="Shopping Cart Items Before" htmlTag="div" htmlClass="rewards" before="checkout.cart.form"/> <block class="Magento\Checkout\Block\Cart" name="checkout.cart.form" as="cart-items" template="cart/form.phtml"> <block class="Magento\Framework\View\Element\RendererList" name="checkout.cart.item.renderers" as="renderer.list"/> @@ -52,7 +52,7 @@ </arguments> </block> </container> - <container name="checkout.cart.noitems" label="invisible" as="no-items"> + <container name="checkout.cart.noitems" as="no-items"> <block class="Magento\Checkout\Block\Cart" name="checkout.cart.empty" before="-" template="cart/noItems.phtml"/> <container name="checkout.cart.empty.widget" as="checkout_cart_empty_widget" label="Empty Shopping Cart Content Before"/> </container> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_additional.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_additional.xml deleted file mode 100644 index ee4479cd77524d2cfad1586bbca7a211b33ef0c7..0000000000000000000000000000000000000000 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_additional.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd"> - <container name="root"> - <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Additional" name="shipping_method_additional" template="onepage/shipping_method/additional.phtml"> - <arguments> - <argument name="dontDisplayContainer" xsi:type="string">1</argument> - </arguments> - </block> - </container> -</layout> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml index 936a2a437683f0ba35fcf60e6854dbe4ca6f615c..20a65fd854b72083dfe2c400c331140aa581da93 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_index.xml @@ -31,10 +31,10 @@ <block class="Magento\Checkout\Block\Onepage" name="checkout.onepage" template="onepage.phtml"> <block class="Magento\Checkout\Block\Onepage\Login" name="checkout.onepage.login" as="login" template="onepage/login.phtml" cacheable="false"> <container name="checkout.onepage.login.before" as="login_before" label="Login/Registration Before" htmlTag="div"/> - <container name="form.login.additional.info" label="invisible" as="form_additional_info"/> + <container name="form.login.additional.info" as="form_additional_info"/> </block> <block class="Magento\Checkout\Block\Onepage\Billing" name="checkout.onepage.billing" as="billing" template="onepage/billing.phtml" cacheable="false"> - <container name="form.billing.additional.info" label="invisible" as="form_additional_info"/> + <container name="form.billing.additional.info" as="form_additional_info"/> </block> <block class="Magento\Checkout\Block\Onepage\Shipping" name="checkout.onepage.shipping" as="shipping" template="onepage/shipping.phtml" cacheable="false"/> <block class="Magento\Checkout\Block\Onepage\Shipping\Method" name="checkout.onepage.shipping_method" as="shipping_method" template="onepage/shipping_method.phtml" cacheable="false"> diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml index 7ce8ecf569a103791b692eea60205a46e0cef02e..a75305dba02f607d07771fa4b292d39577c5b7e8 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_shippingmethod.xml @@ -26,6 +26,8 @@ <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd"> <update handle="checkout_shipping_price_renderer" /> <container name="root"> - <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Available" name="shipping_method" template="onepage/shipping_method/available.phtml"/> + <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Available" name="checkout.onepage.shipping_method.available" as="available" template="onepage/shipping_method/available.phtml"/> + <block class="Magento\Checkout\Block\Onepage\Shipping\Method\Additional" name="checkout.onepage.shipping_method.additional" as="additional" template="onepage/shipping_method/additional.phtml"> + </block> </container> </layout> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml index 4108d230e9a531efe1e87629972edeb8c57e0f8d..c2a0c751552d46334728c6e7a70ccf04d5b4d671 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml @@ -32,7 +32,7 @@ "removeCouponSelector": "#remove-coupon", "applyButton": "button.action.apply", "cancelButton": "button.action.cancel"}}'> - <fieldset class="fieldset coupon<?php strlen($this->getCouponCode()) ? ' applied' : ''?>"> + <div class="fieldset coupon<?php strlen($this->getCouponCode()) ? ' applied' : ''?>"> <input type="hidden" name="remove" id="remove-coupon" value="0" /> <div class="field"> <label for="coupon_code" class="label"><span><?php echo __('Enter your code') ?></span></label> @@ -53,7 +53,7 @@ </div> <?php endif; ?> </div> - </fieldset> + </div> </form> </div> </div> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml index 21fcc1ef1aec07f14fd0cdcb60977689c26cc6cc..9017984d190f71a1702309a49d53caea14524200 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml @@ -30,7 +30,7 @@ method="post" id="form-validate" data-mage-init='{"validation":{}}' - class="form cart"> + class="form form-cart"> <?php echo $this->getBlockHtml('formkey'); ?> <div class="cart table-wrapper<?php echo $mergedCells == 2 ? ' detailed' : ''; ?>"> <table id="shopping-cart-table" diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml index 58ac39ba67ed67f9c5b9ea76e595533a1a6880a5..ef28a02764492d4e2624f8a960eef6f540dd9a01 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml @@ -34,14 +34,14 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima <tbody class="cart item"> <tr class="item info item-info"> <td data-th="<?php echo $this->escapeHtml(__('Item')); ?>" class="col item"> - <?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product photo product-item-photo"> + <?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-item-photo"> <?php else:?> - <span class="product photo product-item-photo"> + <span class="product-item-photo"> <?php endif;?> <?php echo $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image')->init($this->getProductForThumbnail(), 'cart_page_product_thumbnail')->toHtml(); ?> <?php if ($this->hasProductUrl()):?></a><?php else: ?></span><?php endif; ?> - <div class="product details product-item-details"> - <strong class="product name product-item-name"> + <div class="product-item-details"> + <strong class="product-item-name"> <?php if ($this->hasProductUrl()):?> <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> <?php else: ?> @@ -93,16 +93,19 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima <?php $cols++; ?> </td> <?php else: ?> - - <td class="col price" data-th="<?php echo $this->escapeHtml(__('Price')); ?>"> - <?php echo $this->getUnitPriceHtml($_item); ?> - <?php $cols++; ?> - </td> - + <td class="col price" data-th="<?php echo $this->escapeHtml(__('Price')); ?>"> + <?php echo $this->getUnitPriceHtml($_item); ?> + <?php $cols++; ?> + </td> <?php endif; ?> <td class="col qty" data-th="<?php echo $this->escapeHtml(__('Qty')); ?>"> - <div class="control qty"> - <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" type="number" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{required:true,'validate-greater-than-zero':true}"/> + <div class="field qty"> + <label class="label" for="cart-<?php echo $_item->getId() ?>-qty"> + <span><?php echo __('Qty') ?></span> + </label> + <div class="control qty"> + <input id="cart-<?php echo $_item->getId() ?>-qty" name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" type="number" size="4" title="<?php echo __('Qty') ?>" class="input-text qty" maxlength="12" data-validate="{required:true,'validate-greater-than-zero':true}"/> + </div> </div> <?php $cols++; ?> </td> @@ -115,7 +118,6 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima <?php endif; ?> <?php $cols++; ?> </td> - </tr> <tr class="item actions item-actions"> <td colspan="<?php echo $cols;?>"> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml index 028bc8203bd08e846233093e129654428f035463..3974da46e91916f9aad1f3ad52b514300d107c4a 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml @@ -28,6 +28,9 @@ <div class="content" data-role="content"> <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form"> <fieldset class="fieldset estimate"> + <legend class="legend"> + <span><?php echo __('Estimate Shipping and Tax') ?></span> + </legend><br> <p class="field note"><?php echo __('Enter your destination to get a shipping estimate.') ?></p> <div class="field country"> <label for="country" class="label"><span><?php echo __('Country') ?></span></label> diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml index f12f42d4dd70626b0d8eb5693394373eb4d96c9b..5950d2c845c7b007c361fba9fb7473e528c0b524 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/cart/sidebar/default.phtml @@ -34,17 +34,17 @@ $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Ima <li class="item product product-item"> <div class="product"> <?php if ($this->hasProductUrl()): ?> - <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product photo product-item-photo"> + <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-item-photo"> <?php echo $imageBlock->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail')->toHtml() ?> </a> <?php else: ?> - <span class="product photo product-item-photo"> + <span class="product-item-photo"> <?php echo $imageBlock->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail')->toHtml() ?> </span> <?php endif; ?> - <div class="product details product-item-details"> - <strong class="product name product-item-name"> + <div class="product-item-details"> + <strong class="product-item-name"> <?php if ($this->hasProductUrl()): ?> <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a> <?php else: ?> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml index 93c9ac461abe2d00b4b07f2051443048c776e345..11e3832c172f68104a3dfd37a5470ddea859a343 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/billing.phtml @@ -70,7 +70,10 @@ <div class="nested"> <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - <div class="field additional no-label"> + <div class="field additional"> + <label class="label" for="billing:street<?php echo $_i ?>"> + <span><?php echo __('Address') ?></span> + </label> <div class="control"> <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> </div> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml index fef6185f701a80c8502cbdba9b55399cb2d4dbe8..da49c3d13d910133c09ffc43f009461184e18b2e 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml @@ -25,6 +25,9 @@ <form id="co-payment-form" class="form payments"> <?php echo $this->getBlockHtml('formkey') ?> <fieldset class="fieldset"> + <legend class="legend payments-title"> + <span><?php echo __('Payment Information') ?></span> + </legend><br> <?php echo $this->getChildChildHtml('methods_additional') ?> <div id="checkout-payment-method-load" class="opc-payment"></div> </fieldset> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml index 7b69b6a90701738fb28de5acc865c3ab33615b7e..88f992aa513e154112fafc04d439eb19118beb86 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping.phtml @@ -55,7 +55,10 @@ <div class="nested"> <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - <div class="field additional no-label"> + <div class="field additional"> + <label class="label" for="shipping:street<?php echo $_i ?>"> + <span><?php echo __('Street Address %1', $_i) ?></span> + </label> <div class="control"> <input type="text" title="<?php echo __('Street Address %1', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" /> </div> diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml index 1a861ebcd023ce546a41dd98ef1738e6729aeded..f32842278bfb5915eff554162bffc32a8db38a64 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method/available.phtml @@ -32,24 +32,29 @@ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> <dt class="item-title <?php echo $code ?>"><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> <dd class="item-content <?php echo $code ?>"> - <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> - <?php $shippingCodePrice[] = '"'.$_rate->getCode().'":'.(float)$_rate->getPrice(); ?> - <div class="field choice"> - <?php if ($_rate->getErrorMessage()): ?> - <div class="message error"><div><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></div></div> - <?php else: ?> - <?php if ($_sole) : ?> - <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span> - <?php else: ?> - <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/> - <?php endif; ?> - <label class="label" for="s_method_<?php echo $_rate->getCode() ?>"><span><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> - <?php echo $this->getShippingPriceHtml($_rate); ?> - </span> - </label> - <?php endif ?> - </div> - <?php endforeach; ?> + <fieldset class="fieldset"> + <legend class="legend"><span><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></span></legend><br> + <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> + <?php $shippingCodePrice[] = '"'.$_rate->getCode().'":'.(float)$_rate->getPrice(); ?> + <div class="field choice"> + <?php if ($_rate->getErrorMessage()): ?> + <div class="message error"><div><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></div></div> + <?php else: ?> + <?php if ($_sole) : ?> + <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span> + <?php else: ?> + <div class="control"> + <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/> + </div> + <?php endif; ?> + <label class="label" for="s_method_<?php echo $_rate->getCode() ?>"><span><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <?php echo $this->getShippingPriceHtml($_rate); ?> + </span> + </label> + <?php endif ?> + </div> + <?php endforeach; ?> + </fieldset> </dd> <?php endforeach; ?> </dl> diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php b/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php index 882a708d045ac5a8c666fda43d16e13a662df806..dd781490c06b7c46df4f3354529159e9361324b4 100644 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php +++ b/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php @@ -23,7 +23,7 @@ */ namespace Magento\CheckoutAgreements\Service\V1\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * Checkout agreement data object. diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php b/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php index eee32b41b6230e42e961d859953a08ae1a70e334..00bdee4d36d7a7c67628dc5438db6dc9653419ef 100644 --- a/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php +++ b/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php @@ -23,14 +23,14 @@ */ namespace Magento\CheckoutAgreements\Service\V1\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use \Magento\Framework\Api\ExtensibleObjectBuilder; /** * Checkout agreement data object builder. - * + * * @codeCoverageIgnore */ -class AgreementBuilder extends AbstractExtensibleObjectBuilder +class AgreementBuilder extends ExtensibleObjectBuilder { /** * Sets the agreement ID. diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json index fc699375f82fbeefacd61cefa2f6bc34e4b92ed0..555ebf8e9056a99a12d29bfa45f1a8eb9e380f1e 100644 --- a/app/code/Magento/CheckoutAgreements/composer.json +++ b/app/code/Magento/CheckoutAgreements/composer.json @@ -3,14 +3,14 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/CheckoutAgreements/sql/checkoutagreements_setup/install-1.0.0.0.php b/app/code/Magento/CheckoutAgreements/sql/checkoutagreements_setup/install-1.0.0.0.php index bc2758528586f980f69f0e5084c2fde6e28689d4..bc43c5591f2a219c852b3046d712794d0f75a0be 100644 --- a/app/code/Magento/CheckoutAgreements/sql/checkoutagreements_setup/install-1.0.0.0.php +++ b/app/code/Magento/CheckoutAgreements/sql/checkoutagreements_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json index 62fdca41185aa9c69fe18c776b89537604d42d26..14df5fea779d6f21024f856a8e4e7eab1b15784d 100644 --- a/app/code/Magento/Cms/composer.json +++ b/app/code/Magento/Cms/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-widget": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-email": "0.1.0-alpha102", - "magento/module-ui": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-widget": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-email": "0.1.0-alpha103", + "magento/module-ui": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Cms/data/cms_setup/data-install-1.6.0.0.php b/app/code/Magento/Cms/data/cms_setup/data-install-1.6.0.0.php index 43ac20c90e807e120054e2057c0999ff2bff537c..702eae96f71ee9116bf3014e7caeef6d905a2f39 100644 --- a/app/code/Magento/Cms/data/cms_setup/data-install-1.6.0.0.php +++ b/app/code/Magento/Cms/data/cms_setup/data-install-1.6.0.0.php @@ -21,7 +21,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Cms\Model\Resource\Setup $this */ + +/** @var $this \Magento\Cms\Model\Resource\Setup */ $cmsPages = array( array( diff --git a/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.0-1.6.0.1.php index ce4239a009455cc87495bf588800f98c627c89aa..3b0a93354a527502e729b8517824bb71589206fe 100644 --- a/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -21,7 +21,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Cms\Model\Resource\Setup $this */ + +/** @var $this \Magento\Cms\Model\Resource\Setup */ $pageContent = <<<EOD <p style="color: #ff0000; font-weight: bold; font-size: 13px"> @@ -241,7 +242,6 @@ $privacyPageData = array( 'sort_order' => 0 ); -/** @var \Magento\Cms\Model\Page $page */ $this->createPage()->setData($privacyPageData)->save(); $footerLinksBlock = $this->createPage()->load('footer_links', 'identifier'); diff --git a/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.2-1.6.0.3.php index aebce89d2c0f51121cd00a296fa90e75b729bcf0..16f789dd549fa47b8386c7d32554ce86fca31197 100644 --- a/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup\Migration */ +/** @var $this \Magento\Cms\Model\Resource\Setup */ $installer = $this->createMigrationSetup(); $installer->startSetup(); diff --git a/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.3-2.0.0.0.php b/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.3-2.0.0.0.php index fc2116aae29ee9b1afe3f217afcf2fd38e22e4b5..a78b2d0312814e1a51412c9cc07ce04761214b50 100644 --- a/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.3-2.0.0.0.php +++ b/app/code/Magento/Cms/data/cms_setup/data-upgrade-1.6.0.3-2.0.0.0.php @@ -21,7 +21,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Cms\Model\Resource\Setup $this */ + +/** @var $this \Magento\Cms\Model\Resource\Setup */ $cookieRestriction = $this->createPage()->load('privacy-policy-cookie-restriction-mode', 'identifier'); diff --git a/app/code/Magento/Cms/sql/cms_setup/install-1.6.0.0.php b/app/code/Magento/Cms/sql/cms_setup/install-1.6.0.0.php index 8024899394f3094d94c66e36e710d3d707d1e691..c4d26938488f51b05909be16e7dab834b486f32f 100644 --- a/app/code/Magento/Cms/sql/cms_setup/install-1.6.0.0.php +++ b/app/code/Magento/Cms/sql/cms_setup/install-1.6.0.0.php @@ -22,8 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Cms/sql/cms_setup/upgrade-2.0.0.0-2.0.0.1.php b/app/code/Magento/Cms/sql/cms_setup/upgrade-2.0.0.0-2.0.0.1.php index fd2d029f7e897a0e8cb900f564f5bfb1afa018d3..f3d0f01278c4fa3181293c17b9356df81a4a3405 100644 --- a/app/code/Magento/Cms/sql/cms_setup/upgrade-2.0.0.0-2.0.0.1.php +++ b/app/code/Magento/Cms/sql/cms_setup/upgrade-2.0.0.0-2.0.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json index fd023b122206a8cc39cef4a9f6ecf231e3f8f7a4..7e9b6101b4f4fdd82afa25d6de9427fbb4146209 100644 --- a/app/code/Magento/CmsUrlRewrite/composer.json +++ b/app/code/Magento/CmsUrlRewrite/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-url-rewrite": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-url-rewrite": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json index 43d2b8fd4b2c15cc87ad5db1675e0af1e65c31ac..40df384e749f5e20a9dd8ee92a673f7f96a3e519 100644 --- a/app/code/Magento/ConfigurableImportExport/composer.json +++ b/app/code/Magento/ConfigurableImportExport/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-catalog-import-export": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-import-export": "0.1.0-alpha102", - "magento/module-configurable-product": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-catalog-import-export": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-import-export": "0.1.0-alpha103", + "magento/module-configurable-product": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option.php b/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option.php index 58d539d08ec72bebbfe2edc8420f34feab486981..ed6f6726e17fcdfb169cf3ec96dc9d19a9a437f2 100644 --- a/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option.php +++ b/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option.php @@ -26,7 +26,7 @@ namespace Magento\ConfigurableProduct\Service\V1\Data; /** * @codeCoverageIgnore */ -class Option extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Option extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array diff --git a/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/Value.php b/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/Value.php index 5b3e04b675d6e6df66d17d7753b19c6a1ee28ad1..ff77c205112e698c8ade5e061a5ddcd807c01e7e 100644 --- a/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/Value.php +++ b/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/Value.php @@ -26,7 +26,7 @@ namespace Magento\ConfigurableProduct\Service\V1\Data\Option; /** * @codeCoverageIgnore */ -class Value extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Value extends \Magento\Framework\Api\AbstractExtensibleObject { const INDEX = 'index'; const PRICE = 'price'; diff --git a/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/ValueBuilder.php b/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/ValueBuilder.php index 112195fe8070138efb7da4d3efc3d5479ba42413..af13854801d8e2fb6c26c1a9bc203acbc94ecde2 100644 --- a/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/ValueBuilder.php +++ b/app/code/Magento/ConfigurableProduct/Service/V1/Data/Option/ValueBuilder.php @@ -23,16 +23,16 @@ */ namespace Magento\ConfigurableProduct\Service\V1\Data\Option; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class ValueBuilder extends AbstractExtensibleObjectBuilder +class ValueBuilder extends ExtensibleObjectBuilder { /** - * @param float $value - * @return self + * @param float $value + * @return self */ public function setPrice($value) { @@ -40,8 +40,8 @@ class ValueBuilder extends AbstractExtensibleObjectBuilder } /** - * @param int $value - * @return self + * @param int $value + * @return self */ public function setPercent($value) { diff --git a/app/code/Magento/ConfigurableProduct/Service/V1/Data/OptionBuilder.php b/app/code/Magento/ConfigurableProduct/Service/V1/Data/OptionBuilder.php index f74e0785f70cd7ea5caa6dd80bcdf80cccc1135b..e0f03514a01383ba06500165c67c49e62374db45 100644 --- a/app/code/Magento/ConfigurableProduct/Service/V1/Data/OptionBuilder.php +++ b/app/code/Magento/ConfigurableProduct/Service/V1/Data/OptionBuilder.php @@ -26,7 +26,7 @@ namespace Magento\ConfigurableProduct\Service\V1\Data; /** * @codeCoverageIgnore */ -class OptionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class OptionBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param int $value @@ -65,8 +65,8 @@ class OptionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleOb } /** - * @param bool $value - * @return self + * @param bool $value + * @return self */ public function setType($value) { diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json index fe5dafeb3680e0d39073bf5b3087fc2906f40cc8..1a43a63ebcba8c5dcc8a49e4d847f74c94d6c5a1 100644 --- a/app/code/Magento/ConfigurableProduct/composer.json +++ b/app/code/Magento/ConfigurableProduct/composer.json @@ -3,23 +3,23 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-catalog-rule": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", - "magento/module-webapi": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-catalog-rule": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", + "magento/module-webapi": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/ConfigurableProduct/data/configurableproduct_setup/data-install-1.0.0.0.php b/app/code/Magento/ConfigurableProduct/data/configurableproduct_setup/data-install-1.0.0.0.php index 3a082776544c083d2e68a0cbf89ef9c4a3a1844f..b8795ac4ac6f04624b03a87bcbd0918108ef44d8 100644 --- a/app/code/Magento/ConfigurableProduct/data/configurableproduct_setup/data-install-1.0.0.0.php +++ b/app/code/Magento/ConfigurableProduct/data/configurableproduct_setup/data-install-1.0.0.0.php @@ -21,6 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** @var $installer \Magento\Catalog\Model\Resource\Setup */ $installer = $this; diff --git a/app/code/Magento/ConfigurableProduct/sql/configurableproduct_setup/install-1.0.0.0.php b/app/code/Magento/ConfigurableProduct/sql/configurableproduct_setup/install-1.0.0.0.php index 16fbce9419008a09d8f9bb9d19b9af9aca212e9f..85125ed2ef18fb253e3b8f82b9cd00e85472374f 100644 --- a/app/code/Magento/ConfigurableProduct/sql/configurableproduct_setup/install-1.0.0.0.php +++ b/app/code/Magento/ConfigurableProduct/sql/configurableproduct_setup/install-1.0.0.0.php @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Catalog\Model\Resource\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json index 8495841bb87a3406291f79ab3761c5526deeb6da..ea0865667585cac9641453206ef131f0023e46c4 100644 --- a/app/code/Magento/Contact/composer.json +++ b/app/code/Magento/Contact/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Core/composer.json b/app/code/Magento/Core/composer.json index e145c2943ff837a8bad7bc38fe9e4e6a80e9afdb..b32e8bdd5a99a5b96f073546b182ede399dabfef 100644 --- a/app/code/Magento/Core/composer.json +++ b/app/code/Magento/Core/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-cron": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-page-cache": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-cron": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-page-cache": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.12-1.6.0.13.php b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.12-1.6.0.13.php index 1655e11fc2a52320afc2defc03c4a87b60f6404f..96ae466cd1a80bcc0787d561e108837906167979 100644 --- a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.12-1.6.0.13.php +++ b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.12-1.6.0.13.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** @var $this \Magento\Core\Model\Resource\Setup */ $fileCollection = $this->createThemeFactory(); $fileCollection->addDefaultPattern('*'); $fileCollection->setItemObjectClass('Magento\Core\Model\Theme\Data'); -/** @var $themeDbCollection \Magento\Core\Model\Resource\Theme\Collection */ $themeDbCollection = $this->createThemeResourceFactory(); $themeDbCollection->setItemObjectClass('Magento\Core\Model\Theme\Data'); diff --git a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.2-1.6.0.3.php index e5f9d26debf1dbcb4f790e340f8d4fe721305826..ef8b1a2e051b9265e50299fef0e077662f92d563 100644 --- a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Core\Model\Resource\Setup */ $installer = $this; $connection = $installer->getConnection(); $connection->update( diff --git a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.3-1.6.0.4.php b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.3-1.6.0.4.php index 5a1e1516d496e21c182bba4e42616235e1dfb968..66ea8928b31f28638596c2aff6040dc8dffa8384 100644 --- a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.3-1.6.0.4.php +++ b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.3-1.6.0.4.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup\Migration */ +/** @var $this \Magento\Core\Model\Resource\Setup */ $installer = $this->createMigrationSetup(); $installer->startSetup(); diff --git a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php index 0e03bc5a2968dce92f79d85308f294377aebf0d2..c740802c293f0c8446c6766b1f838ed8ef685d59 100644 --- a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php +++ b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Core\Model\Resource\Setup */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.5-1.6.0.6.php b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.5-1.6.0.6.php index 9b9903ae2482c05a3fd0ef40004dc4e73759d2b1..88558b9b1958162c63a8f1d6c009b66dbd4b68d5 100644 --- a/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.5-1.6.0.6.php +++ b/app/code/Magento/Core/data/core_setup/data-upgrade-1.6.0.5-1.6.0.6.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Core\Model\Resource\Setup */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml index b19ce4ecde7ee3a91cc789faa0bc7cd2e1624b85..6b0cccecec7a4f34bdbc63e4f5788fffa95b25bc 100644 --- a/app/code/Magento/Core/etc/di.xml +++ b/app/code/Magento/Core/etc/di.xml @@ -77,13 +77,16 @@ <preference for="Magento\Framework\Stdlib\DateTime\TimezoneInterface" type="Magento\Framework\Stdlib\DateTime\Timezone" /> <preference for="Magento\Framework\Stdlib\DateTime\DateInterface" type="Magento\Framework\Stdlib\DateTime\Date" /> <preference for="Magento\Framework\Less\PreProcessor\ErrorHandlerInterface" type="Magento\Framework\Less\PreProcessor\ErrorHandler" /> - <preference for="Magento\Framework\Module\ResourceInterface" type="Magento\Install\Model\Resource\Resource" /> + <preference for="Magento\Framework\Module\ResourceInterface" type="Magento\Framework\Module\Resource" /> <preference for="Magento\Framework\App\Config\Resource\ConfigInterface" type="Magento\Core\Model\Resource\Config" /> <preference for="Magento\Framework\App\DesignInterface" type="Magento\Core\Model\Design" /> <preference for="Magento\Framework\Pricing\Amount\AmountInterface" type="Magento\Framework\Pricing\Amount\Base" /> <preference for="Magento\Framework\Stdlib\CookieManager" type="Magento\Framework\Stdlib\Cookie\PhpCookieManager" /> <preference for="Magento\Framework\View\Page\FaviconInterface" type="Magento\Theme\Model\Favicon\Favicon" /> - <preference for="Magento\Framework\Api\Data\AttributeInterface" type="Magento\Framework\Service\Data\AttributeValue" /> + <preference for="Magento\Framework\Api\SearchResultsInterface" type="Magento\Framework\Api\SearchResults" /> + <preference for="Magento\Framework\Api\SearchCriteriaInterface" type="Magento\Framework\Api\SearchCriteria" /> + <preference for="Magento\Framework\Api\AttributeInterface" type="Magento\Framework\Api\AttributeValue" /> + <preference for="Magento\Framework\View\Design\Theme\ListInterface" type="Magento\Core\Model\Theme\Collection" /> <type name="Magento\Framework\App\DefaultPath\DefaultPath"> <arguments> <argument name="parts" xsi:type="array"> @@ -421,7 +424,6 @@ <argument name="themes" xsi:type="array"> <item name="frontend" xsi:type="string">Magento/blank</item> <item name="adminhtml" xsi:type="string">Magento/backend</item> - <item name="install" xsi:type="string">Magento/basic</item> </argument> </arguments> </type> diff --git a/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php b/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php index f9acae362c9a045d8247c3ab33ec297a8a24d3af..af689c754021f83936d132245a4e03ec096296d4 100644 --- a/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php +++ b/app/code/Magento/Core/sql/core_setup/install-1.6.0.0.php @@ -22,8 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.1-1.6.0.2.php index bd1fd91291549a8a01f076a4b3801ac00bc0342e..bb72a23124194e01c5afcdf20e41766cc3563a99 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.10-1.6.0.11.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.10-1.6.0.11.php index 2b7dfd23093673314cf45b03c881ab019ff915be..7d510332e795f97ac10ac47b13f539035ad5bade 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.10-1.6.0.11.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.10-1.6.0.11.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.11-1.6.0.12.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.11-1.6.0.12.php index ad640dfd353910928c31bafbf4b5c7bb4fe921a4..0282a04b3f78596625c2f411fff8c5a292806351 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.11-1.6.0.12.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.11-1.6.0.12.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.12-1.6.0.13.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.12-1.6.0.13.php index ca1a5499a03b3ed2f10b7f16697975efa81d8e2b..0b1df3e2eead76f6801e89d66d867de37ca5aa60 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.12-1.6.0.13.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.12-1.6.0.13.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.13-1.6.0.14.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.13-1.6.0.14.php index 107cbdcee477429a6c9c6768b0419e608c61160b..5d086f014cfad44dbedb1c8cfe079f2c8efe7553 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.13-1.6.0.14.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.13-1.6.0.14.php @@ -22,6 +22,6 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $this \Magento\Framework\Module\Setup */ +/* @var $this \Magento\Setup\Module\SetupModule */ $connection = $this->getConnection(); $connection->dropTable('core_theme_file_update'); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.14-1.6.0.15.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.14-1.6.0.15.php index 119f2a8b46d8480bc202e8fba1ffebd385966d7e..ba6bb0a038494aa3c2ccd81ac7dee9855d4f78f5 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.14-1.6.0.15.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.14-1.6.0.15.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.2-1.6.0.3.php index 555b3bcd2b03474073b13883420b5fd24a7de1f6..0abbdd3c6c3c4bf85690cd4f89b09011fe8609a2 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.3-1.6.0.4.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.3-1.6.0.4.php index eaae8cff7c7ed97759b2bdd0e429aef9d1278155..7813b78306ff19b4ca9e2c2952edc8b4f2d78e92 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.3-1.6.0.4.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.3-1.6.0.4.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php index 7beb3848c09c1dc982880a79dba5f003e0ec3a79..5cfc71569d00dc2bb9ea6a42d23e925e1ad6198d 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.6-1.6.0.7.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.6-1.6.0.7.php index 8d7ad8c810f9097003424882b092339fe41ff0a7..3481b2f037f442f68217721dee928e819d02cc47 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.6-1.6.0.7.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.6-1.6.0.7.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.7-1.6.0.8.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.7-1.6.0.8.php index 3359dfceff3053046f2df3750cc47faf279289c9..c3008afc9053567805173de5cd1ac391a1ac48cc 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.7-1.6.0.8.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.7-1.6.0.8.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.8-1.6.0.9.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.8-1.6.0.9.php index f0b68ad19371dc998171abcbae8feccac74009ac..fda35b58a742357e8ffa55a9b18526a0cfd7236c 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.8-1.6.0.9.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.8-1.6.0.9.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.9-1.6.0.10.php b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.9-1.6.0.10.php index 6954a5cf3763cf3c0006db6ccaf87bc27aae45bc..cf4e7f9dde99bc8517b5c491057d4f3ee5a8beee 100644 --- a/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.9-1.6.0.10.php +++ b/app/code/Magento/Core/sql/core_setup/upgrade-1.6.0.9-1.6.0.10.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Core/view/adminhtml/web/prototype/magento.css b/app/code/Magento/Core/view/adminhtml/web/prototype/magento.css index d4b0c94a76a3ab3cb81a70326cb537e23bf17d86..492526f84127dddc250bce9a843c9807a3ed16a2 100644 --- a/app/code/Magento/Core/view/adminhtml/web/prototype/magento.css +++ b/app/code/Magento/Core/view/adminhtml/web/prototype/magento.css @@ -162,10 +162,6 @@ padding: 6px 0 0; } -.popup-window [id$="_focus_anchor"]:focus { - outline: none; -} - .popup-window .page-actions { padding: 0; position: absolute; diff --git a/app/code/Magento/Core/view/frontend/web/prototype/magento.css b/app/code/Magento/Core/view/frontend/web/prototype/magento.css index 97a1b34a5cc588e1512ec4adcc2b402d5c491922..9c649735b05b0ed504db6c058825e898e7fa9cb6 100644 --- a/app/code/Magento/Core/view/frontend/web/prototype/magento.css +++ b/app/code/Magento/Core/view/frontend/web/prototype/magento.css @@ -137,7 +137,6 @@ padding: 9px 11px 9px; box-shadow: none; text-shadow: none; - outline: none; text-decoration: none; } diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json index cbc749a5bf0bf54a00736728ef57f3e72c84337d..b5784bd3d380d9f5a637f78a9cdd23570ecab50c 100644 --- a/app/code/Magento/Cron/composer.json +++ b/app/code/Magento/Cron/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Cron/sql/cron_setup/install-1.6.0.0.php b/app/code/Magento/Cron/sql/cron_setup/install-1.6.0.0.php index 988e630aebd93efe4e399e46dae2d75ba913b2d8..a947772dc9d24aade0804e5194f974f3ecaeae26 100644 --- a/app/code/Magento/Cron/sql/cron_setup/install-1.6.0.0.php +++ b/app/code/Magento/Cron/sql/cron_setup/install-1.6.0.0.php @@ -22,9 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -/* @var $installer \Magento\Framework\Module\Setup */ - +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json index 9d232c2af2a98857c7519f16e94adad9ed224be0..3477e2ed64c48dcc4fdee570ddb3b4275e9b0d83 100644 --- a/app/code/Magento/CurrencySymbol/composer.json +++ b/app/code/Magento/CurrencySymbol/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-page-cache": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-page-cache": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Customer/Api/AccountManagementInterface.php b/app/code/Magento/Customer/Api/AccountManagementInterface.php index cff1135d78b200a7a32ac4b7e2fc4b6f5ca02b09..b32cb52ab15b961990ceba8627cb0f9277171d45 100644 --- a/app/code/Magento/Customer/Api/AccountManagementInterface.php +++ b/app/code/Magento/Customer/Api/AccountManagementInterface.php @@ -30,18 +30,6 @@ namespace Magento\Customer\Api; */ interface AccountManagementInterface { - const DEFAULT_PASSWORD_LENGTH = 6; - - /** - * Constants for the type of new account email to be sent - */ - const NEW_ACCOUNT_EMAIL_REGISTERED = 'registered'; - - /** - * Welcome email, when confirmation is enabled - */ - const NEW_ACCOUNT_EMAIL_CONFIRMATION = 'confirmation'; - /** * Create customer account. Perform necessary business operations like sending email. * @@ -51,7 +39,11 @@ interface AccountManagementInterface * @return \Magento\Customer\Api\Data\CustomerInterface * @throws \Magento\Framework\Exception\LocalizedException */ - public function createAccount(\Magento\Customer\Api\Data\CustomerInterface $customer, $password, $redirectUrl = ''); + public function createAccount( + \Magento\Customer\Api\Data\CustomerInterface $customer, + $password = null, + $redirectUrl = '' + ); /** * Create customer account using provided hashed password. Should not be exposed as a webapi. diff --git a/app/code/Magento/Customer/Api/AddressMetadataInterface.php b/app/code/Magento/Customer/Api/AddressMetadataInterface.php index 92fbea738562890dcae2679fedf91cfead772e4e..456ec30819290369c49048b53847a764dd6c6eb6 100644 --- a/app/code/Magento/Customer/Api/AddressMetadataInterface.php +++ b/app/code/Magento/Customer/Api/AddressMetadataInterface.php @@ -33,5 +33,5 @@ interface AddressMetadataInterface extends MetadataInterface const ENTITY_TYPE_ADDRESS = 'customer_address'; - const DATA_INTERFACE_NAME = 'Magento\Customer\Api\Data\Address'; + const DATA_INTERFACE_NAME = 'Magento\Customer\Api\Data\AddressInterface'; } diff --git a/app/code/Magento/Customer/Api/AddressRepositoryInterface.php b/app/code/Magento/Customer/Api/AddressRepositoryInterface.php index f7a1e069815c6e97244865f15de5149401553b16..655326a58de1af2ff920b743b879aae4b6a1b5e1 100644 --- a/app/code/Magento/Customer/Api/AddressRepositoryInterface.php +++ b/app/code/Magento/Customer/Api/AddressRepositoryInterface.php @@ -50,11 +50,11 @@ interface AddressRepositoryInterface /** * Retrieve customers addresses matching the specified criteria. * - * @param \Magento\Framework\Api\Data\SearchCriteriaInterface $searchCriteria + * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return \Magento\Customer\Api\Data\AddressSearchResultsInterface * @throws \Magento\Framework\Exception\LocalizedException */ - public function getList(\Magento\Framework\Api\Data\SearchCriteriaInterface $searchCriteria); + public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria); /** * Delete customer address. diff --git a/app/code/Magento/Customer/Api/CustomerMetadataInterface.php b/app/code/Magento/Customer/Api/CustomerMetadataInterface.php index c7c2448567fe942b040dce36223c0aa05a5ecc7c..cc1466a20382d27a8011516c86a2a0db6cf6c5cc 100644 --- a/app/code/Magento/Customer/Api/CustomerMetadataInterface.php +++ b/app/code/Magento/Customer/Api/CustomerMetadataInterface.php @@ -33,5 +33,5 @@ interface CustomerMetadataInterface extends MetadataInterface const ENTITY_TYPE_CUSTOMER = 'customer'; - const DATA_INTERFACE_NAME = 'Magento\Customer\Api\Data\Customer'; + const DATA_INTERFACE_NAME = 'Magento\Customer\Api\Data\CustomerInterface'; } diff --git a/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php b/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php index cab779b8f699e2e7b3f98543f9060cdc38fb879f..b53f272b329d5221ac085f8baa5cb71020591b64 100644 --- a/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php +++ b/app/code/Magento/Customer/Api/CustomerRepositoryInterface.php @@ -34,12 +34,13 @@ interface CustomerRepositoryInterface * Create customer. * * @param \Magento\Customer\Api\Data\CustomerInterface $customer + * @param string $passwordHash * @return \Magento\Customer\Api\Data\CustomerInterface * @throws \Magento\Framework\Exception\InputException If bad input is provided * @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used * @throws \Magento\Framework\Exception\LocalizedException */ - public function save(\Magento\Customer\Api\Data\CustomerInterface $customer); + public function save(\Magento\Customer\Api\Data\CustomerInterface $customer, $passwordHash = null); /** * Retrieve customer. @@ -47,19 +48,30 @@ interface CustomerRepositoryInterface * @param string $email * @param int|null $websiteId * @return \Magento\Customer\Api\Data\CustomerInterface - * @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified ID does not exist. + * @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified email does not exist. * @throws \Magento\Framework\Exception\LocalizedException */ public function get($email, $websiteId = null); + /** + * Retrieve customer. + * + * @param int $customerId + * @param int|null $websiteId + * @return \Magento\Customer\Api\Data\CustomerInterface + * @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified ID does not exist. + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function getById($customerId, $websiteId = null); + /** * Retrieve customers which match a specified criteria. * - * @param \Magento\Framework\Api\Data\SearchCriteriaInterface $searchCriteria + * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return \Magento\Customer\Api\Data\CustomerSearchResultsInterface * @throws \Magento\Framework\Exception\LocalizedException */ - public function getList(\Magento\Framework\Api\Data\SearchCriteriaInterface $searchCriteria); + public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria); /** * Delete customer. diff --git a/app/code/Magento/Customer/Api/Data/AddressInterface.php b/app/code/Magento/Customer/Api/Data/AddressInterface.php index 5116c7a1a420ed9f5ba6dc1ad1867ff21fb190a4..3e616dd30f44aa207baa63ce0d2f7e1dbefceda4 100644 --- a/app/code/Magento/Customer/Api/Data/AddressInterface.php +++ b/app/code/Magento/Customer/Api/Data/AddressInterface.php @@ -25,13 +25,34 @@ namespace Magento\Customer\Api\Data; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\ExtensibleDataInterface; /** * Customer address interface. */ interface AddressInterface extends ExtensibleDataInterface { + /**#@+ + * Constants for keys of data array. Identical to the name of the getter in snake case + */ + const ID = 'id'; + const CUSTOMER_ID = 'customer_id'; + const REGION = 'region'; + const COUNTRY_ID = 'country_id'; + const STREET = 'street'; + const COMPANY = 'company'; + const TELEPHONE = 'telephone'; + const FAX = 'fax'; + const POSTCODE = 'postcode'; + const CITY = 'city'; + const FIRSTNAME = 'firstname'; + const LASTNAME = 'lastname'; + const MIDDLENAME = 'middlename'; + const PREFIX = 'prefix'; + const SUFFIX = 'suffix'; + const VAT_ID = 'vat_id'; + /**#@-*/ + /** * Get ID * @@ -54,9 +75,9 @@ interface AddressInterface extends ExtensibleDataInterface public function getRegion(); /** - * Get country id + * Two-letter country code in ISO_3166-2 format * - * @return int|null + * @return string|null */ public function getCountryId(); diff --git a/app/code/Magento/Customer/Api/Data/AddressSearchResultsInterface.php b/app/code/Magento/Customer/Api/Data/AddressSearchResultsInterface.php index c73da297a2b897bcd55c2e65db9a3a19a44bebd2..5dfb8dd4006a99a8caa087d1685c158c30ecebcb 100644 --- a/app/code/Magento/Customer/Api/Data/AddressSearchResultsInterface.php +++ b/app/code/Magento/Customer/Api/Data/AddressSearchResultsInterface.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Api\Data; /** * Interface for customer address search results. */ -interface AddressSearchResultsInterface extends \Magento\Framework\Api\Data\SearchResultsInterface +interface AddressSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface { /** * Get customer addresses list. diff --git a/app/code/Magento/Customer/Api/Data/AttributeMetadataInterface.php b/app/code/Magento/Customer/Api/Data/AttributeMetadataInterface.php index 76956a33f39c4dfe5ba737ab0391992ed897a176..478b84718b7b2d34f19897b1e33aee00a9a3505d 100644 --- a/app/code/Magento/Customer/Api/Data/AttributeMetadataInterface.php +++ b/app/code/Magento/Customer/Api/Data/AttributeMetadataInterface.php @@ -29,6 +29,28 @@ namespace Magento\Customer\Api\Data; */ interface AttributeMetadataInterface { + /**#@+ + * Constants used as keys of data array + */ + const ATTRIBUTE_CODE = 'attribute_code'; + const FRONTEND_INPUT = 'frontend_input'; + const INPUT_FILTER = 'input_filter'; + const STORE_LABEL = 'store_label'; + const VALIDATION_RULES = 'validation_rules'; + const OPTIONS = 'options'; + const VISIBLE = 'visible'; + const REQUIRED = 'required'; + const MULTILINE_COUNT = 'multiline_count'; + const DATA_MODEL = 'data_model'; + const USER_DEFINED = 'user_defined'; + const FRONTEND_CLASS = 'frontend_class'; + const SORT_ORDER = 'sort_order'; + const FRONTEND_LABEL = 'frontend_label'; + const SYSTEM = 'system'; + const NOTE = 'note'; + const BACKEND_TYPE = 'backend_type'; + /**#@-*/ + /** * Retrieve code of the attribute. * @@ -60,7 +82,7 @@ interface AttributeMetadataInterface /** * Retrieve validation rules. * - * @return \Magento\Customer\Service\V1\Data\Eav\ValidationRule[] + * @return \Magento\Customer\Api\Data\ValidationRuleInterface[] */ public function getValidationRules(); @@ -95,7 +117,7 @@ interface AttributeMetadataInterface /** * Return options of the attribute (key => value pairs for select) * - * @return \Magento\Customer\Service\V1\Data\Eav\Option[] + * @return \Magento\Customer\Api\Data\OptionInterface[] */ public function getOptions(); diff --git a/app/code/Magento/Customer/Api/Data/CustomerInterface.php b/app/code/Magento/Customer/Api/Data/CustomerInterface.php index 68d6a8632751da134a8dfba7b4bafa2ffa03dead..252363cf00652f342d1407408c8072fdf46ff6a4 100644 --- a/app/code/Magento/Customer/Api/Data/CustomerInterface.php +++ b/app/code/Magento/Customer/Api/Data/CustomerInterface.php @@ -25,13 +25,37 @@ namespace Magento\Customer\Api\Data; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\ExtensibleDataInterface; /** * Customer interface. */ interface CustomerInterface extends ExtensibleDataInterface { + /**#@+ + * Constants defined for keys of the data array. Identical to the name of the getter in snake case + */ + const ID = 'id'; + const CONFIRMATION = 'confirmation'; + const CREATED_AT = 'created_at'; + const CREATED_IN = 'created_in'; + const DOB = 'dob'; + const EMAIL = 'email'; + const FIRSTNAME = 'firstname'; + const GENDER = 'gender'; + const GROUP_ID = 'group_id'; + const LASTNAME = 'lastname'; + const MIDDLENAME = 'middlename'; + const PREFIX = 'prefix'; + const STORE_ID = 'store_id'; + const SUFFIX = 'suffix'; + const TAXVAT = 'taxvat'; + const WEBSITE_ID = 'website_id'; + const DEFAULT_BILLING = 'default_billing'; + const DEFAULT_SHIPPING = 'default_shipping'; + const KEY_ADDRESSES = 'addresses'; + /**#@-*/ + /** * Get customer id * diff --git a/app/code/Magento/Customer/Api/Data/CustomerSearchResultsInterface.php b/app/code/Magento/Customer/Api/Data/CustomerSearchResultsInterface.php index 702c2bea45b1e341dad643983a3955cd26b517c6..af463d4fba3c01d683a2529751f25418d573eea5 100644 --- a/app/code/Magento/Customer/Api/Data/CustomerSearchResultsInterface.php +++ b/app/code/Magento/Customer/Api/Data/CustomerSearchResultsInterface.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Api\Data; /** * Interface for customer search results. */ -interface CustomerSearchResultsInterface extends \Magento\Framework\Api\Data\SearchResultsInterface +interface CustomerSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface { /** * Get customers list. diff --git a/app/code/Magento/Customer/Api/Data/GroupInterface.php b/app/code/Magento/Customer/Api/Data/GroupInterface.php index 901776333ba408a61deac1139ec4ed65654edb37..b375e4c3000e7e7aa34f7418af4bbe7fd7c89d85 100644 --- a/app/code/Magento/Customer/Api/Data/GroupInterface.php +++ b/app/code/Magento/Customer/Api/Data/GroupInterface.php @@ -25,17 +25,26 @@ namespace Magento\Customer\Api\Data; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\ExtensibleDataInterface; /** * Customer group interface. */ interface GroupInterface extends ExtensibleDataInterface { + /**#@+ + * Constants for keys of data array + */ + const ID = 'id'; + const CODE = 'code'; + const TAX_CLASS_ID = 'tax_class_id'; + const TAX_CLASS_NAME = 'tax_class_name'; + /**#@-*/ + /** * Get id * - * @return int + * @return int|null */ public function getId(); @@ -56,7 +65,7 @@ interface GroupInterface extends ExtensibleDataInterface /** * Get tax class name * - * @return string + * @return string|null */ public function getTaxClassName(); } diff --git a/app/code/Magento/Customer/Api/Data/GroupSearchResultsInterface.php b/app/code/Magento/Customer/Api/Data/GroupSearchResultsInterface.php index 61b28e75ef78a2b7c0ae4cca3f53a9d6761b51ec..1aa2bfd8f5f3335ddb148c52fda6ad14678dd2d7 100644 --- a/app/code/Magento/Customer/Api/Data/GroupSearchResultsInterface.php +++ b/app/code/Magento/Customer/Api/Data/GroupSearchResultsInterface.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Api\Data; /** * Interface for customer groups search results. */ -interface GroupSearchResultsInterface extends \Magento\Framework\Api\Data\SearchResultsInterface +interface GroupSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface { /** * Get customer groups list. diff --git a/app/code/Magento/Customer/Api/Data/OptionInterface.php b/app/code/Magento/Customer/Api/Data/OptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..67e9c974423730ceca5a5b9d5ca1eb87b916f5f7 --- /dev/null +++ b/app/code/Magento/Customer/Api/Data/OptionInterface.php @@ -0,0 +1,61 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Api\Data; + +/** + * Option interface. + */ +interface OptionInterface +{ + /**#@+ + * Constants for keys of data array + */ + const LABEL = 'label'; + const VALUE = 'value'; + const OPTIONS = 'options'; + /**#@-*/ + + /** + * Get option label + * + * @return string + */ + public function getLabel(); + + /** + * Get option value + * + * @return string|null + */ + public function getValue(); + + /** + * Get nested options + * + * @return \Magento\Customer\Api\Data\OptionInterface[]|null + */ + public function getOptions(); +} diff --git a/app/code/Magento/Customer/Api/Data/RegionInterface.php b/app/code/Magento/Customer/Api/Data/RegionInterface.php index ffcb8f275965238d3f4ed42cb3bd737d0a6791c9..e4c1cee8c1b7e1fdca278b99bf74cd8a9d9d89e1 100644 --- a/app/code/Magento/Customer/Api/Data/RegionInterface.php +++ b/app/code/Magento/Customer/Api/Data/RegionInterface.php @@ -24,13 +24,21 @@ */ namespace Magento\Customer\Api\Data; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\ExtensibleDataInterface; /** * Customer address region interface. */ interface RegionInterface extends ExtensibleDataInterface { + /**#@+ + * Constants for keys of data array. Identical to the getters in snake case + */ + const REGION_CODE = 'region_code'; + const REGION = 'region'; + const REGION_ID = 'region_id'; + /**#@-*/ + /** * Get region code * diff --git a/app/code/Magento/Customer/Api/Data/ValidationResultsInterface.php b/app/code/Magento/Customer/Api/Data/ValidationResultsInterface.php index f8895e8d762314e743a97d9eed503ed35dca4f1c..ce16a5c0695c9f14b8c98dce5d63d920e4176a84 100644 --- a/app/code/Magento/Customer/Api/Data/ValidationResultsInterface.php +++ b/app/code/Magento/Customer/Api/Data/ValidationResultsInterface.php @@ -30,6 +30,13 @@ namespace Magento\Customer\Api\Data; */ interface ValidationResultsInterface { + /**#@+ + * Constants for keys of data array + */ + const VALID = 'valid'; + const MESSAGES = 'messages'; + /**#@-*/ + /** * Check if the provided data is valid. * diff --git a/app/code/Magento/Install/Block/Db/Type/Mysql4.php b/app/code/Magento/Customer/Api/Data/ValidationRuleInterface.php similarity index 69% rename from app/code/Magento/Install/Block/Db/Type/Mysql4.php rename to app/code/Magento/Customer/Api/Data/ValidationRuleInterface.php index c3b57551aac40b3a44188de434af003344723dd9..9cdd3574a7954c37920cbed5ee66111f0178fb73 100644 --- a/app/code/Magento/Install/Block/Db/Type/Mysql4.php +++ b/app/code/Magento/Customer/Api/Data/ValidationRuleInterface.php @@ -1,5 +1,6 @@ <?php /** + * * Magento * * NOTICE OF LICENSE @@ -22,19 +23,31 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Customer\Api\Data; + /** - * Mysql4 config installation block - * - * @author Magento Core Team <core@magentocommerce.com> + * Validation rule interface. */ -namespace Magento\Install\Block\Db\Type; - -class Mysql4 extends \Magento\Install\Block\Db\Type +interface ValidationRuleInterface { + /**#@+ + * Constants for keys of data array + */ + const NAME = 'name'; + const VALUE = 'value'; + /**#@-*/ + + /** + * Get validation rule name + * + * @return string + */ + public function getName(); + /** - * Db title + * Get validation rule value * - * @var string + * @return string */ - protected $_title = 'MySQL'; + public function getValue(); } diff --git a/app/code/Magento/Customer/Api/GroupManagementInterface.php b/app/code/Magento/Customer/Api/GroupManagementInterface.php index a8a36ac8bab640e7778e80c6b9a0acd920b9ecdb..cb2e4a32092295607bd2f6f3cfa358c8a1564df7 100644 --- a/app/code/Magento/Customer/Api/GroupManagementInterface.php +++ b/app/code/Magento/Customer/Api/GroupManagementInterface.php @@ -32,12 +32,12 @@ interface GroupManagementInterface /** * Check if customer group can be deleted. * - * @param int $groupId + * @param int $id * @return bool * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found * @throws \Magento\Framework\Exception\LocalizedException */ - public function isReadonly($groupId); + public function isReadonly($id); /** * Get default customer group. diff --git a/app/code/Magento/Customer/Api/GroupRepositoryInterface.php b/app/code/Magento/Customer/Api/GroupRepositoryInterface.php index a89bd29c2fbc27e51112f4d5417398ba4a9ee906..e1209277374031739d51d3a4aa3a7eea86a53c35 100644 --- a/app/code/Magento/Customer/Api/GroupRepositoryInterface.php +++ b/app/code/Magento/Customer/Api/GroupRepositoryInterface.php @@ -46,12 +46,12 @@ interface GroupRepositoryInterface /** * Get customer group by group ID. * - * @param int $groupId + * @param int $id * @return \Magento\Customer\Api\Data\GroupInterface * @throws \Magento\Framework\Exception\NoSuchEntityException If $groupId is not found * @throws \Magento\Framework\Exception\LocalizedException */ - public function get($groupId); + public function get($id); /** * Retrieve customer groups. @@ -59,11 +59,11 @@ interface GroupRepositoryInterface * The list of groups can be filtered to exclude the NOT_LOGGED_IN group using the first parameter and/or it can * be filtered by tax class. * - * @param \Magento\Framework\Api\Data\SearchCriteriaInterface $searchCriteria + * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria * @return \Magento\Customer\Api\Data\GroupSearchResultsInterface * @throws \Magento\Framework\Exception\LocalizedException */ - public function getList(\Magento\Framework\Api\Data\SearchCriteriaInterface $searchCriteria); + public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria); /** * Delete customer group. @@ -78,11 +78,11 @@ interface GroupRepositoryInterface /** * Delete customer group by ID. * - * @param int $groupId + * @param int $id * @return bool true on success * @throws \Magento\Framework\Exception\NoSuchEntityException * @throws \Magento\Framework\Exception\StateException If customer group cannot be deleted * @throws \Magento\Framework\Exception\LocalizedException */ - public function deleteById($groupId); + public function deleteById($id); } diff --git a/app/code/Magento/Customer/Api/MetadataInterface.php b/app/code/Magento/Customer/Api/MetadataInterface.php index 63197ef988bf15f5cc0ea5e2f6946003c47a3d9f..cae0dd577ab99a4a84d3d36a7a9664c0115134c3 100644 --- a/app/code/Magento/Customer/Api/MetadataInterface.php +++ b/app/code/Magento/Customer/Api/MetadataInterface.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Api; /** * Interface for getting attributes metadata. Note that this interface should not be used directly, use its children. */ -interface MetadataInterface +interface MetadataInterface extends \Magento\Framework\Api\MetadataServiceInterface { /** * Retrieve all attributes filtered by form code diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php index 65f3ad7861e83e5d6877a8dbe912dcb00b8b20d3..c75b45a1401c7498208b96e3a085103818581da2 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Form.php @@ -83,7 +83,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic $form->addField('id', 'hidden', array('name' => 'customer_id')); $customer = $this->_customerAccountService->getCustomer($customerId); $form->setValues( - \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer) + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer) )->addValues( array('customer_id' => $customerId) ); diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php index 3fd6e8f1a0c2b1ffa5e489f2ade9bae58c18d6c8..addab2709eb9febe76a992aee80e48e1529d6252 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Account.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Block\Adminhtml\Edit\Tab; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensibleDataObjectConverter; /** * Customer account form block diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php index 7d250dda2cbfb146c59bfb13cdc0ed540e35586e..b0b4ba6156ddad89fca6cb866cf14118b4d2c0c1 100644 --- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php +++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Addresses.php @@ -28,7 +28,6 @@ use Magento\Customer\Service\V1\AddressMetadataServiceInterface; use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder; use Magento\Customer\Service\V1\Data\Address; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; use Magento\Customer\Service\V1\Data\AddressBuilder; use Magento\Customer\Service\V1\Data\CustomerBuilder; use Magento\Framework\Exception\NoSuchEntityException; @@ -233,7 +232,6 @@ class Addresses extends GenericMetadata */ public function initForm() { - $customerData = $this->_backendSession->getCustomerData(); /** @var \Magento\Framework\Data\Form $form */ @@ -294,6 +292,12 @@ class Addresses extends GenericMetadata $country->addClass('countries'); } + $postcode = $form->getElement('postcode'); + if ($postcode) { + $postcode->removeClass('required-entry') + ->setRequired(!$this->_directoryHelper->isZipCodeOptional($address->getCountryId())); + } + if ($this->isReadonly()) { foreach ($this->_addressMetadataService->getAllAttributesMetadata() as $attribute) { $element = $form->getElement($attribute->getAttributeCode()); @@ -345,6 +349,30 @@ class Addresses extends GenericMetadata return $this; } + /** + * @param Address $address + * @return $this + */ + public function initAddressForm(Address $address) + { + $form = $this->initForm()->getForm(); + + $postcode = $form->getElement('postcode'); + if ($postcode) { + $postcode->removeClass('required-entry') + ->setRequired(!$this->_directoryHelper->isZipCodeOptional($address->getCountryId())); + } + + $form->addValues(AddressConverter::toFlatArray($address)) + ->setHtmlIdPrefix("_item{$address->getId()}") + ->setFieldNameSuffix('address[' . $address->getId() . ']'); + + $this->addValuesToNamePrefixElement($address->getPrefix()) + ->addValuesToNameSuffixElement($address->getSuffix()); + + return $this; + } + /** * @return string */ diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php index 2a33cba3ea95d4530d0cc4a6b58d7843251da11f..8edd889b94c3192c45479ae1f31b24c8672d63a5 100644 --- a/app/code/Magento/Customer/Block/Widget/Dob.php +++ b/app/code/Magento/Customer/Block/Widget/Dob.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Block\Widget; use Magento\Framework\Stdlib\DateTime\TimezoneInterface; -use Magento\Framework\Service\ArrayObjectSearch; +use Magento\Framework\Api\ArrayObjectSearch; class Dob extends AbstractWidget { diff --git a/app/code/Magento/Customer/Block/Widget/Gender.php b/app/code/Magento/Customer/Block/Widget/Gender.php index 9654cce28d44aa1f720149793ab066e4c51d97d9..695a829fc7ff35d1bb280e91df62b1ca4d189ebc 100644 --- a/app/code/Magento/Customer/Block/Widget/Gender.php +++ b/app/code/Magento/Customer/Block/Widget/Gender.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Block\Widget; use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; use Magento\Customer\Service\V1\Data\Customer; -use Magento\Customer\Service\V1\Data\Eav\Option; +use Magento\Customer\Api\Data\OptionInterface; /** * Block to render customer's gender attribute @@ -107,7 +107,7 @@ class Gender extends AbstractWidget /** * Returns options from gender attribute - * @return Option[] + * @return OptionInterface[] */ public function getGenderOptions() { diff --git a/app/code/Magento/Customer/Controller/Account/CreatePost.php b/app/code/Magento/Customer/Controller/Account/CreatePost.php index b973b74dc821c4b67453aadb024a9d2cee7ae5c6..31fdf9827e2c3ded0d7a60551102d8268279c5e0 100644 --- a/app/code/Magento/Customer/Controller/Account/CreatePost.php +++ b/app/code/Magento/Customer/Controller/Account/CreatePost.php @@ -205,16 +205,23 @@ class CreatePost extends \Magento\Customer\Controller\Account $this->_getSession()->regenerateId(); try { - $customer = $this->customerExtractor->extract('customer_account_create', $this->_request); $address = $this->extractAddress(); $addresses = is_null($address) ? array() : array($address); - $password = $this->getRequest()->getParam('password'); - $redirectUrl = $this->_getSession()->getBeforeAuthUrl(); + + $customer = $this->customerExtractor->extract('customer_account_create', $this->_request); $customerDetails = $this->customerDetailsBuilder ->setCustomer($customer) ->setAddresses($addresses) ->create(); - $customer = $this->customerAccountService->createCustomer($customerDetails, $password, $redirectUrl); + + $password = $this->getRequest()->getParam('password'); + $confirmation = $this->getRequest()->getParam('password_confirmation'); + $redirectUrl = $this->_getSession()->getBeforeAuthUrl(); + + $this->checkPasswordConfirmation($password, $confirmation); + + $customer = $this->customerAccountService + ->createCustomer($customerDetails, $password, $redirectUrl); if ($this->getRequest()->getParam('is_subscribed', false)) { $this->subscriberFactory->create()->subscribeCustomerById($customer->getId()); @@ -268,6 +275,28 @@ class CreatePost extends \Magento\Customer\Controller\Account $this->getResponse()->setRedirect($this->_redirect->error($defaultUrl)); } + /** + * Make sure that password and password confirmation matched + * + * @param string $password + * @param string $confirmation + * @return void + * @throws InputException + */ + protected function checkPasswordConfirmation($password, $confirmation) + { + $password = trim($password); + if (empty($password)) { + throw new InputException( + 'The password must have at least %1 characters.', + [CustomerAccountServiceInterface::MIN_PASSWORD_LENGTH] + ); + } + if (empty($confirmation) || $password != $confirmation) { + throw new InputException('Please make sure your passwords match.'); + } + } + /** * Retrieve success message * diff --git a/app/code/Magento/Customer/Controller/Account/EditPost.php b/app/code/Magento/Customer/Controller/Account/EditPost.php index a72249034d63352c1ecf07906b1a10ff1d566cce..5641135d0fb4606812fff82566f9aefc6af89954 100644 --- a/app/code/Magento/Customer/Controller/Account/EditPost.php +++ b/app/code/Magento/Customer/Controller/Account/EditPost.php @@ -27,8 +27,8 @@ namespace Magento\Customer\Controller\Account; use Magento\Framework\App\Action\Context; use Magento\Customer\Model\Session; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Customer\Service\V1\Data\CustomerBuilder; -use Magento\Customer\Service\V1\Data\CustomerDetailsBuilder; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\CustomerDataBuilder; use Magento\Core\App\Action\FormKeyValidator; use Magento\Customer\Model\CustomerExtractor; use Magento\Framework\Exception\InputException; @@ -42,11 +42,11 @@ class EditPost extends \Magento\Customer\Controller\Account /** @var CustomerAccountServiceInterface */ protected $customerAccountService; - /** @var CustomerBuilder */ - protected $customerBuilder; + /** @var CustomerRepositoryInterface */ + protected $customerRepository; - /** @var CustomerDetailsBuilder */ - protected $customerDetailsBuilder; + /** @var CustomerDataBuilder */ + protected $customerDataBuilder; /** @var FormKeyValidator */ protected $formKeyValidator; @@ -58,25 +58,24 @@ class EditPost extends \Magento\Customer\Controller\Account * @param Context $context * @param Session $customerSession * @param CustomerAccountServiceInterface $customerAccountService - * @param CustomerDetailsBuilder $customerDetailsBuilder + * @param CustomerRepositoryInterface $customerRepository + * @param CustomerDataBuilder $customerDataBuilder * @param FormKeyValidator $formKeyValidator - * @param CustomerBuilder $customerBuilder * @param CustomerExtractor $customerExtractor - * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( Context $context, Session $customerSession, CustomerAccountServiceInterface $customerAccountService, - CustomerBuilder $customerBuilder, - CustomerDetailsBuilder $customerDetailsBuilder, + CustomerRepositoryInterface $customerRepository, + CustomerDataBuilder $customerDataBuilder, FormKeyValidator $formKeyValidator, CustomerExtractor $customerExtractor ) { $this->customerAccountService = $customerAccountService; - $this->customerBuilder = $customerBuilder; - $this->customerDetailsBuilder = $customerDetailsBuilder; + $this->customerRepository = $customerRepository; + $this->customerDataBuilder = $customerDataBuilder; $this->formKeyValidator = $formKeyValidator; $this->customerExtractor = $customerExtractor; parent::__construct($context, $customerSession); @@ -98,14 +97,13 @@ class EditPost extends \Magento\Customer\Controller\Account if ($this->getRequest()->isPost()) { $customerId = $this->_getSession()->getCustomerId(); $customer = $this->customerExtractor->extract('customer_account_edit', $this->_request); - $this->customerBuilder->populate($customer); - $this->customerBuilder->setId($customerId); - $customer = $this->customerBuilder->create(); + $this->customerDataBuilder->populateWithArray($customer->__toArray()); + $this->customerDataBuilder->setId($customerId); if ($this->getRequest()->getParam('change_password')) { $currPass = $this->getRequest()->getPost('current_password'); $newPass = $this->getRequest()->getPost('password'); - $confPass = $this->getRequest()->getPost('confirmation'); + $confPass = $this->getRequest()->getPost('password_confirmation'); if (strlen($newPass)) { if ($newPass == $confPass) { @@ -128,8 +126,7 @@ class EditPost extends \Magento\Customer\Controller\Account } try { - $this->customerDetailsBuilder->setCustomer($customer); - $this->customerAccountService->updateCustomer($customerId, $this->customerDetailsBuilder->create()); + $this->customerRepository->save($this->customerDataBuilder->create()); } catch (AuthenticationException $e) { $this->messageManager->addError($e->getMessage()); } catch (InputException $e) { diff --git a/app/code/Magento/Customer/Controller/Account/ResetPasswordPost.php b/app/code/Magento/Customer/Controller/Account/ResetPasswordPost.php index 3bc67d8e6aa8fa1fbebcb001c45eb20d680fffef..c3811a527f6fed466f2c3eca94236225cc126ac4 100644 --- a/app/code/Magento/Customer/Controller/Account/ResetPasswordPost.php +++ b/app/code/Magento/Customer/Controller/Account/ResetPasswordPost.php @@ -59,7 +59,7 @@ class ResetPasswordPost extends \Magento\Customer\Controller\Account $resetPasswordToken = (string)$this->getRequest()->getQuery('token'); $customerId = (int)$this->getRequest()->getQuery('id'); $password = (string)$this->getRequest()->getPost('password'); - $passwordConfirmation = (string)$this->getRequest()->getPost('confirmation'); + $passwordConfirmation = (string)$this->getRequest()->getPost('password_confirmation'); if ($password !== $passwordConfirmation) { $this->messageManager->addError(__("New Password and Confirm New Password values didn't match.")); diff --git a/app/code/Magento/Customer/Controller/Address.php b/app/code/Magento/Customer/Controller/Address.php index aa59d276f0769d445b58785be2a3eea2fc88049d..fc8c6df73dd86d97d9ef44d349f721f681b7131d 100644 --- a/app/code/Magento/Customer/Controller/Address.php +++ b/app/code/Magento/Customer/Controller/Address.php @@ -47,6 +47,11 @@ class Address extends \Magento\Framework\App\Action\Action */ protected $_addressService; + /** + * @var \Magento\Customer\Api\AddressRepositoryInterface + */ + protected $_addressRepository; + /** * @var \Magento\Customer\Model\Metadata\FormFactory */ @@ -62,6 +67,21 @@ class Address extends \Magento\Framework\App\Action\Action */ protected $_addressBuilder; + /** + * @var \Magento\Customer\Model\Data\AddressDataBuilder + */ + protected $_addressDataBuilder; + + /** + * @var \Magento\Customer\Api\Data\RegionDataBuilder + */ + protected $_regionDataBuilder; + + /** + * @var \Magento\Framework\Reflection\DataObjectProcessor + */ + protected $_dataProcessor; + /** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Customer\Model\Session $customerSession @@ -70,9 +90,14 @@ class Address extends \Magento\Framework\App\Action\Action * @param \Magento\Customer\Model\Metadata\FormFactory $formFactory * @param \Magento\Customer\Service\V1\Data\RegionBuilder $regionBuilder * @param \Magento\Customer\Service\V1\Data\AddressBuilder $addressBuilder + * @param \Magento\Customer\Api\AddressRepositoryInterface $addressRepository + * @param \Magento\Customer\Api\Data\AddressDataBuilder $addressDataBuilder + * @param \Magento\Customer\Api\Data\RegionDataBuilder $regionDataBuilder + * @param \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor * @internal param \Magento\Customer\Helper\Data $customerData * @internal param \Magento\Customer\Model\AddressFactory $addressFactory * @internal param \Magento\Customer\Model\Address\FormFactory $addressFormFactory + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -81,7 +106,11 @@ class Address extends \Magento\Framework\App\Action\Action \Magento\Customer\Service\V1\CustomerAddressServiceInterface $addressService, \Magento\Customer\Model\Metadata\FormFactory $formFactory, \Magento\Customer\Service\V1\Data\RegionBuilder $regionBuilder, - \Magento\Customer\Service\V1\Data\AddressBuilder $addressBuilder + \Magento\Customer\Service\V1\Data\AddressBuilder $addressBuilder, + \Magento\Customer\Api\AddressRepositoryInterface $addressRepository, + \Magento\Customer\Api\Data\AddressDataBuilder $addressDataBuilder, + \Magento\Customer\Api\Data\RegionDataBuilder $regionDataBuilder, + \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor ) { $this->_customerSession = $customerSession; $this->_formKeyValidator = $formKeyValidator; @@ -89,6 +118,10 @@ class Address extends \Magento\Framework\App\Action\Action $this->_formFactory = $formFactory; $this->_regionBuilder = $regionBuilder; $this->_addressBuilder = $addressBuilder; + $this->_addressRepository = $addressRepository; + $this->_addressDataBuilder = $addressDataBuilder; + $this->_regionDataBuilder = $regionDataBuilder; + $this->_dataProcessor = $dataProcessor; parent::__construct($context); } diff --git a/app/code/Magento/Customer/Controller/Address/FormPost.php b/app/code/Magento/Customer/Controller/Address/FormPost.php index 0e8f0d8a1b3df0bc8b1ca45e511741b294d5dcfb..8b68db91148181ba04193934a13b488bf09cf587 100644 --- a/app/code/Magento/Customer/Controller/Address/FormPost.php +++ b/app/code/Magento/Customer/Controller/Address/FormPost.php @@ -25,6 +25,7 @@ namespace Magento\Customer\Controller\Address; use Magento\Framework\Exception\InputException; +use Magento\Customer\Api\Data\RegionInterface; class FormPost extends \Magento\Customer\Controller\Address { @@ -38,28 +39,42 @@ class FormPost extends \Magento\Customer\Controller\Address $addressId = $this->getRequest()->getParam('id'); $existingAddressData = array(); if ($addressId) { - $existingAddress = $this->_addressService->getAddress($addressId); - if ($existingAddress->getId()) { - $existingAddressData = \Magento\Customer\Service\V1\Data\AddressConverter::toFlatArray( - $existingAddress - ); - } + $existingAddress = $this->_addressRepository->get($addressId); + + $existingAddressData = $this->_dataProcessor + ->buildOutputDataArray($existingAddress, '\Magento\Customer\Api\Data\AddressInterface'); + + $region = $existingAddress->getRegion()->getRegion(); + $existingAddressData['region_code'] = $existingAddress->getRegion()->getRegionCode(); + $existingAddressData['region_id'] = $existingAddress->getRegion()->getRegionId(); + $existingAddressData['region'] = $region; } /** @var \Magento\Customer\Model\Metadata\Form $addressForm */ $addressForm = $this->_formFactory->create('customer_address', 'customer_address_edit', $existingAddressData); $addressData = $addressForm->extractData($this->getRequest()); $attributeValues = $addressForm->compactData($addressData); - $region = array('region_id' => $attributeValues['region_id'], 'region' => $attributeValues['region']); + + $region = [ + RegionInterface::REGION_ID => $attributeValues['region_id'], + RegionInterface::REGION => !empty($attributeValues['region']) ? $attributeValues['region'] : null, + RegionInterface::REGION_CODE => !empty($attributeValues['region_code']) + ? $attributeValues['region_code'] + : null + ]; + + $region = $this->_regionDataBuilder + ->populateWithArray($region) + ->create(); + unset($attributeValues['region'], $attributeValues['region_id']); $attributeValues['region'] = $region; - return $this->_addressBuilder->populateWithArray( - array_merge($existingAddressData, $attributeValues) - )->setDefaultBilling( - $this->getRequest()->getParam('default_billing', false) - )->setDefaultShipping( - $this->getRequest()->getParam('default_shipping', false) - )->create(); + + return $this->_addressDataBuilder + ->populateWithArray(array_merge($existingAddressData, $attributeValues)) + ->setCustomerId($this->_getSession()->getCustomerId()) + ->setRegion($region) + ->create(); } /** @@ -79,10 +94,10 @@ class FormPost extends \Magento\Customer\Controller\Address $this->getResponse()->setRedirect($this->_redirect->error($this->_buildUrl('*/*/edit'))); return; } - $customerId = $this->_getSession()->getCustomerId(); + try { $address = $this->_extractAddress(); - $this->_addressService->saveAddresses($customerId, array($address)); + $this->_addressRepository->save($address); $this->messageManager->addSuccess(__('The address has been saved.')); $url = $this->_buildUrl('*/*/index', array('_secure' => true)); $this->getResponse()->setRedirect($this->_redirect->success($url)); diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Customer/InvalidateToken.php b/app/code/Magento/Customer/Controller/Adminhtml/Customer/InvalidateToken.php index 7b5e2fd7060de2e7fd5207c1c946fcf77cdd76bb..4755dfda45df113750bc84253bcd3cd2871df2d4 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Customer/InvalidateToken.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Customer/InvalidateToken.php @@ -25,12 +25,6 @@ namespace Magento\Customer\Controller\Adminhtml\Customer; -use Magento\Customer\Service\V1\Data\CustomerBuilder; -use Magento\Customer\Service\V1\CustomerAddressServiceInterface; -use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Customer\Service\V1\Data\AddressBuilder; -use Magento\Customer\Service\V1\Data\CustomerDetailsBuilder; - /** * Class to invalidate tokens for customers */ diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index.php b/app/code/Magento/Customer/Controller/Adminhtml/Index.php index 3485fa2bd1eb0b2f38e016910b4dfa8101f2ad76..4efc84c317e9eca7f6ea063610aeef4b974133ab 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Index.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Index.php @@ -28,6 +28,8 @@ use Magento\Customer\Service\V1\Data\AddressBuilder; use Magento\Customer\Service\V1\Data\CustomerDetailsBuilder; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; use Magento\Customer\Service\V1\CustomerAddressServiceInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\AddressDataBuilder; use Magento\Framework\Message\Error; use Magento\Customer\Controller\RegistryConstants; @@ -72,6 +74,9 @@ class Index extends \Magento\Backend\App\Action /** @var AddressBuilder */ protected $_addressBuilder; + /** @var AddressDataBuilder */ + protected $_addressDataBuilder; + /** * @var \Magento\Customer\Model\AddressFactory */ @@ -96,6 +101,9 @@ class Index extends \Magento\Backend\App\Action /** @var CustomerAccountServiceInterface */ protected $_customerAccountService; + /** @var CustomerRepositoryInterface */ + protected $_customerRepository; + /** @var \Magento\Customer\Helper\View */ protected $_viewHelper; @@ -113,11 +121,13 @@ class Index extends \Magento\Backend\App\Action * @param CustomerBuilder $customerBuilder * @param CustomerDetailsBuilder $customerDetailsBuilder * @param AddressBuilder $addressBuilder + * @param AddressDataBuilder $addressDataBuilder * @param CustomerAddressServiceInterface $addressService * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $accountService * @param \Magento\Customer\Helper\View $viewHelper * @param \Magento\Customer\Helper\Data $helper * @param \Magento\Framework\Math\Random $random + * @param CustomerRepositoryInterface $customerRepository * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ @@ -132,11 +142,13 @@ class Index extends \Magento\Backend\App\Action CustomerBuilder $customerBuilder, CustomerDetailsBuilder $customerDetailsBuilder, AddressBuilder $addressBuilder, + AddressDataBuilder $addressDataBuilder, CustomerAddressServiceInterface $addressService, CustomerAccountServiceInterface $accountService, \Magento\Customer\Helper\View $viewHelper, \Magento\Customer\Helper\Data $helper, - \Magento\Framework\Math\Random $random + \Magento\Framework\Math\Random $random, + CustomerRepositoryInterface $customerRepository ) { $this->_fileFactory = $fileFactory; $this->_coreRegistry = $coreRegistry; @@ -144,6 +156,7 @@ class Index extends \Magento\Backend\App\Action $this->_customerBuilder = $customerBuilder; $this->_customerDetailsBuilder = $customerDetailsBuilder; $this->_addressBuilder = $addressBuilder; + $this->_addressDataBuilder = $addressDataBuilder; $this->_addressFactory = $addressFactory; $this->_subscriberFactory = $subscriberFactory; $this->_dataHelper = $helper; @@ -152,6 +165,7 @@ class Index extends \Magento\Backend\App\Action $this->_customerAccountService = $accountService; $this->_viewHelper = $viewHelper; $this->_random = $random; + $this->_customerRepository = $customerRepository; parent::__construct($context); } diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Edit.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Edit.php index 24d001f270214fb7d4153cf921dce195a7c5cfa1..8208d8da2e243801e27b99d256182f12a54cf099 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Edit.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Edit.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Controller\Adminhtml\Index; use Magento\Customer\Service\V1\Data\Customer; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\AddressConverter; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensibleDataObjectConverter; class Edit extends \Magento\Customer\Controller\Adminhtml\Index { diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php index 1dcd16ed6e4051054d6a95a98bf162c781da4cf5..f5ba7ba0c1c493a2b825d4569910d36b1fd17620 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php @@ -27,8 +27,7 @@ namespace Magento\Customer\Controller\Adminhtml\Index; use Magento\Customer\Controller\RegistryConstants; use Magento\Customer\Service\V1\Data\Customer; use Magento\Framework\Exception\LocalizedException; -use Magento\Customer\Service\V1\CustomerMetadataServiceInterface as CustomerMetadata; -use Magento\Customer\Service\V1\AddressMetadataServiceInterface as AddressMetadata; +use Magento\Customer\Service\V1\CustomerMetadataService as CustomerMetadata; class Save extends \Magento\Customer\Controller\Adminhtml\Index { @@ -88,7 +87,7 @@ class Save extends \Magento\Customer\Controller\Adminhtml\Index $addressData = $customerHelper->extractCustomerData( $this->getRequest(), 'adminhtml_customer_address', - AddressMetadata::ENTITY_TYPE_ADDRESS, + \Magento\Customer\Api\AddressMetadataInterface::ENTITY_TYPE_ADDRESS, array(), $scope ); @@ -119,6 +118,7 @@ class Save extends \Magento\Customer\Controller\Adminhtml\Index * * @return void * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function execute() { @@ -136,7 +136,7 @@ class Save extends \Magento\Customer\Controller\Adminhtml\Index if ($isExistingCustomer) { $savedCustomerData = $this->_customerAccountService->getCustomer($customerId); $customerData = array_merge( - \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($savedCustomerData), + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($savedCustomerData), $customerData ); } diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Validate.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Validate.php index 0c4252f9c1cc30be15a9a1c87efd9df057373819..acaca679a05e092a5b9a293e00f775ef77fc79d3 100644 --- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Validate.php +++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Validate.php @@ -47,7 +47,7 @@ class Validate extends \Magento\Customer\Controller\Adminhtml\Index $customerForm = $this->_formFactory->create( 'customer', 'adminhtml_customer', - \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer), + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer), true ); $customerForm->setInvisibleIgnored(true); diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php new file mode 100644 index 0000000000000000000000000000000000000000..ea1bbc19ff2a0deed1ed70b7aa25a84342792a4c --- /dev/null +++ b/app/code/Magento/Customer/Model/AccountManagement.php @@ -0,0 +1,1104 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model; + +use Magento\Customer\Api\AccountManagementInterface; +use Magento\Customer\Api\AddressRepositoryInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Api\Data\CustomerInterface; +use Magento\Customer\Helper\Data as CustomerDataHelper; +use Magento\Customer\Model\Config\Share as ConfigShare; +use Magento\Customer\Model\Customer as CustomerModel; +use Magento\Customer\Model\CustomerFactory; +use Magento\Customer\Model\CustomerRegistry; +use Magento\Customer\Model\Metadata\Validator; +use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Encryption\EncryptorInterface as Encryptor; +use Magento\Framework\Event\ManagerInterface; +use Magento\Framework\Exception\EmailNotConfirmedException; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\InvalidEmailOrPasswordException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\State\ExpiredException; +use Magento\Framework\Exception\State\InputMismatchException; +use Magento\Framework\Exception\State\InvalidTransitionException; +use Magento\Framework\Logger; +use Magento\Framework\Mail\Exception as MailException; +use Magento\Framework\Mail\Template\TransportBuilder; +use Magento\Framework\Math\Random; +use Magento\Framework\Stdlib\DateTime; +use Magento\Framework\Stdlib\String as StringHelper; +use Magento\Framework\StoreManagerInterface; +use Magento\Framework\UrlInterface; +use Magento\Framework\Reflection\DataObjectProcessor; + +/** + * Handle various customer account actions + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyFields) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ +class AccountManagement implements AccountManagementInterface +{ + /** + * Configuration paths for email templates and identities + */ + const XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template'; + + const XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity'; + + const XML_PATH_REMIND_EMAIL_TEMPLATE = 'customer/password/remind_email_template'; + + const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template'; + + const XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity'; + + const XML_PATH_RESET_PASSWORD_TEMPLATE = 'customer/password/reset_password_template'; + + const XML_PATH_IS_CONFIRM = 'customer/create_account/confirm'; + + const XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template'; + + const XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template'; + + /** + * Codes of exceptions related to customer model + */ + const EXCEPTION_EMAIL_EXISTS = 3; + + // Constants for the type of new account email to be sent + const NEW_ACCOUNT_EMAIL_REGISTERED = 'registered'; + + // welcome email, when confirmation is enabled + const NEW_ACCOUNT_EMAIL_CONFIRMATION = 'confirmation'; + + // email with confirmation link + + // Constants for confirmation statuses + const ACCOUNT_CONFIRMED = 'account_confirmed'; + + const ACCOUNT_CONFIRMATION_REQUIRED = 'account_confirmation_required'; + + const ACCOUNT_CONFIRMATION_NOT_REQUIRED = 'account_confirmation_not_required'; + + /** + * Constants for types of emails to send out. + * pdl: + * forgot, remind, reset email templates + */ + const EMAIL_REMINDER = 'email_reminder'; + + const EMAIL_RESET = 'email_reset'; + + const MIN_PASSWORD_LENGTH = 6; + + /** + * @var CustomerFactory + */ + private $customerFactory; + + /** + * @var \Magento\Customer\Api\Data\CustomerDataBuilder + */ + private $customerDataBuilder; + + /** + * @var \Magento\Customer\Api\Data\ValidationResultsDataBuilder + */ + private $validationResultsDataBuilder; + + + /** + * @var ManagerInterface + */ + private $eventManager; + + /** + * @var \Magento\Framework\StoreManagerInterface + */ + private $storeManager; + + /** + * @var Random + */ + private $mathRandom; + + /** + * @var Converter + */ + private $converter; + + /** + * @var Validator + */ + private $validator; + + /** + * @var AddressRepositoryInterface + */ + private $addressRepository; + + /** + * @var CustomerMetadataServiceInterface + */ + private $customerMetadataService; + + /** + * @var UrlInterface + */ + private $url; + + /** + * @var Logger + */ + protected $logger; + + /** + * @var Encryptor + */ + private $encryptor; + + /** + * @var CustomerRegistry + */ + private $customerRegistry; + + /** + * @var ConfigShare + */ + private $configShare; + + /** + * @var StringHelper + */ + private $stringHelper; + + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + /** + * @var ScopeConfigInterface + */ + private $scopeConfig; + /** + * @var TransportBuilder + */ + private $transportBuilder; + + /** + * @var DataObjectProcessor + */ + protected $dataProcessor; + + /** + * @var \Magento\Framework\Registry + */ + protected $registry; + + /** + * @var CustomerDataHelper + */ + protected $customerDataHelper; + + /** + * @var DateTime + */ + protected $dateTime; + + /** + * @var \Magento\Framework\ObjectFactory + */ + protected $objectFactory; + + /** + * @param CustomerFactory $customerFactory + * @param ManagerInterface $eventManager + * @param StoreManagerInterface $storeManager + * @param Random $mathRandom + * @param Converter $converter + * @param Validator $validator + * @param \Magento\Customer\Api\Data\ValidationResultsDataBuilder $validationResultsDataBuilder + * @param AddressRepositoryInterface $addressRepository + * @param CustomerMetadataServiceInterface $customerMetadataService + * @param CustomerRegistry $customerRegistry + * @param UrlInterface $url + * @param Logger $logger + * @param Encryptor $encryptor + * @param ConfigShare $configShare + * @param StringHelper $stringHelper + * @param CustomerRepositoryInterface $customerRepository + * @param ScopeConfigInterface $scopeConfig + * @param TransportBuilder $transportBuilder + * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerDataBuilder + * @param DataObjectProcessor $dataProcessor + * @param \Magento\Framework\Registry $registry + * @param CustomerDataHelper $customerDataHelper + * @param DateTime $dateTime + * @param \Magento\Framework\ObjectFactory $objectFactory + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + CustomerFactory $customerFactory, + ManagerInterface $eventManager, + StoreManagerInterface $storeManager, + Random $mathRandom, + Converter $converter, + Validator $validator, + \Magento\Customer\Api\Data\ValidationResultsDataBuilder $validationResultsDataBuilder, + AddressRepositoryInterface $addressRepository, + CustomerMetadataServiceInterface $customerMetadataService, + CustomerRegistry $customerRegistry, + UrlInterface $url, + Logger $logger, + Encryptor $encryptor, + ConfigShare $configShare, + StringHelper $stringHelper, + CustomerRepositoryInterface $customerRepository, + ScopeConfigInterface $scopeConfig, + TransportBuilder $transportBuilder, + \Magento\Customer\Api\Data\CustomerDataBuilder $customerDataBuilder, + DataObjectProcessor $dataProcessor, + \Magento\Framework\Registry $registry, + CustomerDataHelper $customerDataHelper, + DateTime $dateTime, + \Magento\Framework\ObjectFactory $objectFactory + ) { + $this->customerFactory = $customerFactory; + $this->eventManager = $eventManager; + $this->storeManager = $storeManager; + $this->mathRandom = $mathRandom; + $this->converter = $converter; + $this->validator = $validator; + $this->validationResultsDataBuilder = $validationResultsDataBuilder; + $this->addressRepository = $addressRepository; + $this->customerMetadataService = $customerMetadataService; + $this->customerRegistry = $customerRegistry; + $this->url = $url; + $this->logger = $logger; + $this->encryptor = $encryptor; + $this->configShare = $configShare; + $this->stringHelper = $stringHelper; + $this->customerRepository = $customerRepository; + $this->scopeConfig = $scopeConfig; + $this->transportBuilder = $transportBuilder; + $this->customerDataBuilder = $customerDataBuilder; + $this->dataProcessor = $dataProcessor; + $this->registry = $registry; + $this->customerDataHelper = $customerDataHelper; + $this->dateTime = $dateTime; + $this->objectFactory = $objectFactory; + } + + /** + * {@inheritdoc} + */ + public function resendConfirmation($email, $websiteId = null, $redirectUrl = '') + { + $customer = $this->customerRepository->get($email, $websiteId); + if (!$customer->getConfirmation()) { + throw new InvalidTransitionException('No confirmation needed.'); + } + + try { + $this->sendNewAccountEmail( + $customer, + self::NEW_ACCOUNT_EMAIL_CONFIRMATION, + $redirectUrl, + $this->storeManager->getStore()->getId() + ); + } catch (MailException $e) { + // If we are not able to send a new account email, this should be ignored + $this->logger->logException($e); + } + } + + /** + * {@inheritdoc} + */ + public function activate($email, $confirmationKey) + { + $customer = $this->customerRepository->get($email); + + // check if customer is inactive + if (!$customer->getConfirmation()) { + throw new InvalidTransitionException('Account already active'); + } + + if ($customer->getConfirmation() !== $confirmationKey) { + throw new InputMismatchException('Invalid confirmation token'); + } + + $customer = $this->dataProcessor + ->buildOutputDataArray($customer, '\Magento\Customer\Api\Data\CustomerInterface'); + + $customer = $this->customerDataBuilder->populateWithArray($customer)->setConfirmation(null)->create(); + $this->customerRepository->save($customer); + $this->sendNewAccountEmail($customer, 'confirmed', '', $this->storeManager->getStore()->getId()); + return $customer; + } + + /** + * {@inheritdoc} + */ + public function authenticate($username, $password) + { + $this->checkPasswordStrength($password); + + try { + $customer = $this->customerRepository->get($username); + } catch (NoSuchEntityException $e) { + throw new InvalidEmailOrPasswordException('Invalid login or password.', []); + } + + $hash = $this->customerRegistry->retrieveSecureData($customer->getId())->getPasswordHash(); + if (!$this->encryptor->validateHash($password, $hash)) { + throw new InvalidEmailOrPasswordException('Invalid login or password.', []); + } + + if ($customer->getConfirmation() && $this->isConfirmationRequired($customer)) { + throw new EmailNotConfirmedException('This account is not confirmed.', []); + } + + $this->eventManager->dispatch( + 'customer_customer_authenticated', + array('model' => $this->getFullCustomerObject($customer), 'password' => $password) + ); + + $this->eventManager->dispatch('customer_data_object_login', array('customer' => $customer)); + + return $customer; + } + + /** + * {@inheritdoc} + */ + public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken) + { + $this->validateResetPasswordToken($customerId, $resetPasswordLinkToken); + return true; + } + + /** + * {@inheritdoc} + */ + public function initiatePasswordReset($email, $template, $websiteId = null) + { + if (is_null($websiteId)) { + $websiteId = $this->storeManager->getStore()->getWebsiteId(); + } + // load customer by email + $customer = $this->customerRepository->get($email, $websiteId); + + $newPasswordToken = $this->mathRandom->getUniqueHash(); + $this->changeResetPasswordLinkToken($customer, $newPasswordToken); + + try { + switch ($template) { + case AccountManagement::EMAIL_REMINDER: + $this->sendPasswordReminderEmail($customer, $newPasswordToken); + break; + case AccountManagement::EMAIL_RESET: + $this->sendPasswordResetConfirmationEmail($customer); + break; + default: + throw new InputException( + InputException::INVALID_FIELD_VALUE, + ['value' => $template, 'fieldName' => 'email type'] + ); + } + } catch (MailException $e) { + // If we are not able to send a reset password email, this should be ignored + $this->logger->logException($e); + } + } + + /** + * {@inheritdoc} + */ + public function resetPassword($email, $resetToken, $newPassword) + { + $customer = $this->customerRepository->get($email); + //Validate Token and new password strength + $this->validateResetPasswordToken($customer->getId(), $resetToken); + $this->checkPasswordStrength($newPassword); + //Update secure data + $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId()); + $customerSecure->setRpToken(null); + $customerSecure->setRpTokenCreatedAt(null); + $customerSecure->setPasswordHash($this->createPasswordHash($newPassword)); + $this->customerRepository->save($customer); + return true; + } + + /** + * {@inheritdoc} + */ + public function getConfirmationStatus($customerId) + { + // load customer by id + $customer = $this->customerRepository->getById($customerId); + if (!$customer->getConfirmation()) { + return self::ACCOUNT_CONFIRMED; + } + if ($this->isConfirmationRequired($customer)) { + return self::ACCOUNT_CONFIRMATION_REQUIRED; + } + return self::ACCOUNT_CONFIRMATION_NOT_REQUIRED; + } + + /** + * {@inheritdoc} + */ + public function createAccount( + CustomerInterface $customer, + $password = null, + $redirectUrl = '' + ) { + if ($password) { + $this->checkPasswordStrength($password); + } else { + $password = $this->mathRandom->getRandomString(self::MIN_PASSWORD_LENGTH); + } + $hash = $this->createPasswordHash($password); + return $this->createAccountWithPasswordHash($customer, $hash, $redirectUrl); + } + + /** + * {@inheritdoc} + */ + public function createAccountWithPasswordHash( + CustomerInterface $customer, + $hash, + $redirectUrl = '' + ) { + // This logic allows an existing customer to be added to a different store. No new account is created. + // The plan is to move this logic into a new method called something like 'registerAccountWithStore' + if ($customer->getId()) { + $customer = $this->customerRepository->get($customer->getEmail()); + $websiteId = $customer->getWebsiteId(); + + if ($this->isCustomerInStore($websiteId, $customer->getStoreId())) { + throw new InputException('Customer already exists in this store.'); + } + // Existing password hash will be used from secured customer data registry when saving customer + } + // Make sure we have a storeId to associate this customer with. + if (!$customer->getStoreId()) { + if ($customer->getWebsiteId()) { + $storeId = $this->storeManager->getWebsite($customer->getWebsiteId())->getDefaultStore()->getId(); + } else { + $storeId = $this->storeManager->getStore()->getId(); + } + + $customer = $this->customerDataBuilder->populate($customer) + ->setStoreId($storeId) + ->create(); + } + + try { + // If customer exists existing hash will be used by Repository + $customer = $this->customerRepository->save($customer, $hash); + } catch (\Magento\Customer\Exception $e) { + if ($e->getCode() === CustomerModel::EXCEPTION_EMAIL_EXISTS) { + throw new InputMismatchException('Customer with the same email already exists in associated website.'); + } + throw $e; + } + + foreach ($customer->getAddresses() as $address) { + $this->addressRepository->save($address); + } + $customer = $this->customerRepository->getById($customer->getId()); + $newLinkToken = $this->mathRandom->getUniqueHash(); + $this->changeResetPasswordLinkToken($customer, $newLinkToken); + $this->sendEmailConfirmation($customer, $redirectUrl); + + return $customer; + } + + /** + * Send either confirmation or welcome email after an account creation + * + * @param CustomerInterface $customer + * @param string $redirectUrl + * @return void + */ + protected function sendEmailConfirmation(CustomerInterface $customer, $redirectUrl) + { + try { + if ($this->isConfirmationRequired($customer)) { + $this->sendNewAccountEmail( + $customer, + self::NEW_ACCOUNT_EMAIL_CONFIRMATION, + $redirectUrl, + $customer->getStoreId() + ); + } else { + $this->sendNewAccountEmail( + $customer, + self::NEW_ACCOUNT_EMAIL_REGISTERED, + $redirectUrl, + $customer->getStoreId() + ); + } + } catch (MailException $e) { + // If we are not able to send a new account email, this should be ignored + $this->logger->logException($e); + } + } + + /** + * {@inheritdoc} + */ + public function changePassword($email, $currentPassword, $newPassword) + { + try { + $customer = $this->customerRepository->get($email); + } catch (NoSuchEntityException $e) { + throw new InvalidEmailOrPasswordException("Password doesn't match for this account."); + } + $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId()); + $hash = $customerSecure->getPasswordHash(); + if (!$this->encryptor->validateHash($currentPassword, $hash)) { + throw new InvalidEmailOrPasswordException('Invalid login or password.', []); + } + $customerSecure->setRpToken(null); + $customerSecure->setRpTokenCreatedAt(null); + $this->checkPasswordStrength($newPassword); + $customerSecure->setPasswordHash($this->createPasswordHash($newPassword)); + $this->customerRepository->save($customer); + // FIXME: Are we using the proper template here? + try { + $this->sendPasswordResetNotificationEmail($customer); + } catch (MailException $e) { + $this->logger->logException($e); + } + + return true; + } + + /** + * Make sure that password complies with minimum security requirements. + * + * @param string $password + * @return void + * @throws InputException + */ + protected function checkPasswordStrength($password) + { + $length = $this->stringHelper->strlen($password); + if ($length < self::MIN_PASSWORD_LENGTH) { + throw new InputException( + 'The password must have at least %min_length characters.', + ['min_length' => self::MIN_PASSWORD_LENGTH] + ); + } + if ($this->stringHelper->strlen(trim($password)) != $length) { + throw new InputException('The password can not begin or end with a space.'); + } + } + + /** + * Create a hash for the given password + * + * @param string $password + * @return string + */ + protected function createPasswordHash($password) + { + return $this->encryptor->getHash($password, true); + } + + /** + * {@inheritdoc} + */ + public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer) + { + $customerErrors = $this->validator->validateData( + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer), + [], + 'customer' + ); + + if ($customerErrors !== true) { + return $this->validationResultsDataBuilder + ->setIsValid(false) + ->setMessages($this->validator->getMessages()) + ->create(); + } + + $customerModel = $this->converter->createCustomerModel($customer); + + $result = $customerModel->validate(); + if (true !== $result && is_array($result)) { + return $this->validationResultsDataBuilder + ->setIsValid(false) + ->setMessages($result) + ->create(); + } + return $this->validationResultsDataBuilder + ->setIsValid(true) + ->setMessages([]) + ->create(); + } + + /** + * {@inheritdoc} + */ + public function isEmailAvailable($customerEmail, $websiteId = null) + { + try { + if (is_null($websiteId)) { + $websiteId = $this->storeManager->getStore()->getWebsiteId(); + } + $this->customerRepository->get($customerEmail, $websiteId); + return false; + } catch (NoSuchEntityException $e) { + return true; + } + } + + /** + * {@inheritDoc} + */ + public function isCustomerInStore($customerWebsiteId, $storeId) + { + $ids = []; + if ((bool)$this->configShare->isWebsiteScope()) { + $ids = $this->storeManager->getWebsite($customerWebsiteId)->getStoreIds(); + } else { + foreach ($this->storeManager->getStores() as $store) { + $ids[] = $store->getId(); + } + } + + return in_array($storeId, $ids); + } + + /** + * Validate the Reset Password Token for a customer. + * + * @param int $customerId + * @param string $resetPasswordLinkToken + * @return bool + * @throws \Magento\Framework\Exception\State\InputMismatchException If token is mismatched + * @throws \Magento\Framework\Exception\State\ExpiredException If token is expired + * @throws \Magento\Framework\Exception\InputException If token or customer id is invalid + * @throws \Magento\Framework\Exception\NoSuchEntityException If customer doesn't exist + */ + private function validateResetPasswordToken($customerId, $resetPasswordLinkToken) + { + if (empty($customerId) || $customerId < 0) { + $params = ['value' => $customerId, 'fieldName' => 'customerId']; + throw new InputException(InputException::INVALID_FIELD_VALUE, $params); + } + if (!is_string($resetPasswordLinkToken) || empty($resetPasswordLinkToken)) { + $params = ['fieldName' => 'resetPasswordLinkToken']; + throw new InputException(InputException::REQUIRED_FIELD, $params); + } + + $customerSecureData = $this->customerRegistry->retrieveSecureData($customerId); + $rpToken = $customerSecureData->getRpToken(); + $rpTokenCreatedAt = $customerSecureData->getRpTokenCreatedAt(); + + if (strcmp($rpToken, $resetPasswordLinkToken) !== 0) { + throw new InputMismatchException('Reset password token mismatch.'); + } else if ($this->isResetPasswordLinkTokenExpired($rpToken, $rpTokenCreatedAt)) { + throw new ExpiredException('Reset password token expired.'); + } + + return true; + } + + /** + * Check if customer can be deleted. + * + * @param int $customerId + * @return bool + * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function isReadonly($customerId) + { + $customer = $this->customerRegistry->retrieveSecureData($customerId); + return $customer->getDeleteable(); + } + + + /** + * Send email with new account related information + * + * @param CustomerInterface $customer + * @param string $type + * @param string $backUrl + * @param string $storeId + * @param string $sendemailStoreId + * @return $this + * @throws \Magento\Framework\Model\Exception + */ + protected function sendNewAccountEmail( + $customer, + $type = 'registered', + $backUrl = '', + $storeId = '0', + $sendemailStoreId = null + ) { + $types = $this->getTemplateTypes(); + + if (!isset($types[$type])) { + throw new \Magento\Framework\Model\Exception(__('Wrong transactional account email type')); + } + + if (!$storeId) { + $storeId = $this->getWebsiteStoreId($customer, $sendemailStoreId); + } + + $store = $this->storeManager->getStore($customer->getStoreId()); + + $customerEmailData = $this->getFullCustomerObject($customer); + + $this->sendEmailTemplate( + $customer, + $types[$type], + self::XML_PATH_REGISTER_EMAIL_IDENTITY, + array('customer' => $customerEmailData, 'back_url' => $backUrl, 'store' => $store), + $storeId + ); + + return $this; + } + + /** + * @param CustomerInterface $customer + * @return $this + */ + public function sendPasswordResetNotificationEmail($customer) + { + $storeId = $customer->getStoreId(); + if (!$storeId) { + $storeId = $this->getWebsiteStoreId($customer); + } + + /** @var \Magento\Framework\Mail\TransportInterface $transport */ + $transport = $this->transportBuilder->setTemplateIdentifier( + $this->scopeConfig->getValue( + self::XML_PATH_RESET_PASSWORD_TEMPLATE, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $storeId + ) + )->setTemplateOptions( + array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeId) + )->setTemplateVars( + array('customer' => $customer, 'store' => $this->storeManager->getStore($storeId)) + )->setFrom( + $this->scopeConfig->getValue( + self::XML_PATH_FORGOT_EMAIL_IDENTITY, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $storeId + ) + )->addTo( + $customer->getEmail(), + $this->getName($customer) + )->getTransport(); + $transport->sendMessage(); + + return $this; + } + + /** + * Get either first store ID from a set website or the provided as default + * + * @param CustomerInterface $customer + * @param int|string|null $defaultStoreId + * @return int + */ + protected function getWebsiteStoreId($customer, $defaultStoreId = null) + { + if ($customer->getWebsiteId() != 0 && empty($defaultStoreId)) { + $storeIds = $this->storeManager->getWebsite($customer->getWebsiteId())->getStoreIds(); + reset($storeIds); + $defaultStoreId = current($storeIds); + } + return $defaultStoreId; + } + + /** + * @return array + */ + protected function getTemplateTypes() + { + /** + * 'registered' welcome email, when confirmation is disabled + * 'confirmed' welcome email, when confirmation is enabled + * 'confirmation' email with confirmation link + */ + $types = array( + 'registered' => self::XML_PATH_REGISTER_EMAIL_TEMPLATE, + 'confirmed' => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE, + 'confirmation' => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE, + ); + return $types; + } + + /** + * Send corresponding email template + * + * @param CustomerInterface $customer + * @param string $template configuration path of email template + * @param string $sender configuration path of email identity + * @param array $templateParams + * @param int|null $storeId + * @return $this + */ + protected function sendEmailTemplate($customer, $template, $sender, $templateParams = array(), $storeId = null) + { + /** @var \Magento\Framework\Mail\TransportInterface $transport */ + $transport = $this->transportBuilder->setTemplateIdentifier( + $this->scopeConfig->getValue($template, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeId) + )->setTemplateOptions( + array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeId) + )->setTemplateVars( + $templateParams + )->setFrom( + $this->scopeConfig->getValue($sender, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeId) + )->addTo( + $customer->getEmail(), + $this->getName($customer) + )->getTransport(); + $transport->sendMessage(); + + return $this; + } + + /** + * Get full customer name + * + * @param CustomerInterface $customer + * @return string + */ + protected function getName($customer) + { + $name = ''; + + if ($this->customerMetadataService->getAttributeMetadata('prefix')->isVisible() && $customer->getPrefix()) { + $name .= $customer->getPrefix() . ' '; + } + $name .= $customer->getFirstname(); + if ($this->customerMetadataService->getAttributeMetadata('middlename')->isVisible() + && $customer->getMiddlename() + ) { + $name .= ' ' . $customer->getMiddlename(); + } + $name .= ' ' . $customer->getLastname(); + if ($this->customerMetadataService->getAttributeMetadata('suffix')->isVisible() + && $customer->getSuffix() + ) { + $name .= ' ' . $customer->getSuffix(); + } + return $name; + } + + /** + * Check if accounts confirmation is required in config + * + * @param CustomerInterface $customer + * @return bool + */ + protected function isConfirmationRequired($customer) + { + if ($this->canSkipConfirmation($customer)) { + return false; + } + $storeId = $customer->getStoreId() ? $customer->getStoreId() : null; + + return (bool)$this->scopeConfig->getValue( + self::XML_PATH_IS_CONFIRM, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $storeId + ); + } + + /** + * Check whether confirmation may be skipped when registering using certain email address + * + * @param CustomerInterface $customer + * @return bool + */ + protected function canSkipConfirmation($customer) + { + if (!$customer->getId()) { + return false; + } + + /* If an email was used to start the registration process and it is the same email as the one + used to register, then this can skip confirmation. + */ + $skipConfirmationIfEmail = $this->registry->registry("skip_confirmation_if_email"); + if (!$skipConfirmationIfEmail) { + return false; + } + + return strtolower($skipConfirmationIfEmail) === strtolower($customer->getEmail()); + } + + /** + * Check if rpToken is expired + * + * @param string $rpToken + * @param string $rpTokenCreatedAt + * @return bool + */ + public function isResetPasswordLinkTokenExpired($rpToken, $rpTokenCreatedAt) + { + if (empty($rpToken) || empty($rpTokenCreatedAt)) { + return true; + } + + $expirationPeriod = $this->customerDataHelper->getResetPasswordLinkExpirationPeriod(); + + $currentTimestamp = $this->dateTime->toTimestamp($this->dateTime->now()); + $tokenTimestamp = $this->dateTime->toTimestamp($rpTokenCreatedAt); + if ($tokenTimestamp > $currentTimestamp) { + return true; + } + + $dayDifference = floor(($currentTimestamp - $tokenTimestamp) / (24 * 60 * 60)); + if ($dayDifference >= $expirationPeriod) { + return true; + } + + return false; + } + + /** + * Change reset password link token + * + * Stores new reset password link token + * + * @param CustomerInterface $customer + * @param string $passwordLinkToken + * @return bool + * @throws InputException + */ + public function changeResetPasswordLinkToken($customer, $passwordLinkToken) + { + if (!is_string($passwordLinkToken) || empty($passwordLinkToken)) { + throw new InputException( + InputException::INVALID_FIELD_VALUE, + ['value' => $passwordLinkToken, 'fieldName' => 'password reset token'] + ); + } + if (is_string($passwordLinkToken) && !empty($passwordLinkToken)) { + $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId()); + $customerSecure->setRpToken($passwordLinkToken); + $customerSecure->setRpTokenCreatedAt($this->dateTime->now()); + $this->customerRepository->save($customer); + } + return true; + } + + /** + * Send email with new customer password + * + * @param CustomerInterface $customer + * @param string $newPasswordToken + * @return $this + */ + public function sendPasswordReminderEmail($customer, $newPasswordToken) + { + $this->url->setScope($customer->getStoreId()); + //TODO : Fix how template is built. Maybe Framework Object or create new Email template data model? + // Check template to see what values need to be set in the data model to be passed + // Need to set the reset_password_url property of the object + $resetUrl = $this->url->getUrl( + 'customer/account/createPassword', + [ + '_query' => array('id' => $customer->getId(), 'token' => $newPasswordToken), + '_store' => $customer->getStoreId() + ] + ); + + $customerEmailData = $this->getFullCustomerObject($customer); + $customerEmailData->setResetPasswordUrl($resetUrl); + + $this->sendEmailTemplate( + $customer, + self::XML_PATH_REMIND_EMAIL_TEMPLATE, + self::XML_PATH_FORGOT_EMAIL_IDENTITY, + array('customer' => $customerEmailData, 'store' => $this->storeManager->getStore($customer->getStoreId())), + $customer->getStoreId() + ); + + return $this; + } + + /** + * Send email with reset password confirmation link + * + * @param CustomerInterface $customer + * @return $this + */ + public function sendPasswordResetConfirmationEmail($customer) + { + $storeId = $customer->getStoreId(); + if (!$storeId) { + $storeId = $this->getWebsiteStoreId($customer); + } + + $customerEmailData = $this->getFullCustomerObject($customer); + + $this->sendEmailTemplate( + $customer, + self::XML_PATH_FORGOT_EMAIL_TEMPLATE, + self::XML_PATH_FORGOT_EMAIL_IDENTITY, + array('customer' => $customerEmailData, 'store' => $this->storeManager->getStore($storeId)), + $storeId + ); + + return $this; + } + + /** + * Create an object with data merged from Customer and CustomerSecure + * + * @param CustomerInterface $customer + * @return Data\CustomerSecure + */ + protected function getFullCustomerObject($customer) + { + // No need to flatten the custom attributes or nested objects since the only usage is for email templates and + // object passed for events + $mergedCustomerData = $this->customerRegistry->retrieveSecureData($customer->getId()); + $customerData = $this->dataProcessor + ->buildOutputDataArray($customer, '\Magento\Customer\Api\Data\CustomerInterface'); + $mergedCustomerData->addData($customerData); + $mergedCustomerData->setData('name', $this->getName($customer)); + return $mergedCustomerData; + } +} diff --git a/app/code/Magento/Customer/Model/Address.php b/app/code/Magento/Customer/Model/Address.php index 2e63ddd59e1520ad772aec0106321798ebd38c89..9545c1ee834697897f72f605fb4066c68f92a90c 100644 --- a/app/code/Magento/Customer/Model/Address.php +++ b/app/code/Magento/Customer/Model/Address.php @@ -23,6 +23,13 @@ */ namespace Magento\Customer\Model; +use Magento\Customer\Model\Data\Address as AddressData; +use Magento\Customer\Api\Data\AddressInterface; +use Magento\Customer\Api\AddressMetadataInterface; +use Magento\Customer\Api\Data\AddressDataBuilder; +use Magento\Customer\Api\Data\RegionInterface; +use Magento\Customer\Model\Data\RegionBuilder; + /** * Customer address model * @@ -43,6 +50,26 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress */ protected $_customerFactory; + /** + * @var \Magento\Customer\Service\V1\AddressMetadataServiceInterface + */ + protected $_addressMetadataService; + + /** + * @var AddressDataBuilder + */ + protected $_addressBuilder; + + /** + * @var RegionBuilder + */ + protected $_regionBuilder; + + /** + * @var \Magento\Framework\Reflection\DataObjectProcessor + */ + protected $dataProcessor; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry @@ -52,6 +79,10 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress * @param \Magento\Directory\Model\RegionFactory $regionFactory * @param \Magento\Directory\Model\CountryFactory $countryFactory * @param CustomerFactory $customerFactory + * @param \Magento\Customer\Service\V1\AddressMetadataServiceInterface $addressMetadataService + * @param AddressDataBuilder $addressBuilder + * @param RegionBuilder $regionBuilder + * @param \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data @@ -65,11 +96,19 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress \Magento\Directory\Model\RegionFactory $regionFactory, \Magento\Directory\Model\CountryFactory $countryFactory, CustomerFactory $customerFactory, + \Magento\Customer\Service\V1\AddressMetadataServiceInterface $addressMetadataService, + AddressDataBuilder $addressBuilder, + RegionBuilder $regionBuilder, + \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { + $this->dataProcessor = $dataProcessor; $this->_customerFactory = $customerFactory; + $this->_addressMetadataService = $addressMetadataService; + $this->_addressBuilder = $addressBuilder; + $this->_regionBuilder = $regionBuilder; parent::__construct( $context, $registry, @@ -92,6 +131,82 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress $this->_init('Magento\Customer\Model\Resource\Address'); } + /** + * Update Model with the data from Data Interface + * + * @param \Magento\Customer\Api\Data\AddressInterface $address + * @return $this + * @deprecated Use Api/RepositoryInterface for the operations in the Data Interfaces. Don't rely on Address Model + */ + public function updateData(\Magento\Customer\Api\Data\AddressInterface $address) + { + // Set all attributes + $attributes = $this->dataProcessor + ->buildOutputDataArray($address, '\Magento\Customer\Api\Data\AddressInterface'); + + foreach ($attributes as $attributeCode => $attributeData) { + if (AddressInterface::REGION === $attributeCode) { + $this->setRegion($address->getRegion()->getRegion()); + $this->setRegionCode($address->getRegion()->getRegionCode()); + $this->setRegionId($address->getRegion()->getRegionId()); + } else { + $this->setDataUsingMethod($attributeCode, $attributeData); + } + } + // Need to use attribute set or future updates can cause data loss + if (!$this->getAttributeSetId()) { + $this->setAttributeSetId(AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS); + } + return $this; + } + + /** + * Retrieve Data Model with the Address data + * + * @return \Magento\Customer\Api\Data\AddressInterface + * @deprecated Use Api/Data/AddressInterface as a result of service operations. Don't rely on the model to provide + * the instance of Api/Data/AddressInterface + */ + public function getDataModel() + { + $addressId = $this->getId(); + + $attributes = $this->_addressMetadataService->getAllAttributesMetadata(); + $addressData = array(); + foreach ($attributes as $attribute) { + $code = $attribute->getAttributeCode(); + if (!is_null($this->getData($code))) { + $addressData[$code] = $this->getData($code); + } + } + + /** @var \Magento\Customer\Api\Data\RegionInterface $region */ + $region = $this->_regionBuilder + ->populateWithArray( + array( + RegionInterface::REGION => $this->getRegion(), + RegionInterface::REGION_ID => $this->getRegionId(), + RegionInterface::REGION_CODE => $this->getRegionCode() + ) + ) + ->create(); + + $addressData[AddressData::REGION] = $region; + + $this->_addressBuilder->populateWithArray($addressData); + if ($addressId) { + $this->_addressBuilder->setId($addressId); + } + + if ($this->getCustomerId() || $this->getParentId()) { + $customerId = $this->getCustomerId() ?: $this->getParentId(); + $this->_addressBuilder->setCustomerId($customerId); + } + + $addressDataObject = $this->_addressBuilder->create(); + return $addressDataObject; + } + /** * Retrieve address customer identifier * diff --git a/app/code/Magento/Customer/Model/Address/Converter.php b/app/code/Magento/Customer/Model/Address/Converter.php index cc93635e25e1ffef6478afdec8ae8cabe5c5be55..ccb8965ded52f7f4185343685bea3d5fdb947d0a 100644 --- a/app/code/Magento/Customer/Model/Address/Converter.php +++ b/app/code/Magento/Customer/Model/Address/Converter.php @@ -32,6 +32,7 @@ use Magento\Customer\Model\Address as AddressModel; use Magento\Customer\Model\Address\AbstractAddress; use Magento\Customer\Service\V1\Data\Region; use Magento\Customer\Service\V1\Data\AddressConverter; +use Magento\Customer\Api\AddressMetadataInterface; /** * Customer Address Model converter. @@ -115,7 +116,7 @@ class Converter $addressModel->setIsDefaultShipping($address->isDefaultShipping()); // Need to use attribute set or future updates can cause data loss if (!$addressModel->getAttributeSetId()) { - $addressModel->setAttributeSetId(AddressMetadataServiceInterface::ATTRIBUTE_SET_ID_ADDRESS); + $addressModel->setAttributeSetId(AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS); } } diff --git a/app/code/Magento/Customer/Model/AddressRegistry.php b/app/code/Magento/Customer/Model/AddressRegistry.php index 99bf42b04c3d3060e255b912acfe9bbe1718135b..220902b85cf4567d7ce5455e630aaff7fbd3c7b0 100644 --- a/app/code/Magento/Customer/Model/AddressRegistry.php +++ b/app/code/Magento/Customer/Model/AddressRegistry.php @@ -81,4 +81,16 @@ class AddressRegistry { unset($this->registry[$addressId]); } + + /** + * Replace existing Address Model with a new one + * + * @param Address $address + * @return $this + */ + public function push(Address $address) + { + $this->registry[$address->getId()] = $address; + return $this; + } } diff --git a/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php b/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php index 562a61cc4949aafb4f5ddf9a7d782f7ca0b62ab4..43ab7e8b49731c37fd526429a10f78a6bf52d202 100644 --- a/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php +++ b/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php @@ -23,57 +23,115 @@ */ namespace Magento\Customer\Model\Attribute\Data; +use Magento\Eav\Model\AttributeDataFactory; +use Magento\Framework\App\RequestInterface; +use Magento\Framework\Locale\ResolverInterface; +use Magento\Framework\Logger; +use Magento\Framework\Stdlib\DateTime\TimezoneInterface as MagentoTimezone; +use Magento\Directory\Helper\Data as DirectoryHelper; + /** * Customer Address Postal/Zip Code Attribute Data Model * This Data Model Has to Be Set Up in additional EAV attribute table - * - * @author Magento Core Team <core@magentocommerce.com> */ -class Postcode extends \Magento\Eav\Model\Attribute\Data\Text +class Postcode extends \Magento\Eav\Model\Attribute\Data\AbstractData { + /** + * @var \Magento\Directory\Helper\Data + */ + protected $directoryHelper; + + /** + * @param MagentoTimezone $localeDate + * @param Logger $logger + * @param ResolverInterface $localeResolver + * @param DirectoryHelper $directoryHelper + */ + public function __construct( + MagentoTimezone $localeDate, + Logger $logger, + ResolverInterface $localeResolver, + DirectoryHelper $directoryHelper + ) { + $this->directoryHelper = $directoryHelper; + parent::__construct($localeDate, $logger, $localeResolver); + } + /** * Validate postal/zip code * Return true and skip validation if country zip code is optional * * @param array|string $value - * @return boolean|array + * @return array|bool + */ + public function validateValue($value) + { + $attribute = $this->getAttribute(); + $label = __($attribute->getStoreLabel()); + + $countryId = $this->getExtractedData('country_id'); + if ($this->directoryHelper->isZipCodeOptional($countryId)) { + return true; + } + + $errors = []; + if (empty($value) && $value !== '0') { + $errors[] = __('"%1" is a required value.', $label); + } + if (count($errors) == 0) { + return true; + } + return $errors; + } + + /** + * Extract data from request and return value + * + * @param RequestInterface $request + * @return array|string */ + public function extractValue(RequestInterface $request) + { + $value = $this->_getRequestValue($request); + return $this->_applyInputFilter($value); + } + /** - * Directory data + * Export attribute value to entity model * - * @var \Magento\Directory\Helper\Data + * @param array|string $value + * @return $this */ - protected $_directoryData = null; + public function compactValue($value) + { + if ($value !== false) { + $this->getEntity()->setDataUsingMethod($this->getAttribute()->getAttributeCode(), $value); + } + return $this; + } /** - * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate - * @param \Magento\Framework\Logger $logger - * @param \Magento\Framework\Locale\ResolverInterface $localeResolver - * @param \Magento\Framework\Stdlib\String $stringHelper - * @param \Magento\Directory\Helper\Data $directoryData + * Restore attribute value from SESSION to entity model + * + * @param array|string $value + * @return $this */ - public function __construct( - \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, - \Magento\Framework\Logger $logger, - \Magento\Framework\Locale\ResolverInterface $localeResolver, - \Magento\Framework\Stdlib\String $stringHelper, - \Magento\Directory\Helper\Data $directoryData - ) { - $this->_directoryData = $directoryData; - parent::__construct($localeDate, $logger, $localeResolver, $stringHelper); + public function restoreValue($value) + { + return $this->compactValue($value); } /** - * @param string $value - * @return true|string[] + * Return formated attribute value from entity model + * + * @param string $format + * @return string|array */ - public function validateValue($value) + public function outputValue($format = AttributeDataFactory::OUTPUT_FORMAT_TEXT) { - $countryId = $this->getExtractedData('country_id'); - $optionalZip = $this->_directoryData->getCountriesWithOptionalZip(); - if (!in_array($countryId, $optionalZip)) { - return parent::validateValue($value); - } - return true; + $value = $this->getEntity() + ->getData($this->getAttribute()->getAttributeCode()); + $value = $this->_applyOutputFilter($value); + return $value; } } diff --git a/app/code/Magento/Customer/Model/Converter.php b/app/code/Magento/Customer/Model/Converter.php index b9ba7ae280386222955331d82333a7206a7819c6..4b0f981b510c931f84f3c4c70ed0d70d55decc79 100644 --- a/app/code/Magento/Customer/Model/Converter.php +++ b/app/code/Magento/Customer/Model/Converter.php @@ -27,7 +27,7 @@ use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\Customer as CustomerDataObject; use Magento\Customer\Service\V1\Data\CustomerBuilder as CustomerDataObjectBuilder; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensibleDataObjectConverter; use Magento\Framework\StoreManagerInterface; /** diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php index 83b77cd509d3f661c9fb3c8da453ef3be1eb0336..8f15964efddeaa4a530f4153a489c51fd3baab17 100644 --- a/app/code/Magento/Customer/Model/Customer.php +++ b/app/code/Magento/Customer/Model/Customer.php @@ -26,8 +26,9 @@ namespace Magento\Customer\Model; use Magento\Customer\Model\Config\Share; use Magento\Customer\Model\Resource\Address\CollectionFactory; use Magento\Customer\Model\Resource\Customer as ResourceCustomer; -use Magento\Customer\Service\V1\Data\CustomerBuilder; -use Magento\Customer\Service\V1\Data\Customer as CustomerData; +use Magento\Customer\Api\Data\CustomerDataBuilder; +use Magento\Customer\Model\Data\Customer as CustomerData; +use Magento\Framework\Reflection\DataObjectProcessor; /** * Customer model @@ -46,7 +47,7 @@ use Magento\Customer\Service\V1\Data\Customer as CustomerData; * @method string getPasswordHash() * @method string getConfirmation() */ -class Customer extends \Magento\Framework\Model\AbstractModel +class Customer extends \Magento\Framework\Model\AbstractExtensibleModel { /** * Configuration paths for email templates and identities @@ -205,13 +206,19 @@ class Customer extends \Magento\Framework\Model\AbstractModel protected $dateTime; /** - * @var CustomerBuilder + * @var CustomerDataBuilder */ protected $_customerDataBuilder; + /** + * @var DataObjectProcessor + */ + protected $dataObjectProcessor; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService * @param \Magento\Customer\Helper\Data $customerData * @param \Magento\Framework\StoreManagerInterface $storeManager * @param \Magento\Eav\Model\Config $config @@ -225,13 +232,15 @@ class Customer extends \Magento\Framework\Model\AbstractModel * @param AttributeFactory $attributeFactory * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor * @param \Magento\Framework\Stdlib\DateTime $dateTime + * @param CustomerDataBuilder $customerDataBuilder + * @param DataObjectProcessor $dataObjectProcessor * @param \Magento\Framework\Data\Collection\Db $resourceCollection - * @param CustomerBuilder $customerDataBuilder * @param array $data */ public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, \Magento\Customer\Helper\Data $customerData, \Magento\Framework\StoreManagerInterface $storeManager, \Magento\Eav\Model\Config $config, @@ -245,7 +254,8 @@ class Customer extends \Magento\Framework\Model\AbstractModel AttributeFactory $attributeFactory, \Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\Stdlib\DateTime $dateTime, - CustomerBuilder $customerDataBuilder, + CustomerDataBuilder $customerDataBuilder, + DataObjectProcessor $dataObjectProcessor, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { @@ -262,7 +272,8 @@ class Customer extends \Magento\Framework\Model\AbstractModel $this->_encryptor = $encryptor; $this->dateTime = $dateTime; $this->_customerDataBuilder = $customerDataBuilder; - parent::__construct($context, $registry, $resource, $resourceCollection, $data); + $this->dataObjectProcessor = $dataObjectProcessor; + parent::__construct($context, $registry, $metadataService, $resource, $resourceCollection, $data); } /** @@ -275,6 +286,61 @@ class Customer extends \Magento\Framework\Model\AbstractModel $this->_init('Magento\Customer\Model\Resource\Customer'); } + /** + * Retrieve customer model with customer data + * + * @return \Magento\Customer\Api\Data\CustomerInterface + */ + public function getDataModel() + { + $customerData = $this->getData(); + $addressesData = []; + /** @var \Magento\Customer\Model\Address $address */ + foreach ($this->getAddresses() as $address) { + $addressesData[] = $address->getDataModel(); + } + return $this->_customerDataBuilder + ->populateWithArray($customerData) + ->setAddresses($addressesData) + ->setId($this->getId()) + ->create(); + } + + /** + * Update customer data + * + * @param \Magento\Customer\Api\Data\CustomerInterface $customer + * @return $this + */ + public function updateData($customer) + { + $customerDataAttributes = $this->dataObjectProcessor->buildOutputDataArray( + $customer, + '\Magento\Customer\Api\Data\CustomerInterface' + ); + + foreach ($customerDataAttributes as $attributeCode => $attributeData) { + if ($attributeCode == 'password') { + continue; + } + $this->setDataUsingMethod($attributeCode, $attributeData); + } + + $customerId = $customer->getId(); + if ($customerId) { + $this->setId($customerId); + } + + // Need to use attribute set or future updates can cause data loss + if (!$this->getAttributeSetId()) { + $this->setAttributeSetId( + \Magento\Customer\Service\V1\CustomerMetadataServiceInterface::ATTRIBUTE_SET_ID_CUSTOMER + ); + } + + return $this; + } + /** * Retrieve customer sharing configuration model * @@ -292,6 +358,7 @@ class Customer extends \Magento\Framework\Model\AbstractModel * @param string $password * @return bool * @throws \Magento\Framework\Model\Exception + * @deprecated Use \Magento\Customer\Model\Api\AccountManagement::authenticate */ public function authenticate($login, $password) { @@ -726,6 +793,7 @@ class Customer extends \Magento\Framework\Model\AbstractModel * Check if accounts confirmation is required in config * * @return bool + * @deprecated Maybe this needs to be moved to helper */ public function isConfirmationRequired() { @@ -823,6 +891,7 @@ class Customer extends \Magento\Framework\Model\AbstractModel * Send email to when password is resetting * * @return $this + * @deprecated */ public function sendPasswordResetNotificationEmail() { @@ -1148,7 +1217,7 @@ class Customer extends \Magento\Framework\Model\AbstractModel * * @return bool */ - public function canSkipConfirmation() + protected function canSkipConfirmation() { if (!$this->getId()) { return false; @@ -1248,6 +1317,7 @@ class Customer extends \Magento\Framework\Model\AbstractModel * Check if current reset password link token is expired * * @return boolean + * @deprecated */ public function isResetPasswordLinkTokenExpired() { diff --git a/app/code/Magento/Customer/Model/CustomerExtractor.php b/app/code/Magento/Customer/Model/CustomerExtractor.php index f4f700e188bc195fb0e7abdc1bdbec595fdc01ed..a4e8c77e101747c32cea995f945bbd788823d1c3 100644 --- a/app/code/Magento/Customer/Model/CustomerExtractor.php +++ b/app/code/Magento/Customer/Model/CustomerExtractor.php @@ -80,10 +80,6 @@ class CustomerExtractor $isGroupIdEmpty = true; $customerData = array(); foreach ($allowedAttributes as $attribute) { - // confirmation in request param is the repeated password, not a confirmation code. - if ($attribute === 'confirmation') { - continue; - } $attributeCode = $attribute->getAttributeCode(); if ($attributeCode == 'group_id') { $isGroupIdEmpty = false; diff --git a/app/code/Magento/Customer/Model/CustomerRegistry.php b/app/code/Magento/Customer/Model/CustomerRegistry.php index 9b16df2d09bdaa227379ce585cecfe449ca14195..e49f9d56a231fc4b85b5c4a0d08e532c9b1e34ab 100644 --- a/app/code/Magento/Customer/Model/CustomerRegistry.php +++ b/app/code/Magento/Customer/Model/CustomerRegistry.php @@ -25,6 +25,8 @@ namespace Magento\Customer\Model; use Magento\Customer\Model\CustomerFactory; +use Magento\Customer\Model\Data\CustomerSecure; +use Magento\Customer\Model\Data\CustomerSecureFactory; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\StoreManagerInterface; @@ -33,11 +35,18 @@ use Magento\Framework\StoreManagerInterface; */ class CustomerRegistry { + const REGISTRY_SEPARATOR = ':'; + /** * @var CustomerFactory */ private $customerFactory; + /** + * @var CustomerSecureFactory + */ + private $customerSecureFactory; + /** * @var array */ @@ -48,7 +57,10 @@ class CustomerRegistry */ private $customerRegistryByEmail = []; - const REGISTRY_SEPARATOR = ':'; + /** + * @var array + */ + private $customerSecureRegistryById = []; /** * @var \Magento\Framework\StoreManagerInterface @@ -59,11 +71,16 @@ class CustomerRegistry * Constructor * * @param CustomerFactory $customerFactory + * @param CustomerSecureFactory $customerSecureFactory * @param StoreManagerInterface $storeManager */ - public function __construct(CustomerFactory $customerFactory, StoreManagerInterface $storeManager) - { + public function __construct( + CustomerFactory $customerFactory, + CustomerSecureFactory $customerSecureFactory, + StoreManagerInterface $storeManager + ) { $this->customerFactory = $customerFactory; + $this->customerSecureFactory = $customerSecureFactory; $this->storeManager = $storeManager; } @@ -136,6 +153,31 @@ class CustomerRegistry } } + /** + * Retrieve CustomerSecure Model from registry given an id + * + * @param int $customerId + * @return CustomerSecure + * @throws NoSuchEntityException + */ + public function retrieveSecureData($customerId) + { + if (isset($this->customerSecureRegistryById[$customerId])) { + return $this->customerSecureRegistryById[$customerId]; + } + /** @var Customer $customer */ + $customer = $this->retrieve($customerId); + /** @var $customerSecure CustomerSecure*/ + $customerSecure = $this->customerSecureFactory->create(); + $customerSecure->setPasswordHash($customer->getPasswordHash()); + $customerSecure->setRpToken($customer->getRpToken()); + $customerSecure->setRpTokenCreatedAt($customer->getRpTokenCreatedAt()); + $customerSecure->setDeleteable($customer->isDeleteable()); + $this->customerSecureRegistryById[$customer->getId()] = $customerSecure; + + return $customerSecure; + } + /** * Remove instance of the Customer Model from registry given an id * @@ -150,6 +192,8 @@ class CustomerRegistry $emailKey = $this->getEmailKey($customer->getEmail(), $customer->getWebsiteId()); unset($this->customerRegistryByEmail[$emailKey]); unset($this->customerRegistryById[$customerId]); + unset($this->customerSecureRegistryById[$customerId]); + } } @@ -171,6 +215,7 @@ class CustomerRegistry $customer = $this->customerRegistryByEmail[$emailKey]; unset($this->customerRegistryByEmail[$emailKey]); unset($this->customerRegistryById[$customer->getId()]); + unset($this->customerSecureRegistryById[$customer->getId()]); } } @@ -185,4 +230,18 @@ class CustomerRegistry { return $customerEmail . self::REGISTRY_SEPARATOR . $websiteId; } + + /** + * Replace existing customer model with a new one. + * + * @param Customer $customer + * @return $this + */ + public function push(Customer $customer) + { + $this->customerRegistryById[$customer->getId()] = $customer; + $emailKey = $this->getEmailKey($customer->getEmail(), $customer->getWebsiteId()); + $this->customerRegistryByEmail[$emailKey] = $customer; + return $this; + } } diff --git a/app/code/Magento/Customer/Model/Data/Address.php b/app/code/Magento/Customer/Model/Data/Address.php new file mode 100644 index 0000000000000000000000000000000000000000..e9f5ebbe54ba8d78e3dd36286d66d6f098be3274 --- /dev/null +++ b/app/code/Magento/Customer/Model/Data/Address.php @@ -0,0 +1,190 @@ +<?php +/** + * Data Model implementing the Address interface + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Customer\Model\Data; + +class Address extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\AddressInterface +{ + /** + * Get id + * + * @return int|null + */ + public function getId() + { + return $this->_get(self::ID); + } + + /** + * Get region + * + * @return \Magento\Customer\Service\V1\Data\Region|null + */ + public function getRegion() + { + return $this->_get(self::REGION); + } + + /** + * Get country id + * + * @return string|null + */ + public function getCountryId() + { + return $this->_get(self::COUNTRY_ID); + } + + /** + * Get street + * + * @return string[]|null + */ + public function getStreet() + { + return $this->_get(self::STREET); + } + + /** + * Get company + * + * @return string|null + */ + public function getCompany() + { + return $this->_get(self::COMPANY); + } + + /** + * Get telephone number + * + * @return string|null + */ + public function getTelephone() + { + return $this->_get(self::TELEPHONE); + } + + /** + * Get fax number + * + * @return string|null + */ + public function getFax() + { + return $this->_get(self::FAX); + } + + /** + * Get postcode + * + * @return string|null + */ + public function getPostcode() + { + return $this->_get(self::POSTCODE); + } + + /** + * Get city name + * + * @return string|null + */ + public function getCity() + { + return $this->_get(self::CITY); + } + + /** + * Get first name + * + * @return string|null + */ + public function getFirstname() + { + return $this->_get(self::FIRSTNAME); + } + + /** + * Get last name + * + * @return string|null + */ + public function getLastname() + { + return $this->_get(self::LASTNAME); + } + + /** + * Get middle name + * + * @return string|null + */ + public function getMiddlename() + { + return $this->_get(self::MIDDLENAME); + } + + /** + * Get prefix + * + * @return string|null + */ + public function getPrefix() + { + return $this->_get(self::PREFIX); + } + + /** + * Get suffix + * + * @return string|null + */ + public function getSuffix() + { + return $this->_get(self::SUFFIX); + } + + /** + * Get Vat id + * + * @return string|null + */ + public function getVatId() + { + return $this->_get(self::VAT_ID); + } + + /** + * Get customer id + * + * @return string|null + */ + public function getCustomerId() + { + return $this->_get(self::CUSTOMER_ID); + } +} diff --git a/app/code/Magento/Customer/Model/Data/AttributeMetadata.php b/app/code/Magento/Customer/Model/Data/AttributeMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..98435943c046e22ee85351576a157864d106a534 --- /dev/null +++ b/app/code/Magento/Customer/Model/Data/AttributeMetadata.php @@ -0,0 +1,168 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Data; + +/** + * Customer attribute metadata class. + */ +class AttributeMetadata extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\AttributeMetadataInterface +{ + /** + * {@inheritdoc} + */ + public function getAttributeCode() + { + return $this->_get(self::ATTRIBUTE_CODE); + } + + /** + * {@inheritdoc} + */ + public function getFrontendInput() + { + return $this->_get(self::FRONTEND_INPUT); + } + + /** + * {@inheritdoc} + */ + public function getInputFilter() + { + return $this->_get(self::INPUT_FILTER); + } + + /** + * {@inheritdoc} + */ + public function getStoreLabel() + { + return $this->_get(self::STORE_LABEL); + } + + /** + * {@inheritdoc} + */ + public function getValidationRules() + { + return $this->_get(self::VALIDATION_RULES); + } + + /** + * {@inheritdoc} + */ + public function getMultilineCount() + { + return $this->_get(self::MULTILINE_COUNT); + } + + /** + * {@inheritdoc} + */ + public function isVisible() + { + return $this->_get(self::VISIBLE); + } + + /** + * {@inheritdoc} + */ + public function isRequired() + { + return $this->_get(self::REQUIRED); + } + + /** + * {@inheritdoc} + */ + public function getDataModel() + { + return $this->_get(self::DATA_MODEL); + } + + /** + * {@inheritdoc} + */ + public function getOptions() + { + return $this->_get(self::OPTIONS); + } + + /** + * {@inheritdoc} + */ + public function getFrontendClass() + { + return $this->_get(self::FRONTEND_CLASS); + } + + /** + * {@inheritdoc} + */ + public function isUserDefined() + { + return $this->_get(self::USER_DEFINED); + } + + /** + * {@inheritdoc} + */ + public function getSortOrder() + { + return $this->_get(self::SORT_ORDER); + } + + /** + * {@inheritdoc} + */ + public function getFrontendLabel() + { + return $this->_get(self::FRONTEND_LABEL); + } + + /** + * {@inheritdoc} + */ + public function getNote() + { + return $this->_get(self::NOTE); + } + + /** + * {@inheritdoc} + */ + public function isSystem() + { + return $this->_get(self::SYSTEM); + } + + /** + * {@inheritdoc} + */ + public function getBackendType() + { + return $this->_get(self::BACKEND_TYPE); + } +} diff --git a/app/code/Magento/Customer/Model/Data/Customer.php b/app/code/Magento/Customer/Model/Data/Customer.php new file mode 100644 index 0000000000000000000000000000000000000000..1d04a601d221f8308cb289dcd8a353d2cd76640f --- /dev/null +++ b/app/code/Magento/Customer/Model/Data/Customer.php @@ -0,0 +1,219 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Data; + + +class Customer extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\CustomerInterface +{ + /** + * @return string|null + */ + public function getDefaultBilling() + { + return $this->_get(self::DEFAULT_BILLING); + } + + /** + * Get default shipping address id + * + * @return string|null + */ + public function getDefaultShipping() + { + return $this->_get(self::DEFAULT_SHIPPING); + } + + /** + * Get confirmation + * + * @return string|null + */ + public function getConfirmation() + { + return $this->_get(self::CONFIRMATION); + } + + /** + * Get created at time + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->_get(self::CREATED_AT); + } + + /** + * Get created in area + * + * @return string|null + */ + public function getCreatedIn() + { + return $this->_get(self::CREATED_IN); + } + + /** + * Get date of birth + * + * @return string|null + */ + public function getDob() + { + return $this->_get(self::DOB); + } + + /** + * Get email address + * + * @return string + */ + public function getEmail() + { + return $this->_get(self::EMAIL); + } + + /** + * Get first name + * + * @return string + */ + public function getFirstname() + { + return $this->_get(self::FIRSTNAME); + } + + /** + * Get gender + * + * @return string|null + */ + public function getGender() + { + return $this->_get(self::GENDER); + } + + /** + * Get group id + * + * @return string|null + */ + public function getGroupId() + { + return $this->_get(self::GROUP_ID); + } + + /** + * Get customer id + * + * @return int|null + */ + public function getId() + { + return $this->_get(self::ID); + } + + /** + * Get last name + * + * @return string + */ + public function getLastname() + { + return $this->_get(self::LASTNAME); + } + + /** + * Get middle name + * + * @return string|null + */ + public function getMiddlename() + { + return $this->_get(self::MIDDLENAME); + } + + /** + * Get prefix + * + * @return string|null + */ + public function getPrefix() + { + return $this->_get(self::PREFIX); + } + + /** + * Get store id + * + * @return int|null + */ + public function getStoreId() + { + return $this->_get(self::STORE_ID); + } + + /** + * Get suffix + * + * @return string|null + */ + public function getSuffix() + { + return $this->_get(self::SUFFIX); + } + + /** + * Get tax Vat. + * + * @return string|null + */ + public function getTaxvat() + { + return $this->_get(self::TAXVAT); + } + + /** + * Get website id + * + * @return int|null + */ + public function getWebsiteId() + { + return $this->_get(self::WEBSITE_ID); + } + + /** + * Get addresses + * + * @return \Magento\Customer\Service\V1\Data\Address[] + */ + public function getAddresses() + { + $addresses = $this->_get(self::KEY_ADDRESSES); + return $addresses ?: []; + } +} diff --git a/app/code/Magento/Customer/Model/Data/CustomerBuilder.php b/app/code/Magento/Customer/Model/Data/CustomerBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..763a05b82881938c709d2da79479c2c62862202e --- /dev/null +++ b/app/code/Magento/Customer/Model/Data/CustomerBuilder.php @@ -0,0 +1,251 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Data; + +use Magento\Framework\Api\AbstractExtensibleObject as ExtensibleObject; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; + +/** + * Builder for the Customer Service Data Object + * + * @method Customer create() + * @method Customer mergeDataObjectWithArray(ExtensibleObject $dataObject, array $data) + * @method Customer mergeDataObjects(ExtensibleObject $firstDataObject, ExtensibleObject $secondDataObject) + */ +class CustomerBuilder extends ExtensibleObjectBuilder +{ + /** + * @param \Magento\Framework\Api\ObjectFactory $objectFactory + * @param AttributeValueBuilder $valueBuilder + * @param CustomerMetadataServiceInterface $metadataService + */ + public function __construct( + \Magento\Framework\Api\ObjectFactory $objectFactory, + AttributeValueBuilder $valueBuilder, + CustomerMetadataServiceInterface $metadataService + ) { + parent::__construct($objectFactory, $valueBuilder, $metadataService); + } + + /** + * Sets the default billing + * + * @param string $defaultBilling + * @return $this + */ + public function setDefaultBilling($defaultBilling) + { + return $this->_set(Customer::DEFAULT_BILLING, $defaultBilling); + } + + /** + * Sets the default shipping + * + * @param string $defaultShipping + * @return $this + */ + public function setDefaultShipping($defaultShipping) + { + return $this->_set(Customer::DEFAULT_SHIPPING, $defaultShipping); + } + + /** + * Set confirmation + * + * @param string $confirmation + * @return $this + */ + public function setConfirmation($confirmation) + { + return $this->_set(Customer::CONFIRMATION, $confirmation); + } + + /** + * Set created time + * + * @param string $createdAt + * @return $this + */ + public function setCreatedAt($createdAt) + { + return $this->_set(Customer::CREATED_AT, $createdAt); + } + + /** + * Set created area + * + * @param string $createdIn + * @return $this + */ + public function setCreatedIn($createdIn) + { + return $this->_set(Customer::CREATED_IN, $createdIn); + } + + /** + * Set date of birth + * + * @param string $dob + * @return $this + */ + public function setDob($dob) + { + return $this->_set(Customer::DOB, $dob); + } + + /** + * Set email address + * + * @param string $email + * @return $this + */ + public function setEmail($email) + { + return $this->_set(Customer::EMAIL, $email); + } + + /** + * Set first name + * + * @param string $firstname + * @return $this + */ + public function setFirstname($firstname) + { + return $this->_set(Customer::FIRSTNAME, $firstname); + } + + /** + * Set gender + * + * @param string $gender + * @return $this + */ + public function setGender($gender) + { + return $this->_set(Customer::GENDER, $gender); + } + + /** + * Set group id + * + * @param string $groupId + * @return $this + */ + public function setGroupId($groupId) + { + return $this->_set(Customer::GROUP_ID, $groupId); + } + + /** + * Set customer id + * + * @param int $id + * @return $this + */ + public function setId($id) + { + return $this->_set(Customer::ID, $id); + } + + /** + * Set last name + * + * @param string $lastname + * @return $this + */ + public function setLastname($lastname) + { + return $this->_set(Customer::LASTNAME, $lastname); + } + + /** + * Set middle name + * + * @param string $middlename + * @return $this + */ + public function setMiddlename($middlename) + { + return $this->_set(Customer::MIDDLENAME, $middlename); + } + + /** + * Set prefix + * + * @param string $prefix + * @return $this + */ + public function setPrefix($prefix) + { + return $this->_set(Customer::PREFIX, $prefix); + } + + /** + * Set store id + * + * @param int $storeId + * @return $this + */ + public function setStoreId($storeId) + { + return $this->_set(Customer::STORE_ID, $storeId); + } + + /** + * Set suffix + * + * @param string $suffix + * @return $this + */ + public function setSuffix($suffix) + { + return $this->_set(Customer::SUFFIX, $suffix); + } + + /** + * Set tax Vat + * + * @param string $taxvat + * @return $this + */ + public function setTaxvat($taxvat) + { + return $this->_set(Customer::TAXVAT, $taxvat); + } + + /** + * Set website id + * + * @param int $websiteId + * @return $this + */ + public function setWebsiteId($websiteId) + { + return $this->_set(Customer::WEBSITE_ID, $websiteId); + } +} diff --git a/app/code/Magento/Customer/Model/Data/CustomerSecure.php b/app/code/Magento/Customer/Model/Data/CustomerSecure.php new file mode 100644 index 0000000000000000000000000000000000000000..3edb09e95974863248011bd1e5d696d9f217a18e --- /dev/null +++ b/app/code/Magento/Customer/Model/Data/CustomerSecure.php @@ -0,0 +1,41 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Data; + +/** + * Class containing secure customer data that cannot be exposed as part of \Magento\Customer\Api\Data\CustomerInterface + * + * @method string getRpToken() + * @method string getRpTokenCreatedAt() + * @method string getPasswordHash() + * @method string getDeleteable() + * @method setRpToken(string $rpToken) + * @method setRpTokenCreatedAt(string $rpTokenCreatedAt) + * @method setPasswordHash(string $hashedPassword) + * @method setDeleteable(bool $deleteable) + */ +class CustomerSecure extends \Magento\Framework\Object +{ +} diff --git a/app/code/Magento/Install/Block/Admin.php b/app/code/Magento/Customer/Model/Data/Group.php similarity index 59% rename from app/code/Magento/Install/Block/Admin.php rename to app/code/Magento/Customer/Model/Data/Group.php index 674fbaef19e3428767d7c1ba904cccea2c5e886d..0b52e2a1cfcb03c6b5144033fece0b1d077de40d 100644 --- a/app/code/Magento/Install/Block/Admin.php +++ b/app/code/Magento/Customer/Model/Data/Group.php @@ -22,38 +22,51 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Customer\Model\Data; + /** - * Administrator account install block + * Customer Group data model. */ -namespace Magento\Install\Block; - -class Admin extends \Magento\Install\Block\AbstractBlock +class Group extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\GroupInterface { /** - * @var string + * Get ID + * + * @return int */ - protected $_template = 'create_admin.phtml'; + public function getId() + { + return $this->_get(self::ID); + } /** + * Get code + * * @return string */ - public function getPostUrl() + public function getCode() + { + return $this->_get(self::CODE); + } + + /** + * Get tax class ID + * + * @return int + */ + public function getTaxClassId() { - return $this->getUrl('*/*/administratorPost'); + return $this->_get(self::TAX_CLASS_ID); } /** - * @return \Magento\Framework\Object + * Get tax class name + * + * @return string */ - public function getFormData() + public function getTaxClassName() { - $data = $this->getData('form_data'); - if (null === $data) { - $data = $this->_session->getAdminData(true); - $data = is_array($data) ? $data : array(); - $data = new \Magento\Framework\Object($data); - $this->setData('form_data', $data); - } - return $data; + return $this->_get(self::TAX_CLASS_NAME); } } diff --git a/app/code/Magento/Install/Model/Installer/Data.php b/app/code/Magento/Customer/Model/Data/Option.php similarity index 66% rename from app/code/Magento/Install/Model/Installer/Data.php rename to app/code/Magento/Customer/Model/Data/Option.php index 8c1fc2f8997af661b11bc27a82e1c0e447169060..b8056e661ba7722cadc9a6eccffd992f124d96e2 100644 --- a/app/code/Magento/Install/Model/Installer/Data.php +++ b/app/code/Magento/Customer/Model/Data/Option.php @@ -1,5 +1,7 @@ <?php /** + * Eav attribute option + * * Magento * * NOTICE OF LICENSE @@ -22,40 +24,35 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Customer\Model\Data; /** - * Installer data model + * Class Option */ -namespace Magento\Install\Model\Installer; - -class Data extends \Magento\Framework\Object +class Option extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\OptionInterface { /** - * Errors array - * - * @var array + * {@inheritdoc} */ - protected $_errors = array(); + public function getLabel() + { + return $this->_get(self::LABEL); + } /** - * Add error - * - * @param string $error - * @return $this + * {@inheritdoc} */ - public function addError($error) + public function getValue() { - $this->_errors[] = $error; - return $this; + return $this->_get(self::VALUE); } /** - * Get all errors - * - * @return array + * {@inheritdoc} */ - public function getErrors() + public function getOptions() { - return $this->_errors; + return $this->_get(self::OPTIONS); } } diff --git a/app/code/Magento/Customer/Model/Data/Region.php b/app/code/Magento/Customer/Model/Data/Region.php new file mode 100644 index 0000000000000000000000000000000000000000..99c158447b5c6c99bda640fc1541859f9ef363ff --- /dev/null +++ b/app/code/Magento/Customer/Model/Data/Region.php @@ -0,0 +1,61 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Customer\Model\Data; + +/** + * Data Model implementing Address Region interface + */ +class Region extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\RegionInterface +{ + /** + * Get region code + * + * @return string + */ + public function getRegionCode() + { + return $this->_get(self::REGION_CODE); + } + + /** + * Get region + * + * @return string + */ + public function getRegion() + { + return $this->_get(self::REGION); + } + + /** + * Get region id + * + * @return int + */ + public function getRegionId() + { + return $this->_get(self::REGION_ID); + } +} diff --git a/app/code/Magento/Customer/Model/Data/ValidationResults.php b/app/code/Magento/Customer/Model/Data/ValidationResults.php new file mode 100644 index 0000000000000000000000000000000000000000..5a47070006c73d20271373a275bdffa79e37115d --- /dev/null +++ b/app/code/Magento/Customer/Model/Data/ValidationResults.php @@ -0,0 +1,49 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Data; + +/** + * Validation results data model. + */ +class ValidationResults extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\ValidationResultsInterface +{ + /** + * {@inheritdoc} + */ + public function isValid() + { + return $this->_get(self::VALID); + } + + /** + * {@inheritdoc} + */ + public function getMessages() + { + return $this->_get(self::MESSAGES); + } +} diff --git a/app/code/Magento/Checkout/Controller/Onepage/GetAdditional.php b/app/code/Magento/Customer/Model/Data/ValidationRule.php similarity index 72% rename from app/code/Magento/Checkout/Controller/Onepage/GetAdditional.php rename to app/code/Magento/Customer/Model/Data/ValidationRule.php index 1a4ab6a3f3af7a9cd88b5e1bd03d49faab9883d9..6f81297fa372143691799fa97e01cd557c70d47a 100644 --- a/app/code/Magento/Checkout/Controller/Onepage/GetAdditional.php +++ b/app/code/Magento/Customer/Model/Data/ValidationRule.php @@ -1,6 +1,5 @@ <?php /** - * * Magento * * NOTICE OF LICENSE @@ -22,23 +21,24 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Checkout\Controller\Onepage; +namespace Magento\Customer\Model\Data; -class GetAdditional extends \Magento\Checkout\Controller\Onepage +class ValidationRule extends \Magento\Framework\Api\AbstractExtensibleObject implements + \Magento\Customer\Api\Data\ValidationRuleInterface { /** - * @return string + * {@inheritdoc} */ - protected function _getAdditionalHtml() + public function getName() { - return $this->_getHtmlByHandle('checkout_onepage_additional'); + return $this->_get(self::NAME); } /** - * @return void + * {@inheritdoc} */ - public function execute() + public function getValue() { - $this->getResponse()->setBody($this->_getAdditionalHtml()); + return $this->_get(self::VALUE); } } diff --git a/app/code/Magento/Customer/Model/Group.php b/app/code/Magento/Customer/Model/Group.php index 7c0211c13697f978a7bb23f47f14679e7a242d50..5fac89cabb85baf15f5922c1b15a319c47bbc08b 100644 --- a/app/code/Magento/Customer/Model/Group.php +++ b/app/code/Magento/Customer/Model/Group.php @@ -23,6 +23,8 @@ */ namespace Magento\Customer\Model; +use Magento\Customer\Api\Data\GroupDataBuilder; + /** * Customer group model * @@ -31,8 +33,9 @@ namespace Magento\Customer\Model; * @method string getCustomerGroupCode() * @method \Magento\Customer\Model\Group setCustomerGroupCode(string $value) * @method \Magento\Customer\Model\Group setTaxClassId(int $value) + * @method Group setTaxClassName(string $value) */ -class Group extends \Magento\Framework\Model\AbstractModel +class Group extends \Magento\Framework\Model\AbstractExtensibleModel { const NOT_LOGGED_IN_ID = 0; @@ -59,21 +62,35 @@ class Group extends \Magento\Framework\Model\AbstractModel protected $_eventObject = 'object'; /** - * @var array + * @var \Magento\Store\Model\StoresConfig */ - protected static $_taxClassIds = array(); + protected $_storesConfig; /** - * @var \Magento\Store\Model\StoresConfig + * @var GroupDataBuilder */ - protected $_storesConfig; + protected $groupBuilder; + + /** + * @var \Magento\Framework\Reflection\DataObjectProcessor + */ + protected $dataObjectProcessor; + + /** + * @var \Magento\Tax\Model\ClassModelFactory + */ + protected $classModelFactory; /** * Constructor * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService * @param \Magento\Store\Model\StoresConfig $storesConfig + * @param GroupDataBuilder $groupBuilder + * @param \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor + * @param \Magento\Tax\Model\ClassModelFactory $classModelFactory * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data @@ -81,13 +98,20 @@ class Group extends \Magento\Framework\Model\AbstractModel public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, \Magento\Store\Model\StoresConfig $storesConfig, + GroupDataBuilder $groupBuilder, + \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, + \Magento\Tax\Model\ClassModelFactory $classModelFactory, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_storesConfig = $storesConfig; - parent::__construct($context, $registry, $resource, $resourceCollection, $data); + $this->dataObjectProcessor = $dataObjectProcessor; + $this->groupBuilder = $groupBuilder; + $this->classModelFactory = $classModelFactory; + parent::__construct($context, $registry, $metadataService, $resource, $resourceCollection, $data); } /** @@ -120,21 +144,21 @@ class Group extends \Magento\Framework\Model\AbstractModel } /** - * Get the tax class id for the specified group or this group if the groupId is null + * Get tax class name * - * @param int|null $groupId The id of the group whose tax class id is being sought - * @return int + * @return string */ - public function getTaxClassId($groupId = null) + public function getTaxClassName() { - if (!is_null($groupId)) { - if (empty(self::$_taxClassIds[$groupId])) { - $this->load($groupId); - self::$_taxClassIds[$groupId] = $this->getData('tax_class_id'); - } - $this->setData('tax_class_id', self::$_taxClassIds[$groupId]); + $taxClassName = $this->getData('tax_class_name'); + if ($taxClassName) { + return $taxClassName; } - return $this->getData('tax_class_id'); + $classModel = $this->classModelFactory->create(); + $classModel->load($this->getTaxClassId()); + $taxClassName = $classModel->getClassName(); + $this->setData('tax_class_name', $taxClassName); + return $taxClassName; } /** diff --git a/app/code/Magento/Customer/Model/GroupManagement.php b/app/code/Magento/Customer/Model/GroupManagement.php new file mode 100644 index 0000000000000000000000000000000000000000..5d71142cb3883052dd4c07416b9456bdc76d98d7 --- /dev/null +++ b/app/code/Magento/Customer/Model/GroupManagement.php @@ -0,0 +1,113 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model; + +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\StoreManagerInterface; +use Magento\Customer\Api\GroupRepositoryInterface; +use Magento\Customer\Model\GroupFactory; + +class GroupManagement implements \Magento\Customer\Api\GroupManagementInterface +{ + const XML_PATH_DEFAULT_ID = 'customer/create_account/default_group'; + + /** + * @var StoreManagerInterface + */ + protected $storeManager; + + /** + * @var ScopeConfigInterface + */ + protected $scopeConfig; + + /** + * @var GroupFactory + */ + protected $groupFactory; + + /** + * @var GroupRepositoryInterface + */ + protected $groupRepository; + + /** + * @param StoreManagerInterface $storeManager + * @param ScopeConfigInterface $scopeConfig + * @param GroupFactory $groupFactory + * @param GroupRepositoryInterface $groupRepository + */ + public function __construct( + StoreManagerInterface $storeManager, + ScopeConfigInterface $scopeConfig, + GroupFactory $groupFactory, + GroupRepositoryInterface $groupRepository + ) { + $this->storeManager = $storeManager; + $this->scopeConfig = $scopeConfig; + $this->groupFactory = $groupFactory; + $this->groupRepository = $groupRepository; + } + + /** + * {@inheritdoc} + */ + public function isReadonly($groupId) + { + /** @var \Magento\Customer\Model\Group $group */ + $group = $this->groupFactory->create(); + $group->load($groupId); + if (is_null($group->getId())) { + throw NoSuchEntityException::singleField('groupId', $groupId); + } + return $groupId > 0 && !$group->usesAsDefault(); + } + + /** + * {@inheritdoc} + */ + public function getDefaultGroup($storeId = null) + { + if (is_null($storeId)) { + $storeId = $this->storeManager->getStore()->getCode(); + } + try { + $groupId = $this->scopeConfig->getValue( + self::XML_PATH_DEFAULT_ID, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + $storeId + ); + } catch (\Magento\Framework\App\InitException $e) { + throw NoSuchEntityException::singleField('storeId', $storeId); + } + try { + return $this->groupRepository->get($groupId); + } catch (NoSuchEntityException $e) { + throw NoSuchEntityException::doubleField('groupId', $groupId, 'storeId', $storeId); + } + } +} diff --git a/app/code/Magento/Install/Controller/Adminhtml/Survey.php b/app/code/Magento/Customer/Model/Metadata/AddressCachedMetadata.php similarity index 70% rename from app/code/Magento/Install/Controller/Adminhtml/Survey.php rename to app/code/Magento/Customer/Model/Metadata/AddressCachedMetadata.php index 5358b053e9d2f3887e205e311a9b7c1431ad0b10..054e4a458f3983596ad9656815405adc92934b6c 100644 --- a/app/code/Magento/Install/Controller/Adminhtml/Survey.php +++ b/app/code/Magento/Customer/Model/Metadata/AddressCachedMetadata.php @@ -21,21 +21,23 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Install\Controller\Adminhtml; + +namespace Magento\Customer\Model\Metadata; + +use Magento\Customer\Api\AddressMetadataInterface; /** - * Adminhtml Survey Action + * Cached customer address attribute metadata */ -class Survey extends \Magento\Backend\App\Action +class AddressCachedMetadata extends CachedMetadata implements AddressMetadataInterface { - /** - * Check if user has enough privileges + * Initialize dependencies. * - * @return bool + * @param AddressMetadata $metadata */ - protected function _isAllowed() + public function __construct(AddressMetadata $metadata) { - return $this->_authorization->isAllowed(null); + $this->metadata = $metadata; } } diff --git a/app/code/Magento/Customer/Model/Metadata/AddressMetadata.php b/app/code/Magento/Customer/Model/Metadata/AddressMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..5bd05fbff38d6fb08c24754d33f20fe0b1bb05b4 --- /dev/null +++ b/app/code/Magento/Customer/Model/Metadata/AddressMetadata.php @@ -0,0 +1,168 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Metadata; + +use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataConverter; +use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataDataProvider; +use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Api\Config\MetadataConfig; +use Magento\Framework\Api\SimpleDataObjectConverter; +use Magento\Customer\Api\AddressMetadataInterface; + +/** + * Service to fetch customer address related custom attributes + */ +class AddressMetadata implements AddressMetadataInterface +{ + /** + * @var array + */ + private $addressDataObjectMethods; + + /** + * @var MetadataConfig + */ + private $metadataConfig; + + /** + * @var AttributeMetadataConverter + */ + private $attributeMetadataConverter; + + /** + * @var AttributeMetadataDataProvider + */ + private $attributeMetadataDataProvider; + + /** + * @param MetadataConfig $metadataConfig + * @param AttributeMetadataConverter $attributeMetadataConverter + * @param AttributeMetadataDataProvider $attributeMetadataDataProvider + */ + public function __construct( + MetadataConfig $metadataConfig, + AttributeMetadataConverter $attributeMetadataConverter, + AttributeMetadataDataProvider $attributeMetadataDataProvider + ) { + $this->metadataConfig = $metadataConfig; + $this->attributeMetadataConverter = $attributeMetadataConverter; + $this->attributeMetadataDataProvider = $attributeMetadataDataProvider; + } + + /** + * {@inheritdoc} + */ + public function getAttributes($formCode) + { + $attributes = []; + $attributesFormCollection = $this->attributeMetadataDataProvider->loadAttributesCollection( + AddressMetadataInterface::ENTITY_TYPE_ADDRESS, + $formCode + ); + foreach ($attributesFormCollection as $attribute) { + $attributes[$attribute->getAttributeCode()] = $this->attributeMetadataConverter + ->createMetadataAttribute($attribute); + } + if (empty($attributes)) { + throw NoSuchEntityException::singleField('formCode', $formCode); + } + return $attributes; + } + + /** + * {@inheritdoc} + */ + public function getAttributeMetadata($attributeCode) + { + /** @var AbstractAttribute $attribute */ + $attribute = $this->attributeMetadataDataProvider + ->getAttribute(AddressMetadataInterface::ENTITY_TYPE_ADDRESS, $attributeCode); + if ($attribute && ($attributeCode === 'id' || !is_null($attribute->getId()))) { + $attributeMetadata = $this->attributeMetadataConverter->createMetadataAttribute($attribute); + return $attributeMetadata; + } else { + throw new NoSuchEntityException( + NoSuchEntityException::MESSAGE_DOUBLE_FIELDS, + [ + 'fieldName' => 'entityType', + 'fieldValue' => AddressMetadataInterface::ENTITY_TYPE_ADDRESS, + 'field2Name' => 'attributeCode', + 'field2Value' => $attributeCode, + ] + ); + } + } + + /** + * {@inheritdoc} + */ + public function getAllAttributesMetadata() + { + /** @var AbstractAttribute[] $attribute */ + $attributeCodes = $this->attributeMetadataDataProvider->getAllAttributeCodes( + AddressMetadataInterface::ENTITY_TYPE_ADDRESS, + AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS + ); + + $allAttributesMetadata = []; + + foreach ($attributeCodes as $attributeCode) { + try { + $allAttributesMetadata[] = $this->getAttributeMetadata($attributeCode); + } catch (NoSuchEntityException $e) { + //If no such entity, skip + } + } + + return $allAttributesMetadata; + } + + /** + * {@inheritdoc} + */ + public function getCustomAttributesMetadata($dataObjectClassName = AddressMetadataInterface::DATA_INTERFACE_NAME) + { + $customAttributes = []; + if (!$this->addressDataObjectMethods) { + $dataObjectMethods = array_flip(get_class_methods($dataObjectClassName)); + $baseClassDataObjectMethods = array_flip( + get_class_methods('Magento\Framework\Api\AbstractExtensibleObject') + ); + $this->addressDataObjectMethods = array_diff_key($dataObjectMethods, $baseClassDataObjectMethods); + } + foreach ($this->getAllAttributesMetadata() as $attributeMetadata) { + $attributeCode = $attributeMetadata->getAttributeCode(); + $camelCaseKey = SimpleDataObjectConverter::snakeCaseToUpperCamelCase($attributeCode); + $isDataObjectMethod = isset($this->addressDataObjectMethods['get' . $camelCaseKey]) + || isset($this->addressDataObjectMethods['is' . $camelCaseKey]); + + if (!$isDataObjectMethod && !$attributeMetadata->isSystem()) { + $customAttributes[] = $attributeMetadata; + } + } + return array_merge($customAttributes, $this->metadataConfig->getCustomAttributesMetadata($dataObjectClassName)); + } +} diff --git a/app/code/Magento/Customer/Model/Metadata/CachedMetadata.php b/app/code/Magento/Customer/Model/Metadata/CachedMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..c440e58cac44fde7dcc95668397fdaf98bec6b0a --- /dev/null +++ b/app/code/Magento/Customer/Model/Metadata/CachedMetadata.php @@ -0,0 +1,128 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Metadata; + +use \Magento\Customer\Api\MetadataInterface; + +/** + * Cached attribute metadata service + */ +class CachedMetadata implements MetadataInterface +{ + const CACHE_SEPARATOR = ';'; + + /** + * @var MetadataInterface + */ + protected $metadata; + + /** + * @var array + */ + protected $attributeMetadataCache = []; + + /** + * @var array + */ + protected $attributesCache = []; + + /** + * @var \Magento\Customer\Service\V1\Data\Eav\AttributeMetadata[] + */ + protected $allAttributeMetadataCache = null; + + /** + * @var \Magento\Customer\Service\V1\Data\Eav\AttributeMetadata[] + */ + protected $customAttributesMetadataCache = null; + + /** + * Initialize dependencies. + * + * @param MetadataInterface $metadata + */ + public function __construct(MetadataInterface $metadata) + { + $this->metadata = $metadata; + } + + /** + * {@inheritdoc} + */ + public function getAttributes($formCode) + { + $key = $formCode; + if (isset($this->attributesCache[$key])) { + return $this->attributesCache[$key]; + } + + $value = $this->metadata->getAttributes($formCode); + $this->attributesCache[$key] = $value; + + return $value; + } + + /** + * {@inheritdoc} + */ + public function getAttributeMetadata($attributeCode) + { + $key = $attributeCode; + if (isset($this->attributeMetadataCache[$key])) { + return $this->attributeMetadataCache[$key]; + } + + $value = $this->metadata->getAttributeMetadata($attributeCode); + $this->attributeMetadataCache[$key] = $value; + + return $value; + } + + /** + * {@inheritdoc} + */ + public function getAllAttributesMetadata() + { + if (!is_null($this->allAttributeMetadataCache)) { + return $this->allAttributeMetadataCache; + } + + $this->allAttributeMetadataCache = $this->metadata->getAllAttributesMetadata(); + return $this->allAttributeMetadataCache; + } + + /** + * {@inheritdoc} + */ + public function getCustomAttributesMetadata($dataObjectClassName = null) + { + if (!is_null($this->customAttributesMetadataCache)) { + return $this->customAttributesMetadataCache; + } + + $this->customAttributesMetadataCache = $this->metadata->getCustomAttributesMetadata(); + return $this->customAttributesMetadataCache; + } +} diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php b/app/code/Magento/Customer/Model/Metadata/CustomerCachedMetadata.php similarity index 70% rename from app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php rename to app/code/Magento/Customer/Model/Metadata/CustomerCachedMetadata.php index 04ed7976f140fd7db094712b23969be55c3455de..fda75a2fdf12b5fbe9befbda45570ec93189b159 100644 --- a/app/code/Magento/Rss/Controller/Adminhtml/Authenticate.php +++ b/app/code/Magento/Customer/Model/Metadata/CustomerCachedMetadata.php @@ -21,21 +21,23 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Rss\Controller\Adminhtml; + +namespace Magento\Customer\Model\Metadata; + +use Magento\Customer\Api\CustomerMetadataInterface; /** - * RSS Controller with HTTP Basic authentication + * Cached customer attribute metadata service */ -use Magento\Backend\App\Action; - -class Authenticate extends \Magento\Backend\App\Action +class CustomerCachedMetadata extends CachedMetadata implements CustomerMetadataInterface { /** - * @param Action\Context $context + * Initialize dependencies. + * + * @param CustomerMetadata $metadata */ - public function __construct(Action\Context $context) + public function __construct(CustomerMetadata $metadata) { - parent::__construct($context); - $this->_objectManager->get('Magento\Backend\Model\UrlInterface')->turnOffSecretKey(); + $this->metadata = $metadata; } } diff --git a/app/code/Magento/Customer/Model/Metadata/CustomerMetadata.php b/app/code/Magento/Customer/Model/Metadata/CustomerMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..10de2400e5482495f5d419ddb1fc0c80e63e938c --- /dev/null +++ b/app/code/Magento/Customer/Model/Metadata/CustomerMetadata.php @@ -0,0 +1,171 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Metadata; + +use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataConverter; +use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataDataProvider; +use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Api\Config\MetadataConfig; +use Magento\Framework\Api\SimpleDataObjectConverter; +use Magento\Customer\Api\CustomerMetadataInterface; + +/** + * Service to fetch customer related custom attributes + */ +class CustomerMetadata implements CustomerMetadataInterface +{ + /** + * @var array + */ + private $customerDataObjectMethods; + + /** + * @var MetadataConfig + */ + private $metadataConfig; + + /** + * @var AttributeMetadataConverter + */ + private $attributeMetadataConverter; + + /** + * @var AttributeMetadataDataProvider + */ + private $attributeMetadataDataProvider; + + /** + * @param MetadataConfig $metadataConfig + * @param AttributeMetadataConverter $attributeMetadataConverter + * @param AttributeMetadataDataProvider $attributeMetadataDataProvider + */ + public function __construct( + MetadataConfig $metadataConfig, + AttributeMetadataConverter $attributeMetadataConverter, + AttributeMetadataDataProvider $attributeMetadataDataProvider + ) { + $this->metadataConfig = $metadataConfig; + $this->attributeMetadataConverter = $attributeMetadataConverter; + $this->attributeMetadataDataProvider = $attributeMetadataDataProvider; + } + + /** + * {@inheritdoc} + */ + public function getAttributes($formCode) + { + $attributes = []; + $attributesFormCollection = $this->attributeMetadataDataProvider->loadAttributesCollection( + self::ENTITY_TYPE_CUSTOMER, + $formCode + ); + foreach ($attributesFormCollection as $attribute) { + /** @var $attribute \Magento\Customer\Model\Attribute */ + $attributes[$attribute->getAttributeCode()] = $this->attributeMetadataConverter + ->createMetadataAttribute($attribute); + } + if (empty($attributes)) { + throw NoSuchEntityException::singleField('formCode', $formCode); + } + return $attributes; + } + + /** + * {@inheritdoc} + */ + public function getAttributeMetadata($attributeCode) + { + /** @var AbstractAttribute $attribute */ + $attribute = $this->attributeMetadataDataProvider->getAttribute(self::ENTITY_TYPE_CUSTOMER, $attributeCode); + if ($attribute && ($attributeCode === 'id' || !is_null($attribute->getId()))) { + $attributeMetadata = $this->attributeMetadataConverter->createMetadataAttribute($attribute); + return $attributeMetadata; + } else { + throw new NoSuchEntityException( + NoSuchEntityException::MESSAGE_DOUBLE_FIELDS, + [ + 'fieldName' => 'entityType', + 'fieldValue' => self::ENTITY_TYPE_CUSTOMER, + 'field2Name' => 'attributeCode', + 'field2Value' => $attributeCode, + ] + ); + } + } + + /** + * {@inheritdoc} + */ + public function getAllAttributesMetadata() + { + /** @var AbstractAttribute[] $attribute */ + $attributeCodes = $this->attributeMetadataDataProvider->getAllAttributeCodes( + self::ENTITY_TYPE_CUSTOMER, + self::ATTRIBUTE_SET_ID_CUSTOMER + ); + + $attributesMetadata = []; + + foreach ($attributeCodes as $attributeCode) { + try { + $attributesMetadata[] = $this->getAttributeMetadata($attributeCode); + } catch (NoSuchEntityException $e) { + //If no such entity, skip + } + } + + return $attributesMetadata; + } + + /** + * {@inheritdoc} + */ + public function getCustomAttributesMetadata($dataObjectClassName = self::DATA_INTERFACE_NAME) + { + $customAttributes = []; + if (!$this->customerDataObjectMethods) { + $dataObjectMethods = array_flip(get_class_methods($dataObjectClassName)); + $baseClassDataObjectMethods = array_flip( + get_class_methods('Magento\Framework\Api\AbstractExtensibleObject') + ); + $this->customerDataObjectMethods = array_diff_key($dataObjectMethods, $baseClassDataObjectMethods); + } + foreach ($this->getAllAttributesMetadata() as $attributeMetadata) { + $attributeCode = $attributeMetadata->getAttributeCode(); + $camelCaseKey = SimpleDataObjectConverter::snakeCaseToUpperCamelCase($attributeCode); + $isDataObjectMethod = isset($this->customerDataObjectMethods['get' . $camelCaseKey]) + || isset($this->customerDataObjectMethods['is' . $camelCaseKey]); + + /** Even though disable_auto_group_change is system attribute, it should be available to the clients */ + if (!$isDataObjectMethod + && (!$attributeMetadata->isSystem() || $attributeCode == 'disable_auto_group_change') + ) { + $customAttributes[] = $attributeMetadata; + } + } + return array_merge($customAttributes, $this->metadataConfig->getCustomAttributesMetadata($dataObjectClassName)); + } +} diff --git a/app/code/Magento/Customer/Model/Metadata/ElementFactory.php b/app/code/Magento/Customer/Model/Metadata/ElementFactory.php index 2e8c931e137f25003ed27764fd9b24f51a610cf3..c7da03b3bce40dcb5cc8e53605cedcd5336329c1 100644 --- a/app/code/Magento/Customer/Model/Metadata/ElementFactory.php +++ b/app/code/Magento/Customer/Model/Metadata/ElementFactory.php @@ -85,7 +85,7 @@ class ElementFactory ); /** TODO fix when Validation is implemented MAGETWO-17341 */ if ($dataModelClass == 'Magento\Customer\Model\Attribute\Data\Postcode') { - $dataModelClass = 'Magento\Customer\Model\Metadata\Form\Text'; + $dataModelClass = 'Magento\Customer\Model\Metadata\Form\Postcode'; } if (!empty($dataModelClass)) { $dataModel = $this->_objectManager->create($dataModelClass, $params); diff --git a/app/code/Magento/Customer/Model/Metadata/Form.php b/app/code/Magento/Customer/Model/Metadata/Form.php index 4c659ab1754e4072909acecb6a45151fc7b96233..172868a64916868ef3023b5ccff29e540983972c 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form.php +++ b/app/code/Magento/Customer/Model/Metadata/Form.php @@ -164,7 +164,7 @@ class Form if (!isset($this->_attributes)) { if ($this->_entityType === CustomerMetadataServiceInterface::ENTITY_TYPE_CUSTOMER) { $this->_attributes = $this->_customerMetadataService->getAttributes($this->_formCode); - } else if ($this->_entityType === AddressMetadataServiceInterface::ENTITY_TYPE_ADDRESS) { + } else if ($this->_entityType === \Magento\Customer\Api\AddressMetadataInterface::ENTITY_TYPE_ADDRESS) { $this->_attributes = $this->_addressMetadataService->getAttributes($this->_formCode); } else { throw new \LogicException('Undefined entity type: ' . $this->_entityType); diff --git a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php index 15f5fababbbb20b15bfba2a826b98bda94c6fed7..1e012c507bea83fae5f5ff5a1d2ae389f5919fae 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/AbstractData.php @@ -25,7 +25,7 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Framework\Service\ArrayObjectSearch; +use Magento\Framework\Api\ArrayObjectSearch; abstract class AbstractData { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Date.php b/app/code/Magento/Customer/Model/Metadata/Form/Date.php index 1a6580ccafd15b307d2d27a9b40b0b8df831bed4..9e8f48b055dc43dae9a65983b0f7a89134c940d3 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Date.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Date.php @@ -25,7 +25,7 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Framework\Service\ArrayObjectSearch; +use Magento\Framework\Api\ArrayObjectSearch; class Date extends AbstractData { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/File.php b/app/code/Magento/Customer/Model/Metadata/Form/File.php index a1de7918903ffb41b663643f0b70ebe4f7e3f705..b15552869bae2712e32dfb9dd48c53ec3e388ace 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/File.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php @@ -28,7 +28,7 @@ namespace Magento\Customer\Model\Metadata\Form; use Magento\Framework\File\UploaderFactory; use Magento\Framework\Filesystem; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\Service\ArrayObjectSearch; +use Magento\Framework\Api\ArrayObjectSearch; class File extends AbstractData { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Image.php b/app/code/Magento/Customer/Model/Metadata/Form/Image.php index 9f3b97397c1c2fbcd293bcb2c4bebb085e965d49..e0eb3b07091372dcd856b096211e856fd013dc84 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Image.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Image.php @@ -25,7 +25,7 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Framework\Service\ArrayObjectSearch; +use Magento\Framework\Api\ArrayObjectSearch; class Image extends File { diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Postcode.php b/app/code/Magento/Customer/Model/Metadata/Form/Postcode.php new file mode 100644 index 0000000000000000000000000000000000000000..c56910cfccd9c2b9e72dafae7c4ab3f43918861d --- /dev/null +++ b/app/code/Magento/Customer/Model/Metadata/Form/Postcode.php @@ -0,0 +1,133 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Customer\Model\Metadata\Form; + +use Magento\Customer\Model\Metadata\ElementFactory; +use Magento\Customer\Service\V1\Data\Eav\AttributeMetadata; +use Magento\Directory\Helper\Data as DirectoryHelper; +use Magento\Framework\Locale\ResolverInterface; +use Magento\Framework\Logger; +use Magento\Framework\Stdlib\DateTime\TimezoneInterface as MagentoTimezone; + +/** + * Customer Address Postal/Zip Code Attribute Data Model + */ +class Postcode extends AbstractData +{ + /** + * @var DirectoryHelper + */ + protected $directoryHelper; + + /** + * @param MagentoTimezone $localeDate + * @param Logger $logger + * @param AttributeMetadata $attribute + * @param ResolverInterface $localeResolver + * @param string $value + * @param string $entityTypeCode + * @param bool $isAjax + * @param DirectoryHelper $directoryHelper + */ + public function __construct( + MagentoTimezone $localeDate, + Logger $logger, + AttributeMetadata $attribute, + ResolverInterface $localeResolver, + $value, + $entityTypeCode, + $isAjax, + DirectoryHelper $directoryHelper + ) { + $this->directoryHelper = $directoryHelper; + parent::__construct( + $localeDate, + $logger, + $attribute, + $localeResolver, + $value, + $entityTypeCode, + $isAjax + ); + } + + /** + * Validate postal/zip code + * Return true and skip validation if country zip code is optional + * + * @param array|null|string $value + * @return array|bool + */ + public function validateValue($value) + { + $attribute = $this->getAttribute(); + $label = __($attribute->getStoreLabel()); + + $countryId = $this->getExtractedData('country_id'); + if ($this->directoryHelper->isZipCodeOptional($countryId)) { + return true; + } + + $errors = []; + if (empty($value) && $value !== '0') { + $errors[] = __('"%1" is a required value.', $label); + } + if (count($errors) == 0) { + return true; + } + return $errors; + } + + /** + * {@inheritdoc} + */ + public function extractValue(\Magento\Framework\App\RequestInterface $request) + { + return $this->_applyInputFilter($this->_getRequestValue($request)); + } + + /** + * {@inheritdoc} + */ + public function compactValue($value) + { + return $value; + } + + /** + * {@inheritdoc} + */ + public function restoreValue($value) + { + return $this->compactValue($value); + } + + /** + * {@inheritdoc} + */ + public function outputValue($format = ElementFactory::OUTPUT_FORMAT_TEXT) + { + return $this->_applyOutputFilter($this->_value); + } +} diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Text.php b/app/code/Magento/Customer/Model/Metadata/Form/Text.php index d6accf1e5bf07db35b2f891299cfa7528073f94b..e11cfb9fd0a566db8eb0d8887ae6cc01140feedc 100644 --- a/app/code/Magento/Customer/Model/Metadata/Form/Text.php +++ b/app/code/Magento/Customer/Model/Metadata/Form/Text.php @@ -25,7 +25,7 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Framework\Service\ArrayObjectSearch; +use Magento\Framework\Api\ArrayObjectSearch; class Text extends AbstractData { diff --git a/app/code/Magento/Customer/Model/Resource/AddressRepository.php b/app/code/Magento/Customer/Model/Resource/AddressRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..6d3fbec60184dd2a61698096f999d435fceb4aa5 --- /dev/null +++ b/app/code/Magento/Customer/Model/Resource/AddressRepository.php @@ -0,0 +1,303 @@ +<?php +/** + * Customer address entity resource model + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Customer\Model\Resource; + +use Magento\Framework\Exception\InputException; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SortOrder; +use Magento\Customer\Model\Address as CustomerAddressModel; +use Magento\Customer\Model\Resource\Address\Collection; + +class AddressRepository implements \Magento\Customer\Api\AddressRepositoryInterface +{ + /** + * Directory data + * + * @var \Magento\Directory\Helper\Data + */ + protected $directoryData; + + /** + * @var \Magento\Customer\Model\AddressFactory + */ + protected $addressFactory; + + /** + * @var \Magento\Customer\Model\AddressRegistry + */ + protected $addressRegistry; + + /** + * @var \Magento\Customer\Model\CustomerRegistry + */ + protected $customerRegistry; + + /** + * @var \Magento\Customer\Model\Resource\Address + */ + protected $addressResourceModel; + + /** + * @var \Magento\Customer\Api\Data\AddressSearchResultsDataBuilder + */ + protected $addressSearchResultsBuilder; + + /** + * @var \Magento\Customer\Model\Resource\Address\CollectionFactory + */ + protected $addressCollectionFactory; + + /** + * @param \Magento\Customer\Model\AddressFactory $addressFactory + * @param \Magento\Customer\Model\AddressRegistry $addressRegistry + * @param \Magento\Customer\Model\CustomerRegistry $customerRegistry + * @param \Magento\Customer\Model\Resource\Address $addressResourceModel + * @param \Magento\Directory\Helper\Data $directoryData + * @param \Magento\Customer\Api\Data\AddressSearchResultsDataBuilder $addressSearchResultsBuilder + * @param \Magento\Customer\Model\Resource\Address\CollectionFactory $addressCollectionFactory + */ + public function __construct( + \Magento\Customer\Model\AddressFactory $addressFactory, + \Magento\Customer\Model\AddressRegistry $addressRegistry, + \Magento\Customer\Model\CustomerRegistry $customerRegistry, + \Magento\Customer\Model\Resource\Address $addressResourceModel, + \Magento\Directory\Helper\Data $directoryData, + \Magento\Customer\Api\Data\AddressSearchResultsDataBuilder $addressSearchResultsBuilder, + \Magento\Customer\Model\Resource\Address\CollectionFactory $addressCollectionFactory + ) { + $this->addressFactory = $addressFactory; + $this->addressRegistry = $addressRegistry; + $this->customerRegistry = $customerRegistry; + $this->addressResource = $addressResourceModel; + $this->directoryData = $directoryData; + $this->addressSearchResultsBuilder = $addressSearchResultsBuilder; + $this->addressCollectionFactory = $addressCollectionFactory; + } + + /** + * Save customer address. + * + * @param \Magento\Customer\Api\Data\AddressInterface $address + * @return \Magento\Customer\Api\Data\AddressInterface + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function save(\Magento\Customer\Api\Data\AddressInterface $address) + { + $addressModel = null; + $customerModel = $this->customerRegistry->retrieve($address->getCustomerId()); + if ($address->getId()) { + $addressModel = $this->addressRegistry->retrieve($address->getId()); + } + + if (is_null($addressModel)) { + $addressModel = $this->addressFactory->create(); + $addressModel->updateData($address); + $addressModel->setCustomer($customerModel); + } else { + $addressModel->updateData($address); + } + + $inputException = $this->_validate($addressModel); + if ($inputException->wasErrorAdded()) { + throw $inputException; + } + $this->addressResource->save($addressModel); + $this->addressRegistry->push($addressModel); + $customerModel->getAddressesCollection()->clear(); + + return $addressModel->getDataModel(); + } + + /** + * Retrieve customer address. + * + * @param int $addressId + * @return \Magento\Customer\Api\Data\AddressInterface + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function get($addressId) + { + $address = $this->addressRegistry->retrieve($addressId); + return $address->getDataModel(); + } + + /** + * Retrieve customers addresses matching the specified criteria. + * + * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria + * @return \Magento\Customer\Api\Data\AddressSearchResultsInterface + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria) + { + $this->addressSearchResultsBuilder->setSearchCriteria($searchCriteria); + + /** @var Collection $collection */ + $collection = $this->addressCollectionFactory->create(); + // Add filters from root filter group to the collection + foreach ($searchCriteria->getFilterGroups() as $group) { + $this->addFilterGroupToCollection($group, $collection); + } + $this->addressSearchResultsBuilder->setTotalCount($collection->getSize()); + $sortOrders = $searchCriteria->getSortOrders(); + /** @var SortOrder $sortOrder */ + if ($sortOrders) { + foreach ($searchCriteria->getSortOrders() as $sortOrder) { + $field = $sortOrder->getField(); + $collection->addOrder( + $field, + ($sortOrder->getDirection() == SearchCriteriaInterface::SORT_ASC) ? 'ASC' : 'DESC' + ); + } + } + $collection->setCurPage($searchCriteria->getCurrentPage()); + $collection->setPageSize($searchCriteria->getPageSize()); + + /** @var \Magento\Customer\Api\Data\AddressInterface[] $addresses */ + $addresses = []; + $addressIds = $collection->getAllIds(); + foreach ($addressIds as $addressId) { + $addresses[] = $this->get($addressId); + } + $this->addressSearchResultsBuilder->setItems($addresses); + return $this->addressSearchResultsBuilder->create(); + } + + /** + * Helper function that adds a FilterGroup to the collection. + * + * @param FilterGroup $filterGroup + * @param Collection $collection + * @return void + * @throws \Magento\Framework\Exception\InputException + */ + protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection) + { + $fields = []; + $conditions = []; + foreach ($filterGroup->getFilters() as $filter) { + $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; + $fields[] = ['attribute' => $filter->getField(), $condition => $filter->getValue()]; + $conditions[] = [$condition => $filter->getValue()]; + } + if ($fields) { + $collection->addFieldToFilter($fields, $conditions); + } + } + + /** + * Delete customer address. + * + * @param \Magento\Customer\Api\Data\AddressInterface $address + * @return bool true on success + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function delete(\Magento\Customer\Api\Data\AddressInterface $address) + { + $address = $this->addressRegistry->retrieve($address->getId()); + $customerModel = $this->customerRegistry->retrieve($address->getCustomerId()); + $customerModel->getAddressesCollection()->clear(); + $this->addressResource->delete($address); + $this->addressRegistry->remove($address->getId()); + return true; + } + + /** + * Delete customer address by ID. + * + * @param int $addressId + * @return bool true on success + * @throws \Magento\Framework\Exception\NoSuchEntityException + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function deleteById($addressId) + { + $address = $this->addressRegistry->retrieve($addressId); + $customerModel = $this->customerRegistry->retrieve($address->getCustomerId()); + $customerModel->getAddressesCollection()->clear(); + $this->addressResource->delete($address); + $this->addressRegistry->remove($addressId); + return true; + } + + /** + * Validate Customer Addresses attribute values. + * + * @param CustomerAddressModel $customerAddressModel the model to validate + * @return InputException + * + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + */ + private function _validate(CustomerAddressModel $customerAddressModel) + { + $exception = new InputException(); + if ($customerAddressModel->getShouldIgnoreValidation()) { + return $exception; + } + + if (!\Zend_Validate::is($customerAddressModel->getFirstname(), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'firstname']); + } + + if (!\Zend_Validate::is($customerAddressModel->getLastname(), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'lastname']); + } + + if (!\Zend_Validate::is($customerAddressModel->getStreet(1), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'street']); + } + + if (!\Zend_Validate::is($customerAddressModel->getCity(), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'city']); + } + + if (!\Zend_Validate::is($customerAddressModel->getTelephone(), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'telephone']); + } + + $havingOptionalZip = $this->directoryData->getCountriesWithOptionalZip(); + if (!in_array($customerAddressModel->getCountryId(), $havingOptionalZip) + && !\Zend_Validate::is($customerAddressModel->getPostcode(), 'NotEmpty') + ) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'postcode']); + } + + if (!\Zend_Validate::is($customerAddressModel->getCountryId(), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'countryId']); + } + + if ($customerAddressModel->getCountryModel()->getRegionCollection()->getSize() + && !\Zend_Validate::is($customerAddressModel->getRegionId(), 'NotEmpty') + && $this->directoryData->isRegionRequired($customerAddressModel->getCountryId()) + ) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'regionId']); + } + + return $exception; + } +} diff --git a/app/code/Magento/Customer/Model/Resource/Customer/Grid/ServiceCollection.php b/app/code/Magento/Customer/Model/Resource/Customer/Grid/ServiceCollection.php index 3388889e4adc1ffec02d2b25a508132d89e1c3cc..d1e8266fe42fda8e12293f0ff969756e2a94b7da 100644 --- a/app/code/Magento/Customer/Model/Resource/Customer/Grid/ServiceCollection.php +++ b/app/code/Magento/Customer/Model/Resource/Customer/Grid/ServiceCollection.php @@ -24,12 +24,12 @@ namespace Magento\Customer\Model\Resource\Customer\Grid; use Magento\Core\Model\EntityFactory; -use Magento\Framework\Service\AbstractServiceCollection; +use Magento\Framework\Api\AbstractServiceCollection; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; use Magento\Customer\Service\V1\Data\CustomerDetails; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\SortOrderBuilder; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\SortOrderBuilder; /** * Customer Grid Collection backed by Services diff --git a/app/code/Magento/Customer/Model/Resource/CustomerRepository.php b/app/code/Magento/Customer/Model/Resource/CustomerRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..f6af8b15aebe4addae4741960de89b52844f64bc --- /dev/null +++ b/app/code/Magento/Customer/Model/Resource/CustomerRepository.php @@ -0,0 +1,372 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Resource; + +use Magento\Customer\Model\Address as CustomerAddressModel; +use Magento\Customer\Model\Data\CustomerSecure; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Api\SearchCriteriaInterface; + +/** + * Customer repository. + */ +class CustomerRepository implements \Magento\Customer\Api\CustomerRepositoryInterface +{ + /** + * @var \Magento\Framework\Reflection\DataObjectProcessor + */ + protected $dataProcessor; + + /** + * @var \Magento\Customer\Model\CustomerFactory + */ + protected $customerFactory; + + /** + * @var \Magento\Customer\Model\Data\CustomerSecureFactory + */ + protected $customerSecureFactory; + + /** + * @var \Magento\Customer\Model\CustomerRegistry + */ + protected $customerRegistry; + + /** + * @var \Magento\Customer\Model\Resource\AddressRepository + */ + protected $addressRepository; + + /** + * @var \Magento\Customer\Model\Resource\Customer + */ + protected $customerResourceModel; + + /** + * @var \Magento\Customer\Api\CustomerMetadataInterface + */ + protected $customerMetadata; + + /** + * @var \Magento\Customer\Api\Data\AddressDataBuilder + */ + protected $addressBuilder; + + /** + * @var \Magento\Customer\Api\Data\CustomerDataBuilder + */ + protected $customerBuilder; + + /** + * @var \Magento\Customer\Api\Data\CustomerSearchResultsDataBuilder + */ + protected $searchResultsBuilder; + + /** + * @var \Magento\Framework\Event\ManagerInterface + */ + protected $eventManager; + + /** + * @var \Magento\Framework\StoreManagerInterface + */ + protected $storeManager; + + /** + * @param \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param \Magento\Customer\Model\Data\CustomerSecureFactory $customerSecureFactory + * @param \Magento\Customer\Model\CustomerRegistry $customerRegistry + * @param \Magento\Customer\Model\Resource\AddressRepository $addressRepository + * @param \Magento\Customer\Model\Resource\Customer $customerResourceModel + * @param \Magento\Customer\Api\CustomerMetadataInterface $customerMetadata + * @param \Magento\Customer\Api\Data\AddressDataBuilder $addressBuilder + * @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder + * @param \Magento\Customer\Api\Data\CustomerSearchResultsDataBuilder $searchResultsDataBuilder + * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Framework\StoreManagerInterface $storeManager + */ + public function __construct( + \Magento\Framework\Reflection\DataObjectProcessor $dataProcessor, + \Magento\Customer\Model\CustomerFactory $customerFactory, + \Magento\Customer\Model\Data\CustomerSecureFactory $customerSecureFactory, + \Magento\Customer\Model\CustomerRegistry $customerRegistry, + \Magento\Customer\Model\Resource\AddressRepository $addressRepository, + \Magento\Customer\Model\Resource\Customer $customerResourceModel, + \Magento\Customer\Api\CustomerMetadataInterface $customerMetadata, + \Magento\Customer\Api\Data\AddressDataBuilder $addressBuilder, + \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder, + \Magento\Customer\Api\Data\CustomerSearchResultsDataBuilder $searchResultsDataBuilder, + \Magento\Framework\Event\ManagerInterface $eventManager, + \Magento\Framework\StoreManagerInterface $storeManager + ) { + $this->dataProcessor = $dataProcessor; + $this->customerFactory = $customerFactory; + $this->customerSecureFactory = $customerSecureFactory; + $this->customerRegistry = $customerRegistry; + $this->addressRepository = $addressRepository; + $this->customerResourceModel = $customerResourceModel; + $this->customerMetadata = $customerMetadata; + $this->addressBuilder = $addressBuilder; + $this->customerBuilder = $customerBuilder; + $this->searchResultsBuilder = $searchResultsDataBuilder; + $this->eventManager = $eventManager; + $this->storeManager = $storeManager; + } + + /** + * {@inheritdoc} + */ + public function save(\Magento\Customer\Api\Data\CustomerInterface $customer, $passwordHash = null) + { + $isNewCustomer = $customer->getId() ? false : true; + $this->validate($customer); + $customerModel = $this->customerFactory->create( + [ + 'data' => $this->dataProcessor->buildOutputDataArray( + $customer, + 'Magento\Customer\Api\Data\CustomerInterface' + ) + ] + ); + $storeId = $customerModel->getStoreId(); + if ($storeId === null) { + $customerModel->setStoreId($this->storeManager->getStore()->getId()); + } + $customerModel->getGroupId(); + $customerModel->setId($customer->getId()); + /** Prevent addresses being processed by resource model */ + $customerModel->unsAddresses(); + // Need to use attribute set or future updates can cause data loss + if (!$customerModel->getAttributeSetId()) { + $customerModel->setAttributeSetId( + \Magento\Customer\Service\V1\CustomerMetadataServiceInterface::ATTRIBUTE_SET_ID_CUSTOMER + ); + } + // Populate model with secure data + if ($customer->getId()) { + /* + * TODO: Check \Magento\Customer\Model\Resource\Customer::changeResetPasswordLinkToken setAttribute + * and make sure its consistent + */ + $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId()); + $customerModel->setRpToken($customerSecure->getRpToken()); + $customerModel->setRpTokenCreatedAt($customerSecure->getRpTokenCreatedAt()); + $customerModel->setPasswordHash($customerSecure->getPasswordHash()); + } else { + if ($passwordHash) { + $customerModel->setPasswordHash($passwordHash); + } + } + $this->customerResourceModel->save($customerModel); + $this->customerRegistry->push($customerModel); + $customerId = $customerModel->getId(); + foreach ($customer->getAddresses() as $address) { + $address = $this->addressBuilder->populate($address)->setCustomerId($customerId)->create(); + $this->addressRepository->save($address); + } + $savedCustomer = $this->get($customer->getEmail(), $customer->getWebsiteId()); + $this->eventManager->dispatch( + 'customer_save_after_data_object', + ['customer_data_object' => $savedCustomer, 'orig_customer_data_object' => $customer] + ); + return $savedCustomer; + } + + /** + * {@inheritdoc} + */ + public function get($email, $websiteId = null) + { + $customerModel = $this->customerRegistry->retrieveByEmail($email, $websiteId); + return $customerModel->getDataModel(); + } + + /** + * {@inheritdoc} + */ + public function getById($customerId, $websiteId = null) + { + $customerModel = $this->customerRegistry->retrieve($customerId, $websiteId); + return $customerModel->getDataModel(); + } + + /** + * {@inheritdoc} + */ + public function getList(SearchCriteriaInterface $searchCriteria) + { + $this->searchResultsBuilder->setSearchCriteria($searchCriteria); + /** @var \Magento\Customer\Model\Resource\Customer\Collection $collection */ + $collection = $this->customerFactory->create()->getCollection(); + // This is needed to make sure all the attributes are properly loaded + foreach ($this->customerMetadata->getAllAttributesMetadata() as $metadata) { + $collection->addAttributeToSelect($metadata->getAttributeCode()); + } + // Needed to enable filtering on name as a whole + $collection->addNameToSelect(); + // Needed to enable filtering based on billing address attributes + $collection->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left') + ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left') + ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left') + ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left') + ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left') + ->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left'); + //Add filters from root filter group to the collection + foreach ($searchCriteria->getFilterGroups() as $group) { + $this->addFilterGroupToCollection($group, $collection); + } + $this->searchResultsBuilder->setTotalCount($collection->getSize()); + $sortOrders = $searchCriteria->getSortOrders(); + if ($sortOrders) { + foreach ($searchCriteria->getSortOrders() as $sortOrder) { + $collection->addOrder( + $sortOrder->getField(), + ($sortOrder->getDirection() == SearchCriteriaInterface::SORT_ASC) ? 'ASC' : 'DESC' + ); + } + } + $collection->setCurPage($searchCriteria->getCurrentPage()); + $collection->setPageSize($searchCriteria->getPageSize()); + $customers = []; + /** @var \Magento\Customer\Model\Customer $customerModel */ + foreach ($collection as $customerModel) { + $customers[] = $customerModel->getDataModel(); + } + $this->searchResultsBuilder->setItems($customers); + return $this->searchResultsBuilder->create(); + } + + /** + * {@inheritdoc} + */ + public function delete(\Magento\Customer\Api\Data\CustomerInterface $customer) + { + return $this->deleteById($customer->getId()); + } + + /** + * {@inheritdoc} + */ + public function deleteById($customerId) + { + $customerModel = $this->customerRegistry->retrieve($customerId); + $customerModel->delete(); + $this->customerRegistry->remove($customerId); + return true; + } + + /** + * Validate customer attribute values. + * + * @param \Magento\Customer\Api\Data\CustomerInterface $customer + * @throws InputException + * @return void + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ + private function validate(\Magento\Customer\Api\Data\CustomerInterface $customer) + { + $exception = new InputException(); + if (!\Zend_Validate::is(trim($customer->getFirstname()), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'firstname']); + } + + if (!\Zend_Validate::is(trim($customer->getLastname()), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'lastname']); + } + + $isEmailAddress = \Zend_Validate::is( + $customer->getEmail(), + 'EmailAddress', + ['allow' => ['allow'=> \Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false]] + ); + + if (!$isEmailAddress) { + $exception->addError( + InputException::INVALID_FIELD_VALUE, + ['fieldName' => 'email', 'value' => $customer->getEmail()] + ); + } + + $dob = $this->getAttributeMetadata('dob'); + if (!is_null($dob) && $dob->isRequired() && '' == trim($customer->getDob())) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'dob']); + } + + $taxvat = $this->getAttributeMetadata('taxvat'); + if (!is_null($taxvat) && $taxvat->isRequired() && '' == trim($customer->getTaxvat())) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'taxvat']); + } + + $gender = $this->getAttributeMetadata('gender'); + if (!is_null($gender) && $gender->isRequired() && '' == trim($customer->getGender())) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'gender']); + } + + if ($exception->wasErrorAdded()) { + throw $exception; + } + } + + /** + * Get attribute metadata. + * + * @param string $attributeCode + * @return \Magento\Customer\Api\Data\AttributeMetadataInterface|null + */ + private function getAttributeMetadata($attributeCode) + { + try { + return $this->customerMetadata->getAttributeMetadata($attributeCode); + } catch (NoSuchEntityException $e) { + return null; + } + } + + /** + * Helper function that adds a FilterGroup to the collection. + * + * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup + * @param \Magento\Customer\Model\Resource\Customer\Collection $collection + * @return void + * @throws \Magento\Framework\Exception\InputException + */ + protected function addFilterGroupToCollection( + \Magento\Framework\Api\Search\FilterGroup $filterGroup, + \Magento\Customer\Model\Resource\Customer\Collection $collection + ) { + $fields = []; + $conditions = []; + foreach ($filterGroup->getFilters() as $filter) { + $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; + $fields[] = array('attribute' => $filter->getField(), $condition => $filter->getValue()); + } + if ($fields) { + $collection->addFieldToFilter($fields, $conditions); + } + } +} diff --git a/app/code/Magento/Customer/Model/Resource/Group.php b/app/code/Magento/Customer/Model/Resource/Group.php index 6ae36a22640bbbac0afb10b9690843df1f9605ed..5ab5053280709ba28ef927088d68aaf729742eb7 100644 --- a/app/code/Magento/Customer/Model/Resource/Group.php +++ b/app/code/Magento/Customer/Model/Resource/Group.php @@ -123,4 +123,17 @@ class Group extends \Magento\Framework\Model\Resource\Db\AbstractDb { return $this->_customersFactory->create(); } + + /** + * Prepare data before save + * + * @param \Magento\Framework\Model\AbstractModel $group + * @return $this + */ + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $group) + { + /** @var \Magento\Customer\Model\Group $group */ + $group->setCode(substr($group->getCode(), 0, $group::GROUP_CODE_MAX_LENGTH)); + return parent::_beforeSave($group); + } } diff --git a/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php b/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php index 7b169e243783b729a04de192cb52e486679de77e..9a574780a80f0ba026db1604e744d18bc7319f3e 100644 --- a/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php +++ b/app/code/Magento/Customer/Model/Resource/Group/Grid/ServiceCollection.php @@ -24,12 +24,12 @@ namespace Magento\Customer\Model\Resource\Group\Grid; use Magento\Core\Model\EntityFactory; -use Magento\Framework\Service\AbstractServiceCollection; +use Magento\Framework\Api\AbstractServiceCollection; use Magento\Customer\Service\V1\CustomerGroupServiceInterface; use Magento\Customer\Service\V1\Data\CustomerGroup; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\SortOrderBuilder; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\SortOrderBuilder; /** * Customer group collection backed by services @@ -76,7 +76,7 @@ class ServiceCollection extends AbstractServiceCollection $groups = $searchResults->getItems(); foreach ($groups as $group) { $groupItem = new \Magento\Framework\Object(); - $groupItem->addData(\Magento\Framework\Service\SimpleDataObjectConverter::toFlatArray($group)); + $groupItem->addData(\Magento\Framework\Api\SimpleDataObjectConverter::toFlatArray($group)); $this->_addItem($groupItem); } $this->_setIsLoaded(); diff --git a/app/code/Magento/Customer/Model/Resource/GroupRepository.php b/app/code/Magento/Customer/Model/Resource/GroupRepository.php new file mode 100644 index 0000000000000000000000000000000000000000..69bf9a8943d4cb7b54d41e902eec0743f59ef926 --- /dev/null +++ b/app/code/Magento/Customer/Model/Resource/GroupRepository.php @@ -0,0 +1,332 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Resource; + +use Magento\Customer\Api\Data\GroupInterface; +use Magento\Customer\Model\Resource\Group\Collection; +use Magento\Framework\Api\SearchCriteriaInterface; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\State\InvalidTransitionException; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Tax\Service\V1\Data\TaxClass; +use Magento\Tax\Service\V1\TaxClassServiceInterface; + +/** + * Customer group CRUD class + */ +class GroupRepository implements \Magento\Customer\Api\GroupRepositoryInterface +{ + + /** + * The default tax class id if no tax class id is specified + */ + const DEFAULT_TAX_CLASS_ID = 3; + + /** + * @var \Magento\Customer\Model\GroupRegistry + */ + protected $groupRegistry; + + /** + * @var \Magento\Customer\Model\GroupFactory + */ + protected $groupFactory; + + /** + * @var \Magento\Customer\Api\Data\GroupDataBuilder + */ + protected $groupBuilder; + + /** + * @var \Magento\Customer\Model\Resource\Group + */ + protected $groupResourceModel; + + /** + * @var \Magento\Framework\Reflection\DataObjectProcessor + */ + protected $dataObjectProcessor; + + /** + * @var \Magento\Customer\Api\Data\GroupSearchResultsDataBuilder + */ + protected $searchResultsBuilder; + + /** + * @var TaxClassServiceInterface + */ + private $taxClassService; + + /** + * @param \Magento\Customer\Model\GroupRegistry $groupRegistry + * @param \Magento\Customer\Model\GroupFactory $groupFactory + * @param \Magento\Customer\Api\Data\GroupDataBuilder $groupBuilder + * @param \Magento\Customer\Model\Resource\Group $groupResourceModel + * @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor + * @param \Magento\Customer\Api\Data\GroupSearchResultsDataBuilder $searchResultsBuilder + * @param TaxClassServiceInterface $taxClassServiceInterface + */ + public function __construct( + \Magento\Customer\Model\GroupRegistry $groupRegistry, + \Magento\Customer\Model\GroupFactory $groupFactory, + \Magento\Customer\Api\Data\GroupDataBuilder $groupBuilder, + \Magento\Customer\Model\Resource\Group $groupResourceModel, + \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, + \Magento\Customer\Api\Data\GroupSearchResultsDataBuilder $searchResultsBuilder, + TaxClassServiceInterface $taxClassServiceInterface + ) { + $this->groupRegistry = $groupRegistry; + $this->groupFactory = $groupFactory; + $this->groupBuilder = $groupBuilder; + $this->groupResourceModel = $groupResourceModel; + $this->dataObjectProcessor = $dataObjectProcessor; + $this->searchResultsBuilder = $searchResultsBuilder; + $this->taxClassService = $taxClassServiceInterface; + } + + /** + * {@inheritdoc} + */ + public function save(\Magento\Customer\Api\Data\GroupInterface $group) + { + $this->_validate($group); + + /** @var \Magento\Customer\Model\Group $groupModel */ + $groupModel = null; + if ($group->getId()) { + $this->_verifyTaxClassModel($group->getTaxClassId(), $group); + $groupModel = $this->groupRegistry->retrieve($group->getId()); + $groupDataAttributes = $this->dataObjectProcessor->buildOutputDataArray( + $group, + '\Magento\Customer\Api\Data\GroupInterface' + ); + foreach ($groupDataAttributes as $attributeCode => $attributeData) { + $groupModel->setDataUsingMethod($attributeCode, $attributeData); + } + } else { + $groupModel = $this->groupFactory->create(); + $groupModel->setCode($group->getCode()); + + $taxClassId = $group->getTaxClassId() ? : self::DEFAULT_TAX_CLASS_ID; + $this->_verifyTaxClassModel($taxClassId, $group); + $groupModel->setTaxClassId($taxClassId); + } + + try { + $this->groupResourceModel->save($groupModel); + } catch (\Magento\Framework\Model\Exception $e) { + /** + * Would like a better way to determine this error condition but + * difficult to do without imposing more database calls + */ + if ($e->getMessage() === __('Customer Group already exists.')) { + throw new InvalidTransitionException('Customer Group already exists.'); + } + throw $e; + } + + $this->groupRegistry->remove($groupModel->getId()); + + $this->groupBuilder->setId($groupModel->getId()); + $this->groupBuilder->setCode($groupModel->getCode()); + $this->groupBuilder->setTaxClassId($groupModel->getTaxClassId()); + $this->groupBuilder->setTaxClassName($groupModel->getTaxClassName()); + return $this->groupBuilder->create(); + } + + /** + * {@inheritdoc} + */ + public function get($id) + { + $groupModel = $this->groupRegistry->retrieve($id); + return $this->groupBuilder->setId($groupModel->getId()) + ->setCode($groupModel->getCode()) + ->setTaxClassId($groupModel->getTaxClassId()) + ->setTaxClassName($groupModel->getTaxClassName()) + ->create(); + } + + /** + * {@inheritdoc} + */ + public function getList(SearchCriteriaInterface $searchCriteria) + { + $this->searchResultsBuilder->setSearchCriteria($searchCriteria); + + /** @var \Magento\Customer\Model\Resource\Group\Collection $collection */ + $collection = $this->groupFactory->create()->getCollection(); + + //Add filters from root filter group to the collection + /** @var FilterGroup $group */ + foreach ($searchCriteria->getFilterGroups() as $group) { + $this->addFilterGroupToCollection($group, $collection); + } + $this->searchResultsBuilder->setTotalCount($collection->getSize()); + $sortOrders = $searchCriteria->getSortOrders(); + /** @var \Magento\Framework\Api\SortOrder $sortOrder */ + if ($sortOrders) { + foreach ($searchCriteria->getSortOrders() as $sortOrder) { + $field = $this->translateField($sortOrder->getField()); + $collection->addOrder( + $field, + ($sortOrder->getDirection() == SearchCriteriaInterface::SORT_ASC) ? 'ASC' : 'DESC' + ); + } + } + $collection->setCurPage($searchCriteria->getCurrentPage()); + $collection->setPageSize($searchCriteria->getPageSize()); + + /** @var \Magento\Customer\Api\Data\GroupInterface[] $groups */ + $groups = array(); + /** @var \Magento\Customer\Model\Group $group */ + foreach ($collection as $group) { + $this->groupBuilder->setId($group->getId()); + $this->groupBuilder->setCode($group->getCode()); + $this->groupBuilder->setTaxClassId($group->getTaxClassId()); + $this->groupBuilder->setTaxClassName($group->getTaxClassName()); + $groups[] = $this->groupBuilder->create(); + } + return $this->searchResultsBuilder->setItems($groups)->create(); + } + + /** + * Helper function that adds a FilterGroup to the collection. + * + * @param FilterGroup $filterGroup + * @param Collection $collection + * @return void + * @throws \Magento\Framework\Exception\InputException + */ + protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection) + { + $fields = []; + $conditions = []; + foreach ($filterGroup->getFilters() as $filter) { + $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; + $fields[] = $this->translateField($filter->getField()); + $conditions[] = [$condition => $filter->getValue()]; + } + if ($fields) { + $collection->addFieldToFilter($fields, $conditions); + } + } + + /** + * Translates a field name to a DB column name for use in collection queries. + * + * @param string $field a field name that should be translated to a DB column name. + * @return string + */ + protected function translateField($field) + { + switch ($field) { + case GroupInterface::CODE: + return 'customer_group_code'; + case GroupInterface::ID: + return 'customer_group_id'; + default: + return $field; + } + } + + /** + * Delete customer group. + * + * @param GroupInterface $group + * @return bool true on success + * @throws \Magento\Framework\Exception\StateException If customer group cannot be deleted + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function delete(GroupInterface $group) + { + return $this->deleteById($group->getId()); + } + + /** + * Delete customer group by ID. + * + * @param int $id + * @return bool true on success + * @throws \Magento\Framework\Exception\NoSuchEntityException + * @throws \Magento\Framework\Exception\StateException If customer group cannot be deleted + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function deleteById($id) + { + $groupModel = $this->groupRegistry->retrieve($id); + + if ($id <= 0 || $groupModel->usesAsDefault()) { + throw new \Magento\Framework\Exception\StateException('Cannot delete group.'); + } + + $groupModel->delete(); + $this->groupRegistry->remove($id); + return true; + } + + /** + * Validate group values. + * + * @param \Magento\Customer\Api\Data\GroupInterface $group + * @throws InputException + * @return void + * + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + */ + private function _validate($group) + { + $exception = new InputException(); + if (!\Zend_Validate::is($group->getCode(), 'NotEmpty')) { + $exception->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'code']); + } + + if ($exception->wasErrorAdded()) { + throw $exception; + } + } + + /** + * Verifies that the tax class model exists and is a customer tax class type. + * + * @param int $taxClassId The id of the tax class model to check + * @param \Magento\Customer\Api\Data\GroupInterface $group The original group parameters + * @return void + * @throws InputException Thrown if the tax class model is invalid + */ + protected function _verifyTaxClassModel($taxClassId, $group) + { + try { + /* @var TaxClass $taxClassData */ + $taxClassData = $this->taxClassService->getTaxClass($taxClassId); + } catch (\Magento\Framework\Exception\NoSuchEntityException $e) { + throw InputException::invalidFieldValue('taxClassId', $group->getTaxClassId()); + } + if ($taxClassData->getClassType() !== TaxClassServiceInterface::TYPE_CUSTOMER) { + throw InputException::invalidFieldValue('taxClassId', $group->getTaxClassId()); + } + } +} diff --git a/app/code/Magento/Customer/Model/Resource/Setup.php b/app/code/Magento/Customer/Model/Resource/Setup.php index 14b2bb6b7f7254558942710f4734768b2411040e..6c9af4dac681f3438885df91ae9abe5cbdcb0737 100644 --- a/app/code/Magento/Customer/Model/Resource/Setup.php +++ b/app/code/Magento/Customer/Model/Resource/Setup.php @@ -437,7 +437,8 @@ class Setup extends \Magento\Eav\Model\Entity\Setup 'sort_order' => 110, 'validate_rules' => 'a:0:{}', 'data' => 'Magento\Customer\Model\Attribute\Data\Postcode', - 'position' => 110 + 'position' => 110, + 'required' => false, ), 'telephone' => array( 'type' => 'varchar', diff --git a/app/code/Magento/Customer/Model/Resource/Visitor.php b/app/code/Magento/Customer/Model/Resource/Visitor.php index 260bb66c547d58aba19b4aead580b2965ecdcb65..8648c13790042c83f9b6f18390e2c712c5168597 100644 --- a/app/code/Magento/Customer/Model/Resource/Visitor.php +++ b/app/code/Magento/Customer/Model/Resource/Visitor.php @@ -30,6 +30,31 @@ namespace Magento\Customer\Model\Resource; */ class Visitor extends \Magento\Framework\Model\Resource\Db\AbstractDb { + /** + * @var \Magento\Framework\Stdlib\DateTime\DateTime + */ + protected $date; + + /** + * @var \Magento\Framework\Stdlib\DateTime + */ + protected $dateTime; + + /** + * @param \Magento\Framework\App\Resource $resource + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Stdlib\DateTime $dateTime + */ + public function __construct( + \Magento\Framework\App\Resource $resource, + \Magento\Framework\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Stdlib\DateTime $dateTime + ) { + $this->date = $date; + $this->dateTime = $dateTime; + parent::__construct($resource); + } + /** * Define main table * @@ -50,6 +75,40 @@ class Visitor extends \Magento\Framework\Model\Resource\Db\AbstractDb { return array( 'session_id' => $visitor->getSessionId(), + 'last_visit_at' => $visitor->getLastVisitAt() ); } + + /** + * Clean visitor's outdated records + * + * @param \Magento\Customer\Model\Visitor $object + * @return $this + */ + public function clean(\Magento\Customer\Model\Visitor $object) + { + $cleanTime = $object->getCleanTime(); + $readAdapter = $this->_getReadAdapter(); + $writeAdapter = $this->_getWriteAdapter(); + $timeLimit = $this->dateTime->formatDate($this->date->gmtTimestamp() - $cleanTime); + while (true) { + $select = $readAdapter->select()->from( + array('visitor_table' => $this->getTable('customer_visitor')), + array('visitor_id' => 'visitor_table.visitor_id') + )->where( + 'visitor_table.last_visit_at < ?', + $timeLimit + )->limit( + 100 + ); + $visitorIds = $readAdapter->fetchCol($select); + if (!$visitorIds) { + break; + } + $condition = array('visitor_id IN (?)' => $visitorIds); + $writeAdapter->delete($this->getTable('customer_visitor'), $condition); + } + + return $this; + } } diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php index 242cdd822e7d6ffe881574f4c02f139e8cfcdcb2..37e1dee5f6937dc727bd79d596f7a70af7791522 100644 --- a/app/code/Magento/Customer/Model/Visitor.php +++ b/app/code/Magento/Customer/Model/Visitor.php @@ -61,6 +61,18 @@ class Visitor extends \Magento\Framework\Model\AbstractModel */ protected $ignores; + /** + * Core store config + * + * @var \Magento\Framework\App\Config\ScopeConfigInterface + */ + protected $scopeConfig; + + /** + * @var \Magento\Framework\Stdlib\DateTime + */ + protected $dateTime; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry @@ -68,26 +80,34 @@ class Visitor extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\HTTP\Header $httpHeader * @param \Magento\Framework\Model\Resource\AbstractResource $resource * @param \Magento\Framework\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param array $ignoredUserAgents * @param array $ignores * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\HTTP\Header $httpHeader, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Model\Resource\AbstractResource $resource = null, \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $ignoredUserAgents = array(), array $ignores = array(), - $data = array() + array $data = array() ) { $this->session = $session; $this->httpHeader = $httpHeader; $this->ignoredUserAgents = $ignoredUserAgents; parent::__construct($context, $registry, $resource, $resourceCollection, $data); $this->ignores = $ignores; + $this->scopeConfig = $scopeConfig; + $this->dateTime = $dateTime; } /** @@ -136,6 +156,7 @@ class Visitor extends \Magento\Framework\Model\AbstractModel } if (!$this->getId()) { $this->setSessionId($this->session->getSessionId()); + $this->setLastVisitAt($this->dateTime->now()); $this->save(); $this->_eventManager->dispatch('visitor_init', array('visitor' => $this)); $this->session->setVisitorData($this->getData()); @@ -251,4 +272,29 @@ class Visitor extends \Magento\Framework\Model\AbstractModel } return $this; } + + + /** + * Return clean time in seconds for visitor's outdated records + * + * @return string + */ + public function getCleanTime() + { + return $this->scopeConfig->getValue( + \Magento\Framework\Session\Config::XML_PATH_COOKIE_LIFETIME, + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ) + 86400; + } + + /** + * Clean visitor's outdated records + * + * @return $this + */ + public function clean() + { + $this->getResource()->clean($this); + return $this; + } } diff --git a/app/code/Magento/Customer/Service/V1/AddressMetadataService.php b/app/code/Magento/Customer/Service/V1/AddressMetadataService.php index c1b8b47053085116ef0ecc3fdb6576572732d1ef..53e956fe7aa82f5d48c5364e36a80ac27492537e 100644 --- a/app/code/Magento/Customer/Service/V1/AddressMetadataService.php +++ b/app/code/Magento/Customer/Service/V1/AddressMetadataService.php @@ -28,8 +28,9 @@ use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataConverter; use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataDataProvider; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Service\Config\MetadataConfig; -use Magento\Framework\Service\SimpleDataObjectConverter; +use Magento\Framework\Api\Config\MetadataConfig; +use Magento\Framework\Api\SimpleDataObjectConverter; +use Magento\Customer\Api\AddressMetadataInterface; /** * Service to fetch customer address related custom attributes @@ -78,7 +79,7 @@ class AddressMetadataService implements AddressMetadataServiceInterface { $attributes = []; $attributesFormCollection = $this->attributeMetadataDataProvider->loadAttributesCollection( - self::ENTITY_TYPE_ADDRESS, + AddressMetadataInterface::ENTITY_TYPE_ADDRESS, $formCode ); foreach ($attributesFormCollection as $attribute) { @@ -97,7 +98,10 @@ class AddressMetadataService implements AddressMetadataServiceInterface public function getAttributeMetadata($attributeCode) { /** @var AbstractAttribute $attribute */ - $attribute = $this->attributeMetadataDataProvider->getAttribute(self::ENTITY_TYPE_ADDRESS, $attributeCode); + $attribute = $this->attributeMetadataDataProvider->getAttribute( + AddressMetadataInterface::ENTITY_TYPE_ADDRESS, + $attributeCode + ); if ($attribute && ($attributeCode === 'id' || !is_null($attribute->getId()))) { $attributeMetadata = $this->attributeMetadataConverter->createMetadataAttribute($attribute); return $attributeMetadata; @@ -106,7 +110,7 @@ class AddressMetadataService implements AddressMetadataServiceInterface NoSuchEntityException::MESSAGE_DOUBLE_FIELDS, [ 'fieldName' => 'entityType', - 'fieldValue' => self::ENTITY_TYPE_ADDRESS, + 'fieldValue' => AddressMetadataInterface::ENTITY_TYPE_ADDRESS, 'field2Name' => 'attributeCode', 'field2Value' => $attributeCode, ] @@ -121,33 +125,33 @@ class AddressMetadataService implements AddressMetadataServiceInterface { /** @var AbstractAttribute[] $attribute */ $attributeCodes = $this->attributeMetadataDataProvider->getAllAttributeCodes( - self::ENTITY_TYPE_ADDRESS, - self::ATTRIBUTE_SET_ID_ADDRESS + AddressMetadataInterface::ENTITY_TYPE_ADDRESS, + AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS ); - $attributesMetadata = []; + $allAttributesMetadata = []; foreach ($attributeCodes as $attributeCode) { try { - $attributesMetadata[] = $this->getAttributeMetadata($attributeCode); + $allAttributesMetadata[] = $this->getAttributeMetadata($attributeCode); } catch (NoSuchEntityException $e) { //If no such entity, skip } } - return $attributesMetadata; + return $allAttributesMetadata; } /** * {@inheritdoc} */ - public function getCustomAttributesMetadata($dataObjectClassName = self::DATA_OBJECT_CLASS_NAME) + public function getCustomAttributesMetadata($dataObjectClassName = AddressMetadataInterface::DATA_INTERFACE_NAME) { $customAttributes = []; if (!$this->addressDataObjectMethods) { $dataObjectMethods = array_flip(get_class_methods($dataObjectClassName)); $baseClassDataObjectMethods = array_flip( - get_class_methods('Magento\Framework\Service\Data\AbstractExtensibleObject') + get_class_methods('Magento\Framework\Api\AbstractExtensibleObject') ); $this->addressDataObjectMethods = array_diff_key($dataObjectMethods, $baseClassDataObjectMethods); } diff --git a/app/code/Magento/Customer/Service/V1/CustomerAccountService.php b/app/code/Magento/Customer/Service/V1/CustomerAccountService.php index 1fd4eb9f235e851fba92b9b9b5c75005ac14fbf9..f2858a8103be16ad91b72f32399abf842fa5adfa 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerAccountService.php +++ b/app/code/Magento/Customer/Service/V1/CustomerAccountService.php @@ -47,9 +47,9 @@ use Magento\Framework\Exception\StateException; use Magento\Framework\Logger; use Magento\Framework\Mail\Exception as MailException; use Magento\Framework\Math\Random; -use Magento\Framework\Service\V1\Data\Search\FilterGroup; -use Magento\Framework\Service\V1\Data\SearchCriteria; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SortOrder; use Magento\Framework\UrlInterface; use Magento\Framework\StoreManagerInterface; use Magento\Framework\Stdlib\String as StringHelper; @@ -382,13 +382,16 @@ class CustomerAccountService implements CustomerAccountServiceInterface $password = null, $redirectUrl = '' ) { - if ($password) { - $this->checkPasswordStrength($password); - } else { + if (empty($password)) { $password = $this->mathRandom->getRandomString(self::MIN_PASSWORD_LENGTH); + } else { + $this->checkPasswordStrength($password); } - $hash = $this->getPasswordHash($password); - return $this->createCustomerWithPasswordHash($customerDetails, $hash, $redirectUrl); + return $this->createCustomerWithPasswordHash( + $customerDetails, + $this->getPasswordHash($password), + $redirectUrl + ); } /** @@ -662,8 +665,8 @@ class CustomerAccountService implements CustomerAccountServiceInterface $length = $this->stringHelper->strlen($password); if ($length < self::MIN_PASSWORD_LENGTH) { throw new InputException( - 'The password must have at least %min_length characters.', - ['min_length' => self::MIN_PASSWORD_LENGTH] + 'The password must have at least %1 characters.', + [self::MIN_PASSWORD_LENGTH] ); } if ($this->stringHelper->strlen(trim($password)) != $length) { @@ -685,7 +688,7 @@ class CustomerAccountService implements CustomerAccountServiceInterface public function validateCustomerData(Data\Customer $customer, array $attributes = []) { $customerErrors = $this->validator->validateData( - \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer), + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer), $attributes, 'customer' ); diff --git a/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php b/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php index 4f6b77914137f8b0c52cb5ea74c12cb5b1a0727c..805442f8fb262c0865640a143f480856429cbb93 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php +++ b/app/code/Magento/Customer/Service/V1/CustomerAccountServiceInterface.php @@ -124,11 +124,11 @@ interface CustomerAccountServiceInterface /** * Retrieve customers which match a specified criteria * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @throws \Magento\Framework\Exception\InputException if there is a problem with the input * @return \Magento\Customer\Service\V1\Data\SearchResults containing Data\CustomerDetails */ - public function searchCustomers(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function searchCustomers(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Login a customer account using username and password diff --git a/app/code/Magento/Customer/Service/V1/CustomerAddressService.php b/app/code/Magento/Customer/Service/V1/CustomerAddressService.php index 1c3d814549297b84d7a2c2e4a880ef4a611513ed..57cc9c5425b22f51c8b3babe1097fe1a58ce6634 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerAddressService.php +++ b/app/code/Magento/Customer/Service/V1/CustomerAddressService.php @@ -26,7 +26,6 @@ namespace Magento\Customer\Service\V1; use Magento\Customer\Model\Address as CustomerAddressModel; use Magento\Customer\Model\Address\Converter as AddressConverter; use Magento\Customer\Model\CustomerRegistry; -use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\InputException; /** diff --git a/app/code/Magento/Customer/Service/V1/CustomerGroupService.php b/app/code/Magento/Customer/Service/V1/CustomerGroupService.php index d3d73a017342c8a2b9a973628b8c798adf81057e..0c52479ccff604d2022e8275c27e2d73adfb795f 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerGroupService.php +++ b/app/code/Magento/Customer/Service/V1/CustomerGroupService.php @@ -30,15 +30,15 @@ use Magento\Customer\Model\GroupFactory; use Magento\Customer\Model\GroupRegistry; use Magento\Customer\Model\Resource\Group\Collection; use Magento\Customer\Service\V1\Data\CustomerGroup; -use Magento\Framework\Service\V1\Data\Search\FilterGroup; +use Magento\Framework\Api\Search\FilterGroup; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Exception\StateException; use Magento\Framework\Exception\State\InvalidTransitionException; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; use Magento\Tax\Service\V1\Data\TaxClass; use Magento\Tax\Service\V1\TaxClassServiceInterface; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\SortOrder; /** * Customer service is responsible for customer business workflow encapsulation diff --git a/app/code/Magento/Customer/Service/V1/CustomerGroupServiceInterface.php b/app/code/Magento/Customer/Service/V1/CustomerGroupServiceInterface.php index 636c9878107f6e3beedbd29f0d78639b3413581a..76d6ecbbb770544af71f6034e1b8fe5b3639f661 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerGroupServiceInterface.php +++ b/app/code/Magento/Customer/Service/V1/CustomerGroupServiceInterface.php @@ -52,11 +52,11 @@ interface CustomerGroupServiceInterface /** * Search groups * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @throws \Magento\Framework\Exception\InputException If there is a problem with the input * @return \Magento\Customer\Service\V1\Data\CustomerGroupSearchResults containing Data\CustomerGroup objects */ - public function searchGroups(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function searchGroups(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Get a customer group by group ID. diff --git a/app/code/Magento/Customer/Service/V1/CustomerMetadataService.php b/app/code/Magento/Customer/Service/V1/CustomerMetadataService.php index fad3a7af130d8700be5ddd895a1c93a04ae12f64..b0e490471cb185fe4e90a121f56bab6e9e0256ec 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerMetadataService.php +++ b/app/code/Magento/Customer/Service/V1/CustomerMetadataService.php @@ -28,8 +28,8 @@ use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataConverter; use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataDataProvider; use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Service\Config\MetadataConfig; -use Magento\Framework\Service\SimpleDataObjectConverter; +use Magento\Framework\Api\Config\MetadataConfig; +use Magento\Framework\Api\SimpleDataObjectConverter; /** * Service to fetch customer related custom attributes @@ -148,7 +148,7 @@ class CustomerMetadataService implements CustomerMetadataServiceInterface if (!$this->customerDataObjectMethods) { $dataObjectMethods = array_flip(get_class_methods($dataObjectClassName)); $baseClassDataObjectMethods = array_flip( - get_class_methods('Magento\Framework\Service\Data\AbstractExtensibleObject') + get_class_methods('Magento\Framework\Api\AbstractExtensibleObject') ); $this->customerDataObjectMethods = array_diff_key($dataObjectMethods, $baseClassDataObjectMethods); } diff --git a/app/code/Magento/Customer/Service/V1/CustomerMetadataServiceInterface.php b/app/code/Magento/Customer/Service/V1/CustomerMetadataServiceInterface.php index ba5df7a303a47e1304ce4df0bc929e84522da9fa..4a23ac9eed14f9b032248f0ab87e837760bd3ddd 100644 --- a/app/code/Magento/Customer/Service/V1/CustomerMetadataServiceInterface.php +++ b/app/code/Magento/Customer/Service/V1/CustomerMetadataServiceInterface.php @@ -32,5 +32,5 @@ interface CustomerMetadataServiceInterface extends MetadataServiceInterface const ENTITY_TYPE_CUSTOMER = 'customer'; - const DATA_OBJECT_CLASS_NAME = 'Magento\Customer\Service\V1\Data\Customer'; + const DATA_OBJECT_CLASS_NAME = 'Magento\Customer\Api\Data\CustomerInterface'; } diff --git a/app/code/Magento/Customer/Service/V1/Data/Address.php b/app/code/Magento/Customer/Service/V1/Data/Address.php index 6bf7bb2d96fc29645dfcc40a6baa2c8060bffb25..b42bfaaef11d390ddfa6b43f7b6be820979d4d60 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Address.php +++ b/app/code/Magento/Customer/Service/V1/Data/Address.php @@ -25,7 +25,7 @@ */ namespace Magento\Customer\Service\V1\Data; -class Address extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Address extends \Magento\Framework\Api\AbstractExtensibleObject { // FIXME: This constant relates to a quote address object, not this Data Object const ADDRESS_TYPE_BILLING = 'billing'; diff --git a/app/code/Magento/Customer/Service/V1/Data/AddressBuilder.php b/app/code/Magento/Customer/Service/V1/Data/AddressBuilder.php index b700d06ef911d297a37e424f44855f949e2f5b3c..5c47d7ea441e5bdfe8b2fd0bd8fa284ea50a41e0 100644 --- a/app/code/Magento/Customer/Service/V1/Data/AddressBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/AddressBuilder.php @@ -25,9 +25,9 @@ namespace Magento\Customer\Service\V1\Data; use Magento\Customer\Service\V1\AddressMetadataServiceInterface; -use Magento\Framework\Service\Data\AbstractExtensibleObject as ExtensibleObject; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AbstractExtensibleObject as ExtensibleObject; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * Builder for the Address Service Data Object @@ -36,7 +36,7 @@ use Magento\Framework\Service\Data\AttributeValueBuilder; * @method Address mergeDataObjectWithArray(ExtensibleObject $dataObject, array $data) * @method Address mergeDataObjects(ExtensibleObject $firstDataObject, ExtensibleObject $secondDataObject) */ -class AddressBuilder extends AbstractExtensibleObjectBuilder +class AddressBuilder extends ExtensibleObjectBuilder { /** * Region builder @@ -46,20 +46,20 @@ class AddressBuilder extends AbstractExtensibleObjectBuilder protected $_regionBuilder; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param AddressMetadataServiceInterface $metadataService * @param RegionBuilder $regionBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, AddressMetadataServiceInterface $metadataService, RegionBuilder $regionBuilder ) { parent::__construct($objectFactory, $valueBuilder, $metadataService); $this->_regionBuilder = $regionBuilder; - $this->_data[Address::KEY_REGION] = $regionBuilder->create(); + $this->data[Address::KEY_REGION] = $regionBuilder->create(); } /** diff --git a/app/code/Magento/Customer/Service/V1/Data/AddressConverter.php b/app/code/Magento/Customer/Service/V1/Data/AddressConverter.php index 9809422a376801c7b0179b0f11c8b3d5b9da0007..58afde2cd23d65af3067c531f65292914e07c325 100644 --- a/app/code/Magento/Customer/Service/V1/Data/AddressConverter.php +++ b/app/code/Magento/Customer/Service/V1/Data/AddressConverter.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Service\V1\Data; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensibleDataObjectConverter; /** * Class AddressConverter converts Address Service Data Object to an array diff --git a/app/code/Magento/Customer/Service/V1/Data/Customer.php b/app/code/Magento/Customer/Service/V1/Data/Customer.php index 1289abfab4f3ef0975781896ec830c2704aab127..bf6c68d7b516af31ba8b7d905ef3373edbb8dcc4 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Customer.php +++ b/app/code/Magento/Customer/Service/V1/Data/Customer.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Service\V1\Data; /** * Class Customer */ -class Customer extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Customer extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerBuilder.php b/app/code/Magento/Customer/Service/V1/Data/CustomerBuilder.php index 9e43a63ddad5ae981a28f2c3e6870742d3a527c1..9940cee02308458e5ecc1f3b15c77166cf52c491 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerBuilder.php @@ -24,9 +24,9 @@ namespace Magento\Customer\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as ExtensibleObject; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AbstractExtensibleObject as ExtensibleObject; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; /** @@ -36,15 +36,15 @@ use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; * @method Customer mergeDataObjectWithArray(ExtensibleObject $dataObject, array $data) * @method Customer mergeDataObjects(ExtensibleObject $firstDataObject, ExtensibleObject $secondDataObject) */ -class CustomerBuilder extends AbstractExtensibleObjectBuilder +class CustomerBuilder extends ExtensibleObjectBuilder { /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param CustomerMetadataServiceInterface $metadataService */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, CustomerMetadataServiceInterface $metadataService ) { diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerDetails.php b/app/code/Magento/Customer/Service/V1/Data/CustomerDetails.php index d0dffa9f8b767bb9b2b991da4a26063ae5c0f644..09255ff5e53e2952046da4f73ec3650c9342ccde 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerDetails.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerDetails.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Service\V1\Data; /** * Class CustomerDetails */ -class CustomerDetails extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class CustomerDetails extends \Magento\Framework\Api\AbstractExtensibleObject { const KEY_CUSTOMER = 'customer'; diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerDetailsBuilder.php b/app/code/Magento/Customer/Service/V1/Data/CustomerDetailsBuilder.php index fa0197373d48422cfee808323f95a716dd4eb371..0db5a29509120075a351accdcb4239c2197d66f9 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerDetailsBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerDetailsBuilder.php @@ -25,14 +25,14 @@ */ namespace Magento\Customer\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Class CustomerDetailsBuilder */ -class CustomerDetailsBuilder extends AbstractExtensibleObjectBuilder +class CustomerDetailsBuilder extends ExtensibleObjectBuilder { /** * Customer builder @@ -49,14 +49,14 @@ class CustomerDetailsBuilder extends AbstractExtensibleObjectBuilder protected $_addressBuilder; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param CustomerBuilder $customerBuilder * @param AddressBuilder $addressBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder, @@ -121,11 +121,11 @@ class CustomerDetailsBuilder extends AbstractExtensibleObjectBuilder */ public function create() { - if (!isset($this->_data[CustomerDetails::KEY_CUSTOMER])) { - $this->_data[CustomerDetails::KEY_CUSTOMER] = $this->_customerBuilder->create(); + if (!isset($this->data[CustomerDetails::KEY_CUSTOMER])) { + $this->data[CustomerDetails::KEY_CUSTOMER] = $this->_customerBuilder->create(); } - if (!isset($this->_data[CustomerDetails::KEY_ADDRESSES])) { - $this->_data[CustomerDetails::KEY_ADDRESSES] = null; + if (!isset($this->data[CustomerDetails::KEY_ADDRESSES])) { + $this->data[CustomerDetails::KEY_ADDRESSES] = null; } return parent::create(); } diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerGroup.php b/app/code/Magento/Customer/Service/V1/Data/CustomerGroup.php index 1b919ad736e97e909022a5269f5a0a4f3d794ea2..4e3dc6d120c5d3e6449135ee9bea9626d26d7ea9 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerGroup.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerGroup.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Service\V1\Data; /** * CustomerGroup Service Data Object */ -class CustomerGroup extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class CustomerGroup extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants for Data Object keys diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerGroupBuilder.php b/app/code/Magento/Customer/Service/V1/Data/CustomerGroupBuilder.php index bfaf95f50e97576a7e353773e8c9853f7deea40a..cec5547d5be07245ef789292b2eb2fdb76633b1f 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerGroupBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerGroupBuilder.php @@ -29,7 +29,7 @@ namespace Magento\Customer\Service\V1\Data; * * @method CustomerGroup create() */ -class CustomerGroupBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class CustomerGroupBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set id diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResults.php b/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResults.php index 4e2c8f70d06fd9a261800f9e6cbe0f0bcfebdddc..aa1952e3bc146b5fba86b071d1f348b6f16deb2b 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResults.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResults.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Service\V1\Data; /** * SearchResults Service Data Object used for the search service requests */ -class CustomerGroupSearchResults extends \Magento\Framework\Service\V1\Data\SearchResults +class CustomerGroupSearchResults extends \Magento\Framework\Api\SearchResults { /** * Get items diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResultsBuilder.php b/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResultsBuilder.php index a7cc9ad6026a8cdb3e301809d2deeabe77dcb47b..7234903af3d14ba83f482e47558a8c02720a5f47 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResultsBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerGroupSearchResultsBuilder.php @@ -24,11 +24,11 @@ namespace Magento\Customer\Service\V1\Data; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\AbstractSearchResultsBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Builder for the SearchResults Service Data Object diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResults.php b/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResults.php index 938b1074f6b7812bb61224708048f96fa31fc164..9e69d32783dc4506188d1390cb123c06e874b86b 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResults.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResults.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Service\V1\Data; /** * CustomerAccountService Data Object used for validateCustomerData api */ -class CustomerValidationResults extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class CustomerValidationResults extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants used as keys into $_data diff --git a/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResultsBuilder.php b/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResultsBuilder.php index f512fb7eb9fd3747ff2d2d52c11ec9028148eace..89637ae75feb7af2428f4886935d441b77c8db85 100644 --- a/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResultsBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/CustomerValidationResultsBuilder.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Service\V1\Data; /** * Builder for CustomerValidationResults */ -class CustomerValidationResultsBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class CustomerValidationResultsBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set if customer data is valid diff --git a/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadata.php b/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadata.php index 95b47942ac82a24aafeb236a4c0a107e5f2ce65e..2f677d7836f33eaa156b1096f68b7eb762552f84 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadata.php +++ b/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadata.php @@ -23,8 +23,8 @@ */ namespace Magento\Customer\Service\V1\Data\Eav; -use Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Service\Data\MetadataObjectInterface; +use Magento\Framework\Api\AbstractExtensibleObject; +use Magento\Framework\Api\MetadataObjectInterface; /** * Class AttributeMetadata diff --git a/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilder.php b/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilder.php index 62efb65e6201aac818e8c7cc30a38c10ad5a9d1f..afeddb6b0b77e14bc50f44ddebee089c25ef2360 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilder.php @@ -23,15 +23,15 @@ */ namespace Magento\Customer\Service\V1\Data\Eav; -use Magento\Framework\Service\Data\AttributeMetadataBuilderInterface; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeMetadataBuilderInterface; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Class AttributeMetadataBuilder */ -class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implements AttributeMetadataBuilderInterface +class AttributeMetadataBuilder extends ExtensibleObjectBuilder implements AttributeMetadataBuilderInterface { /** * Option builder @@ -48,14 +48,14 @@ class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implement protected $_validationRuleBuilder; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param OptionBuilder $optionBuilder * @param ValidationRuleBuilder $validationRuleBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, \Magento\Customer\Service\V1\Data\Eav\OptionBuilder $optionBuilder, @@ -64,8 +64,8 @@ class AttributeMetadataBuilder extends AbstractExtensibleObjectBuilder implement parent::__construct($objectFactory, $valueBuilder, $metadataService); $this->_optionBuilder = $optionBuilder; $this->_validationRuleBuilder = $validationRuleBuilder; - $this->_data[AttributeMetadata::OPTIONS] = array(); - $this->_data[AttributeMetadata::VALIDATION_RULES] = array(); + $this->data[AttributeMetadata::OPTIONS] = array(); + $this->data[AttributeMetadata::VALIDATION_RULES] = array(); } /** diff --git a/app/code/Magento/Customer/Service/V1/Data/Eav/Option.php b/app/code/Magento/Customer/Service/V1/Data/Eav/Option.php index ad03c669030c71e446c2f6e168357577e9c3d3ac..ec170deff528bd60e021f39024c3412b4935ebdb 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Eav/Option.php +++ b/app/code/Magento/Customer/Service/V1/Data/Eav/Option.php @@ -27,8 +27,10 @@ namespace Magento\Customer\Service\V1\Data\Eav; /** * Class Option + * + * @deprecated */ -class Option extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Option extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Constants used as keys into $_data diff --git a/app/code/Magento/Customer/Service/V1/Data/Eav/OptionBuilder.php b/app/code/Magento/Customer/Service/V1/Data/Eav/OptionBuilder.php index 79e07a52407836c4696e32a9989b9bbd78e7ce6b..7f6723904f2d2e55302ac64422e81d167d7e6ccc 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Eav/OptionBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/Eav/OptionBuilder.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Service\V1\Data\Eav; /** * Class OptionBuilder */ -class OptionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class OptionBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set option label diff --git a/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRule.php b/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRule.php index 4c382aa25627f6f91a05547fa359307af1356333..cca30b729cdc96da179c8fde898924694307e668 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRule.php +++ b/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRule.php @@ -23,7 +23,12 @@ */ namespace Magento\Customer\Service\V1\Data\Eav; -class ValidationRule extends \Magento\Framework\Service\Data\AbstractExtensibleObject +/** + * Validation rule class + * + * @deprecated + */ +class ValidationRule extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Constants used as keys into $_data diff --git a/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRuleBuilder.php b/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRuleBuilder.php index eb4daae768d260461bd2c2a3dff84046334dcd8b..bf2c758c3b0884f8b5e4f3a0156e8b614ffbf1e7 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRuleBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/Eav/ValidationRuleBuilder.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Service\V1\Data\Eav; -class ValidationRuleBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ValidationRuleBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set validation rule name diff --git a/app/code/Magento/Customer/Service/V1/Data/Region.php b/app/code/Magento/Customer/Service/V1/Data/Region.php index 8cfb7dbe44583f4ad2d2282be482801c43d83483..b185140518dde6894a73239f3a1abc4aa65df303 100644 --- a/app/code/Magento/Customer/Service/V1/Data/Region.php +++ b/app/code/Magento/Customer/Service/V1/Data/Region.php @@ -26,7 +26,7 @@ namespace Magento\Customer\Service\V1\Data; /** * Data Object for Address Region */ -class Region extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Region extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Array keys diff --git a/app/code/Magento/Customer/Service/V1/Data/RegionBuilder.php b/app/code/Magento/Customer/Service/V1/Data/RegionBuilder.php index 2316134f11a10c257c8632367754bd09e90cd0ec..7825cbf6f97a32c838b7fd264cc8a44be5b2d042 100644 --- a/app/code/Magento/Customer/Service/V1/Data/RegionBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/RegionBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Customer\Service\V1\Data; * * @method Region create() */ -class RegionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class RegionBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set region code @@ -38,7 +38,7 @@ class RegionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleOb */ public function setRegionCode($regionCode) { - $this->_data[Region::KEY_REGION_CODE] = $regionCode; + $this->data[Region::KEY_REGION_CODE] = $regionCode; return $this; } @@ -50,7 +50,7 @@ class RegionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleOb */ public function setRegion($regionName) { - $this->_data[Region::KEY_REGION] = $regionName; + $this->data[Region::KEY_REGION] = $regionName; return $this; } @@ -62,7 +62,7 @@ class RegionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleOb */ public function setRegionId($regionId) { - $this->_data[Region::KEY_REGION_ID] = $regionId; + $this->data[Region::KEY_REGION_ID] = $regionId; return $this; } } diff --git a/app/code/Magento/Customer/Service/V1/Data/SearchResults.php b/app/code/Magento/Customer/Service/V1/Data/SearchResults.php index b4c6f1005b0c0d8623884dca19c6ef7594760f42..188e926b4ab62f907272dd86f7cb3011952cabfa 100644 --- a/app/code/Magento/Customer/Service/V1/Data/SearchResults.php +++ b/app/code/Magento/Customer/Service/V1/Data/SearchResults.php @@ -27,7 +27,7 @@ namespace Magento\Customer\Service\V1\Data; /** * SearchResults Service Data Object used for the search service requests */ -class SearchResults extends \Magento\Framework\Service\V1\Data\SearchResults +class SearchResults extends \Magento\Framework\Api\SearchResults { /** * Get items diff --git a/app/code/Magento/Customer/Service/V1/Data/SearchResultsBuilder.php b/app/code/Magento/Customer/Service/V1/Data/SearchResultsBuilder.php index 8ed3c1aa56fba082451a371a548ac59dc40b9bf2..e93bd781654d959047cd0e3ae3d8295888f9d403 100644 --- a/app/code/Magento/Customer/Service/V1/Data/SearchResultsBuilder.php +++ b/app/code/Magento/Customer/Service/V1/Data/SearchResultsBuilder.php @@ -24,11 +24,11 @@ namespace Magento\Customer\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\AbstractSearchResultsBuilder; /** * Builder for the SearchResults Service Data Object diff --git a/app/code/Magento/Customer/Service/V1/MetadataServiceInterface.php b/app/code/Magento/Customer/Service/V1/MetadataServiceInterface.php index 4b9cb31c0e18b945e5c1560f5f5e7fa89c622343..6ca1ad08594acafffd55fa90fa98c44b790ef43a 100644 --- a/app/code/Magento/Customer/Service/V1/MetadataServiceInterface.php +++ b/app/code/Magento/Customer/Service/V1/MetadataServiceInterface.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Service\V1; -use Magento\Framework\Service\Data\MetadataServiceInterface as EavMetadataServiceInterface; +use Magento\Framework\Api\MetadataServiceInterface as EavMetadataServiceInterface; /** * Interface providing APIs to fetch custom attributes metadata diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json index b79356d0f0808673bcab828a64b0feb0801d3f28..070aa3601370762fc02f02b3ddd4cae360b2a50f 100644 --- a/app/code/Magento/Customer/composer.json +++ b/app/code/Magento/Customer/composer.json @@ -3,27 +3,27 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-newsletter": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-wishlist": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-review": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-page-cache": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", - "magento/module-authorization": "0.1.0-alpha102", - "magento/module-integration": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-newsletter": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-wishlist": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-review": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-page-cache": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", + "magento/module-authorization": "0.1.0-alpha103", + "magento/module-integration": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Customer/data/customer_setup/data-upgrade-1.6.2.0.1-1.6.2.0.2.php b/app/code/Magento/Customer/data/customer_setup/data-upgrade-1.6.2.0.1-1.6.2.0.2.php index 9adc1c23287a4368b3ac08738907b59520ec07ee..39ac36804a9ff614c84d85025ff4a18c473c3bdc 100644 --- a/app/code/Magento/Customer/data/customer_setup/data-upgrade-1.6.2.0.1-1.6.2.0.2.php +++ b/app/code/Magento/Customer/data/customer_setup/data-upgrade-1.6.2.0.1-1.6.2.0.2.php @@ -23,7 +23,6 @@ */ /** @var $this \Magento\Customer\Model\Resource\Setup */ -/** @var $installer \Magento\Framework\Module\Setup\Migration */ $installer = $this->createMigrationSetup(); $installer->startSetup(); diff --git a/app/code/Magento/Backend/etc/install/di.xml b/app/code/Magento/Customer/etc/crontab.xml similarity index 80% rename from app/code/Magento/Backend/etc/install/di.xml rename to app/code/Magento/Customer/etc/crontab.xml index fbfccae1431dc76199efd36afc3d0ddaf4e515ff..cc2d20ceb2f1d2f826cec09336b8d5ee67054799 100644 --- a/app/code/Magento/Backend/etc/install/di.xml +++ b/app/code/Magento/Customer/etc/crontab.xml @@ -23,6 +23,10 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <preference for="Magento\Backend\App\ConfigInterface" type="Magento\Backend\App\Config" /> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Cron/etc/crontab.xsd"> + <group id="default"> + <job name="visitor_clean" instance="Magento\Customer\Model\Visitor" method="clean"> + <schedule>0 0 * * *</schedule> + </job> + </group> </config> diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml index f811eba8aff85eb4560e2f7c01a0057d36872486..e8e2e10559f48589d80d181622c6fcef7e21f826 100644 --- a/app/code/Magento/Customer/etc/di.xml +++ b/app/code/Magento/Customer/etc/di.xml @@ -24,16 +24,48 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> + <preference for="Magento\Customer\Api\AddressRepositoryInterface" + type="Magento\Customer\Model\Resource\AddressRepository" /> + <preference for="Magento\Customer\Api\CustomerRepositoryInterface" + type="Magento\Customer\Model\Resource\CustomerRepository" /> + <preference for="Magento\Customer\Api\GroupManagementInterface" + type="Magento\Customer\Model\GroupManagement" /> + <preference for="Magento\Customer\Api\GroupRepositoryInterface" + type="Magento\Customer\Model\Resource\GroupRepository" /> + <preference for="Magento\Customer\Api\Data\CustomerInterface" type="Magento\Customer\Model\Data\Customer" /> + <preference for="Magento\Customer\Api\Data\AddressInterface" type="Magento\Customer\Model\Data\Address" /> + <preference for="Magento\Customer\Api\Data\RegionInterface" type="Magento\Customer\Model\Data\Region" /> + <preference for="Magento\Customer\Api\Data\AttributeMetadataInterface" + type="Magento\Customer\Model\Data\AttributeMetadata" /> + <preference for="Magento\Customer\Api\Data\GroupInterface" type="Magento\Customer\Model\Data\Group" /> + <preference for="Magento\Customer\Api\Data\OptionInterface" type="Magento\Customer\Model\Data\Option" /> + <preference for="Magento\Customer\Api\Data\ValidationRuleInterface" + type="Magento\Customer\Model\Data\ValidationRule" /> + <preference for="Magento\Customer\Api\Data\ValidationResultsInterface" + type="Magento\Customer\Model\Data\ValidationResults" /> + <preference for="Magento\Customer\Api\Data\GroupSearchResultsInterface" + type="Magento\Framework\Api\SearchResults" /> + <preference for="Magento\Customer\Api\Data\CustomerSearchResultsInterface" + type="Magento\Framework\Api\SearchResults" /> + <preference for="Magento\Customer\Api\Data\AddressSearchResultsInterface" + type="Magento\Framework\Api\SearchResults" /> <preference for="Magento\Customer\Service\V1\CustomerAddressServiceInterface" type="Magento\Customer\Service\V1\CustomerAddressService" /> <preference for="Magento\Customer\Service\V1\CustomerGroupServiceInterface" type="Magento\Customer\Service\V1\CustomerGroupService" /> <preference for="Magento\Customer\Service\V1\CustomerAccountServiceInterface" type="Magento\Customer\Service\V1\CustomerAccountService" /> + <preference for="Magento\Customer\Api\AccountManagementInterface" + type="Magento\Customer\Model\AccountManagement" /> + <preference for="Magento\Customer\Service\V1\CustomerMetadataServiceInterface" type="Magento\Customer\Service\V1\CustomerMetadataServiceCached" /> + <preference for="Magento\Customer\Api\CustomerMetadataInterface" + type="Magento\Customer\Model\Metadata\CustomerCachedMetadata" /> <preference for="Magento\Customer\Service\V1\AddressMetadataServiceInterface" type="Magento\Customer\Service\V1\AddressMetadataServiceCached" /> + <preference for="Magento\Customer\Api\AddressMetadataInterface" + type="Magento\Customer\Model\Metadata\AddressCachedMetadata" /> <type name="Magento\Customer\Model\Session"> <arguments> <argument name="configShare" xsi:type="object">Magento\Customer\Model\Config\Share\Proxy</argument> @@ -49,6 +81,16 @@ </argument> </arguments> </type> + <type name="Magento\Customer\Api\Data\CustomerDataBuilder" shared="false"> + <arguments> + <argument name="metadataService" xsi:type="object">\Magento\Customer\Api\CustomerMetadataInterface</argument> + </arguments> + </type> + <type name="Magento\Customer\Api\Data\AddressDataBuilder" shared="false"> + <arguments> + <argument name="metadataService" xsi:type="object">\Magento\Customer\Api\AddressMetadataInterface</argument> + </arguments> + </type> <type name="Magento\Customer\Helper\Address"> <arguments> <argument name="addressConfig" xsi:type="object">Magento\Customer\Model\Address\Config\Proxy</argument> @@ -64,8 +106,10 @@ <argument name="customerData" xsi:type="object">Magento\Customer\Helper\Data\Proxy</argument> </arguments> </type> + <type name="Magento\Customer\Model\Data\GroupBuilder" shared="false" /> <type name="Magento\Customer\Service\V1\Data\CustomerGroupBuilder" shared="false" /> <type name="Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder" shared="false" /> + <type name="Magento\Customer\Api\Data\OptionDataBuilder" shared="false" /> <type name="Magento\Customer\Service\V1\Data\Eav\OptionBuilder" shared="false" /> <type name="Magento\Customer\Service\V1\Data\CustomerBuilder" shared="false" /> <type name="Magento\Customer\Service\V1\Data\AddressBuilder" shared="false" /> @@ -84,7 +128,7 @@ <argument name="url" xsi:type="object">Magento\Framework\Url</argument> </arguments> </type> - <virtualType name="Magento\Customer\Service\Config\CustomerMetadataConfig" type="Magento\Framework\Service\Config\MetadataConfig"> + <virtualType name="Magento\Customer\Service\Config\CustomerMetadataConfig" type="Magento\Framework\Api\Config\MetadataConfig"> <arguments> <argument name="attributeMetadataBuilder" xsi:type="object">Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder</argument> </arguments> @@ -94,7 +138,7 @@ <argument name="metadataConfig" xsi:type="object">Magento\Customer\Service\Config\CustomerMetadataConfig</argument> </arguments> </type> - <virtualType name="Magento\Customer\Service\Config\AddressMetadataConfig" type="Magento\Framework\Service\Config\MetadataConfig"> + <virtualType name="Magento\Customer\Service\Config\AddressMetadataConfig" type="Magento\Framework\Api\Config\MetadataConfig"> <arguments> <argument name="attributeMetadataBuilder" xsi:type="object">Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder</argument> </arguments> diff --git a/app/code/Magento/Customer/etc/webapi.xml b/app/code/Magento/Customer/etc/webapi.xml index 854d147619aa15daa5792fc669376210b5cd37a1..12677d5bcadb995ffe96450e9875a6f24cc778e6 100644 --- a/app/code/Magento/Customer/etc/webapi.xml +++ b/app/code/Magento/Customer/etc/webapi.xml @@ -27,61 +27,55 @@ xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd"> <!-- Customer Group Service--> <route url="/V1/customerGroups/:id" method="GET"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="getGroup"/> - <resources> - <resource ref="Magento_Customer::group"/> - </resources> - </route> - <route url="/V1/customerGroups" method="GET"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="getGroups"/> + <service class="Magento\Customer\Api\GroupRepositoryInterface" method="get"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups/default/:storeId" method="GET"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="getDefaultGroup"/> + <service class="Magento\Customer\Api\GroupManagementInterface" method="getDefaultGroup"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups/default" method="GET"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="getDefaultGroup"/> + <service class="Magento\Customer\Api\GroupManagementInterface" method="getDefaultGroup"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups/:id/permissions" method="GET"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="canDelete"/> + <service class="Magento\Customer\Api\GroupManagementInterface" method="isReadonly"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups/search" method="POST"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="searchGroups"/> + <service class="Magento\Customer\Api\GroupRepositoryInterface" method="getList"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups/search" method="GET"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="searchGroups"/> + <service class="Magento\Customer\Api\GroupRepositoryInterface" method="getList"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups" method="POST"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="createGroup"/> + <service class="Magento\Customer\Api\GroupRepositoryInterface" method="save"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups/:id" method="PUT"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="updateGroup"/> + <service class="Magento\Customer\Api\GroupRepositoryInterface" method="save"/> <resources> <resource ref="Magento_Customer::group"/> </resources> </route> <route url="/V1/customerGroups/:id" method="DELETE"> - <service class="Magento\Customer\Service\V1\CustomerGroupServiceInterface" method="deleteGroup"/> + <service class="Magento\Customer\Api\GroupRepositoryInterface" method="deleteById"/> <resources> <resource ref="Magento_Customer::group"/> </resources> diff --git a/app/code/Magento/Customer/sql/customer_setup/install-1.6.0.0.php b/app/code/Magento/Customer/sql/customer_setup/install-1.6.0.0.php index 041ddc08a6bc8d502d6f216e4c5d112bee2df64f..5e0067035f7b314e76cf15401218f436d6206434 100644 --- a/app/code/Magento/Customer/sql/customer_setup/install-1.6.0.0.php +++ b/app/code/Magento/Customer/sql/customer_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Customer\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); @@ -1175,6 +1175,12 @@ $table = $installer->getConnection()->newTable( 64, array('nullable' => true, 'default' => null), 'Session ID' +)->addColumn( + 'last_visit_at', + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, + null, + array('nullable' => false), + 'Last Visit Time' )->setComment( 'Visitor Table' ); diff --git a/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0-1.6.2.0.1.php b/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0-1.6.2.0.1.php index f83cb4c1d5d08f26e966d2062c4682e330aa378b..5ad77fbde0b998f81f3c15c5b07bb3d7e00d55cd 100644 --- a/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0-1.6.2.0.1.php +++ b/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0-1.6.2.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Customer\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( diff --git a/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0.4-1.6.2.0.5.php b/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0.4-1.6.2.0.5.php index e915d7861931993e2b4dd0dff13a1793e4f4232e..f677719ddde5db9e266ea837d984c6031a374ce3 100644 --- a/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0.4-1.6.2.0.5.php +++ b/app/code/Magento/Customer/sql/customer_setup/upgrade-1.6.2.0.4-1.6.2.0.5.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Customer\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml index 8213511229ae784413ddb9b0cb0a4ff06857a963..704dbc9ad3eb4bcad44d7a39ed25e447742f896f 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml @@ -163,14 +163,7 @@ /** @var \Magento\Customer\Service\V1\Data\Address $_address */ foreach ($addressCollection as $_address): ?> <div class="address-item-edit-content" id="form_address_item_<?php echo $_address->getId() ?>" data-item="<?php echo $_address->getId() ?>" style="display:none" data-mage-init='{"observableInputs": {"name": "address_item_<?php echo $_address->getId() ?>"}}'> - <?php - $this->initForm()->getForm() - ->addValues(\Magento\Customer\Service\V1\Data\AddressConverter::toFlatArray($_address)) - ->setHtmlIdPrefix("_item{$_address->getId()}") - ->setFieldNameSuffix('address['.$_address->getId().']'); - $this->addValuesToNamePrefixElement($_address->getPrefix()) - ->addValuesToNameSuffixElement($_address->getSuffix()); - ?> + <?php $this->initAddressForm($_address); ?> <?php echo $this->getForm()->getHtml() ?> <input type="hidden" name="address[<?php echo $_address->getId() ?>][_deleted]" id="deleted_address_item_<?php echo $_address->getId() ?>" /> </div> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml index 8e361bb4fea96cc18d424e6d21649012bb3b45b9..3425203501000596852927b46d1a0009d71ab00b 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_create.xml @@ -30,7 +30,7 @@ </referenceBlock> <referenceContainer name="content"> <block class="Magento\Customer\Block\Form\Register" name="customer_form_register" template="form/register.phtml" cacheable="false"> - <container name="form.additional.info" label="invisible" as="form_additional_info"/> + <container name="form.additional.info" as="form_additional_info"/> <container name="customer.form.register.fields.before" as="form_fields_before" label="Form Fields Before" htmlTag="div" htmlClass="customer-form-before"/> </block> <block class="Magento\Core\Block\RequireCookie" name="require-cookie" template="Magento_Core::require_cookie.phtml"> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml index 242afb239603213303d74b98fd4935234638a113..a03a4d7b0ce23f2b900823f63a5e66bfe088e1de 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_forgotpassword.xml @@ -35,7 +35,7 @@ </referenceBlock> <referenceContainer name="content"> <block class="Magento\Customer\Block\Account\Forgotpassword" name="forgotPassword" template="form/forgotpassword.phtml"> - <container name="form.additional.info" label="invisible" as="form_additional_info"/> + <container name="form.additional.info" as="form_additional_info"/> </block> </referenceContainer> </body> diff --git a/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml b/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml index 7332bd8e83e3f23a6f9c707f581739c0f7bd52c4..91dde9798836df4b0da0383dfc79962254cd8b7f 100644 --- a/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml +++ b/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml @@ -29,7 +29,7 @@ <!-- customer.form.login.extra --> <container name="customer.login.container" label="Customer Login Container" htmlTag="div" htmlClass="login container"> <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="form/login.phtml" cacheable="false"> - <container name="form.additional.info" label="invisible" as="form_additional_info"/> + <container name="form.additional.info" as="form_additional_info"/> </block> <block class="Magento\Customer\Block\Form\Login" name="customer.new" template="newcustomer.phtml" cacheable="false"/> </container> diff --git a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml index ef1923e4fa5b6a13752ab498888c13b24c03ecc8..22aec2ea0639c66bc8d7f84eccaf0ac4fbfee34c 100644 --- a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml @@ -66,6 +66,9 @@ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> <?php for ($_i = 1, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i < $_n; $_i++): ?> <div class="field additional"> + <label class="label" for="street_<?php echo $_i+1 ?>"> + <span><?php echo __('Street Address %1', $_i+1) ?></span> + </label> <div class="control"> <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getStreetLine($_i+1)) ?>" title="<?php echo __('Street Address %1', $_i+1) ?>" id="street_<?php echo $_i+1 ?>" class="input-text <?php echo $_streetValidationClass ?>"> </div> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml index 2eccf9173c37c156609f9e280fc5250795f2b474..f18760001e928c72fb34db1bd8c53288a625b93d 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml @@ -68,9 +68,9 @@ </div> </div> <div class="field confirm password required"> - <label class="label" for="confirmation"><span><?php echo __('Confirm New Password') ?></span></label> + <label class="label" for="password-confirmation"><span><?php echo __('Confirm New Password') ?></span></label> <div class="control"> - <input type="password" class="input-text" name="confirmation" id="confirmation"> + <input type="password" class="input-text" name="password_confirmation" id="password-confirmation"> </div> </div> </fieldset> @@ -92,7 +92,7 @@ $('#change-password').mage('setPassword', { 'currentPasswordId': '#current-password', 'passwordId': '#password', - 'confirmationId': '#confirmation', + 'confirmationId': '#password-confirmation', 'passwordContainer': 'fieldset.fieldset.password', 'showOnDefault': <?php echo $this->getChangePassword() ? 'true' : 'false' ?> }); diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml index e7ef71d0d7504d8f93fcd815b71f337b6ff64bbf..8349a9681599dce503102e941faee44a2cedac05 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml @@ -94,7 +94,10 @@ <div class="nested"> <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?> <?php for ($_i = 2, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i <= $_n; $_i++): ?> - <div class="field additional no-label"> + <div class="field additional"> + <label class="label" for="street_<?php echo $_i ?>"> + <span><?php echo __('Address') ?></span> + </label> <div class="control"> <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i - 1)) ?>" title="<?php echo __('Street Address %1', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>"> </div> @@ -156,9 +159,9 @@ </div> </div> <div class="field confirmation required"> - <label for="confirmation" class="label"><span><?php echo __('Confirm Password') ?></span></label> + <label for="password-confirmation" class="label"><span><?php echo __('Confirm Password') ?></span></label> <div class="control"> - <input type="password" name="confirmation" title="<?php echo __('Confirm Password') ?>" id="confirmation" class="input-text" data-validate="{required:true, equalTo:'#password'}"> + <input type="password" name="password_confirmation" title="<?php echo __('Confirm Password') ?>" id="password-confirmation" class="input-text" data-validate="{required:true, equalTo:'#password'}"> </div> </div> <?php echo $this->getChildHtml('form_additional_info'); ?> diff --git a/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml index 07d43f9c4af9481cbd948f58053f71de2d3e03df..a291833dd369190dc2da3f2b81a044c9e95eeba0 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/resetforgottenpassword.phtml @@ -37,9 +37,9 @@ </div> </div> <div class="field confirmation required"> - <label class="label" for="confirmation"><span><?php echo __('Confirm New Password'); ?></span></label> + <label class="label" for="password-confirmation"><span><?php echo __('Confirm New Password'); ?></span></label> <div class="control"> - <input type="password" class="input-text" name="confirmation" id="confirmation" data-validate="{required:true,equalTo:'#password'}"> + <input type="password" class="input-text" name="password_confirmation" id="password-confirmation" data-validate="{required:true,equalTo:'#password'}"> </div> </div> </fieldset> diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json index 4ed72ac9b8b1ef7920a188476ff017bb07a232c6..dcf167156e55692dd01d55a0b7ada4662ffb3168 100644 --- a/app/code/Magento/CustomerImportExport/composer.json +++ b/app/code/Magento/CustomerImportExport/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-import-export": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-import-export": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/DesignEditor/composer.json b/app/code/Magento/DesignEditor/composer.json index 8183ac314b0e2f174bc9b8450c24288790c401fa..e08dbfe35a4d60bb8e6b3aa8ddf6cdfd03e6e372 100644 --- a/app/code/Magento/DesignEditor/composer.json +++ b/app/code/Magento/DesignEditor/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/DesignEditor/sql/designeditor_setup/install-1.0.0.1.php b/app/code/Magento/DesignEditor/sql/designeditor_setup/install-1.0.0.1.php index 699bb5f0dfc81061f9e1e638c5052e11257269a5..817feea2236102f5728fce66b94bdf970db681a9 100644 --- a/app/code/Magento/DesignEditor/sql/designeditor_setup/install-1.0.0.1.php +++ b/app/code/Magento/DesignEditor/sql/designeditor_setup/install-1.0.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.1-1.0.0.2.php b/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.1-1.0.0.2.php index e2a42bbdfa0f1add64433a919033fff8284c442a..8b0aa24a68300ed6899f954bd6b7fd243d21a892 100644 --- a/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.1-1.0.0.2.php +++ b/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.1-1.0.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.2-1.0.0.3.php b/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.2-1.0.0.3.php index ffe662a66cd8d8301e560e79a9fa4e037e19c06b..9d356e7ec125eccb02ee1a38ff18cad38fe5b661 100644 --- a/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.2-1.0.0.3.php +++ b/app/code/Magento/DesignEditor/sql/designeditor_setup/upgrade-1.0.0.2-1.0.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/DesignEditor/view/adminhtml/web/css/styles.css b/app/code/Magento/DesignEditor/view/adminhtml/web/css/styles.css index ac0b45c53b38aed9a8399548301a8d65e414d5bf..a71a31cc0d2cceed02a9853e633c43d15e31cfe3 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/web/css/styles.css +++ b/app/code/Magento/DesignEditor/view/adminhtml/web/css/styles.css @@ -89,7 +89,6 @@ .theme input[type=text]:focus { border-color: rgba(82, 168, 236, 0.8); - outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); @@ -974,7 +973,6 @@ .eq-ie8 .vde-tab-data .action-download { filter: none; - outline: none; } .eq-ie8 .vde-tab-data .action-download:focus:before { @@ -1392,10 +1390,6 @@ padding: 20px 0 20px 20px; } -.custom-code textarea:focus { - outline: none; -} - @-moz-document url-prefix() { .custom-code textarea { padding-bottom: 3px; diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json index 38c788bfcc166c8cc23c2bdc7fd0629c7a5bbfcd..b1c924676704d085dcf5643a03a54eb077985ab8 100644 --- a/app/code/Magento/Dhl/composer.json +++ b/app/code/Magento/Dhl/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Dhl/data/dhl_setup/data-install-2.0.0.0.php b/app/code/Magento/Dhl/data/dhl_setup/data-install-2.0.0.0.php index 81a98db6a3af3775f49b7cf6fbc7952b2db86243..4de4e3648ed516748c5387a21d3e0c5ca66a215c 100644 --- a/app/code/Magento/Dhl/data/dhl_setup/data-install-2.0.0.0.php +++ b/app/code/Magento/Dhl/data/dhl_setup/data-install-2.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Dhl\Model\Resource\Setup $this */ +/** @var $this \Magento\Dhl\Model\Resource\Setup */ $days = $this->getLocaleLists()->getTranslationList('days'); $days = array_keys($days['format']['wide']); diff --git a/app/code/Magento/Directory/Model/PriceCurrency.php b/app/code/Magento/Directory/Model/PriceCurrency.php index 92004eca78f05c8bd37722adc98fe976e2764181..06cf2de6e63634bd807a34f8d8d3d121dfcd374a 100644 --- a/app/code/Magento/Directory/Model/PriceCurrency.php +++ b/app/code/Magento/Directory/Model/PriceCurrency.php @@ -123,7 +123,7 @@ class PriceCurrency implements \Magento\Framework\Pricing\PriceCurrencyInterface * @param Currency|string|null $currency * @return Currency */ - protected function getCurrency($store = null, $currency = null) + public function getCurrency($store = null, $currency = null) { if ($currency instanceof Currency) { $currentCurrency = $currency; @@ -141,7 +141,7 @@ class PriceCurrency implements \Magento\Framework\Pricing\PriceCurrencyInterface * Get store model * * @param null|string|bool|int|\\Magento\Store\Model\Store $store - * @return \\Magento\Store\Model\Store + * @return \Magento\Store\Model\Store */ protected function getStore($store = null) { diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json index eb97b0d4378d9f9ff771e17312f72a5ce9b21800..fc660b3e373ec48155a061a59e6e85aa73d4829f 100644 --- a/app/code/Magento/Directory/composer.json +++ b/app/code/Magento/Directory/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Directory/data/directory_setup/data-install-1.6.0.0.php b/app/code/Magento/Directory/data/directory_setup/data-install-1.6.0.0.php index 9d1789594a4a278a20eafc0baac227d54354862c..ce28feee08dd10049a8638c6774cca5137802375 100644 --- a/app/code/Magento/Directory/data/directory_setup/data-install-1.6.0.0.php +++ b/app/code/Magento/Directory/data/directory_setup/data-install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Directory\Model\Resource\Setup */ $installer = $this; /** diff --git a/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.0-1.6.0.1.php index 505917999a07edb167e0b8aaf714ba9a8f76225a..718c00fe1215723b99717abc05d9cf3a3aba293e 100644 --- a/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -23,7 +23,7 @@ */ /** - * @var \Magento\Directory\Model\Resource\Setup $installer + * @var $installer \Magento\Directory\Model\Resource\Setup */ $installer = $this; diff --git a/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.1-1.6.0.2.php index 33c2664f0f16443c55070fe0eaccdd84883bbab5..99ce38b3eb84886b8b0a6a67b0aca4f6dcd3bc2e 100644 --- a/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Directory/data/directory_setup/data-upgrade-1.6.0.1-1.6.0.2.php @@ -23,7 +23,7 @@ */ /** - * @var \Magento\Directory\Model\Resource\Setup $installer + * @var $installer \Magento\Directory\Model\Resource\Setup */ $installer = $this; diff --git a/app/code/Magento/Directory/sql/directory_setup/install-1.6.0.0.php b/app/code/Magento/Directory/sql/directory_setup/install-1.6.0.0.php index 8bea0d12dc42e9306adb794764ca15b57a00fce6..52e9f69d4e035a3a7f6054572667aa0dd80c4a44 100644 --- a/app/code/Magento/Directory/sql/directory_setup/install-1.6.0.0.php +++ b/app/code/Magento/Directory/sql/directory_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Downloadable/Service/V1/Data/FileContent.php b/app/code/Magento/Downloadable/Service/V1/Data/FileContent.php index 76c476b43174f050dda1619d40206b6a22b2c7de..181eaa0f8fbfcbefad4cb743b5865312eb8d6686 100644 --- a/app/code/Magento/Downloadable/Service/V1/Data/FileContent.php +++ b/app/code/Magento/Downloadable/Service/V1/Data/FileContent.php @@ -23,7 +23,7 @@ */ namespace Magento\Downloadable\Service\V1\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Downloadable/Service/V1/Data/FileContentBuilder.php b/app/code/Magento/Downloadable/Service/V1/Data/FileContentBuilder.php index acd58b238a32e21a66bfba499777263aa7f2c495..d108976ef70c608ea64e015c5add83893154b7e8 100644 --- a/app/code/Magento/Downloadable/Service/V1/Data/FileContentBuilder.php +++ b/app/code/Magento/Downloadable/Service/V1/Data/FileContentBuilder.php @@ -23,12 +23,12 @@ */ namespace Magento\Downloadable\Service\V1\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use \Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class FileContentBuilder extends AbstractExtensibleObjectBuilder +class FileContentBuilder extends ExtensibleObjectBuilder { /** * Set data (base64 encoded content) diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContent.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContent.php index 6666500ff8df8719bc75a7eceef04b88eedf67fa..4f71071fbd313ef55349f46214bc0773cb44269d 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContent.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContent.php @@ -24,7 +24,7 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContentBuilder.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContentBuilder.php index 962ff574ad7def12e65734e59616744f02f44f9d..770ee947528ae7ba02961c7f894d7bcb794db892 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContentBuilder.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkContentBuilder.php @@ -25,13 +25,13 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use \Magento\Framework\Api\ExtensibleObjectBuilder; use \Magento\Downloadable\Service\V1\Data\FileContent; /** * @codeCoverageIgnore */ -class DownloadableLinkContentBuilder extends AbstractExtensibleObjectBuilder +class DownloadableLinkContentBuilder extends ExtensibleObjectBuilder { /** * Set link title diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfo.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfo.php index be2c759925b8d2915659d9e46e3661c8b5041a43..0a55cefee8d0dd2a1366dde7ae9a5f91bb3b8ca1 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfo.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfo.php @@ -24,7 +24,7 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfoBuilder.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfoBuilder.php index cbaf88cc99bc8e74edaa88a6e825dcecb271c0ee..5eaf0c88654b3df735ec3b6e89c5ffea48e66d24 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfoBuilder.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableLinkInfoBuilder.php @@ -25,12 +25,12 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class DownloadableLinkInfoBuilder extends AbstractExtensibleObjectBuilder +class DownloadableLinkInfoBuilder extends ExtensibleObjectBuilder { /** * @param int|null $value diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfo.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfo.php index ee9bd8a51b8c0a207ffe33e38374861aab5d8e95..5cb088192dc51cee971d5536adeabb7601bdb309 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfo.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfo.php @@ -24,7 +24,7 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfoBuilder.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfoBuilder.php index 8f05fd07ab60b8f3fe0df967ef9f48175a82d3c6..27dee953cb9099cb0db76910304baac79041af9b 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfoBuilder.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableResourceInfoBuilder.php @@ -25,9 +25,9 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; -class DownloadableResourceInfoBuilder extends AbstractExtensibleObjectBuilder +class DownloadableResourceInfoBuilder extends ExtensibleObjectBuilder { /** * Set file path diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfo.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfo.php index 4d11ed20dc61507ad0b436caf70a9dab20d91578..ec750a3783668c06b73af8e47f77b797ca3e522b 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfo.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfo.php @@ -24,7 +24,7 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfoBuilder.php b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfoBuilder.php index 7cf783b03b5b8a51a20c9a8f64480019374598d7..04d68fde08ab1b5805adb9ebc6c4bc10c662e77b 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfoBuilder.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableLink/Data/DownloadableSampleInfoBuilder.php @@ -25,12 +25,12 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableLink\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * @codeCoverageIgnore */ -class DownloadableSampleInfoBuilder extends AbstractExtensibleObjectBuilder +class DownloadableSampleInfoBuilder extends ExtensibleObjectBuilder { /** * @param string $value diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContent.php b/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContent.php index 1717f463a09a46c823ac06419aaf8089b11ee0a7..0e3d5eb747606ece30e463bc2aaf8e92f6e0fdf4 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContent.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContent.php @@ -24,7 +24,7 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableSample\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObject; +use \Magento\Framework\Api\AbstractExtensibleObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContentBuilder.php b/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContentBuilder.php index 6812db4ff35e1d89e9513240a7356a7ea3879c56..8e49fdc3151fad37914a7ba1fff582118ef53c4b 100644 --- a/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContentBuilder.php +++ b/app/code/Magento/Downloadable/Service/V1/DownloadableSample/Data/DownloadableSampleContentBuilder.php @@ -25,13 +25,13 @@ */ namespace Magento\Downloadable\Service\V1\DownloadableSample\Data; -use \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use \Magento\Framework\Api\ExtensibleObjectBuilder; use \Magento\Downloadable\Service\V1\Data\FileContent; /** * @codeCoverageIgnore */ -class DownloadableSampleContentBuilder extends AbstractExtensibleObjectBuilder +class DownloadableSampleContentBuilder extends ExtensibleObjectBuilder { /** * Set link title diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json index cf0b3c8a8e20706b57d32fd149a98718c86899b2..54b051f3ba5cfc0b113a71ff34c806be50ae278b 100644 --- a/app/code/Magento/Downloadable/composer.json +++ b/app/code/Magento/Downloadable/composer.json @@ -3,26 +3,26 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-wishlist": "0.1.0-alpha102", - "magento/module-gift-message": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-msrp": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-wishlist": "0.1.0-alpha103", + "magento/module-gift-message": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-msrp": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Downloadable/data/downloadable_setup/data-install-1.6.0.0.php b/app/code/Magento/Downloadable/data/downloadable_setup/data-install-1.6.0.0.php index d0711c439413752402abe1ea2f2cebf4a70bf422..5d21fb7c4685764faac86360306a623bab02e99a 100644 --- a/app/code/Magento/Downloadable/data/downloadable_setup/data-install-1.6.0.0.php +++ b/app/code/Magento/Downloadable/data/downloadable_setup/data-install-1.6.0.0.php @@ -21,7 +21,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Downloadable\Model\Resource\Setup */ + +/** @var $installer \Magento\Catalog\Model\Resource\Setup */ $installer = $this; /** * Add attributes to the eav/attribute table diff --git a/app/code/Magento/Downloadable/data/downloadable_setup/data-upgrade-1.6.0.0.2-1.6.0.0.3.php b/app/code/Magento/Downloadable/data/downloadable_setup/data-upgrade-1.6.0.0.2-1.6.0.0.3.php index 4f2847531a3f8b53ea6e73a8f039cfca91ed2081..64727ffcc288af2d4ef844b092a7ebe9b0912b47 100644 --- a/app/code/Magento/Downloadable/data/downloadable_setup/data-upgrade-1.6.0.0.2-1.6.0.0.3.php +++ b/app/code/Magento/Downloadable/data/downloadable_setup/data-upgrade-1.6.0.0.2-1.6.0.0.3.php @@ -22,6 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $this \Magento\Catalog\Model\Resource\Setup */ $applyTo = array_merge( explode(',', $this->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'weight', 'apply_to')), array(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE) diff --git a/app/code/Magento/Downloadable/sql/downloadable_setup/install-1.6.0.0.php b/app/code/Magento/Downloadable/sql/downloadable_setup/install-1.6.0.0.php index d798125fcca100e888b025f6b7480e1887921eab..8f22273500453cc4e81ba8819aa986b24d4c7cc6 100644 --- a/app/code/Magento/Downloadable/sql/downloadable_setup/install-1.6.0.0.php +++ b/app/code/Magento/Downloadable/sql/downloadable_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Catalog\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Downloadable/sql/downloadable_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php b/app/code/Magento/Downloadable/sql/downloadable_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php index ba34b27644e2f0229e55cdbab1e1a5c6618eb875..aad2a65a72367a1a00936dcb300c4ab96ba60773 100644 --- a/app/code/Magento/Downloadable/sql/downloadable_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php +++ b/app/code/Magento/Downloadable/sql/downloadable_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php @@ -22,9 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -/** @var $this \Magento\Catalog\Model\Resource\Setup */ -/** @var $connection \Magento\Framework\DB\Adapter\Pdo\Mysql */ +/** @var $this \Magento\Setup\Module\SetupModule */ $connection = $this->getConnection(); $connection->changeTableEngine( $this->getTable('catalog_product_index_price_downlod_tmp'), diff --git a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml index f2991c53f498c64fd40b10ed532386edc776275f..5c2c84aa1640dc8739ccff8da1badd877134acb7 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/links.phtml @@ -27,6 +27,7 @@ <?php if ($this->getProduct()->isSaleable() && $this->hasLinks()):?> <?php $_links = $this->getLinks(); ?> <?php $_isRequired = $this->getLinkSelectionRequired(); ?> + <legend class="legend links-title"><span><?php echo $this->getLinksTitle() ?></span></legend><br> <div class="field downloads<?php if ($_isRequired) echo ' required' ?>"> <label class="label"><span><?php echo $this->getLinksTitle() ?></span></label> <div class="control" id="downloadable-links-list" diff --git a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml index 3115ec9085847d4f7448183def93687490d7416e..3ae16df7104cf0db7124d58187b145d49ac1c158 100644 --- a/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml +++ b/app/code/Magento/Downloadable/view/frontend/templates/catalog/product/type.phtml @@ -31,12 +31,12 @@ <?php $_product = $this->getProduct() ?> <?php if($_product->getIsSalable()): ?> - <p class="stock available" title="<?php echo __('Availability') ?>"> + <div class="stock available" title="<?php echo __('Availability') ?>"> <span><?php echo __('In stock') ?></span> - </p> + </div> <?php else: ?> - <p class="stock unavailable" title="<?php echo __('Availability') ?>"> + <div class="stock unavailable" title="<?php echo __('Availability') ?>"> <span><?php echo __('Out of stock') ?></span> - </p> + </div> <?php endif; ?> <?php echo $this->getChildHtml() ?> \ No newline at end of file diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json index 9a831497ce6d460f8c12522fc772d5320b4fd1c3..6c6d37ad2dc53f4b518d30d2c1a7b0f5edbd7f66 100644 --- a/app/code/Magento/Eav/composer.json +++ b/app/code/Magento/Eav/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.0-1.6.0.1.php index a37ea199aa16f850640569198a38081e46e90ee1..9e8f15bff0ecaf9aabf4f21f2e2954331199d511 100644 --- a/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup\Migration */ +/** @var $this \Magento\Eav\Model\Entity\Setup */ $installer = $this->createMigrationSetup(); $installer->startSetup(); diff --git a/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.1-1.6.0.2.php index cd8318b2526c14d2a74f847049f450d9fb033158..6826ccc6bc440ee9f540e7cd51986215056ea3a1 100644 --- a/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Eav/data/eav_setup/data-upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup\Migration */ +/** @var $installer \Magento\Eav\Model\Entity\Setup */ $installer = $this; $installer->startSetup(); /** @var $groups \Magento\Eav\Model\Resource\Entity\Attribute\Group\Collection*/ diff --git a/app/code/Magento/Eav/sql/eav_setup/install-1.6.0.0.php b/app/code/Magento/Eav/sql/eav_setup/install-1.6.0.0.php index 481dd5f0f34e27d149f8dd41bea4befe85cdf902..9b52fde232e530fcb207aeb4940cb095223985f0 100644 --- a/app/code/Magento/Eav/sql/eav_setup/install-1.6.0.0.php +++ b/app/code/Magento/Eav/sql/eav_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Eav\Model\Entity\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Eav/sql/eav_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Eav/sql/eav_setup/upgrade-1.6.0.1-1.6.0.2.php index b9fa3c87aeac0793aeea97006496f946309fc758..d91b25d35a5ccc581b9cacf0f2b896b07d3811d2 100644 --- a/app/code/Magento/Eav/sql/eav_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Eav/sql/eav_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Eav\Model\Entity\Setup*/ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json index ba538dd16efe3d1f426ab81aeac9d102fe82d2d6..da9af92b589bbea3cc0696617eda999ad6bf1911 100644 --- a/app/code/Magento/Email/composer.json +++ b/app/code/Magento/Email/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Email/sql/email_setup/install-1.0.0.0.php b/app/code/Magento/Email/sql/email_setup/install-1.0.0.0.php index 154307923eef6951a3084656e993a17101b9bf33..054fa0e743d77bc58c2b0a9be0be010767d0a86b 100644 --- a/app/code/Magento/Email/sql/email_setup/install-1.0.0.0.php +++ b/app/code/Magento/Email/sql/email_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /** diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json index 360d368ae32b9ee27e752c173765512c9721a390..7564c40fe84891083fb09949c64b9cdb9c4b8aff 100644 --- a/app/code/Magento/Fedex/composer.json +++ b/app/code/Magento/Fedex/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Fedex/data/fedex_setup/data-install-2.0.0.0.php b/app/code/Magento/Fedex/data/fedex_setup/data-install-2.0.0.0.php index 4bb66d3c52bd04d125af76ed431f6aaf4cb69c74..dd32110c799508b5f8ab7268b510235bb2bc6f64 100644 --- a/app/code/Magento/Fedex/data/fedex_setup/data-install-2.0.0.0.php +++ b/app/code/Magento/Fedex/data/fedex_setup/data-install-2.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Framework\Module\Setup $this */ +/** @var $this \Magento\Framework\Module\Setup */ $codes = array( 'method' => array( 'EUROPEFIRSTINTERNATIONALPRIORITY' => 'EUROPE_FIRST_INTERNATIONAL_PRIORITY', diff --git a/app/code/Magento/GiftMessage/Block/Message/Inline.php b/app/code/Magento/GiftMessage/Block/Message/Inline.php index 0c4632143976760918191b1980876099c687fb86..95491d42a9c670c2e173f98e69ca434b92a967e4 100644 --- a/app/code/Magento/GiftMessage/Block/Message/Inline.php +++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php @@ -268,16 +268,6 @@ class Inline extends \Magento\Framework\View\Element\Template return $this->getData('items'); } - /** - * Retrieve additional url - * - * @return string - */ - public function getAdditionalUrl() - { - return $this->getUrl('*/*/getAdditional'); - } - /** * Check if gift messages for separate items are allowed * diff --git a/app/code/Magento/GiftMessage/Service/V1/Data/Message.php b/app/code/Magento/GiftMessage/Service/V1/Data/Message.php index e351e8df156a579bccb2435506bb9c54b26b1cef..d1f63b31cad185421f340efa4fff5ecbcd71b024 100644 --- a/app/code/Magento/GiftMessage/Service/V1/Data/Message.php +++ b/app/code/Magento/GiftMessage/Service/V1/Data/Message.php @@ -28,7 +28,7 @@ namespace Magento\GiftMessage\Service\V1\Data; * * @codeCoverageIgnore */ -class Message extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Message extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Gift message ID. diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json index d656097e3ad17fcd5c8b98d88250bf1eb8c6f2a3..9c69e019f8e2b5171fa4936b54cd83ebad79cb72 100644 --- a/app/code/Magento/GiftMessage/composer.json +++ b/app/code/Magento/GiftMessage/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-multishipping": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-multishipping": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/GiftMessage/data/giftmessage_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/GiftMessage/data/giftmessage_setup/data-upgrade-1.6.0.0-1.6.0.1.php index af507d7f6b7861c1588f0c3bb8d345ddc0f8208d..ce85c95ddf68b4e21dea6ba06e1fbdac83a19912 100644 --- a/app/code/Magento/GiftMessage/data/giftmessage_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/GiftMessage/data/giftmessage_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Catalog\Model\Resource\Setup */ +/** @var $this \Magento\GiftMessage\Model\Resource\Setup */ $groupName = 'Autosettings'; $entityTypeId = $this->getEntityTypeId(\Magento\Catalog\Model\Product::ENTITY); diff --git a/app/code/Magento/GiftMessage/sql/giftmessage_setup/install-1.6.0.0.php b/app/code/Magento/GiftMessage/sql/giftmessage_setup/install-1.6.0.0.php index 250c7bba506afad9757f2b2e0c7a61f1a1b1a541..b2f0ea177582936b870d24168a67f73120b9dda6 100644 --- a/app/code/Magento/GiftMessage/sql/giftmessage_setup/install-1.6.0.0.php +++ b/app/code/Magento/GiftMessage/sql/giftmessage_setup/install-1.6.0.0.php @@ -23,7 +23,7 @@ */ -/** @var $installer \Magento\GiftMessage\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml index 2bbaa2ba473e83349a1dc802cb469b0b92b89fd3..1255dd8d5a1b96ce7e769efc45641a441066befb 100644 --- a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml +++ b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml @@ -23,16 +23,6 @@ */ ?> <?php $_giftMessage = false; ?> -<?php if(!$this->getDontDisplayContainer()): ?> -<script type="text/javascript"> -require(['jquery', "mage/mage"], function(jQuery){ - - jQuery('#checkoutSteps').mage('extraOptions', {additionalUrl: '<?php echo $this->getAdditionalUrl(); ?>'}); - -}); -</script> -<?php endif ?> - <?php switch ($this->getCheckoutType()): ?> <?php case 'onepage_checkout': ?> <fieldset class="fieldset gift-message"> diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json index 750f469cb8b73402c15b93ab0349ec8d5dba3f7b..113d5f4ce548b9f56907a79e70685b598ba317ce 100644 --- a/app/code/Magento/GoogleAdwords/composer.json +++ b/app/code/Magento/GoogleAdwords/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json index 1602b53b1f112f472387bc9822afd365500fddd5..508dbb98670ff01b64f652ff5e5862eafb4b9714 100644 --- a/app/code/Magento/GoogleAnalytics/composer.json +++ b/app/code/Magento/GoogleAnalytics/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json index 0f597bfd45316daec2f3b2c7e1e4c8213c302c86..3ec25dde8dfefd34672d1960751303813377cc18 100644 --- a/app/code/Magento/GoogleOptimizer/composer.json +++ b/app/code/Magento/GoogleOptimizer/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-google-analytics": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-google-analytics": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleOptimizer/sql/googleoptimizer_setup/install-2.0.0.0.php b/app/code/Magento/GoogleOptimizer/sql/googleoptimizer_setup/install-2.0.0.0.php index cec2e5a5bc666c042f017c225c2034da4f624a98..d0e6450144ef7d6b6561e1851c17d7b391dd5880 100644 --- a/app/code/Magento/GoogleOptimizer/sql/googleoptimizer_setup/install-2.0.0.0.php +++ b/app/code/Magento/GoogleOptimizer/sql/googleoptimizer_setup/install-2.0.0.0.php @@ -23,8 +23,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/GoogleShopping/composer.json b/app/code/Magento/GoogleShopping/composer.json index 5412013c680354f590cda08f9a009a327db60673..e79b3cb149f237dd010632885ce18f1ae2e3cb01 100644 --- a/app/code/Magento/GoogleShopping/composer.json +++ b/app/code/Magento/GoogleShopping/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/GoogleShopping/sql/googleshopping_setup/install-1.6.0.0.php b/app/code/Magento/GoogleShopping/sql/googleshopping_setup/install-1.6.0.0.php index e011fd54efdf120ca1ea53771a1085fcfb5c43db..cc6a65aaa598e49219d7a228ac23e0f882c7751b 100644 --- a/app/code/Magento/GoogleShopping/sql/googleshopping_setup/install-1.6.0.0.php +++ b/app/code/Magento/GoogleShopping/sql/googleshopping_setup/install-1.6.0.0.php @@ -27,7 +27,8 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -/** @var $installer \Magento\Framework\Module\Setup */ + +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/GoogleShopping/sql/googleshopping_setup/upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/Magento/GoogleShopping/sql/googleshopping_setup/upgrade-1.6.0.0-1.6.0.0.1.php index e0365e870aec30333a57d3f1b9e7daa3229f049a..61d13c411f435dc22c1b6c0eadf88078e50ea7c8 100644 --- a/app/code/Magento/GoogleShopping/sql/googleshopping_setup/upgrade-1.6.0.0-1.6.0.0.1.php +++ b/app/code/Magento/GoogleShopping/sql/googleshopping_setup/upgrade-1.6.0.0-1.6.0.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/layout/adminhtml_googleshopping_types_block.xml b/app/code/Magento/GoogleShopping/view/adminhtml/layout/adminhtml_googleshopping_types_block.xml index b2cb89290a6b1ce5c4dcfb7967f29fafeff6c49a..35a2b590bd511b597e3162ff72819d0269c925d5 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/layout/adminhtml_googleshopping_types_block.xml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/layout/adminhtml_googleshopping_types_block.xml @@ -33,7 +33,7 @@ <argument name="save_parameters_in_session" xsi:type="string">1</argument> <argument name="use_ajax" xsi:type="string">1</argument> <argument name="grid_url" xsi:type="url" path="*/*/grid"> - <param name="_current">1</param> + <param name="_current">0</param> </argument> </arguments> <block class="Magento\Backend\Block\Widget\Grid\ColumnSet" as="grid.columnSet" name="googleshopping.types.grid.columnSet"> diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json index bffb6804480a40fa9f13d28fc57c7c4ffa70c3c0..525bf0c37c33aa6bcaf62d5192a13b7039f002c4 100644 --- a/app/code/Magento/GroupedImportExport/composer.json +++ b/app/code/Magento/GroupedImportExport/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-import-export": "0.1.0-alpha102", - "magento/module-catalog-import-export": "0.1.0-alpha102", - "magento/module-grouped-product": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-import-export": "0.1.0-alpha103", + "magento/module-catalog-import-export": "0.1.0-alpha103", + "magento/module-grouped-product": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/Converter.php b/app/code/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/Converter.php index 52eb56a2c9046179286791cb0fed4bea17449b43..6a0aee66184883a8e0b258a8d7a4d07e4d121bd2 100644 --- a/app/code/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/Converter.php +++ b/app/code/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/Converter.php @@ -25,7 +25,7 @@ namespace Magento\GroupedProduct\Service\V1\Product\Link\Data\ProductLink\ProductEntity; use \Magento\Catalog\Service\V1\Product\Link\Data\ProductLink; -use \Magento\Framework\Service\Data\AttributeValue; +use \Magento\Framework\Api\AttributeValue; use \Magento\Catalog\Service\V1\Product\Link\Data\ProductLink\ProductEntity\ConverterInterface; class Converter implements ConverterInterface diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json index 572384ad0c97c40eb8db9af67171ed142d717333..a371019206b632bc48f9c0e4863f2b2bc0e02cb8 100644 --- a/app/code/Magento/GroupedProduct/composer.json +++ b/app/code/Magento/GroupedProduct/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-msrp": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-msrp": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml index 2f77cc2020b91509e162b455511e86f5c461b1e5..70ab6db3dac0c0258e253cf2242225c3972b1e20 100644 --- a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml +++ b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/default.phtml @@ -29,12 +29,12 @@ <?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?> <?php if ($this->displayProductStockStatus()): ?> <?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?> - <p class="stock available" title="<?php echo __('Availability') ?>"> + <div class="stock available" title="<?php echo __('Availability') ?>"> <span><?php echo __('In stock') ?></span> - </p> + </div> <?php else: ?> - <p class="stock unavailable" title="<?php echo __('Availability') ?>"> + <div class="stock unavailable" title="<?php echo __('Availability') ?>"> <span><?php echo __('Out of stock') ?></span> - </p> + </div> <?php endif; ?> <?php endif; ?> diff --git a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml index f43d36539dc2bad67594fd7a398c193afd6d9ea2..31083ae9a75368693573901d5dd7b3381034a1a8 100644 --- a/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml +++ b/app/code/Magento/GroupedProduct/view/frontend/templates/product/view/type/grouped.phtml @@ -59,7 +59,7 @@ <?php endif; ?> </td> <?php if ($_product->isSaleable()): ?> - <td data-th="<?php echo $this->escapeHtml(__('Qty')); ?>" class="col qty"> + <td data-th="<?php echo $this->escapeHtml(__('Qty')); ?>" class="col qty"> <?php if ($_item->isSaleable()) : ?> <div class="control qty"> <input type="number" name="super_group[<?php echo $_item->getId() ?>]" @@ -71,9 +71,9 @@ data-validate-message-box="#validate-message-box"/> </div> <?php else: ?> - <p class="stock unavailable" title="<?php echo __('Availability') ?>"> + <div class="stock unavailable" title="<?php echo __('Availability') ?>"> <span><?php echo __('Out of stock') ?></span> - </p> + </div> <?php endif; ?> </td> <?php endif; ?> diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json index 29409c1ade12aafc56e32f13d922d46ed191742e..74afea4be232a660dbe91f734be70d21dd806266 100644 --- a/app/code/Magento/ImportExport/composer.json +++ b/app/code/Magento/ImportExport/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-indexer": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-indexer": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "ext-ctype": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/ImportExport/sql/importexport_setup/install-1.6.0.0.php b/app/code/Magento/ImportExport/sql/importexport_setup/install-1.6.0.0.php index eeb0fdda1d691313e7223e1834fab0c02b0ba07b..df26f1492fea13a0c2c20978520ec1ca762db0c6 100644 --- a/app/code/Magento/ImportExport/sql/importexport_setup/install-1.6.0.0.php +++ b/app/code/Magento/ImportExport/sql/importexport_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.1-1.6.0.2.php index e03f7dfeed86990f3789ab8a0759c2a2198c9c0a..6373179ad595fdbd9b5d66cf307a949437b94bad 100644 --- a/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->modifyColumn( diff --git a/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.2-1.6.0.3.php index 5aad8e09b454f8cbf8e47ed4a2d168d46401c391..699887aa1e154131ff7b7af218446ddde7f8fd53 100644 --- a/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( diff --git a/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.3-1.6.0.4.php b/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.3-1.6.0.4.php index 3244a1e68ea5ab5bd0140efe06e9b458dd97d8b8..217c24ef02d4275ce5c422cb91aa62c50c2ebf6f 100644 --- a/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.3-1.6.0.4.php +++ b/app/code/Magento/ImportExport/sql/importexport_setup/upgrade-1.6.0.3-1.6.0.4.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->dropColumn($installer->getTable('importexport_importdata'), 'entity_subtype'); diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json index e8570cbba88985275a17b8393b8bf1329181d871..4d5f4a80fd5b9d1be242f3e4a0d178f93754506f 100644 --- a/app/code/Magento/Indexer/composer.json +++ b/app/code/Magento/Indexer/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-page-cache": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-page-cache": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Indexer/sql/indexer_setup/install-1.0.0.0.php b/app/code/Magento/Indexer/sql/indexer_setup/install-1.0.0.0.php index 661e333f20e5705e10fd74210f01dbc76e3f0481..7d3127568f8a402d228aae7e6c352e6e41971e19 100644 --- a/app/code/Magento/Indexer/sql/indexer_setup/install-1.0.0.0.php +++ b/app/code/Magento/Indexer/sql/indexer_setup/install-1.0.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Install/App/Console.php b/app/code/Magento/Install/App/Console.php deleted file mode 100644 index 18073a557882c5fcb39bef6831514ce6eefe0dda..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/App/Console.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php -/** - * Console application - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\App; - -use Magento\Framework\App\Console\Response; -use Magento\Framework\App\Bootstrap; -use Magento\Framework\App\Filesystem\DirectoryList; - -class Console implements \Magento\Framework\AppInterface -{ - /** - * @var \Magento\Install\Model\Installer\ConsoleFactory - */ - protected $_installerFactory; - - /** @var array */ - protected $_arguments; - - /** @var \Magento\Install\App\Output */ - protected $_output; - - /** - * @var \Magento\Framework\App\ObjectManager\ConfigLoader - */ - protected $_loader; - - /** - * @var \Magento\Framework\App\State - */ - protected $_state; - - /** - * @var \Magento\Framework\ObjectManager - */ - protected $_objectManager; - - /** - * @var \Magento\Framework\Filesystem\Directory\Read - */ - protected $rootDirectory; - - /** - * @var \Magento\Framework\App\Console\Response - */ - protected $_response; - - /** - * @param \Magento\Install\Model\Installer\ConsoleFactory $installerFactory - * @param \Magento\Install\App\Output $output - * @param \Magento\Framework\App\State $state - * @param \Magento\Framework\App\ObjectManager\ConfigLoader $loader - * @param \Magento\Framework\ObjectManager $objectManager - * @param \Magento\Framework\Filesystem $filesystem - * @param Response $response - * @param array $arguments - */ - public function __construct( - \Magento\Install\Model\Installer\ConsoleFactory $installerFactory, - \Magento\Install\App\Output $output, - \Magento\Framework\App\State $state, - \Magento\Framework\App\ObjectManager\ConfigLoader $loader, - \Magento\Framework\ObjectManager $objectManager, - \Magento\Framework\Filesystem $filesystem, - Response $response, - array $arguments = array() - ) { - $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT); - $this->_loader = $loader; - $this->_state = $state; - $this->_installerFactory = $installerFactory; - $this->_arguments = $arguments; - $this->_output = $output; - $this->_response = $response; - $this->_objectManager = $objectManager; - } - - /** - * Install application - * - * @param \Magento\Install\Model\Installer\Console $installer - * @return void - */ - protected function _handleInstall(\Magento\Install\Model\Installer\Console $installer) - { - if (isset( - $this->_arguments['config'] - ) && $this->rootDirectory->isExist( - $this->rootDirectory->getRelativePath($this->_arguments['config']) - ) - ) { - $config = (array)include $this->_arguments['config']; - $this->_arguments = array_merge((array)$config, $this->_arguments); - } - - $result = $installer->install($this->_arguments); - - if (!$installer->hasErrors()) { - $msg = 'Installed successfully' . ($result ? ' (encryption key "' . $result . '")' : ''); - $this->_output->success($msg . PHP_EOL); - } else { - $this->_output->error(implode(PHP_EOL, $installer->getErrors()) . PHP_EOL); - } - } - - /** - * Run application - * - * @return \Magento\Framework\App\ResponseInterface - */ - public function launch() - { - $areaCode = 'install'; - $this->_state->setAreaCode($areaCode); - $this->_objectManager->configure($this->_loader->load($areaCode)); - - /** @var \Magento\Install\Model\Installer\Console $installer */ - $installer = $this->_installerFactory->create(array('installArgs' => $this->_arguments)); - - if (isset($this->_arguments['show_locales'])) { - $this->_output->readableOutput($this->_output->prepareArray($installer->getAvailableLocales())); - } elseif (isset($this->_arguments['show_currencies'])) { - $this->_output->readableOutput($this->_output->prepareArray($installer->getAvailableCurrencies())); - } elseif (isset($this->_arguments['show_timezones'])) { - $this->_output->readableOutput($this->_output->prepareArray($installer->getAvailableTimezones())); - } elseif (isset($this->_arguments['show_install_options'])) { - $this->_output->readableOutput(PHP_EOL . 'Required parameters:'); - $this->_output->readableOutput($this->_output->alignArrayKeys($installer->getRequiredParams())); - $this->_output->readableOutput(PHP_EOL . 'Optional parameters:'); - $this->_output->readableOutput($this->_output->alignArrayKeys($installer->getOptionalParams())); - $this->_output->readableOutput( - PHP_EOL . - 'Flag values are considered positive if set to 1, y, true or yes.' . - 'Any other value is considered as negative.' . - PHP_EOL - ); - } else { - $this->_handleInstall($installer); - } - $this->_response->setCode(0); - return $this->_response; - } - - /** - * {@inheritdoc} - */ - public function catchException(Bootstrap $bootstrap, \Exception $exception) - { - return false; - } -} diff --git a/app/code/Magento/Install/App/Output.php b/app/code/Magento/Install/App/Output.php deleted file mode 100644 index e9ec242644e454087fd23b38038be11009016dbe..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/App/Output.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\App; - -class Output -{ - /** - * Make array keys aligned to the longest - * - * @param array $data - * @return array - */ - public function alignArrayKeys(array $data) - { - $formattedData = array(); - $length = max(array_map('strlen', array_keys($data))); - foreach ($data as $key => $value) { - $formattedData[str_pad($key, $length, ' ', STR_PAD_RIGHT)] = $value; - } - return $formattedData; - } - - /** - * Process an array to $key => $value format - * and adapt keys to pretty output - * - * @param array $rawData - * @return array - */ - public function prepareArray(array $rawData) - { - $keyValData = array(); - - // transform data to key => value format - foreach ($rawData as $item) { - $keyValData[$item['value']] = $item['label']; - } - - return $this->alignArrayKeys($keyValData); - } - - /** - * Make output human readable - * - * @param mixed $var - * @return void - */ - public function readableOutput($var) - { - switch (true) { - case is_array($var): - $eol = ''; - foreach ($var as $key => $value) { - if (is_array($value) || !is_scalar($value)) { - echo $eol . $key . ' => ' . var_export($value, true); - } else { - echo $eol . $key . ' -- ' . $value; - } - $eol = PHP_EOL; - } - echo PHP_EOL; - break; - case is_scalar($var): - echo $var . PHP_EOL; - break; - default: - var_export($var); - } - } - - /** - * Display message - * - * @param string $message - * @return void - */ - public function success($message) - { - echo $message; - } - - /** - * Display error - * - * @param string $message - * @return void - * @SuppressWarnings(PHPMD.ExitExpression) - */ - public function error($message) - { - echo $message; - exit(1); - } -} diff --git a/app/code/Magento/Install/Block/AbstractBlock.php b/app/code/Magento/Install/Block/AbstractBlock.php deleted file mode 100644 index 5accaf287b2879be593d372a5402ce2236c9fc77..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/AbstractBlock.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Abstract installation block - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Install\Block; - -abstract class AbstractBlock extends \Magento\Framework\View\Element\Template -{ - /** - * Installer model - * - * @var \Magento\Install\Model\Installer - */ - protected $_installer; - - /** - * Wizard model - * - * @var \Magento\Install\Model\Wizard - */ - protected $_installWizard; - - /** - * Install session - * - * @var \Magento\Framework\Session\Generic - */ - protected $_session; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Installer $installer - * @param \Magento\Install\Model\Wizard $installWizard - * @param \Magento\Framework\Session\Generic $session - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Installer $installer, - \Magento\Install\Model\Wizard $installWizard, - \Magento\Framework\Session\Generic $session, - array $data = array() - ) { - parent::__construct($context, $data); - $this->_installer = $installer; - $this->_installWizard = $installWizard; - $this->_session = $session; - $this->_isScopePrivate = true; - } - - /** - * Retrieve installer model - * - * @return \Magento\Install\Model\Installer - */ - public function getInstaller() - { - return $this->_installer; - } - - /** - * Retrieve wizard model - * - * @return \Magento\Install\Model\Wizard - */ - public function getWizard() - { - return $this->_installWizard; - } - - /** - * Retrieve current installation step - * - * @return \Magento\Framework\Object - */ - public function getCurrentStep() - { - return $this->getWizard()->getStepByRequest($this->getRequest()); - } -} diff --git a/app/code/Magento/Install/Block/Config.php b/app/code/Magento/Install/Block/Config.php deleted file mode 100644 index 35339f7901026ee890b7742d57a96c26908f63eb..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/Config.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Config installation block - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Install\Block; - -class Config extends \Magento\Install\Block\AbstractBlock -{ - /** - * @var string - */ - protected $_template = 'config.phtml'; - - /** - * Install installer config - * - * @var \Magento\Install\Model\Installer\Config - */ - protected $_installerConfig = null; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Installer $installer - * @param \Magento\Install\Model\Wizard $installWizard - * @param \Magento\Framework\Session\Generic $session - * @param \Magento\Install\Model\Installer\Config $installerConfig - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Installer $installer, - \Magento\Install\Model\Wizard $installWizard, - \Magento\Framework\Session\Generic $session, - \Magento\Install\Model\Installer\Config $installerConfig, - array $data = array() - ) { - parent::__construct($context, $installer, $installWizard, $session, $data); - $this->_installerConfig = $installerConfig; - } - - /** - * Retrieve form data post url - * - * @return string - */ - public function getPostUrl() - { - return $this->getUrl('*/*/configPost'); - } - - /** - * Retrieve configuration form data object - * - * @return \Magento\Framework\Object - */ - public function getFormData() - { - $data = $this->getData('form_data'); - if (is_null($data)) { - $data = $this->_session->getConfigData(true); - if (empty($data)) { - $data = $this->_installerConfig->getFormData(); - } else { - $data = new \Magento\Framework\Object($data); - } - $this->setFormData($data); - } - return $data; - } - - /** - * @return bool - */ - public function getSkipUrlValidation() - { - return $this->_session->getSkipUrlValidation(); - } - - /** - * @return bool - */ - public function getSkipBaseUrlValidation() - { - return $this->_session->getSkipBaseUrlValidation(); - } - - /** - * @return array - */ - public function getSessionSaveOptions() - { - return array('files' => __('File System'), 'db' => __('Database')); - } - - /** - * @return string - */ - public function getSessionSaveSelect() - { - $html = $this->getLayout()->createBlock( - 'Magento\Framework\View\Element\Html\Select' - )->setName( - 'config[session_save]' - )->setId( - 'session_save' - )->setTitle( - __('Save Session Files In') - )->setClass( - 'required-entry' - )->setOptions( - $this->getSessionSaveOptions() - )->getHtml(); - return $html; - } -} diff --git a/app/code/Magento/Install/Block/Db/Main.php b/app/code/Magento/Install/Block/Db/Main.php deleted file mode 100644 index d9f403257b927f9eba790ddffc4c578530b80749..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/Db/Main.php +++ /dev/null @@ -1,144 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Database config installation block - */ -namespace Magento\Install\Block\Db; - -class Main extends \Magento\Framework\View\Element\Template -{ - /** - * Array of Database blocks keyed by name - * - * @var array - */ - protected $_databases = array(); - - /** - * Install installer config - * - * @var \Magento\Install\Model\Installer\Config - */ - protected $_installerConfig = null; - - /** - * Install installer config - * - * @var \Magento\Framework\Session\Generic - */ - protected $_session; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Installer\Config $installerConfig - * @param \Magento\Framework\Session\Generic $session - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Installer\Config $installerConfig, - \Magento\Framework\Session\Generic $session, - array $data = array() - ) { - parent::__construct($context, $data); - $this->_installerConfig = $installerConfig; - $this->_session = $session; - } - - /** - * Adding customized database block template for database model type - * - * @param string $type database type - * @param string $block database block type - * @param string $template - * @return $this - */ - public function addDatabaseBlock($type, $block, $template) - { - $this->_databases[$type] = array('block' => $block, 'template' => $template, 'instance' => null); - - return $this; - } - - /** - * Retrieve database block by type - * - * @param string $type database model type - * @return bool|\Magento\Framework\View\Element\Template - */ - public function getDatabaseBlock($type) - { - $block = false; - if (isset($this->_databases[$type])) { - if ($this->_databases[$type]['instance']) { - $block = $this->_databases[$type]['instance']; - } else { - $block = $this->getLayout()->createBlock( - $this->_databases[$type]['block'] - )->setTemplate( - $this->_databases[$type]['template'] - )->setIdPrefix( - $type - ); - $this->_databases[$type]['instance'] = $block; - } - } - return $block; - } - - /** - * Retrieve database blocks - * - * @return array - */ - public function getDatabaseBlocks() - { - $databases = array(); - foreach (array_keys($this->_databases) as $type) { - $databases[] = $this->getDatabaseBlock($type); - } - return $databases; - } - - /** - * Retrieve configuration form data object - * - * @return \Magento\Framework\Object - */ - public function getFormData() - { - $data = $this->getData('form_data'); - if (is_null($data)) { - $data = $this->_session->getConfigData(true); - if (empty($data)) { - $data = $this->_installerConfig->getFormData(); - } else { - $data = new \Magento\Framework\Object($data); - } - $this->setFormData($data); - } - return $data; - } -} diff --git a/app/code/Magento/Install/Block/Db/Type.php b/app/code/Magento/Install/Block/Db/Type.php deleted file mode 100644 index 49155cfe027404305f1a62bbac4e2c040e96b4d6..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/Db/Type.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Common database config installation block - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Install\Block\Db; - -class Type extends \Magento\Framework\View\Element\Template -{ - /** - * Db title - * - * @var string - */ - protected $_title; - - /** - * Install installer config - * - * @var \Magento\Install\Model\Installer\Config - */ - protected $_installerConfig = null; - - /** - * Install installer config - * - * @var \Magento\Framework\Session\Generic - */ - protected $_session; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Installer\Config $installerConfig - * @param \Magento\Framework\Session\Generic $session - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Installer\Config $installerConfig, - \Magento\Framework\Session\Generic $session, - array $data = array() - ) { - parent::__construct($context, $data); - $this->_installerConfig = $installerConfig; - $this->_session = $session; - } - - /** - * Return Db title - * - * @return string - */ - public function getTitle() - { - return $this->_title; - } - - /** - * Retrieve configuration form data object - * - * @return \Magento\Framework\Object - */ - public function getFormData() - { - $data = $this->getData('form_data'); - if (is_null($data)) { - $data = $this->_session->getConfigData(true); - if (empty($data)) { - $data = $this->_installerConfig->getFormData(); - } else { - $data = new \Magento\Framework\Object($data); - } - $this->setFormData($data); - } - return $data; - } -} diff --git a/app/code/Magento/Install/Block/Download.php b/app/code/Magento/Install/Block/Download.php deleted file mode 100644 index 45b259d6740f8d52821d0efe1d55060dc181c97c..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/Download.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Download Magento core modules and updates choice (online, offline) - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Install\Block; - -use Magento\Framework\App\Filesystem\DirectoryList; - -class Download extends \Magento\Install\Block\AbstractBlock -{ - /** - * @var string - */ - protected $_template = 'download.phtml'; - - /** - * @var \Magento\Framework\Module\Dir\Reader - */ - protected $_moduleReader; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Installer $installer - * @param \Magento\Install\Model\Wizard $installWizard - * @param \Magento\Framework\Session\Generic $session - * @param \Magento\Framework\Module\Dir\Reader $moduleReader - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Installer $installer, - \Magento\Install\Model\Wizard $installWizard, - \Magento\Framework\Session\Generic $session, - \Magento\Framework\Module\Dir\Reader $moduleReader, - array $data = array() - ) { - parent::__construct($context, $installer, $installWizard, $session, $data); - $this->_moduleReader = $moduleReader; - } - - /** - * Retrieve locale data post url - * - * @return string - */ - public function getPostUrl() - { - return $this->getUrl('*/*/downloadPost'); - } - - /** - * @return string - */ - public function getNextUrl() - { - return $this->_installWizard->getStepByName('download')->getNextUrl(); - } - - /** - * @return bool - */ - public function hasLocalCopy() - { - $path = $this->_moduleReader->getModuleDir('etc', 'Magento_Adminhtml'); - $directory = $this->_filesystem->getDirectoryRead(DirectoryList::MODULES); - - if ($path && $directory->isDirectory($directory->getRelativePath($path))) { - return true; - } - return false; - } -} diff --git a/app/code/Magento/Install/Block/End.php b/app/code/Magento/Install/Block/End.php deleted file mode 100644 index 75d895086e9882ed95918961d0d9b763b91cab0b..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/End.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Installation ending block - */ -namespace Magento\Install\Block; - -class End extends \Magento\Install\Block\AbstractBlock -{ - /** - * @var string - */ - protected $_template = 'end.phtml'; - - /** - * @var \Magento\Install\Model\Survey - */ - protected $_survey; - - /** - * Cryptographic key - * - * @var string - */ - protected $_cryptKey; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Installer $installer - * @param \Magento\Install\Model\Wizard $installWizard - * @param \Magento\Framework\Session\Generic $session - * @param \Magento\Install\Model\Survey $survey - * @param string $cryptKey - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Installer $installer, - \Magento\Install\Model\Wizard $installWizard, - \Magento\Framework\Session\Generic $session, - \Magento\Install\Model\Survey $survey, - $cryptKey, - array $data = array() - ) { - $this->_cryptKey = $cryptKey; - parent::__construct($context, $installer, $installWizard, $session, $data); - $this->_survey = $survey; - } - - /** - * @return string - */ - public function getEncryptionKey() - { - $key = $this->getData('encryption_key'); - if (is_null($key)) { - $key = $this->_cryptKey; - $this->setData('encryption_key', $key); - } - return $key; - } - - /** - * Return url for iframe source - * - * @return string|null - */ - public function getIframeSourceUrl() - { - if (!$this->_survey->isSurveyUrlValid() || $this->_installer->getHideIframe()) { - return null; - } - return $this->_survey->getSurveyUrl(); - } -} diff --git a/app/code/Magento/Install/Block/Locale.php b/app/code/Magento/Install/Block/Locale.php deleted file mode 100644 index 73bd692b079182641e679e25d7d4ac4ee40115da..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/Locale.php +++ /dev/null @@ -1,267 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Install localization block - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Install\Block; - -class Locale extends \Magento\Install\Block\AbstractBlock -{ - /** - * Template file - * - * @var string - */ - protected $_template = 'locale.phtml'; - - /** - * Locale code - * - * @var string - */ - protected $_localeCode; - - /** - * @var \Magento\Framework\Locale\CurrencyInterface - */ - protected $_localeCurrency; - - /** - * @var \Magento\Framework\Locale\ListsInterface - */ - protected $_localeLists; - - /** - * @var \Magento\Framework\Locale\ResolverInterface - */ - protected $_localeResolver; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Installer $installer - * @param \Magento\Install\Model\Wizard $installWizard - * @param \Magento\Framework\Session\Generic $session - * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency - * @param \Magento\Framework\Locale\ListsInterface $localeLists - * @param \Magento\Framework\Locale\ResolverInterface $localeResolver - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Installer $installer, - \Magento\Install\Model\Wizard $installWizard, - \Magento\Framework\Session\Generic $session, - \Magento\Framework\Locale\CurrencyInterface $localeCurrency, - \Magento\Framework\Locale\ListsInterface $localeLists, - \Magento\Framework\Locale\ResolverInterface $localeResolver, - array $data = array() - ) { - $this->_localeLists = $localeLists; - parent::__construct($context, $installer, $installWizard, $session, $data); - $this->_localeCurrency = $localeCurrency; - $this->_localeResolver = $localeResolver; - } - - /** - * Set locale code - * - * @param string $localeCode - * @return $this - */ - public function setLocaleCode($localeCode) - { - $this->_localeCode = $localeCode; - return $this; - } - - /** - * Retrieve locale code - * - * @return string - */ - public function getLocaleCode() - { - return $this->_localeCode; - } - - /** - * Retrieve locale object - * - * @return \Magento\Framework\LocaleInterface - */ - public function getLocale() - { - $locale = $this->getData('locale'); - if (null === $locale) { - $locale = $this->_localeResolver->setLocaleCode($this->getLocaleCode())->getLocale(); - $this->setData('locale', $locale); - } - return $locale; - } - - /** - * Retrieve locale data post url - * - * @return string - */ - public function getPostUrl() - { - return $this->getCurrentStep()->getNextUrl(); - } - - /** - * Retrieve locale change url - * - * @return string - */ - public function getChangeUrl() - { - return $this->getUrl('*/*/localeChange'); - } - - /** - * Retrieve locale dropdown HTML - * - * @return string - */ - public function getLocaleSelect() - { - $html = $this->getLayout()->createBlock( - 'Magento\Framework\View\Element\Html\Select' - )->setName( - 'config[locale]' - )->setId( - 'locale' - )->setTitle( - __('Locale') - )->setClass( - 'required-entry' - )->setValue( - $this->getLocale()->__toString() - )->setOptions( - $this->_localeLists->getTranslatedOptionLocales() - )->getHtml(); - return $html; - } - - /** - * Retrieve timezone dropdown HTML - * - * @return string - */ - public function getTimezoneSelect() - { - $html = $this->getLayout()->createBlock( - 'Magento\Framework\View\Element\Html\Select' - )->setName( - 'config[timezone]' - )->setId( - 'timezone' - )->setTitle( - __('Time Zone') - )->setClass( - 'required-entry' - )->setValue( - $this->getTimezone() - )->setOptions( - $this->_localeLists->getOptionTimezones() - )->getHtml(); - return $html; - } - - /** - * Retrieve timezone - * - * @return string - */ - public function getTimezone() - { - $timezone = $this->_session - ->getTimezone() ? $this - ->_session - ->getTimezone() : $this - ->_localeDate - ->getDefaultTimezone(); - if ($timezone == \Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE) { - $timezone = 'America/Los_Angeles'; - } - return $timezone; - } - - /** - * Retrieve currency dropdown html - * - * @return string - */ - public function getCurrencySelect() - { - $html = $this->getLayout()->createBlock( - 'Magento\Framework\View\Element\Html\Select' - )->setName( - 'config[currency]' - )->setId( - 'currency' - )->setTitle( - __('Default Currency') - )->setClass( - 'required-entry' - )->setValue( - $this->getCurrency() - )->setOptions( - $this->_localeLists->getOptionCurrencies() - )->getHtml(); - return $html; - } - - /** - * Retrieve currency - * - * @return string - */ - public function getCurrency() - { - return $this->_session - ->getCurrency() ? $this - ->_session - ->getCurrency() : $this - ->_localeCurrency - ->getDefaultCurrency(); - } - - /** - * @return \Magento\Framework\Object - */ - public function getFormData() - { - $data = $this->getData('form_data'); - if (null === $data) { - $data = new \Magento\Framework\Object(); - $this->setData('form_data', $data); - } - return $data; - } -} diff --git a/app/code/Magento/Install/Block/State.php b/app/code/Magento/Install/Block/State.php deleted file mode 100644 index bf261cec8527dacaf3a8963c9831ad871e1e0650..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Block/State.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Block; - -/** - * Install state block - */ -class State extends \Magento\Framework\View\Element\Template -{ - /** - * @var string - */ - protected $_template = 'state.phtml'; - - /** - * Install Wizard - * - * @var \Magento\Install\Model\Wizard - */ - protected $_wizard; - - /** - * @param \Magento\Framework\View\Element\Template\Context $context - * @param \Magento\Install\Model\Wizard $wizard - * @param array $data - */ - public function __construct( - \Magento\Framework\View\Element\Template\Context $context, - \Magento\Install\Model\Wizard $wizard, - array $data = array() - ) { - parent::__construct($context, $data); - $this->_isScopePrivate = true; - $this->assign('steps', $wizard->getSteps()); - } - - /** - * Get previous downloader steps - * - * @return array - */ - public function getDownloaderSteps() - { - if ($this->isDownloaderInstall()) { - $steps = array(__('Welcome'), __('Validation'), __('Magento Connect Manager Deployment')); - return $steps; - } else { - return array(); - } - } - - /** - * Checks for Magento Connect Manager installation method - * - * @return bool - */ - public function isDownloaderInstall() - { - $session = $this->_request->getCookie('magento_downloader_session', false); - return $session ? true : false; - } -} diff --git a/app/code/Magento/Install/Controller/Adminhtml/Survey/Index.php b/app/code/Magento/Install/Controller/Adminhtml/Survey/Index.php deleted file mode 100644 index 69fb6a58c2b683c8cb299057dd130d6e79dd4df7..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Controller/Adminhtml/Survey/Index.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Controller\Adminhtml\Survey; - -class Index extends \Magento\Install\Controller\Adminhtml\Survey -{ - /** - * Index Action - * - * @return void - */ - public function execute() - { - if ($this->getRequest()->getParam('isAjax', false)) { - $this->_objectManager->get('Magento\Install\Model\Survey')->saveSurveyViewed(true); - } - $this->getResponse()->representJson(\Zend_Json::encode(array('survey_decision_saved' => 1))); - } -} diff --git a/app/code/Magento/Install/Model/Config.php b/app/code/Magento/Install/Model/Config.php deleted file mode 100644 index edde8e3bdaf72133ec50acee4297f16279e1bd1e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Config.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Install config - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Install\Model; - -class Config -{ - /** - * Config data model - * - * @var \Magento\Install\Model\Config\Data - */ - protected $_dataStorage; - - /** - * Filesystem - * - * @var \Magento\Framework\Filesystem - */ - protected $filesystem; - - /** - * Constructor - * - * @param Config\Data $dataStorage - * @param \Magento\Framework\Filesystem $filesystem - */ - public function __construct(\Magento\Install\Model\Config\Data $dataStorage, \Magento\Framework\Filesystem $filesystem) - { - $this->_dataStorage = $dataStorage; - $this->filesystem = $filesystem; - } - - /** - * Get array of wizard steps - * - * Array($index => \Magento\Framework\Object) - * - * @return array - */ - public function getWizardSteps() - { - $data = $this->_dataStorage->get(); - $steps = array(); - foreach ($data['steps'] as $step) { - $stepObject = new \Magento\Framework\Object($step); - $steps[] = $stepObject; - } - return $steps; - } - - /** - * Retrieve writable path for checking - * - * Array( - * ['writeable'] => array( - * [$index] => array( - * ['path'] - * ['recursive'] - * ) - * ) - * ) - * - * @deprecated since 1.7.1.0 - * - * @return array - */ - public function getPathForCheck() - { - $data = $this->_dataStorage->get(); - $res = array(); - - $items = isset( - $data['filesystem_prerequisites'] - ) && isset( - $data['filesystem_prerequisites']['writables'] - ) ? $data['filesystem_prerequisites']['writables'] : array(); - - foreach ($items as $item) { - $res['writeable'][] = $item; - } - - return $res; - } - - /** - * Retrieve writable full paths for checking - * - * @return array - */ - public function getWritableFullPathsForCheck() - { - $data = $this->_dataStorage->get(); - $paths = array(); - $items = isset( - $data['filesystem_prerequisites'] - ) && isset( - $data['filesystem_prerequisites']['writables'] - ) ? $data['filesystem_prerequisites']['writables'] : array(); - foreach ($items as $nodeKey => $item) { - $value = $item; - $value['path'] = $this->filesystem->getDirectoryWrite($nodeKey)->getAbsolutePath(); - $paths[$nodeKey] = $value; - } - - return $paths; - } -} diff --git a/app/code/Magento/Install/Model/Config/Converter.php b/app/code/Magento/Install/Model/Config/Converter.php deleted file mode 100644 index 952091f4d3035a3ddbc4ed044a885d2355fe7883..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Config/Converter.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model\Config; - -class Converter implements \Magento\Framework\Config\ConverterInterface -{ - /** - * {@inheritdoc} - * @SuppressWarnings(PHPMD.NPathComplexity) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - */ - public function convert($source) - { - $xpath = new \DOMXPath($source); - - $result = array( - 'steps' => array(), - 'filesystem_prerequisites' => array('writables' => array(), 'notWritables' => array()) - ); - - /** @var $step DOMNode */ - foreach ($xpath->query('/install_wizard/steps/step') as $step) { - $stepAttributes = $step->attributes; - $id = $stepAttributes->getNamedItem('id')->nodeValue; - $result['steps'][$id]['name'] = $id; - - $controller = $stepAttributes->getNamedItem('controller')->nodeValue; - $result['steps'][$id]['controller'] = $controller; - - $action = $stepAttributes->getNamedItem('action')->nodeValue; - $result['steps'][$id]['action'] = $action; - - /** @var $child DOMNode */ - foreach ($step->childNodes as $child) { - if ($child->nodeName == 'label') { - $result['steps'][$id]['code'] = $child->nodeValue; - } - } - } - - /** @var $step DOMNode */ - foreach ($xpath->query('/install_wizard/filesystem_prerequisites/directory') as $directory) { - $directoryAttributes = $directory->attributes; - $alias = $directoryAttributes->getNamedItem('alias')->nodeValue; - $existence = $directoryAttributes->getNamedItem('existence')->nodeValue == 'true' ? '1' : '0'; - $recursive = $directoryAttributes->getNamedItem('recursive')->nodeValue == 'true' ? '1' : '0'; - if ($directoryAttributes->getNamedItem('writable')->nodeValue == 'true') { - $result['filesystem_prerequisites']['writables'][$alias]['existence'] = $existence; - $result['filesystem_prerequisites']['writables'][$alias]['recursive'] = $recursive; - } else { - $result['filesystem_prerequisites']['notwritables'][$alias]['existence'] = $existence; - $result['filesystem_prerequisites']['notwritables'][$alias]['recursive'] = $recursive; - } - } - - return $result; - } -} diff --git a/app/code/Magento/Install/Model/Config/Reader.php b/app/code/Magento/Install/Model/Config/Reader.php deleted file mode 100644 index 666d55d2b26dd0220aeeee1c643c6ccf1b3793bc..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Config/Reader.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model\Config; - -class Reader extends \Magento\Framework\Config\Reader\Filesystem -{ - /** - * List of identifier attributes for merging - * - * @var array - */ - protected $_idAttributes = array( - '/install_wizard/steps/step' => 'id', - '/install_wizard/filesystem_prerequisites/directory' => 'alias' - ); -} diff --git a/app/code/Magento/Install/Model/Config/SchemaLocator.php b/app/code/Magento/Install/Model/Config/SchemaLocator.php deleted file mode 100644 index d8070df1a5bc549c1b3e0bb4cdba81346597268c..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Config/SchemaLocator.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -/** - * Locator for install_wizard XSD schemas. - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model\Config; - -class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface -{ - /** - * Path to corresponding XSD file with validation rules for merged config - * - * @var string - */ - protected $_schema = null; - - /** - * Path to corresponding XSD file with validation rules for separate config files - * - * @var string - */ - protected $_perFileSchema = null; - - /** - * @param \Magento\Framework\Module\Dir\Reader $moduleReader - */ - public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) - { - $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Install') . '/install_wizard.xsd'; - $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Install') . '/install_wizard_file.xsd'; - } - - /** - * Get path to merged config schema - * - * @return string|null - */ - public function getSchema() - { - return $this->_schema; - } - - /** - * Get path to per file validation schema - * - * @return string|null - */ - public function getPerFileSchema() - { - return $this->_perFileSchema; - } -} diff --git a/app/code/Magento/Install/Model/Installer.php b/app/code/Magento/Install/Model/Installer.php deleted file mode 100644 index c65795f30daba6db0ba9bd48641507a34b513ee0..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer.php +++ /dev/null @@ -1,573 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model; - -/** - * Installer model - */ -class Installer extends \Magento\Framework\Object -{ - /** - * Installer data model used to store data between installation steps - * - * @var \Magento\Framework\Object - */ - protected $_dataModel; - - /** - * DB updated model - * - * @var \Magento\Framework\Module\Updater - */ - protected $_dbUpdater; - - /** - * Application chache model - * - * @var \Magento\Framework\App\CacheInterface - */ - protected $_cache; - - /** - * Application config model - * - * @var \Magento\Framework\App\Config\ReinitableConfigInterface - */ - protected $_config; - - /** - * @var \Magento\Framework\App\Cache\StateInterface - */ - protected $_cacheState; - - /** - * @var \Magento\Framework\App\Cache\TypeListInterface - */ - protected $_cacheTypeList; - - /** - * @var \Magento\Install\Model\Setup - */ - protected $_installSetup; - - /** - * Install installer pear - * - * @var \Magento\Install\Model\Installer\Pear - */ - protected $_installerPear; - - /** - * Install installer filesystem - * - * @var \Magento\Install\Model\Installer\Filesystem - */ - protected $_filesystem; - - /** - * Area list - * - * @var \Magento\Framework\App\AreaList - */ - protected $_areaList; - - /** - * Application - * - * @var \Magento\Framework\App\State - */ - protected $_appState; - - /** - * Store Manager - * - * @var \Magento\Framework\StoreManagerInterface - */ - protected $_storeManager; - - /** - * User user - * - * @var \Magento\User\Model\UserFactory - */ - protected $_userModelFactory; - - /** - * Installer DB model - * - * @var \Magento\Install\Model\Installer\Db - */ - protected $_installerDb; - - /** - * Installer DB model - * - * @var \Magento\Install\Model\Installer\Config - */ - protected $_installerConfig; - - /** - * Install session - * - * @var \Magento\Framework\Session\Generic - */ - protected $_session; - - /** - * @var \Magento\Framework\App\Resource - */ - protected $_resource; - - /** - * @var \Magento\Framework\Encryption\EncryptorInterface - */ - protected $_encryptor; - - /** - * @var \Magento\Framework\Math\Random - */ - protected $mathRandom; - - /** - * Configuration arguments - * - * @var \Magento\Framework\App\Arguments - */ - protected $_arguments; - - /** - * @var \Magento\Framework\Module\ModuleListInterface - */ - protected $moduleList; - - /** - * @var \Magento\Framework\Module\DependencyManagerInterface - */ - protected $dependencyManager; - - /** - * @var \Magento\Framework\Message\ManagerInterface - */ - protected $messageManager; - - /** - * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface - */ - protected $_localeDate; - - /** - * @var \Magento\Framework\Locale\ResolverInterface - */ - protected $_localeResolver; - - /** - * @param \Magento\Framework\App\Config\ReinitableConfigInterface $config - * @param \Magento\Framework\Module\Updater $dbUpdater - * @param \Magento\Framework\App\CacheInterface $cache - * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList - * @param \Magento\Framework\App\Cache\StateInterface $cacheState - * @param \Magento\Install\Model\Setup $installSetup - * @param \Magento\Framework\App\Arguments $arguments - * @param \Magento\Framework\App\AreaList $areaList - * @param \Magento\Framework\App\State $appState - * @param \Magento\Framework\StoreManagerInterface $storeManager - * @param \Magento\User\Model\UserFactory $userModelFactory - * @param Installer\Filesystem $filesystem - * @param Installer\Pear $installerPear - * @param Installer\Db $installerDb - * @param Installer\Config $installerConfig - * @param \Magento\Framework\Session\Generic $session - * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor - * @param \Magento\Framework\Math\Random $mathRandom - * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Framework\Module\ModuleListInterface $moduleList - * @param \Magento\Framework\Module\DependencyManagerInterface $dependencyManager - * @param \Magento\Framework\Message\ManagerInterface $messageManager - * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate - * @param \Magento\Framework\Locale\ResolverInterface $localeResolver - * @param array $data - */ - public function __construct( - \Magento\Framework\App\Config\ReinitableConfigInterface $config, - \Magento\Framework\Module\Updater $dbUpdater, - \Magento\Framework\App\CacheInterface $cache, - \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, - \Magento\Framework\App\Cache\StateInterface $cacheState, - \Magento\Install\Model\Setup $installSetup, - \Magento\Framework\App\Arguments $arguments, - \Magento\Framework\App\AreaList $areaList, - \Magento\Framework\App\State $appState, - \Magento\Framework\StoreManagerInterface $storeManager, - \Magento\User\Model\UserFactory $userModelFactory, - \Magento\Install\Model\Installer\Filesystem $filesystem, - \Magento\Install\Model\Installer\Pear $installerPear, - \Magento\Install\Model\Installer\Db $installerDb, - \Magento\Install\Model\Installer\Config $installerConfig, - \Magento\Framework\Session\Generic $session, - \Magento\Framework\Encryption\EncryptorInterface $encryptor, - \Magento\Framework\Math\Random $mathRandom, - \Magento\Framework\App\Resource $resource, - \Magento\Framework\Module\ModuleListInterface $moduleList, - \Magento\Framework\Module\DependencyManagerInterface $dependencyManager, - \Magento\Framework\Message\ManagerInterface $messageManager, - \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, - \Magento\Framework\Locale\ResolverInterface $localeResolver, - array $data = array() - ) { - $this->_dbUpdater = $dbUpdater; - $this->_config = $config; - $this->_cache = $cache; - $this->_cacheState = $cacheState; - $this->_cacheTypeList = $cacheTypeList; - $this->_installSetup = $installSetup; - $this->_encryptor = $encryptor; - $this->mathRandom = $mathRandom; - $this->_arguments = $arguments; - $this->_areaList = $areaList; - $this->_appState = $appState; - $this->_storeManager = $storeManager; - $this->_userModelFactory = $userModelFactory; - $this->_filesystem = $filesystem; - $this->_installerPear = $installerPear; - $this->_installerDb = $installerDb; - $this->_installerConfig = $installerConfig; - $this->_session = $session; - $this->_resource = $resource; - $this->moduleList = $moduleList; - $this->dependencyManager = $dependencyManager; - $this->messageManager = $messageManager; - $this->_localeDate = $localeDate; - $this->_localeResolver = $localeResolver; - parent::__construct($data); - } - - /** - * Get data model - * - * @return \Magento\Framework\Object - */ - public function getDataModel() - { - if (null === $this->_dataModel) { - $this->setDataModel($this->_session); - } - return $this->_dataModel; - } - - /** - * Set data model to store data between installation steps - * - * @param \Magento\Framework\Object $model - * @return $this - */ - public function setDataModel($model) - { - $this->_dataModel = $model; - return $this; - } - - /** - * Check packages (pear) downloads - * - * @return boolean - */ - public function checkDownloads() - { - try { - $this->_installerPear->checkDownloads(); - $result = true; - } catch (\Exception $e) { - $result = false; - } - $this->setDownloadCheckStatus($result); - return $result; - } - - /** - * Check server settings - * - * @return bool - */ - public function checkServer() - { - try { - $this->checkExtensionsLoaded(); - $this->_filesystem->install(); - $result = true; - } catch (\Exception $e) { - $result = false; - } - $this->setData('server_check_status', $result); - return $result; - } - - /** - * Retrieve server checking result status - * - * @return bool - */ - public function getServerCheckStatus() - { - $status = $this->getData('server_check_status'); - if (is_null($status)) { - $status = $this->checkServer(); - } - return $status; - } - - /** - * Check all necessary extensions are loaded and available - * - * @return void - * @throws \Exception - */ - protected function checkExtensionsLoaded() - { - try { - foreach ($this->moduleList->getModules() as $moduleData) { - $this->dependencyManager->checkModuleDependencies($moduleData); - } - } catch (\Exception $exception) { - $this->messageManager->addError($exception->getMessage()); - throw new \Exception($exception->getMessage()); - } - } - - /** - * Installation config data - * - * @param array $data - * @return $this - */ - public function installConfig($data) - { - $data['db_active'] = true; - - $data = $this->_installerDb->checkDbConnectionData($data); - - $data = $this->_installerConfig->install($data); - $this->getDataModel()->setConfigData($data); - - $this->_arguments->reload(); - $this->_resource->setTablePrefix($data['db_prefix']); - - $this->_config->reinit(); - - return $this; - } - - /** - * Database installation - * - * @return $this - */ - public function installDb() - { - $this->_dbUpdater->updateScheme(); - $data = $this->getDataModel()->getConfigData(); - - /** - * Saving host information into DB - */ - if (!empty($data['use_rewrites'])) { - $this->_installSetup->setConfigData(\Magento\Store\Model\Store::XML_PATH_USE_REWRITES, 1); - } - - if (!empty($data['enable_charts'])) { - $this->_installSetup->setConfigData(\Magento\Backend\Block\Dashboard::XML_PATH_ENABLE_CHARTS, 1); - } else { - $this->_installSetup->setConfigData(\Magento\Backend\Block\Dashboard::XML_PATH_ENABLE_CHARTS, 0); - } - - if (!empty($data['admin_no_form_key'])) { - $this->_installSetup->setConfigData(\Magento\Backend\Model\Url::XML_PATH_USE_SECURE_KEY, 0); - } - - $unsecureBaseUrl = $this->_storeManager->getStore()->getBaseUrl('web'); - if (!empty($data['unsecure_base_url'])) { - $unsecureBaseUrl = $data['unsecure_base_url']; - $this->_installSetup->setConfigData( - \Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, - $unsecureBaseUrl - ); - } - - if (!empty($data['use_secure'])) { - $this->_installSetup->setConfigData(\Magento\Store\Model\Store::XML_PATH_SECURE_IN_FRONTEND, 1); - $this->_installSetup->setConfigData( - \Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, - $data['secure_base_url'] - ); - if (!empty($data['use_secure_admin'])) { - $this->_installSetup->setConfigData(\Magento\Store\Model\Store::XML_PATH_SECURE_IN_ADMINHTML, 1); - } - } elseif (!empty($data['unsecure_base_url'])) { - $this->_installSetup->setConfigData(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, $unsecureBaseUrl); - } - - /** - * Saving locale information into DB - */ - $locale = $this->getDataModel()->getLocaleData(); - if (!empty($locale['locale'])) { - $this->_installSetup->setConfigData($this->_localeResolver->getDefaultLocalePath(), $locale['locale']); - } - if (!empty($locale['timezone'])) { - $this->_installSetup->setConfigData($this->_localeDate->getDefaultTimezonePath(), $locale['timezone']); - } - if (!empty($locale['currency'])) { - $this->_installSetup->setConfigData( - \Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE, - $locale['currency'] - ); - $this->_installSetup->setConfigData( - \Magento\Directory\Model\Currency::XML_PATH_CURRENCY_DEFAULT, - $locale['currency'] - ); - $this->_installSetup->setConfigData( - \Magento\Directory\Model\Currency::XML_PATH_CURRENCY_ALLOW, - $locale['currency'] - ); - } - - if (!empty($data['order_increment_prefix'])) { - $this->_setOrderIncrementPrefix($this->_installSetup, $data['order_increment_prefix']); - } - - return $this; - } - - /** - * Set order number prefix - * - * @param \Magento\Framework\Module\Setup $setupModel - * @param string $orderIncrementPrefix - * @return void - */ - protected function _setOrderIncrementPrefix(\Magento\Framework\Module\Setup $setupModel, $orderIncrementPrefix) - { - $select = $setupModel->getConnection()->select()->from( - $setupModel->getTable('eav_entity_type'), - 'entity_type_id' - )->where( - 'entity_type_code=?', - 'order' - ); - $data = array( - 'entity_type_id' => $setupModel->getConnection()->fetchOne($select), - 'store_id' => '1', - 'increment_prefix' => $orderIncrementPrefix - ); - $setupModel->getConnection()->insert($setupModel->getTable('eav_entity_store'), $data); - } - - /** - * Create an admin user - * - * @param array $data - * @return void - */ - public function createAdministrator($data) - { - // \Magento\User\Model\User belongs to adminhtml area - $this->_areaList - ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Framework\App\AreaInterface::PART_CONFIG); - - /** @var $user \Magento\User\Model\User */ - $user = $this->_userModelFactory->create(); - $user->loadByUsername($data['username']); - // setForceNewPassword(true) - run-time flag to force saving of the entered password - $user->addData($data)->setForceNewPassword(true)->setRoleId(1)->save(); - $this->_refreshConfig(); - } - - /** - * Install encryption key into the application, generate and return a random one, if no value is specified - * - * @param string $key - * @return $this - */ - public function installEncryptionKey($key) - { - $this->_encryptor->validateKey($key); - $this->_installerConfig->replaceTmpEncryptKey($key); - $this->_refreshConfig(); - return $this; - } - - /** - * Return a validated encryption key, generating a random one, if no value was initially provided - * - * @param string|null $key - * @return string - */ - public function getValidEncryptionKey($key = null) - { - if (!$key) { - $key = md5($this->mathRandom->getRandomString(10)); - } - $this->_encryptor->validateKey($key); - return $key; - } - - /** - * @return $this - */ - public function finish() - { - $this->_setAppInstalled(); - $this->_refreshConfig(); - - /* Enable all cache types */ - foreach (array_keys($this->_cacheTypeList->getTypes()) as $cacheTypeCode) { - $this->_cacheState->setEnabled($cacheTypeCode, true); - } - $this->_cacheState->persist(); - return $this; - } - - /** - * Store install date and set application into installed state - * - * @return void - */ - protected function _setAppInstalled() - { - $dateTime = date('r'); - $this->_installerConfig->replaceTmpInstallDate($dateTime); - $this->_appState->setInstallDate($dateTime); - } - - /** - * Ensure changes in the configuration, if any, take effect - * - * @return void - */ - protected function _refreshConfig() - { - $this->_cache->clean(); - $this->_config->reinit(); - } -} diff --git a/app/code/Magento/Install/Model/Installer/Config.php b/app/code/Magento/Install/Model/Installer/Config.php deleted file mode 100644 index 5176dd7b6f63ebc6455cfac5354adce74eee60d8..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer/Config.php +++ /dev/null @@ -1,271 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model\Installer; - -use Magento\Framework\Filesystem as AppFilesystem; -use Magento\Framework\App\Filesystem\DirectoryList; - -/** - * Config installer - */ -class Config -{ - const TMP_INSTALL_DATE_VALUE = 'd-d-d-d-d'; - - const TMP_ENCRYPT_KEY_VALUE = 'k-k-k-k-k'; - - /** - * Path to local configuration file - * - * @var string - */ - protected $_localConfigFile = 'local.xml'; - - /** - * @var \Magento\Framework\App\RequestInterface - */ - protected $_request; - - /** - * @var AppFilesystem - */ - protected $_filesystem; - - /** - * @var \Magento\Framework\Filesystem\Directory\ReadInterface - */ - protected $_pubDirectory; - - /** - * @var \Magento\Framework\Filesystem\Directory\Write - */ - protected $_configDirectory; - - /** - * Store Manager - * - * @var \Magento\Framework\StoreManagerInterface - */ - protected $_storeManager; - - /** - * @var \Magento\Framework\Message\ManagerInterface - */ - protected $messageManager; - - /** - * @param \Magento\Framework\App\RequestInterface $request - * @param AppFilesystem $filesystem - * @param \Magento\Framework\StoreManagerInterface $storeManager - * @param \Magento\Framework\Message\ManagerInterface $messageManager - */ - public function __construct( - \Magento\Framework\App\RequestInterface $request, - AppFilesystem $filesystem, - \Magento\Framework\StoreManagerInterface $storeManager, - \Magento\Framework\Message\ManagerInterface $messageManager - ) { - $this->_request = $request; - $this->_storeManager = $storeManager; - $this->_filesystem = $filesystem; - $this->_pubDirectory = $filesystem->getDirectoryRead(DirectoryList::PUB); - $this->_configDirectory = $filesystem->getDirectoryWrite(DirectoryList::CONFIG); - $this->messageManager = $messageManager; - } - - /** - * Generate installation data and record them into local.xml using local.xml.template - * - * @param array $config - * @return array - */ - public function install($config) - { - $defaults = array( - 'root_dir' => $this->_filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath(), - 'app_dir' => $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath(), - 'var_dir' => $this->_filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath(), - 'base_url' => $this->_request->getDistroBaseUrl() - ); - foreach ($defaults as $index => $value) { - if (!isset($config[$index])) { - $config[$index] = $value; - } - } - - if (isset($config['unsecure_base_url'])) { - $config['unsecure_base_url'] .= substr($config['unsecure_base_url'], -1) != '/' ? '/' : ''; - if (strpos($config['unsecure_base_url'], 'http') !== 0) { - $config['unsecure_base_url'] = 'http://' . $config['unsecure_base_url']; - } - if (empty($config['skip_base_url_validation'])) { - $this->_checkUrl($config['unsecure_base_url']); - } - } - if (isset($config['secure_base_url'])) { - $config['secure_base_url'] .= substr($config['secure_base_url'], -1) != '/' ? '/' : ''; - if (strpos($config['secure_base_url'], 'http') !== 0) { - $config['secure_base_url'] = 'https://' . $config['secure_base_url']; - } - - if (!empty($config['use_secure']) && empty($config['skip_url_validation'])) { - $this->_checkUrl($config['secure_base_url']); - } - } - - $config['date'] = self::TMP_INSTALL_DATE_VALUE; - $config['key'] = self::TMP_ENCRYPT_KEY_VALUE; - $config['var_dir'] = $config['root_dir'] . '/var'; - - $config['use_script_name'] = isset($config['use_script_name']) ? 'true' : 'false'; - - $contents = $this->_configDirectory->readFile('local.xml.template'); - foreach ($config as $index => $value) { - $contents = str_replace('{{' . $index . '}}', '<![CDATA[' . $value . ']]>', $contents); - } - - $this->_configDirectory->writeFile($this->_localConfigFile, $contents); - $this->_configDirectory->changePermissions($this->_localConfigFile, 0777); - - return $config; - } - - /** - * @return \Magento\Framework\Object - */ - public function getFormData() - { - $uri = \Zend_Uri::factory($this->_storeManager->getStore()->getBaseUrl('web')); - - $baseUrl = $uri->getUri(); - if ($uri->getScheme() !== 'https') { - $uri->setPort(null); - $baseSecureUrl = str_replace('http://', 'https://', $uri->getUri()); - } else { - $baseSecureUrl = $uri->getUri(); - } - - $data = new \Magento\Framework\Object(); - $data->setDbHost( - 'localhost' - )->setDbName( - 'magento' - )->setDbUser( - '' - )->setDbModel( - 'mysql4' - )->setDbPass( - '' - )->setSecureBaseUrl( - $baseSecureUrl - )->setUnsecureBaseUrl( - $baseUrl - )->setBackendFrontname( - 'backend' - )->setEnableCharts( - '1' - ); - return $data; - } - - /** - * Check validity of a base URL - * - * @param string $baseUrl - * @return void - * @throws \Magento\Framework\Model\Exception - * @throws \Exception - */ - protected function _checkUrl($baseUrl) - { - try { - $staticFile = $this->_findFirstFileRelativePath('', '/.+\.(html?|js|css|gif|jpe?g|png)$/'); - $staticUrl = $baseUrl . $this->_filesystem->getUri(DirectoryList::PUB) . '/' . $staticFile; - $client = new \Magento\Framework\HTTP\ZendClient($staticUrl); - $response = $client->request('GET'); - } catch (\Exception $e) { - $this->messageManager->addError(__('The URL "%1" is not accessible.', $baseUrl)); - throw $e; - } - if ($response->getStatus() != 200) { - $this->messageManager->addError(__('The URL "%1" is invalid.', $baseUrl)); - throw new \Magento\Framework\Model\Exception(__('Response from the server is invalid.')); - } - } - - /** - * Find a relative path to a first file located in a directory or its descendants - * - * @param string $dir Directory to search for a file within - * @param string $pattern PCRE pattern a file name has to match - * @return string|null - */ - protected function _findFirstFileRelativePath($dir, $pattern = '/.*/') - { - $childDirs = array(); - foreach ($this->_pubDirectory->read($dir) as $itemPath) { - if ($this->_pubDirectory->isFile($itemPath)) { - if (preg_match($pattern, $itemPath)) { - return $itemPath; - } - } else { - $childDirs[$itemPath] = $itemPath; - } - } - foreach ($childDirs as $dirName => $dirPath) { - $filePath = $this->_findFirstFileRelativePath($dirPath, $pattern); - if ($filePath) { - return $filePath; - } - } - return null; - } - - /** - * @param string $date - * @return $this - */ - public function replaceTmpInstallDate($date = 'now') - { - $stamp = strtotime((string)$date); - $localXml = $this->_configDirectory->readFile($this->_localConfigFile); - $localXml = str_replace(self::TMP_INSTALL_DATE_VALUE, date('r', $stamp), $localXml); - $this->_configDirectory->writeFile($this->_localConfigFile, $localXml); - - return $this; - } - - /** - * @param string $key - * @return $this - */ - public function replaceTmpEncryptKey($key) - { - $localXml = $this->_configDirectory->readFile($this->_localConfigFile); - $localXml = str_replace(self::TMP_ENCRYPT_KEY_VALUE, $key, $localXml); - $this->_configDirectory->writeFile($this->_localConfigFile, $localXml); - - return $this; - } -} diff --git a/app/code/Magento/Install/Model/Installer/Console.php b/app/code/Magento/Install/Model/Installer/Console.php deleted file mode 100644 index f2f0fdd6ae22c73b385b3c35474ed4f24ae685ca..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer/Console.php +++ /dev/null @@ -1,480 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Magento application console installer - */ -namespace Magento\Install\Model\Installer; - -class Console -{ - /** - * Available installation options - * - * @var array - */ - protected $installParameters = []; - - /** - * Required parameters with descriptions - * - * @var array - */ - protected $requiredParameters = [ - 'license_agreement_accepted' => 'Accept licence. See LICENSE*.txt. Flag value.', - 'locale' => 'Locale to use. Run with --show_locales for full list', - 'timezone' => 'Time zone to use. Run with --show_timezones for full list', - 'default_currency' => 'Default currency. Run with --show_currencies for full list', - 'db_host' => 'IP or name of your DB host', - 'db_name' => 'Database name', - 'db_user' => 'Database user name', - 'url' => 'Instance URL. For example, "http://myinstance.com"', - 'use_rewrites' => 'Use web server rewrites. Flag value', - 'use_secure' => 'Use https(ssl) protocol. Flag value', - 'secure_base_url' => 'Full secure URL if use_secure enabled. For example "https://myinstance.com"', - 'use_secure_admin' => 'Use secure protocol for backend. Flag value', - 'admin_lastname' => 'Admin user last name', - 'admin_firstname' => 'Admin user first name', - 'admin_email' => 'Admin email', - 'admin_username' => 'Admin login', - 'admin_password' => 'Admin password' - ]; - - /** - * Optional parameters with descriptions - * - * @var array - */ - protected $optionalParameters = [ - 'db_model' => 'DB driver. "mysql4" is default and the only supported now', - 'db_pass' => 'DB password. Empty by default', - 'db_prefix' => 'Use prefix for tables of this installation. Empty by default', - 'skip_url_validation' => 'Skip URL validation on installation. Flag value. Validate by default', - 'admin_no_form_key' => 'Disable the form key protection on the back-end. Flag value. Enabled by default', - 'encryption_key' => 'Key to encrypt sensitive data. Auto-generated if empty', - 'session_save' => 'Where session data will be stored. "files"(default) or "db"', - 'backend_frontname' => 'Backend URL path. "backend" by default', - 'enable_charts' => 'Enable charts on backend dashboard. Flag value. Enabled by default', - 'order_increment_prefix' => 'Order number prefix. Empty by default.', - 'cleanup_database' => 'Clean up database before installation. Flag value. Disabled by default' - ]; - - /** - * Installer data model to store data between installations steps - * - * @var \Magento\Install\Model\Installer\Data|\Magento\Framework\Session\Generic - */ - protected $_dataModel; - - /** - * Installer model - * - * @var \Magento\Install\Model\Installer - */ - protected $installer; - - /** - * DB updater - * - * @var \Magento\Framework\Module\Updater - */ - protected $_dbUpdater; - - /** - * Install installer data - * - * @var \Magento\Install\Model\Installer\Data - */ - protected $_installerData = null; - - /** - * Locale Lists - * - * @var \Magento\Framework\Locale\ListsInterface - */ - protected $_localeLists; - - /** - * Magento Object Manager - * - * @var \Magento\Framework\Message\ManagerInterface - */ - protected $messageManager; - - /** - * @var \Magento\Install\Model\Installer\Db\Mysql4 - */ - protected $db; - - /** - * @param \Magento\Install\Model\Installer $installer - * @param \Magento\Framework\Module\Updater $dbUpdater - * @param \Magento\Install\Model\Installer\Data $installerData - * @param \Magento\Framework\Locale\ListsInterface $localeLists - * @param \Magento\Install\Model\Installer\Db\Mysql4 $db - * @param \Magento\Framework\Message\ManagerInterface $messageManager - */ - public function __construct( - \Magento\Install\Model\Installer $installer, - \Magento\Framework\Module\Updater $dbUpdater, - \Magento\Install\Model\Installer\Data $installerData, - \Magento\Framework\Locale\ListsInterface $localeLists, - Db\Mysql4 $db, - \Magento\Framework\Message\ManagerInterface $messageManager - ) { - $this->installer = $installer; - $this->_dbUpdater = $dbUpdater; - $this->_installerData = $installerData; - $this->installer->setDataModel($this->_installerData); - $this->_localeLists = $localeLists; - $this->installParameters = array_keys($this->requiredParameters + $this->optionalParameters); - $this->db = $db; - $this->messageManager = $messageManager; - } - - /** - * Retrieve validated installation options - * - * @param array $options - * @return array|bool - */ - protected function _getInstallOptions(array $options) - { - /** - * Check required options - */ - foreach (array_keys($this->requiredParameters) as $optionName) { - if (!isset($options[$optionName])) { - $this->addError("ERROR: installation parameter '{$optionName}' is required."); - } - } - - if ($this->hasErrors()) { - return false; - } - - /** - * Validate license agreement acceptance - */ - if (!$this->_getFlagValue($options['license_agreement_accepted'])) { - $this->addError( - 'ERROR: You have to accept Magento license agreement terms and conditions to continue installation.' - ); - return false; - } - - $result = []; - foreach ($this->installParameters as $optionName) { - $result[$optionName] = isset($options[$optionName]) ? $options[$optionName] : ''; - } - - return $result; - } - - /** - * Add error - * - * @param string $error - * @return $this - */ - public function addError($error) - { - $this->_installerData->addError($error); - return $this; - } - - /** - * Check if there were any errors - * - * @return boolean - */ - public function hasErrors() - { - return count($this->_installerData->getErrors()) > 0; - } - - /** - * Get all errors - * - * @return array - */ - public function getErrors() - { - return $this->_installerData->getErrors(); - } - - /** - * Return TRUE for 'yes', 1, 'true' (case insensitive) or FALSE otherwise - * - * @param string $value - * @return boolean - */ - protected function _getFlagValue($value) - { - $res = 1 == $value || preg_match('/^(yes|y|true)$/i', $value); - return $res; - } - - /** - * Install Magento - * - * @param array $options - * @return string|false - */ - public function install(array $options) - { - try { - $options = $this->_getInstallOptions($options); - if (!$options) { - return false; - } - - /** - * Skip URL validation, if set - */ - $this->_installerData->setSkipUrlValidation($options['skip_url_validation']); - $this->_installerData->setSkipBaseUrlValidation($options['skip_url_validation']); - - /** - * Locale settings - */ - $this->_installerData->setLocaleData( - [ - 'locale' => $options['locale'], - 'timezone' => $options['timezone'], - 'currency' => $options['default_currency'] - ] - ); - - /** - * Database and web config - */ - $this->_installerData->setConfigData( - [ - 'db_model' => $options['db_model'], - 'db_host' => $options['db_host'], - 'db_name' => $options['db_name'], - 'db_user' => $options['db_user'], - 'db_pass' => $options['db_pass'], - 'db_prefix' => $options['db_prefix'], - 'use_rewrites' => $this->_getFlagValue($options['use_rewrites']), - 'use_secure' => $this->_getFlagValue($options['use_secure']), - 'unsecure_base_url' => $options['url'], - 'secure_base_url' => $options['secure_base_url'], - 'use_secure_admin' => $this->_getFlagValue($options['use_secure_admin']), - 'session_save' => $this->_checkSessionSave($options['session_save']), - 'backend_frontname' => $this->_checkBackendFrontname($options['backend_frontname']), - 'admin_no_form_key' => $this->_getFlagValue($options['admin_no_form_key']), - 'skip_url_validation' => $this->_getFlagValue($options['skip_url_validation']), - 'enable_charts' => $this->_getFlagValue($options['enable_charts']), - 'order_increment_prefix' => $options['order_increment_prefix'] - ] - ); - - /** - * Primary admin user - */ - $this->_installerData->setAdminData( - [ - 'firstname' => $options['admin_firstname'], - 'lastname' => $options['admin_lastname'], - 'email' => $options['admin_email'], - 'username' => $options['admin_username'], - 'password' => $options['admin_password'] - ] - ); - - $this->checkServer(); - if ($this->hasErrors()) { - return false; - } - - /** - * Install configuration - */ - $this->installer->installConfig($this->_installerData->getConfigData()); - - if (!empty($options['cleanup_database'])) { - $this->db->cleanUpDatabase(); - } - - if ($this->hasErrors()) { - return false; - } - - /** - * Install database - */ - $this->installer->installDb(); - - if ($this->hasErrors()) { - return false; - } - - // apply data updates - $this->_dbUpdater->updateData(); - - /** - * Create primary administrator user & install encryption key - */ - $encryptionKey = !empty($options['encryption_key']) ? $options['encryption_key'] : null; - $encryptionKey = $this->installer->getValidEncryptionKey($encryptionKey); - $this->installer->createAdministrator($this->_installerData->getAdminData()); - $this->installer->installEncryptionKey($encryptionKey); - - /** - * Installation finish - */ - $this->installer->finish(); - - if ($this->hasErrors()) { - return false; - } - - return $encryptionKey; - } catch (\Exception $e) { - if ($e instanceof \Magento\Framework\Model\Exception) { - $errorMessages = $e->getMessages(\Magento\Framework\Message\MessageInterface::TYPE_ERROR); - if (!empty($errorMessages)) { - foreach ($errorMessages as $errorMessage) { - $this->addError($errorMessage); - } - } else { - $this->addError($e->getMessage()); - } - - } else { - $this->addError('ERROR: ' . $e->getMessage() . $e->getTraceAsString()); - } - return false; - } - } - - /** - * Retrieve available locale codes - * - * @return array - */ - public function getAvailableLocales() - { - return $this->_localeLists->getOptionLocales(); - } - - /** - * Retrieve available currency codes - * - * @return array - */ - public function getAvailableCurrencies() - { - return $this->_localeLists->getOptionCurrencies(); - } - - /** - * Retrieve available timezone codes - * - * @return array - */ - public function getAvailableTimezones() - { - return $this->_localeLists->getOptionTimezones(); - } - - /** - * Retrieve required installation params - * - * @return array - */ - public function getRequiredParams() - { - - return $this->requiredParameters; - } - - /** - * Get optional installation parameters - * @return array - */ - public function getOptionalParams() - { - return $this->optionalParameters; - } - - /** - * Check if server is applicable for Magento - * @return $this - */ - public function checkServer() - { - $result = $this->installer->checkServer(); - if (!$result) { - foreach ($this->messageManager->getMessages()->getItems() as $message) { - $this->addError($message->toString()); - } - } - - return $this; - } - - /** - * Validate session storage value (files or db) - * If empty, will return 'files' - * - * @param string $value - * @return string - * @throws \Exception - */ - protected function _checkSessionSave($value) - { - if (empty($value)) { - return 'files'; - } - if (!in_array($value, array('files', 'db'), true)) { - throw new \Exception('session_save value must be "files" or "db".'); - } - return $value; - } - - /** - * Validate backend area frontname value. - * If empty, "backend" will be returned - * - * @param string $value - * @return string - * @throws \Exception - */ - protected function _checkBackendFrontname($value) - { - if (empty($value)) { - return 'backend'; - } - if (!preg_match('/^[a-z]+[a-z0-9_]+$/', $value)) { - throw new \Exception( - 'backend_frontname value must contain only letters (a-z), numbers (0-9)' . - ' or underscore(_), first character should be a letter.' - ); - } - return $value; - } -} diff --git a/app/code/Magento/Install/Model/Installer/Db.php b/app/code/Magento/Install/Model/Installer/Db.php deleted file mode 100644 index a2139e0e533f2aee304434a57f26dff0fecbf325..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer/Db.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * DB Installer - */ -namespace Magento\Install\Model\Installer; - -class Db -{ - /** - * Database resource - * - * @var \Magento\Install\Model\Installer\Db\AbstractDb - */ - protected $_dbResource; - - /** - * @var \Magento\Framework\Logger - */ - protected $_logger; - - /** - * Database model factory - * - * @var \Magento\Install\Model\Installer\Db\Factory - */ - protected $_dbFactory; - - /** - * Databases configuration - * - * @var array - */ - protected $_dbConfig; - - /** - * @param \Magento\Framework\Logger $logger - * @param \Magento\Install\Model\Installer\Db\Factory $dbFactory - * @param array $dbConfig - */ - public function __construct( - \Magento\Framework\Logger $logger, - \Magento\Install\Model\Installer\Db\Factory $dbFactory, - array $dbConfig - ) { - $this->_logger = $logger; - $this->_dbConfig = $dbConfig; - $this->_dbFactory = $dbFactory; - } - - /** - * Check database connection - * and return checked connection data - * - * @param array $data - * @return array - * @throws \Magento\Framework\Model\Exception - */ - public function checkDbConnectionData($data) - { - $data = $this->_getCheckedData($data); - - try { - /** @var \Magento\Install\Model\Installer\Db\Mysql4 $resource */ - $resource = $this->_getDbResource(); - $resource->setConfig($data); - - // check required extensions - $absenteeExtensions = array(); - $extensions = $resource->getRequiredExtensions(); - foreach ($extensions as $extName) { - if (!extension_loaded($extName)) { - $absenteeExtensions[] = $extName; - } - } - if (!empty($absenteeExtensions)) { - throw new \Magento\Framework\Model\Exception( - __('PHP Extensions "%1" must be loaded.', implode(',', $absenteeExtensions)) - ); - } - - $version = $resource->getVersion(); - $requiredVersion = isset( - $this->_dbConfig['mysql4']['min_version'] - ) ? $this->_dbConfig['mysql4']['min_version'] : 0; - - // check DB server version - if (version_compare($version, $requiredVersion) == -1) { - throw new \Magento\Framework\Model\Exception( - __( - 'The database server version doesn\'t match system requirements (required: %1, actual: %2).', - $requiredVersion, - $version - ) - ); - } - - // check InnoDB support - if (!$resource->supportEngine()) { - throw new \Magento\Framework\Model\Exception(__('Database server does not support the InnoDB storage engine.')); - } - - // TODO: check user roles - } catch (\Magento\Framework\Model\Exception $e) { - $this->_logger->logException($e); - throw new \Magento\Framework\Model\Exception(__($e->getMessage())); - } catch (\Exception $e) { - $this->_logger->logException($e); - throw new \Magento\Framework\Model\Exception(__('Something went wrong while connecting to the database.')); - } - - return $data; - } - - /** - * Check database connection data - * - * @param array $data - * @return array - */ - protected function _getCheckedData($data) - { - if (!isset($data['db_name']) || empty($data['db_name'])) { - throw new \Magento\Framework\Model\Exception(__('The Database Name field cannot be empty.')); - } - //make all table prefix to lower letter - if ($data['db_prefix'] != '') { - $data['db_prefix'] = strtolower($data['db_prefix']); - } - //check table prefix - if ($data['db_prefix'] != '') { - if (!preg_match('/^[a-z]+[a-z0-9_]*$/', $data['db_prefix'])) { - throw new \Magento\Framework\Model\Exception( - __( - 'The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.' - ) - ); - } - } - //set db type according the db model - if (!isset($data['db_type'])) { - $data['db_type'] = isset( - $this->_dbConfig[(string)$data['db_model']]['type'] - ) ? $this->_dbConfig[(string)$data['db_model']]['type'] : null; - } - - $dbResource = $this->_getDbResource(); - $data['db_pdo_type'] = $dbResource->getPdoType(); - - if (!isset($data['db_init_statements'])) { - $data['db_init_statements'] = isset( - $this->_dbConfig[(string)$data['db_model']]['initStatements'] - ) ? $this->_dbConfig[(string)$data['db_model']]['initStatements'] : null; - } - - return $data; - } - - /** - * Retrieve the database resource - * - * @return \Magento\Install\Model\Installer\Db\AbstractDb - * @throws \Magento\Framework\Model\Exception - */ - protected function _getDbResource() - { - if (!isset($this->_dbResource)) { - $this->_dbResource = $this->_dbFactory->get('mysql4'); - } - return $this->_dbResource; - } -} diff --git a/app/code/Magento/Install/Model/Installer/Db/AbstractDb.php b/app/code/Magento/Install/Model/Installer/Db/AbstractDb.php deleted file mode 100644 index 918b2ed34155a7ff0b6fadc14b6f21bf8d60a8d7..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer/Db/AbstractDb.php +++ /dev/null @@ -1,203 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Abstract resource data model - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Install\Model\Installer\Db; - -abstract class AbstractDb -{ - /** - * Resource connection adapter factory - * - * @var \Magento\Framework\Model\Resource\Type\Db\Pdo\MysqlFactory - */ - protected $_adapterFactory; - - /** - * List of necessary extensions for DBs - * - * @var array - */ - protected $_dbExtensions; - - /** - * Adapter instance - * - * @var \Magento\Framework\DB\Adapter\AdapterInterface - */ - protected $_connection; - - /** - * Connection configuration - * - * @var array - */ - protected $_connectionData; - - /** - * Connection configuration - * - * @var array - */ - protected $_configData; - - /** - * Configuration arguments - * - * @var \Magento\Framework\App\Arguments - */ - protected $_arguments; - - /** - * @param \Magento\Framework\Model\Resource\Type\Db\Pdo\MysqlFactory $adapterFactory - * @param \Magento\Framework\App\Arguments $arguments - * @param array $dbExtensions - */ - public function __construct( - \Magento\Framework\Model\Resource\Type\Db\Pdo\MysqlFactory $adapterFactory, - \Magento\Framework\App\Arguments $arguments, - array $dbExtensions = array() - ) { - $this->_adapterFactory = $adapterFactory; - $this->_dbExtensions = $dbExtensions; - $this->_arguments = $arguments; - } - - /** - * Return the name of DB model from config - * - * @return string - */ - public function getModel() - { - return $this->_configData['db_model']; - } - - /** - * Return the DB type from config - * - * @return string - */ - public function getType() - { - return $this->_configData['db_type']; - } - - /** - * Set configuration data - * - * @param array $config the connection configuration - * @return void - */ - public function setConfig($config) - { - $this->_configData = $config; - } - - /** - * Retrieve connection data from config - * - * @return array - */ - public function getConnectionData() - { - if (!$this->_connectionData) { - if ($this->_configData) { - $connectionData = array( - 'host' => $this->_configData['db_host'], - 'username' => $this->_configData['db_user'], - 'password' => $this->_configData['db_pass'], - 'dbName' => $this->_configData['db_name'], - 'pdoType' => $this->getPdoType() - ); - } else { - $default = $this->_arguments->getConnection('default'); - $connectionData = array( - 'host' => $default['host'], - 'username' => $default['username'], - 'password' => $default['password'], - 'dbName' => $default['dbName'], - 'pdoType' => $this->getPdoType() - ); - } - $this->_connectionData = $connectionData; - } - return $this->_connectionData; - } - - /** - * Check InnoDB support - * - * @return bool - */ - public function supportEngine() - { - return true; - } - - /** - * Create new connection with custom config - * - * @return \Magento\Framework\DB\Adapter\AdapterInterface - */ - protected function _getConnection() - { - if (!isset($this->_connection)) { - $connection = $this->_adapterFactory->create($this->getConnectionData())->getConnection(); - $this->_connection = $connection; - } - return $this->_connection; - } - - /** - * Return pdo type - * - * @return null - */ - public function getPdoType() - { - return null; - } - - /** - * Retrieve required PHP extension list for database - * - * @return array - */ - public function getRequiredExtensions() - { - return isset($this->_dbExtensions[$this->getModel()]) ? $this->_dbExtensions[$this->getModel()] : array(); - } - - /** - * Clean up database - * - * @return void - */ - abstract public function cleanUpDatabase(); -} diff --git a/app/code/Magento/Install/Model/Installer/Db/Mysql4.php b/app/code/Magento/Install/Model/Installer/Db/Mysql4.php deleted file mode 100644 index f1b25bdbaccf81771dc89045215908532e07e04e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer/Db/Mysql4.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * Mysql resource data model - */ -namespace Magento\Install\Model\Installer\Db; - -class Mysql4 extends \Magento\Install\Model\Installer\Db\AbstractDb -{ - /** - * Retrieve DB server version - * - * @return string (string version number | 'undefined') - */ - public function getVersion() - { - $version = $this->_getConnection()->fetchOne('SELECT VERSION()'); - $version = $version ? $version : 'undefined'; - $match = array(); - if (preg_match("#^([0-9\.]+)#", $version, $match)) { - $version = $match[0]; - } - return $version; - } - - /** - * Check InnoDB support - * - * @return bool - */ - public function supportEngine() - { - $variables = $this->_getConnection()->fetchPairs('SHOW ENGINES'); - return isset($variables['InnoDB']) && ($variables['InnoDB'] == 'DEFAULT' || $variables['InnoDB'] == 'YES'); - } - - /** - * {@inheritdoc} - */ - public function cleanUpDatabase() - { - $connectionData = $this->getConnectionData(); - $connection = $this->_getConnection(); - $connection->query('DROP DATABASE IF EXISTS ' . $connectionData['dbName']); - $connection->query('CREATE DATABASE ' . $connectionData['dbName']); - } -} diff --git a/app/code/Magento/Install/Model/Installer/Filesystem.php b/app/code/Magento/Install/Model/Installer/Filesystem.php deleted file mode 100644 index 0a5554f6fdd3671a8ed344d563dc0be704413c3d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer/Filesystem.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model\Installer; - -use Magento\Framework\App\Filesystem\DirectoryList; - -/** - * Filesystem installer - */ -class Filesystem -{ - /**#@+ - * @deprecated since 1.7.1.0 - */ - const MODE_WRITE = 'write'; - - const MODE_READ = 'read'; - - /**#@- */ - - /** - * @var \Magento\Framework\Filesystem - */ - protected $_filesystem; - - /** - * Install Config - * - * @var \Magento\Install\Model\Config - */ - protected $_installConfig; - - /** - * Application Root Directory - * - * @var string - */ - protected $_appRootDir; - - /** - * @var \Magento\Framework\Message\ManagerInterface - */ - protected $messageManager; - - /** - * @param \Magento\Framework\Filesystem $filesystem - * @param \Magento\Install\Model\Config $installConfig - * @param \Magento\Framework\Message\ManagerInterface $messageManager - */ - public function __construct( - \Magento\Framework\Filesystem $filesystem, - \Magento\Install\Model\Config $installConfig, - \Magento\Framework\Message\ManagerInterface $messageManager - ) { - $this->_filesystem = $filesystem; - $this->_installConfig = $installConfig; - $this->messageManager = $messageManager; - } - - /** - * Check and prepare file system - * - * @return $this - * @throws \Exception - */ - public function install() - { - if (!$this->_checkFilesystem()) { - throw new \Exception(); - } - return $this; - } - - /** - * Check file system by config - * - * @return bool - */ - protected function _checkFilesystem() - { - $res = true; - $config = $this->_installConfig->getWritableFullPathsForCheck(); - - if (is_array($config)) { - foreach ($config as $item) { - $recursive = isset($item['recursive']) ? (bool)$item['recursive'] : false; - $existence = isset($item['existence']) ? (bool)$item['existence'] : false; - $checkRes = $this->_checkFullPath($item['path'], $recursive, $existence); - $res = $res && $checkRes; - } - } - return $res; - } - - /** - * Check file system full path - * - * @param string $fullPath - * @param bool $recursive - * @param bool $existence - * @return bool - */ - protected function _checkFullPath($fullPath, $recursive, $existence) - { - $result = true; - $directory = $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT); - $path = $directory->getRelativePath($fullPath); - if ($recursive && $directory->isDirectory($path)) { - $pathsToCheck = $directory->read($path); - array_unshift($pathsToCheck, $path); - } else { - $pathsToCheck = array($path); - } - - $skipFileNames = array('.svn', '.htaccess'); - foreach ($pathsToCheck as $pathToCheck) { - if (in_array(basename($pathToCheck), $skipFileNames)) { - continue; - } - - if ($existence) { - $setError = !$directory->isWritable($path); - } else { - $setError = $directory->isExist($path) && !$directory->isWritable($path); - } - - if ($setError) { - $this->messageManager->addError(__('Path "%1" must be writable.', $pathToCheck)); - $result = false; - } - } - - return $result; - } -} diff --git a/app/code/Magento/Install/Model/Installer/Pear.php b/app/code/Magento/Install/Model/Installer/Pear.php deleted file mode 100644 index 099ed6f848ed54e062ea646f861b077261e3b819..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Installer/Pear.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model\Installer; - -/** - * PEAR Packages Download Manager - */ -class Pear -{ - /** - * @var \Magento\Framework\Message\ManagerInterface - */ - protected $messageManager; - - /** - * @param \Magento\Framework\Message\ManagerInterface $messageManager - */ - public function __construct( - \Magento\Framework\Message\ManagerInterface $messageManager - ) { - $this->messageManager = $messageManager; - } - - /** - * @return string[] - */ - public function getPackages() - { - $packages = array( - 'pear/PEAR-stable', - 'connect.magentocommerce.com/core/Magento_Pear_Helpers', - 'connect.magentocommerce.com/core/Lib_ZF', - 'connect.magentocommerce.com/core/Lib_Varien', - 'connect.magentocommerce.com/core/Magento_All', - 'connect.magentocommerce.com/core/Interface_Frontend_Default', - 'connect.magentocommerce.com/core/Interface_Adminhtml_Default', - 'connect.magentocommerce.com/core/Interface_Install_Default' - ); - return $packages; - } - - /** - * @return bool - */ - public function checkDownloads() - { - $pear = new \Magento\Framework\Pear(); - $pkg = new PEAR_PackageFile($pear->getConfig(), false); - $result = true; - foreach ($this->getPackages() as $package) { - $obj = $pkg->fromAnyFile($package, PEAR_VALIDATE_NORMAL); - if (PEAR::isError($obj)) { - $uinfo = $obj->getUserInfo(); - if (is_array($uinfo)) { - foreach ($uinfo as $message) { - if (is_array($message)) { - $message = $message['message']; - } - $this->messageManager->addError($message); - } - } else { - print_r($obj->getUserInfo()); - } - $result = false; - } - } - return $result; - } -} diff --git a/app/code/Magento/Install/Model/Setup.php b/app/code/Magento/Install/Model/Setup.php deleted file mode 100644 index 16df1c20cecac8dbe385dc9d0ccb6157ffe75d85..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Setup.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model; - -class Setup extends \Magento\Framework\Module\Setup -{ - /** - * Save configuration data - * - * @param string $path - * @param string $value - * @param int|string $scope - * @param int $scopeId - * @return $this - */ - public function setConfigData($path, $value, $scope = \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT, $scopeId = 0) - { - $table = $this->getTable('core_config_data'); - // this is a fix for mysql 4.1 - $this->getConnection()->showTableStatus($table); - - $data = array('scope' => $scope, 'scope_id' => $scopeId, 'path' => $path, 'value' => $value); - $this->getConnection()->insertOnDuplicate($table, $data, array('value')); - return $this; - } -} diff --git a/app/code/Magento/Install/Model/Survey.php b/app/code/Magento/Install/Model/Survey.php deleted file mode 100644 index 1278e3938f4b25bdd93701ccbddbf0d9c74a657d..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Survey.php +++ /dev/null @@ -1,141 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * Installation survey model - */ -namespace Magento\Install\Model; - -class Survey -{ - const SURVEY_URL = 'www.magentocommerce.com/instsurvey.html'; - - /** - * @var string - */ - protected $_flagCode = 'install_survey'; - - /** - * @var \Magento\Framework\Flag - */ - protected $_flagModel = null; - - /** - * @var \Magento\Framework\FlagFactory - */ - protected $_flagFactory; - - /** - * @var \Magento\Framework\App\RequestInterface - */ - protected $_request; - - /** - * @param \Magento\Framework\FlagFactory $flagFactory - * @param \Magento\Framework\App\RequestInterface $request - */ - public function __construct( - \Magento\Framework\FlagFactory $flagFactory, - \Magento\Framework\App\RequestInterface $request - ) { - $this->_request = $request; - $this->_flagFactory = $flagFactory; - } - - /** - * Check if survey url valid (exists) or not - * - * @return bool - */ - public function isSurveyUrlValid() - { - $curl = new \Magento\Framework\HTTP\Adapter\Curl(); - $curl->setConfig(array('timeout' => 5))->write(\Zend_Http_Client::GET, $this->getSurveyUrl(), '1.0'); - $response = $curl->read(); - $curl->close(); - - if (\Zend_Http_Response::extractCode($response) == 200) { - return true; - } - return false; - } - - /** - * Return survey url - * - * @return string - */ - public function getSurveyUrl() - { - $host = $this->_request->isSecure() ? 'https://' : 'http://'; - return $host . self::SURVEY_URL; - } - - /** - * Return core flag model - * - * @return \Magento\Framework\Flag - */ - protected function _getFlagModel() - { - if ($this->_flagModel === null) { - $this->_flagModel = $this->_flagFactory->create( - array('data' => array('flag_code' => $this->_flagCode)) - )->loadSelf(); - } - return $this->_flagModel; - } - - /** - * Check if survey question was already asked - * or survey url was viewed during installation process - * - * @return boolean - */ - public function isSurveyViewed() - { - $flagData = $this->_getFlagModel()->getFlagData(); - if (isset($flagData['survey_viewed']) && $flagData['survey_viewed'] == 1) { - return true; - } - return false; - } - - /** - * Save survey viewed flag in core flag - * - * @param boolean $viewed - * @return void - */ - public function saveSurveyViewed($viewed) - { - $flagData = $this->_getFlagModel()->getFlagData(); - if (is_null($flagData)) { - $flagData = array(); - } - $flagData = array_merge($flagData, array('survey_viewed' => (bool)$viewed)); - $this->_getFlagModel()->setFlagData($flagData)->save(); - } -} diff --git a/app/code/Magento/Install/Model/System/Message/Survey.php b/app/code/Magento/Install/Model/System/Message/Survey.php deleted file mode 100644 index 3d516ed61c2a18309619b116c1e06f4357de8ca7..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/System/Message/Survey.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model\System\Message; - -class Survey implements \Magento\Framework\Notification\MessageInterface -{ - /** - * @var \Magento\Backend\Model\Auth\Session - */ - protected $_authSession; - - /** - * @var \Magento\Framework\AuthorizationInterface - */ - protected $_authorization; - - /** - * @var \Magento\Framework\UrlInterface - */ - protected $_urlBuilder; - - /** - * @var \Magento\Install\Model\Survey - */ - protected $_survey; - - /** - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Framework\AuthorizationInterface $authorization - * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Magento\Install\Model\Survey $survey - */ - public function __construct( - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Framework\AuthorizationInterface $authorization, - \Magento\Framework\UrlInterface $urlBuilder, - \Magento\Install\Model\Survey $survey - ) { - $this->_authorization = $authorization; - $this->_authSession = $authSession; - $this->_urlBuilder = $urlBuilder; - $this->_survey = $survey; - } - - /** - * Return survey url - * - * @return string - */ - public function getSurveyUrl() - { - return $this->_survey->getSurveyUrl(); - } - - /** - * Retrieve unique message identity - * - * @return string - */ - public function getIdentity() - { - return md5('survey' . $this->getSurveyUrl()); - } - - /** - * Check whether survey question can show - * - * @return bool - */ - public function isDisplayed() - { - if ($this->_authSession->getHideSurveyQuestion() || false == $this->_authorization->isAllowed( - null - ) || $this->_survey->isSurveyViewed() || false == $this->_survey->isSurveyUrlValid() - ) { - return false; - } - - return true; - } - - /** - * Retrieve message text - * - * @return string - */ - public function getText() - { - $params = array( - 'actionLink' => array( - 'event' => 'surveyYes', - 'eventData' => array( - 'surveyUrl' => $this->_survey->getSurveyUrl(), - 'surveyAction' => $this->_urlBuilder->getUrl('*/survey/index', array('_current' => true)), - 'decision' => 'yes' - ) - ) - ); - return __( - 'We appreciate our merchants\' feedback. Please <a href="#" data-mage-init="%1">take our survey</a> and tell us about features you\'d like to see in Magento.', - json_encode($params, JSON_FORCE_OBJECT) - ); - } - - /** - * Retrieve message severity - * - * @return int - */ - public function getSeverity() - { - return \Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR; - } -} diff --git a/app/code/Magento/Install/Model/Uninstaller.php b/app/code/Magento/Install/Model/Uninstaller.php deleted file mode 100644 index 1b10a831c0920bbdf65477227dad2e39068f2745..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Uninstaller.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Install\Model; - -use Magento\Framework\Filesystem; -use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\Filesystem\FilesystemException; - -/** - * A model for uninstalling Magento application - */ -class Uninstaller -{ - /** - * A service for cleaning up directories - * - * @var Filesystem - */ - protected $filesystem; - - /** - * A service for recreating database - * - * @var Installer\Db\Mysql4 - */ - private $db; - - /** - * Logger - * - * @var \Zend_Log - */ - private $log; - - /** - * Constructor - * - * @param Filesystem $filesystem - * @param Installer\Db\Mysql4 $db - * @param \Zend_Log $log - */ - public function __construct( - Filesystem $filesystem, - Installer\Db\Mysql4 $db, - \Zend_Log $log - ) { - $this->filesystem = $filesystem; - $this->db = $db; - $this->log = $log; - } - - /** - * Uninstalls the application - * - * @return void - */ - public function uninstall() - { - $this->log('Starting uninstall'); - $this->recreateDatabase(); - $this->log('File system cleanup:'); - $this->deleteDirContents(DirectoryList::VAR_DIR); - $this->deleteDirContents(DirectoryList::STATIC_VIEW); - $this->deleteLocalXml(); - $this->log('Uninstall complete.'); - } - - /** - * Log output - * - * @param string $message - * @param int $level - * @return void - */ - private function log($message, $level = \Zend_Log::INFO) - { - $this->log->log($message, $level); - } - - /** - * Deletes the database and creates it again - * - * @return void - */ - private function recreateDatabase() - { - $connectionData = $this->db->getConnectionData(); - if (empty($connectionData['dbName'])) { - $this->log('No database connection defined - skipping cleanup'); - } else { - $this->log("Recreating database '{$connectionData['dbName']}'"); - $this->db->cleanUpDatabase(); - } - } - - /** - * Removes contents of a directory - * - * @param string $type - * @return void - */ - private function deleteDirContents($type) - { - $dir = $this->filesystem->getDirectoryWrite($type); - $dirPath = $dir->getAbsolutePath(); - foreach ($dir->read() as $path) { - if (preg_match('/^\./', $path)) { - continue; - } - $this->log("{$dirPath}{$path}"); - try { - $dir->delete($path); - } catch (FilesystemException $e) { - $this->log($e->getMessage()); - } - } - } - - /** - * Removes deployment configuration - * - * @return void - */ - protected function deleteLocalXml() - { - $configDir = $this->filesystem->getDirectoryWrite(DirectoryList::CONFIG); - $localXml = "{$configDir->getAbsolutePath()}local.xml"; - if (!$configDir->isFile('local.xml')) { - $this->log("The file '{$localXml}' doesn't exist - skipping cleanup"); - return; - } - try { - $this->log($localXml); - $configDir->delete('local.xml'); - } catch (FilesystemException $e) { - $this->log($e->getMessage()); - } - } -} diff --git a/app/code/Magento/Install/Model/Wizard.php b/app/code/Magento/Install/Model/Wizard.php deleted file mode 100644 index ee0c4cafbddb58d39c82f34b0eecc6734f833f50..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/Model/Wizard.php +++ /dev/null @@ -1,162 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Installation wizard model - */ -namespace Magento\Install\Model; - -use Magento\Framework\UrlInterface; - -class Wizard -{ - /** - * Wizard configuration - * - * @var array - */ - protected $_steps = array(); - - /** - * Url builder - * - * @var UrlInterface - */ - protected $_urlBuilder; - - /** - * Init install wizard - * @param UrlInterface $urlBuilder - * @param Config $installConfig - */ - public function __construct(UrlInterface $urlBuilder, Config $installConfig) - { - $this->_steps = $installConfig->getWizardSteps(); - $this->_urlBuilder = $urlBuilder; - $this->_initSteps(); - } - - /** - * @return void - */ - protected function _initSteps() - { - foreach (array_keys($this->_steps) as $index) { - $this->_steps[$index]->setUrl( - $this->_getUrl($this->_steps[$index]->getController(), $this->_steps[$index]->getAction()) - ); - - if (isset($this->_steps[$index + 1])) { - $this->_steps[$index]->setNextUrl( - $this->_getUrl($this->_steps[$index + 1]->getController(), $this->_steps[$index + 1]->getAction()) - ); - $this->_steps[$index]->setNextUrlPath( - $this->_getUrlPath( - $this->_steps[$index + 1]->getController(), - $this->_steps[$index + 1]->getAction() - ) - ); - } - if (isset($this->_steps[$index - 1])) { - $this->_steps[$index]->setPrevUrl( - $this->_getUrl($this->_steps[$index - 1]->getController(), $this->_steps[$index - 1]->getAction()) - ); - $this->_steps[$index]->setPrevUrlPath( - $this->_getUrlPath( - $this->_steps[$index - 1]->getController(), - $this->_steps[$index - 1]->getAction() - ) - ); - } - } - } - - /** - * Get wizard step by request - * - * @param \Magento\Framework\App\RequestInterface $request - * @return \Magento\Framework\Object|bool - */ - public function getStepByRequest(\Magento\Framework\App\RequestInterface $request) - { - foreach ($this->_steps as $step) { - if ($step->getController() == $request->getControllerName() && - $step->getAction() == $request->getActionName() - ) { - return $step; - } - } - return false; - } - - /** - * Get wizard step by name - * - * @param string $name - * @return \Magento\Framework\Object|bool - */ - public function getStepByName($name) - { - foreach ($this->_steps as $step) { - if ($step->getName() == $name) { - return $step; - } - } - return false; - } - - /** - * Get all wizard steps - * - * @return array - */ - public function getSteps() - { - return $this->_steps; - } - - /** - * Get url - * - * @param string $controller - * @param string $action - * @return string - */ - protected function _getUrl($controller, $action) - { - return $this->_urlBuilder->getUrl($this->_getUrlPath($controller, $action)); - } - - /** - * Retrieve Url Path - * - * @param string $controller - * @param string $action - * @return string - */ - protected function _getUrlPath($controller, $action) - { - return 'install/' . $controller . '/' . $action; - } -} diff --git a/app/code/Magento/Install/composer.json b/app/code/Magento/Install/composer.json deleted file mode 100644 index 1e7a486d77ab1d285c4c0ce11e1192bcede6e59b..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/composer.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "magento/module-install", - "description": "N/A", - "require": { - "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-user": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", - "magento/magento-composer-installer": "*" - }, - "type": "magento2-module", - "version": "0.1.0-alpha102", - "extra": { - "map": [ - [ - "*", - "Magento/Install" - ] - ] - } -} diff --git a/app/code/Magento/Install/etc/di.xml b/app/code/Magento/Install/etc/di.xml deleted file mode 100644 index d937d383f98abdc68a19b65f66c36abf3d3e069e..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/di.xml +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <preference for="Magento\Framework\View\Design\Theme\ListInterface" type="Magento\Core\Model\Theme\Collection" /> - <preference for="Magento\Framework\Module\ResourceInterface" type="Magento\Install\Model\Resource\Resource" /> - <virtualType name="Magento\Install\Model\Session\Storage" type="Magento\Framework\Session\Storage"> - <arguments> - <argument name="namespace" xsi:type="string">install</argument> - </arguments> - </virtualType> - <virtualType name="Magento\Install\Model\Session" type="Magento\Framework\Session\Generic"> - <arguments> - <argument name="storage" xsi:type="object">Magento\Install\Model\Session\Storage</argument> - </arguments> - </virtualType> - <type name="Magento\Framework\Notification\MessageList"> - <arguments> - <argument name="messages" xsi:type="array"> - <item name="survey" xsi:type="string">Magento\Install\Model\System\Message\Survey</item> - </argument> - </arguments> - </type> - <type name="Magento\Install\Block\End"> - <arguments> - <argument name="cryptKey" xsi:type="init_parameter">Magento\Framework\Encryption\Encryptor::PARAM_CRYPT_KEY</argument> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Install\Model\Installer\Db"> - <arguments> - <argument name="dbConfig" xsi:type="array"> - <item name="mysql4" xsi:type="array"> - <item name="type" xsi:type="string">pdo_mysql</item> - <item name="initStatements" xsi:type="string">SET NAMES utf8</item> - <item name="min_version" xsi:type="string">4.1.20</item> - </item> - </argument> - </arguments> - </type> - <type name="Magento\Install\Model\Installer\Db\AbstractDb"> - <arguments> - <argument name="dbExtensions" xsi:type="array"> - <item name="mysql4" xsi:type="array"> - <item name="pdo" xsi:type="string">pdo_mysql</item> - </item> - </argument> - </arguments> - </type> - <type name="Magento\Install\Model\Config\Reader"> - <arguments> - <argument name="fileName" xsi:type="string">install_wizard.xml</argument> - <argument name="converter" xsi:type="object">Magento\Install\Model\Config\Converter</argument> - <argument name="schemaLocator" xsi:type="object">Magento\Install\Model\Config\SchemaLocator</argument> - </arguments> - </type> - <type name="Magento\Install\Model\Config\Data"> - <arguments> - <argument name="reader" xsi:type="object">Magento\Install\Model\Config\Reader</argument> - <argument name="cacheId" xsi:type="string">install_wizard_config</argument> - </arguments> - </type> - <type name="Magento\Install\Block\AbstractBlock"> - <arguments> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Install\Block\Config"> - <arguments> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Install\Block\Locale"> - <arguments> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Install\Block\Db\Main"> - <arguments> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Install\Block\Db\Type"> - <arguments> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Install\Model\Installer"> - <arguments> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Install\Model\Observer"> - <arguments> - <argument name="session" xsi:type="object">Magento\Install\Model\Session</argument> - </arguments> - </type> - <type name="Magento\Framework\App\AreaList"> - <arguments> - <argument name="areas" xsi:type="array"> - <item name="install" xsi:type="array"> - <item name="frontName" xsi:type="string">install</item> - <item name="router" xsi:type="string">install</item> - </item> - </argument> - </arguments> - </type> - <type name="Magento\Backend\Model\Url\ScopeResolver" shared="false"> - <arguments> - <argument name="areaCode" xsi:type="string">adminhtml</argument> - </arguments> - </type> - <type name="Magento\Install\Model\Setup"> - <arguments> - <argument name="resourceName" xsi:type="string">core_setup</argument> - <argument name="moduleName" xsi:type="string">Magento_Core</argument> - </arguments> - </type> -</config> diff --git a/app/code/Magento/Install/etc/frontend/di.xml b/app/code/Magento/Install/etc/frontend/di.xml deleted file mode 100644 index c4f97b70589bdc9a9da25dd0d7f048115a7df3ea..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/frontend/di.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <type name="Magento\Core\Model\Url\SecurityInfo"> - <arguments> - <argument name="secureUrlList" xsi:type="array"> - <item name="install" xsi:type="string">/install/wizard/checkSecureHost</item> - </argument> - </arguments> - </type> - <virtualType name="Magento\Install\Model\Session\Storage" type="Magento\Framework\Session\Storage"> - <arguments> - <argument name="namespace" xsi:type="string">install</argument> - </arguments> - </virtualType> - <type name="Magento\Install\Model\Session"> - <arguments> - <argument name="storage" xsi:type="object">Magento\Install\Model\Session\Storage</argument> - </arguments> - </type> -</config> diff --git a/app/code/Magento/Install/etc/install/di.xml b/app/code/Magento/Install/etc/install/di.xml deleted file mode 100644 index 4bb37d60fd469bb13453241b813d3c373867ff31..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/install/di.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <preference for="Magento\Core\Model\Theme" type="Magento\Core\Model\Theme\Data" /> -</config> diff --git a/app/code/Magento/Install/etc/install/events.xml b/app/code/Magento/Install/etc/install/events.xml deleted file mode 100644 index 5f027077cba44aeb4808e894d9e2b1c6dd65395f..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/install/events.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd"> - <event name="core_locale_set_locale"> - <observer name="bind_locale" instance="Magento\Install\Model\Observer" method="bindLocale" /> - </event> -</config> diff --git a/app/code/Magento/Install/etc/install_wizard.xml b/app/code/Magento/Install/etc/install_wizard.xml deleted file mode 100644 index 9ae375da36c5d8331b12f6d07f76ba57bc82cab4..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/install_wizard.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./install_wizard.xsd"> - <steps> - <step id="begin" controller="wizard" action="begin"> - <label translate="true">License Agreement</label> - </step> - <step id="locale" controller="wizard" action="locale"> - <label translate="true">Localization</label> - </step> - <step id="config" controller="wizard" action="config"> - <label translate="true">Configuration</label> - </step> - <step id="administrator" controller="wizard" action="administrator"> - <label translate="true">Create Admin Account</label> - </step> - <step id="end" controller="wizard" action="end"> - <label translate="true">You're All Set!</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" recursive="false" existence="true" writable="true" /> - <directory alias="var" recursive="true" existence="true" writable="true" /> - <directory alias="media" recursive="true" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/app/code/Magento/Install/etc/install_wizard.xsd b/app/code/Magento/Install/etc/install_wizard.xsd deleted file mode 100644 index 438acd3194735949934d9eba94efdbd1cecd6d93..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/install_wizard.xsd +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="install_wizard"> - <xs:annotation> - <xs:documentation> - Specifies install wizard configuration. - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:all> - <xs:element name="steps" type="stepsType" /> - <xs:element name='filesystem_prerequisites' type="filesystemPrerequisitesType" /> - </xs:all> - </xs:complexType> - </xs:element> - - <xs:complexType name="stepsType"> - <xs:sequence> - <xs:element name="step" type="stepType" minOccurs="1" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="stepType"> - <xs:annotation> - <xs:documentation> - The definition of the step. - </xs:documentation> - </xs:annotation> - <xs:sequence> - <xs:element name="label" type="translatableType" minOccurs="1" maxOccurs="1" /> - </xs:sequence> - <xs:attribute name="id" type="xs:ID" use="required"/> - <xs:attribute name="controller" type="xs:token" use="required"/> - <xs:attribute name="action" type="xs:token" use="required"/> - </xs:complexType> - - <xs:complexType name="filesystemPrerequisitesType"> - <xs:sequence> - <xs:element name="directory" type="directoryType" minOccurs="1" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="directoryType"> - <xs:annotation> - <xs:documentation> - The requirement of a directory - </xs:documentation> - </xs:annotation> - <xs:attribute name="alias" type="xs:token" use="required"/> - <xs:attribute name="recursive" type="xs:boolean" use="required"/> - <xs:attribute name="existence" type="xs:boolean" use="required"/> - <xs:attribute name="writable" type="xs:boolean" use="required"/> - </xs:complexType> - - <xs:complexType name="translatableType"> - <xs:simpleContent> - <xs:extension base="xs:string"> - <xs:attribute name="translate" use="optional" fixed="true" type="xs:boolean"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> -</xs:schema> \ No newline at end of file diff --git a/app/code/Magento/Install/etc/install_wizard_file.xsd b/app/code/Magento/Install/etc/install_wizard_file.xsd deleted file mode 100644 index 03da7bcac97173612065231a76155fb6f776d5bf..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/install_wizard_file.xsd +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:element name="install_wizard"> - <xs:annotation> - <xs:documentation> - Specifies install wizard configuration. - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:all> - <xs:element name="steps" type="stepsType" /> - <xs:element name='filesystem_prerequisites' type="filesystemPrerequisitesType" /> - </xs:all> - </xs:complexType> - </xs:element> - - <xs:complexType name="stepsType"> - <xs:sequence> - <xs:element name="step" type="stepType" minOccurs="0" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="stepType"> - <xs:annotation> - <xs:documentation> - The definition of the step. - </xs:documentation> - </xs:annotation> - <xs:sequence> - <xs:element name="label" type="translatableType" minOccurs="0" maxOccurs="1" /> - </xs:sequence> - <xs:attribute name="id" type="xs:ID" use="required"/> - <xs:attribute name="controller" type="xs:token" use="optional"/> - <xs:attribute name="action" type="xs:token" use="optional"/> - </xs:complexType> - - <xs:complexType name="filesystemPrerequisitesType"> - <xs:sequence> - <xs:element name="directory" type="directoryType" minOccurs="0" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - - <xs:complexType name="directoryType"> - <xs:annotation> - <xs:documentation> - The requirement of a directory - </xs:documentation> - </xs:annotation> - <xs:attribute name="alias" type="xs:token" use="required"/> - <xs:attribute name="recursive" type="xs:boolean" use="optional"/> - <xs:attribute name="existence" type="xs:boolean" use="optional"/> - <xs:attribute name="writable" type="xs:boolean" use="optional"/> - </xs:complexType> - - <xs:complexType name="translatableType"> - <xs:simpleContent> - <xs:extension base="xs:string"> - <xs:attribute name="translate" use="optional" fixed="true" type="xs:boolean"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> -</xs:schema> \ No newline at end of file diff --git a/app/code/Magento/Install/etc/module.xml b/app/code/Magento/Install/etc/module.xml deleted file mode 100644 index 64f361175393ff1bf39b3874d06710feacc5dc42..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/etc/module.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> - <module name="Magento_Install" schema_version="0.7.0" active="true"> - <sequence> - <module name="Magento_Core"/> - <module name="Magento_Store"/> - </sequence> - <depends> - <module name="Magento_Store"/> - <module name="Magento_Directory"/> - <module name="Magento_User"/> - <module name="Magento_Backend"/> - <module name="Magento_Theme"/> - </depends> - </module> -</config> diff --git a/app/code/Magento/Install/i18n/de_DE.csv b/app/code/Magento/Install/i18n/de_DE.csv deleted file mode 100644 index 1d842842af3f40a72c1c50c583defc543f1b6f3f..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/i18n/de_DE.csv +++ /dev/null @@ -1,118 +0,0 @@ -"User Name",Benutzername -"First Name",Vorname -"Last Name",Nachname -Email,E-Mail -"Password Confirmation",Passwortbestätigung -Configuration,Konfiguration -"File System",Dateisystem -Database,Datenbank -Welcome,Wilkommen -"Personal Information","Persönliche Informationen" -"User Password",Benutzerpasswort -"Email Address",E-Mail-Adresse -Password,Passwort -"Confirm Password","Passwort bestätigen" -Continue,Fortsetzen -Download,Download -"Login Information","Login Informationen" -"Required Fields",Pflichtfelder -"Save Session Files In","Sessiondateien speichern in" -Locale,Sprachumgebung -"Time Zone",Zeitzone -"Default Currency",Standardwährung -Validation,Validierung -"Magento Connect Manager Deployment","Magento Verbindungsmanagerentwicklung" -"Downloading and installing Magento, please wait...","Magento wird heruntergeladen und installiert, bitte warten..." -"Setting preferred state to: %1","Setting preferred state to: %1" -"The URL ""%1"" is not accessible.","The URL ""%1"" is not accessible." -"The URL ""%1"" is invalid.","The URL ""%1"" is invalid." -"Response from the server is invalid.","Response from the server is invalid." -"PHP Extensions ""%1"" must be loaded.","PHP Extensions ""%1"" must be loaded." -"The database server version doesn't match system requirements (required: %1, actual: %2).","The database server version doesn't match system requirements (required: %1, actual: %2)." -"Database server does not support the InnoDB storage engine.","Der Datenbankserver unterstützt die InnoDB Storage-Engine nicht." -"Something went wrong while connecting to the database.","Something went wrong while connecting to the database." -"The Database Name field cannot be empty.","The Database Name field cannot be empty." -"The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.","The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter." -"Path ""%1"" must be writable.","Path ""%1"" must be writable." -"Welcome to Magento's Installation Wizard","Wilkommen zum Magento Installationsassistenten" -"I agree to the above terms and conditions.","Ich stimme den allgemeinen Geschäftsbedingungen zu." -"Web access options","Optionen für Webzugang" -"Base URL","Base URL" -"Admin Path","Admin Pfad" -"This is the additional path used after your base URL to access your store Admin (e.g, Admin).","This is the additional path used after your base URL to access your store Admin (e.g, Admin)." -"Enable Charts","Tabellen aktivieren" -"Enable this option if you want to see the charts on your dashboard.","Enable this option if you want to see the charts on your dashboard." -"Skip Base URL Validation Before the Next Step","Base URL Validierung vor dem nächsten Schritt überspringen" -"Check this box only if it is not possible to automatically validate the Base URL.","Wählen Sie diese Box nur an, wenn es nicht möglich ist, die Base URL automatisch zu validieren." -"Use Web Server (Apache) Rewrites","Webserver (Apache) Rewrites verwenden" -"You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.","You could enable this option to use web server rewrites functionality for improved Search Engine Optimization." -"Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.","Bitte gehen Sie sicher, dass <code>mod_rewrite</code> in der Apache Konfiguration aktiviert ist." -"Use Secure URLs (SSL)","Secure URLs (SSL) verwenden" -"Enable this option only if you have SSL available.","Aktivieren Sie diese Option nur, wenn Sie über SSL verfügen." -"Secure Base URL","Secure Base URL" -"Provide a complete base URL for SSL connection. For example: %1.","Provide a complete base URL for SSL connection. For example: %1." -"Run admin interface with SSL","Admininterface mit SSL ausführen" -"Skip Secure URL validation before next step","Base URL Validierung vor nächsten Schritt überspringen" -"Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.","Wählen Sie diese Box nur an, wenn es nicht möglich ist, die Secure URL automatisch zu validieren, wie zum Beispiel wenn eine HTTP Authentifizierung erforderlich ist." -"Session Storage Options","Session Storage Optionen" -"Save Session Data In","Sessiondaten speichern in" -"Please set all required settings before clicking ""Continue"".","Please set all required settings before clicking ""Continue""." -"Create Admin Account","Adminkonto erstellen" -Username,Benutzername -"Encryption Key",Kodierungsschlüssel -"Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page.","Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page." -Connection,Verbindung -"Database Connection",Datenbankverbindung -"Database Type",Datenbanktyp -Host,Host -"Database host",Datenbankhost -"You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock","Sie können den Server-Port spezifizieren, Ex.: Lokalhost:3307<br />Wenn Sie nicht den Standard-UNIX-Anschluss verwenden, können Sie dies hier anstelle des Host spezifizieren, Ex.: /var/run/mysqld/mysqld.sock" -"Database Name",Datenbankname -"Database user name","Datenbank Benutzername" -"Database user password","Datebank Benutzerpasswort" -"Tables Prefix",Tabellenpräfix -"(Optional. Leave blank for no prefix)","(Optional. Lassen Sie es aus, wenn sie kein Präfix brauchen)" -"All packages were installed. Click 'OK' to continue with installation.","All packages were installed. Click 'OK' to continue with installation." -"Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.","Something went wrong installing the Magento packages. Please read the log, correct any errors and try again." -"As another option, you could try the ""Manual Downloads and Upgrades"" method.","As another option, you could try the ""Manual Downloads and Upgrades"" method." -"Download Magento Core Modules and Updates","Magento Core Modules und Updates herunterladen" -"Full Download / SVN Installation","Volles Download / SVN Installation" -"If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.","Falls Sie das volle Package heruntergeladen oder Magento über SVN installiert haben, überspringen Sie Packageinstallation und Validierung indem Sie den untenstehenden Button klicken." -"Continue Full Download / SVN Installation","Vollen Download / SVN Installation fortfahren" -"Package Management through the Web","Packageverwaltung durch das Web" -"If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.","Falls Sie es wünschen Mangeto Packages durch das Web Admin Interface zu verwalten, müssen Sie webschreibbare Erlaubnis auf alle Magento Ordner und Dateien anwenden." -"If your server is running on MS Windows, most probably you will not need to change anything.","Falls Ihr Server auf MS Windows läuft, müssen Sie höchstwahrscheinlich nichts ändern." -"If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.","Falls Sie PHP als GCI benützen, könnten Ihre PHP Prozesse under dem selben User ausgeführt werden, der genutzt wurde um Magentodateien hochzuladen." -"In other cases you will need to make Magento files writeable for the user that the web server process is running under.","In anderen Fällen, müssen Sie Magento Dateien schreibbar für User, unter dem der Webserverprozess läuft, machen." -"Preferred stability: %1","Preferred stability: %1" -"This is the most stable state available for Magento packages.","This is the most stable state available for Magento packages." -"Choose this if you would like to test storefront and admin functionality.","Choose this if you would like to test storefront and admin functionality." -"Proceed With Automatic Download (%1)","Proceed With Automatic Download (%1)" -"If you are a developer and would like to have the latest public updates, choose this option.","Wenn Sie Entwickler sind und gerne die neusten öffentlichen Updates erhalten wollen, wählen Sie diese Option." -"Please note that it is much less stable than beta.","Bitte beachten Sie, dass es viel weniger stabil als beta ist." -"Manual Downloads and Upgrades","Manuelle Downloads und Upgrades" -"If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.","Falls Sie den Installationsassistenten über eine vorher heruntergeladene und installierte Magentoinstallation laufen lassen wollen, fahren Sie mit dieser Method fort." -"If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.","Falls Sie es nicht wünschen oder nicht in der Lage sind, Magento Ordner schreibbar für Webprozessierung zu machen, können Sie PEAR verwenden, welches im Rootverzeichnis der Magentoinstallation zu finden ist." -"Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.","Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option." -"Run this in your shell from Magento root folder:","Führen Sie dies in Ihrer Shell aus dem Magento Rootordner aus:" -"Click the button below when the installation is finished.","Click the button below when the installation is finished." -"Continue After Manual Download","Nach manuellem Download fortfahren" -"You're All Set","Sie sind bereit" -"Get ready to experience Open-Source eCommerce Evolved.","Machen Sie sich bereit, Open-Source eCommerce Evolved zu erleben." -"Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).","Bevor Sie zu Ihrem Shop gehen, bitte beachten Sie Ihren Kodierungsschlüssel. (Magento verwendet ihn um Passwörter, Kreditkarten und mehr zu verschlüsseln)." -"(Make sure you keep it in a safe place.)","(Bitte bewahren Sie es sicher auf.)" -"Go to Frontend","Zum Frontend gehen" -"Go to Backend","Zum Backend gehen" -Localization,Lokalisierung -"Locale settings",Spracheinstellungen -"Magento Installation Wizard","Magento Installationsassistent" -Magento,Magento -"Help Us Keep Magento Healthy","Help Us Keep Magento Healthy" -"Report All Bugs","Alle Bugs Melden" -"(ver. %1)","(ver. %1)" -Installation,Installation -"Having trouble installing Magento?","Probleme bei der Installation von Magento?" -"Check out our","Probieren Sie unser" -"Installation Guide",Installationsanleitung -"License Agreement",Linzenvereinbarung -"You're All Set!","Sie sind bereit!" diff --git a/app/code/Magento/Install/i18n/en_US.csv b/app/code/Magento/Install/i18n/en_US.csv deleted file mode 100644 index 1a79f03cf1747f311f9d4241d291babe00f743b0..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/i18n/en_US.csv +++ /dev/null @@ -1,118 +0,0 @@ -"User Name","User Name" -"First Name","First Name" -"Last Name","Last Name" -Email,Email -"Password Confirmation","Password Confirmation" -Configuration,Configuration -"File System","File System" -Database,Database -Welcome,Welcome -"Personal Information","Personal Information" -"User Password","User Password" -"Email Address","Email Address" -Password,Password -"Confirm Password","Confirm Password" -Continue,Continue -Download,Download -"Login Information","Login Information" -"Required Fields","Required Fields" -"Save Session Files In","Save Session Files In" -Locale,Locale -"Time Zone","Time Zone" -"Default Currency","Default Currency" -Validation,Validation -"Magento Connect Manager Deployment","Magento Connect Manager Deployment" -"Downloading and installing Magento, please wait...","Downloading and installing Magento, please wait..." -"Setting preferred state to: %1","Setting preferred state to: %1" -"The URL ""%1"" is not accessible.","The URL ""%1"" is not accessible." -"The URL ""%1"" is invalid.","The URL ""%1"" is invalid." -"Response from the server is invalid.","Response from the server is invalid." -"PHP Extensions ""%1"" must be loaded.","PHP Extensions ""%1"" must be loaded." -"The database server version doesn't match system requirements (required: %1, actual: %2).","The database server version doesn't match system requirements (required: %1, actual: %2)." -"Database server does not support the InnoDB storage engine.","Database server does not support the InnoDB storage engine." -"Something went wrong while connecting to the database.","Something went wrong while connecting to the database." -"The Database Name field cannot be empty.","The Database Name field cannot be empty." -"The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.","The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter." -"Path ""%1"" must be writable.","Path ""%1"" must be writable." -"Welcome to Magento's Installation Wizard","Welcome to Magento's Installation Wizard" -"I agree to the above terms and conditions.","I agree to the above terms and conditions." -"Web access options","Web access options" -"Base URL","Base URL" -"Admin Path","Admin Path" -"This is the additional path used after your base URL to access your store Admin (e.g, Admin).","This is the additional path used after your base URL to access your store Admin (e.g, Admin)." -"Enable Charts","Enable Charts" -"Enable this option if you want to see the charts on your dashboard.","Enable this option if you want to see the charts on your dashboard." -"Skip Base URL Validation Before the Next Step","Skip Base URL Validation Before the Next Step" -"Check this box only if it is not possible to automatically validate the Base URL.","Check this box only if it is not possible to automatically validate the Base URL." -"Use Web Server (Apache) Rewrites","Use Web Server (Apache) Rewrites" -"You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.","You could enable this option to use web server rewrites functionality for improved Search Engine Optimization." -"Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.","Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration." -"Use Secure URLs (SSL)","Use Secure URLs (SSL)" -"Enable this option only if you have SSL available.","Enable this option only if you have SSL available." -"Secure Base URL","Secure Base URL" -"Provide a complete base URL for SSL connection. For example: %1.","Provide a complete base URL for SSL connection. For example: %1." -"Run admin interface with SSL","Run admin interface with SSL" -"Skip Secure URL validation before next step","Skip Secure URL validation before next step" -"Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.","Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required." -"Session Storage Options","Session Storage Options" -"Save Session Data In","Save Session Data In" -"Please set all required settings before clicking ""Continue"".","Please set all required settings before clicking ""Continue""." -"Create Admin Account","Create Admin Account" -Username,Username -"Encryption Key","Encryption Key" -"Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page.","Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page." -Connection,Connection -"Database Connection","Database Connection" -"Database Type","Database Type" -Host,Host -"Database host","Database host" -"You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock","You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock" -"Database Name","Database Name" -"Database user name","Database user name" -"Database user password","Database user password" -"Tables Prefix","Tables Prefix" -"(Optional. Leave blank for no prefix)","(Optional. Leave blank for no prefix)" -"All packages were installed. Click 'OK' to continue with installation.","All packages were installed. Click 'OK' to continue with installation." -"Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.","Something went wrong installing the Magento packages. Please read the log, correct any errors and try again." -"As another option, you could try the ""Manual Downloads and Upgrades"" method.","As another option, you could try the ""Manual Downloads and Upgrades"" method." -"Download Magento Core Modules and Updates","Download Magento Core Modules and Updates" -"Full Download / SVN Installation","Full Download / SVN Installation" -"If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.","If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below." -"Continue Full Download / SVN Installation","Continue Full Download / SVN Installation" -"Package Management through the Web","Package Management through the Web" -"If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.","If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files." -"If your server is running on MS Windows, most probably you will not need to change anything.","If your server is running on MS Windows, most probably you will not need to change anything." -"If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.","If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files." -"In other cases you will need to make Magento files writeable for the user that the web server process is running under.","In other cases you will need to make Magento files writeable for the user that the web server process is running under." -"Preferred stability: %1","Preferred stability: %1" -"This is the most stable state available for Magento packages.","This is the most stable state available for Magento packages." -"Choose this if you would like to test storefront and admin functionality.","Choose this if you would like to test storefront and admin functionality." -"Proceed With Automatic Download (%1)","Proceed With Automatic Download (%1)" -"If you are a developer and would like to have the latest public updates, choose this option.","If you are a developer and would like to have the latest public updates, choose this option." -"Please note that it is much less stable than beta.","Please note that it is much less stable than beta." -"Manual Downloads and Upgrades","Manual Downloads and Upgrades" -"If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.","If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method." -"If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.","If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation." -"Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.","Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option." -"Run this in your shell from Magento root folder:","Run this in your shell from Magento root folder:" -"Click the button below when the installation is finished.","Click the button below when the installation is finished." -"Continue After Manual Download","Continue After Manual Download" -"You're All Set","You're All Set" -"Get ready to experience Open-Source eCommerce Evolved.","Get ready to experience Open-Source eCommerce Evolved." -"Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).","Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more)." -"(Make sure you keep it in a safe place.)","(Make sure you keep it in a safe place.)" -"Go to Frontend","Go to Frontend" -"Go to Backend","Go to Backend" -Localization,Localization -"Locale settings","Locale settings" -"Magento Installation Wizard","Magento Installation Wizard" -Magento,Magento -"Help Us Keep Magento Healthy","Help Us Keep Magento Healthy" -"Report All Bugs","Report All Bugs" -"(ver. %1)","(ver. %1)" -Installation,Installation -"Having trouble installing Magento?","Having trouble installing Magento?" -"Check out our","Check out our" -"Installation Guide","Installation Guide" -"License Agreement","License Agreement" -"You're All Set!","You're All Set!" diff --git a/app/code/Magento/Install/i18n/es_ES.csv b/app/code/Magento/Install/i18n/es_ES.csv deleted file mode 100644 index 4b5764ed983e7b3f456e0ff00b418a3575a255b5..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/i18n/es_ES.csv +++ /dev/null @@ -1,118 +0,0 @@ -"User Name","Nombre de Usuario" -"First Name",Nombre -"Last Name",Apellido -Email,"Correo electrónico" -"Password Confirmation","Confirmación de contraseña" -Configuration,Configuración -"File System","Sistema de archivos" -Database,"Base de datos" -Welcome,Bienvenido -"Personal Information","Información Personal" -"User Password","Contraseña de Usuario" -"Email Address","Dirección de email" -Password,Contraseña -"Confirm Password","Confirma Contraseña" -Continue,Continuar -Download,Descargar -"Login Information","Información de registro" -"Required Fields","Campos obligatorios" -"Save Session Files In","Guardar archivos de sesión en" -Locale,"Configuración regional" -"Time Zone","Zona Horaria" -"Default Currency","Moneda predeterminada" -Validation,Validación -"Magento Connect Manager Deployment","Implementación del administrador de conexión de Magento" -"Downloading and installing Magento, please wait...","Descargando e instalando Magento. Espere, por favor." -"Setting preferred state to: %1","Setting preferred state to: %1" -"The URL ""%1"" is not accessible.","The URL ""%1"" is not accessible." -"The URL ""%1"" is invalid.","The URL ""%1"" is invalid." -"Response from the server is invalid.","Response from the server is invalid." -"PHP Extensions ""%1"" must be loaded.","PHP Extensions ""%1"" must be loaded." -"The database server version doesn't match system requirements (required: %1, actual: %2).","The database server version doesn't match system requirements (required: %1, actual: %2)." -"Database server does not support the InnoDB storage engine.","El servidor de la base de datos no es compatible el motor de almacenamiento InnoDB." -"Something went wrong while connecting to the database.","Something went wrong while connecting to the database." -"The Database Name field cannot be empty.","The Database Name field cannot be empty." -"The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.","The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter." -"Path ""%1"" must be writable.","Path ""%1"" must be writable." -"Welcome to Magento's Installation Wizard","Bienvenido al asistente de instalación de Magento" -"I agree to the above terms and conditions.","Estoy de acuerdo con los términos y las condiciones que se establecen más arriba." -"Web access options","Opciones de acceso web" -"Base URL","Dirección URL básica" -"Admin Path","Ruta de administración" -"This is the additional path used after your base URL to access your store Admin (e.g, Admin).","This is the additional path used after your base URL to access your store Admin (e.g, Admin)." -"Enable Charts","Activar gráficos" -"Enable this option if you want to see the charts on your dashboard.","Enable this option if you want to see the charts on your dashboard." -"Skip Base URL Validation Before the Next Step","Saltar validación de URL base antes del próximo paso" -"Check this box only if it is not possible to automatically validate the Base URL.","Marque esta casilla sólo si no es posible validar automáticamente la dirección URL básica." -"Use Web Server (Apache) Rewrites","Use reescritura de servidor (Apache)" -"You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.","You could enable this option to use web server rewrites functionality for improved Search Engine Optimization." -"Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.","Por favor asegúrese de que <code>mod_rewrite</code> está activado en la configuración de Apache." -"Use Secure URLs (SSL)","URLs segura (SSL) de usuario" -"Enable this option only if you have SSL available.","Active esta opción sólo si tiene SSL disponible." -"Secure Base URL","URL base segura" -"Provide a complete base URL for SSL connection. For example: %1.","Provide a complete base URL for SSL connection. For example: %1." -"Run admin interface with SSL","Ejecutar la interfaz de administración con SSL" -"Skip Secure URL validation before next step","Saltar validación de URL segura antes del próximo paso" -"Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.","Marque esta casilla sólo si no es posible validar automáticamente las direcciones URL seguras, por ejemplo, si se necesita autenticación HTTP." -"Session Storage Options","Opciones de almacenaje de sesión" -"Save Session Data In","Guardar datos de sesión en" -"Please set all required settings before clicking ""Continue"".","Please set all required settings before clicking ""Continue""." -"Create Admin Account","Crear cuenta de administración" -Username,"Nombre de usuario" -"Encryption Key","Clave de cifrado" -"Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page.","Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page." -Connection,Conexión -"Database Connection","Conexión a la base de datos" -"Database Type","Tipo de base de datos" -Host,Host -"Database host","Host de base de datos" -"You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock","Puedes especificar el puerto de servidor, ej: localhost:3307<br />Si no estás utilizando el socket UNIX predeterminado, puedes especificarlo aquà en vez del host, ej.: /var/run/mysqld/mysqld.sock" -"Database Name","Nombre de la base de datos" -"Database user name","Nombre de usuario de la base de datos" -"Database user password","Contraseña de usuario de la base de datos" -"Tables Prefix","Prefijo de tablas" -"(Optional. Leave blank for no prefix)","(Opcional. Déjelo en blanco si no desea agregar un prefijo.)" -"All packages were installed. Click 'OK' to continue with installation.","All packages were installed. Click 'OK' to continue with installation." -"Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.","Something went wrong installing the Magento packages. Please read the log, correct any errors and try again." -"As another option, you could try the ""Manual Downloads and Upgrades"" method.","As another option, you could try the ""Manual Downloads and Upgrades"" method." -"Download Magento Core Modules and Updates","Descargar los módulos básicos y las actualizaciones de Magento" -"Full Download / SVN Installation","Descarga completa/instalación de SVN" -"If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.","SI ha descargado el paquete completo o ha instalado Magento mediante SVN, debe omitir los pasos de instalación y validación de paquetes haciendo clic en el siguiente botón." -"Continue Full Download / SVN Installation","Continuar la descarga completa/instalación de SVN" -"Package Management through the Web","Administración de paquetes a través de la web" -"If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.","SI desea administrar los paquetes de Magento mediante la interfaz de administración web, deberá aplicar permisos de escritura web a todas las carpetas y todos los archivos de Magento." -"If your server is running on MS Windows, most probably you will not need to change anything.","Si el servidor se ejecuta en MS Windows, es probable que no necesite hacer cambios." -"If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.","Si ejecuta PHP como CGI, sus procesos de PHP pueden ejecutarse con el mismo usuario que utilizó al cargar los archivos de Magento." -"In other cases you will need to make Magento files writeable for the user that the web server process is running under.","En otros casos, deberá establecer permiso de escritura en los archivos de Magento para el usuario bajo el cual se ejecute el proceso del servidor web." -"Preferred stability: %1","Preferred stability: %1" -"This is the most stable state available for Magento packages.","This is the most stable state available for Magento packages." -"Choose this if you would like to test storefront and admin functionality.","Choose this if you would like to test storefront and admin functionality." -"Proceed With Automatic Download (%1)","Proceed With Automatic Download (%1)" -"If you are a developer and would like to have the latest public updates, choose this option.","Si es desarrollador y desea recibir las actualizaciones públicas más reciente, elija esta opción." -"Please note that it is much less stable than beta.","Por favor tenga en cuenta que es mucho menos estable que beta." -"Manual Downloads and Upgrades","Descargas manuales y actualizaciones" -"If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.","Si está ejecutando el asistente de instalación sobre una instalación de Magento descargada e instalada previamente, siga con este método." -"If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.","Si no puede escribir en las carpetas de Magento para el proceso web, o no desea hacerlo, puede utilizar el ejecutable PEAR ubicado en la raÃz de instalación de Magento." -"Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.","Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option." -"Run this in your shell from Magento root folder:","Ejecute esto en su sistema desde la carpeta raÃz de Magento:" -"Click the button below when the installation is finished.","Click the button below when the installation is finished." -"Continue After Manual Download","Continuar después de la descarga manual" -"You're All Set","Usted está preparado" -"Get ready to experience Open-Source eCommerce Evolved.","Prepárese para descubrir la evolución del comercio electrónico de código abierto." -"Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).","Antes de continuar con su tienda, tome nota de su clave de cifrado (Magento la utiliza para cifrar las contraseñas, las tarjetas de crédito y más)." -"(Make sure you keep it in a safe place.)","(Asegúrese de guardarlo en un lugar seguro.)" -"Go to Frontend","Ir a la interfaz del cliente" -"Go to Backend","Ir al área de administración" -Localization,Localización -"Locale settings","Configuración local" -"Magento Installation Wizard","Asistente de instalación de Magento" -Magento,Magento -"Help Us Keep Magento Healthy","Help Us Keep Magento Healthy" -"Report All Bugs","Informar de todos los errores" -"(ver. %1)","(ver. %1)" -Installation,Instalación -"Having trouble installing Magento?","¿Tiene problemas con la instalación de Magento?" -"Check out our","Descubra nuestro" -"Installation Guide","GuÃa de instalación" -"License Agreement","Acuerdo de licencia" -"You're All Set!","Usted está preparado!" diff --git a/app/code/Magento/Install/i18n/fr_FR.csv b/app/code/Magento/Install/i18n/fr_FR.csv deleted file mode 100644 index fe1e60d65e917d375e4678c224ea7bb6621aad02..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/i18n/fr_FR.csv +++ /dev/null @@ -1,118 +0,0 @@ -"User Name","Nom d'utilisateur" -"First Name",Prénom -"Last Name",Nom -Email,Email -"Password Confirmation","Confirmation du mot de passe" -Configuration,Configuration -"File System","Système de fichiers" -Database,"Base de données" -Welcome,Bienvenue -"Personal Information","Information personnelle" -"User Password","Mot de passe utilisateur" -"Email Address","Adresse email" -Password,"Mot de passe" -"Confirm Password","Confirmez le mot de passe" -Continue,Continuer -Download,Téléchargement -"Login Information","Information de connexion" -"Required Fields","Champs requis" -"Save Session Files In","Enregistrer les fichiers de la session dans" -Locale,"Paramètres régionaux" -"Time Zone","Fuseau horaire" -"Default Currency","Monnaie par défaut" -Validation,Validation -"Magento Connect Manager Deployment","Déploiement du Magento Connect Manager" -"Downloading and installing Magento, please wait...","Téléchargement et installation de Magento, veuillez patienter ..." -"Setting preferred state to: %1","Setting preferred state to: %1" -"The URL ""%1"" is not accessible.","The URL ""%1"" is not accessible." -"The URL ""%1"" is invalid.","The URL ""%1"" is invalid." -"Response from the server is invalid.","Response from the server is invalid." -"PHP Extensions ""%1"" must be loaded.","PHP Extensions ""%1"" must be loaded." -"The database server version doesn't match system requirements (required: %1, actual: %2).","The database server version doesn't match system requirements (required: %1, actual: %2)." -"Database server does not support the InnoDB storage engine.","Le serveur de base de données ne prend pas en charge le moteur de stockage InnoDB." -"Something went wrong while connecting to the database.","Something went wrong while connecting to the database." -"The Database Name field cannot be empty.","The Database Name field cannot be empty." -"The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.","The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter." -"Path ""%1"" must be writable.","Path ""%1"" must be writable." -"Welcome to Magento's Installation Wizard","Bienvenue dans l'assistant d'installation Magento" -"I agree to the above terms and conditions.","Je suis d'accord avec les conditions d'utilisations." -"Web access options","Options d'accès Internet" -"Base URL","URL de base" -"Admin Path","Répertoire administrateur" -"This is the additional path used after your base URL to access your store Admin (e.g, Admin).","This is the additional path used after your base URL to access your store Admin (e.g, Admin)." -"Enable Charts","Activer les graphiques" -"Enable this option if you want to see the charts on your dashboard.","Enable this option if you want to see the charts on your dashboard." -"Skip Base URL Validation Before the Next Step","Sauter la validation de l'URL de base avant l'étape suivante." -"Check this box only if it is not possible to automatically validate the Base URL.","Cochez cette case uniquement s'il n'est pas possible de valider automatiquement l'URL de base." -"Use Web Server (Apache) Rewrites","Utiliser les réécritures du serveur web (Apache)" -"You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.","You could enable this option to use web server rewrites functionality for improved Search Engine Optimization." -"Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.","Veuillez vous assurer que <code>mod_rewrite</code> est activé dans la configuration Apache." -"Use Secure URLs (SSL)","Utiliser des URLs sécurisées (SSL)" -"Enable this option only if you have SSL available.","Choisissez cette option si seul le SSL est disponible." -"Secure Base URL","Base d'url sécurisée" -"Provide a complete base URL for SSL connection. For example: %1.","Provide a complete base URL for SSL connection. For example: %1." -"Run admin interface with SSL","Exécuter l'interface admin avec SSL" -"Skip Secure URL validation before next step","Passer la validation d'URL sécurisée avant la prochaine étape" -"Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.","Cochez cette case uniquement s'il n'est pas possible de valider automatiquement l'URL sécurisée, par exemple si une authentification HTTP est nécessaire." -"Session Storage Options","Option de stockage de la session" -"Save Session Data In","Enregistrer les données de la session dans" -"Please set all required settings before clicking ""Continue"".","Please set all required settings before clicking ""Continue""." -"Create Admin Account","Créer un compte administrateur" -Username,"Nom d'utilisateur" -"Encryption Key","Clé d'encryptage" -"Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page.","Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page." -Connection,Connexion -"Database Connection","Connexion à la base de données" -"Database Type","Type de base de données" -Host,Hôte -"Database host","Hébergeur de la base de données" -"You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock","Vous pouvez spécifier un port de serveur, par exemple : localhost:3307<br />Si vous n'utilisez pas de socket UNIX par défaut, vous pouvez le préciser ici à la place de l'hôte, par exemple : /var/run/mysqld/mysqld.sock" -"Database Name","Nom de la base de données" -"Database user name","Nom d'utilisateur de la base de données" -"Database user password","Mot de passe utilisateur de la base de données" -"Tables Prefix","Préfixe de tables" -"(Optional. Leave blank for no prefix)","(Optionnel. Laissez vide s'il n'y a pas de préfixe)" -"All packages were installed. Click 'OK' to continue with installation.","All packages were installed. Click 'OK' to continue with installation." -"Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.","Something went wrong installing the Magento packages. Please read the log, correct any errors and try again." -"As another option, you could try the ""Manual Downloads and Upgrades"" method.","As another option, you could try the ""Manual Downloads and Upgrades"" method." -"Download Magento Core Modules and Updates","Télécharger les modules de base de Magento ainsi que les mises à jour" -"Full Download / SVN Installation","Téléchargement complet / Installation d'SVN" -"If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.","Si vous avez installé l'ensemble des logiciels ou installé Magento via SVN, vous devriez sauter l'installation et la validation des librairies en cliquant le bouton ci-dessous." -"Continue Full Download / SVN Installation","Continuer le téléchargement complet / l'installation d'SVN" -"Package Management through the Web","Gestion de paquet via le web" -"If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.","Si vous souhaitez gérer les fichiers de Magento via l'interface web, vous aurez besoin d'avoir les permissions d'écritures web appliquées à tous les dossiers et fichiers Magento." -"If your server is running on MS Windows, most probably you will not need to change anything.","Si votre serveur utilise MS Windows, vous n'aurez probablement pas besoin de changer quoique ce soit." -"If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.","Si vous utilisez PHP comme CGI, votre processus PHP doit utiliser le même nom d'utilisateur que pour l'envoi des fichiers Magento." -"In other cases you will need to make Magento files writeable for the user that the web server process is running under.","Sinon vous aurez à rendre les fichiers Magento accessibles en écriture pour l'utilisateur sous lequel le processus web tourne." -"Preferred stability: %1","Preferred stability: %1" -"This is the most stable state available for Magento packages.","This is the most stable state available for Magento packages." -"Choose this if you would like to test storefront and admin functionality.","Choose this if you would like to test storefront and admin functionality." -"Proceed With Automatic Download (%1)","Proceed With Automatic Download (%1)" -"If you are a developer and would like to have the latest public updates, choose this option.","Si vous êtes un développeur et que vous aimeriez bénéficier des dernières mises à jour disponibles, choisissez cette option." -"Please note that it is much less stable than beta.","Veuillez noter que ceci est bien moins stable qu'une beta." -"Manual Downloads and Upgrades","Téléchargement de mode d'emploi et mises à niveau" -"If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.","Si vous lancez une installation alors qu'une autre version de Magento est déjà installée, continuez avec cette méthode." -"If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.","Si vous ne souhaitez pas ou ne pouvez pas rendre les dossiers de Magento accessibles en écriture pour le processus web, vous pouvez utiliser l'exécutable PEAR situé à la racine de l'installation Magento." -"Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.","Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option." -"Run this in your shell from Magento root folder:","Exécuter ceci dans votre shell depuis le dossier racine de Magento :" -"Click the button below when the installation is finished.","Click the button below when the installation is finished." -"Continue After Manual Download","Continuer après le téléchargement manuel" -"You're All Set","Vous êtes prêt" -"Get ready to experience Open-Source eCommerce Evolved.","Préparez-vous à découvrir le commerce électronique open-source évolué." -"Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).","Avant de continuer vers notre boutique, veuillez noter votre clé encryptage (Magento l'utilise pour encrypter les mots de passe, cartes crédit, etc.)" -"(Make sure you keep it in a safe place.)","(Assurez-vous que vous le conservez dans un lieu sûr.)" -"Go to Frontend","Allez à l'interface visuel" -"Go to Backend","Allez à la partie technique" -Localization,"Paramètres régionaux" -"Locale settings","Réglages des paramètres régionaux" -"Magento Installation Wizard","Assistant d'installation Magento" -Magento,Magento -"Help Us Keep Magento Healthy","Help Us Keep Magento Healthy" -"Report All Bugs","Rapporter tous les bugs" -"(ver. %1)","(ver. %1)" -Installation,Installation -"Having trouble installing Magento?","Problèmes d'installation de Magento ?" -"Check out our","Paiement ou" -"Installation Guide","Guide d'installation" -"License Agreement","Accord de license" -"You're All Set!","Vous êtes prêt !" diff --git a/app/code/Magento/Install/i18n/nl_NL.csv b/app/code/Magento/Install/i18n/nl_NL.csv deleted file mode 100644 index 8a888274742aba74fd057a0a40739ee24dd24912..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/i18n/nl_NL.csv +++ /dev/null @@ -1,118 +0,0 @@ -"User Name",Gebruikersnaam -"First Name",Voornaam -"Last Name",Achternaam -Email,Email -"Password Confirmation","Wachtwoord Confirmatie" -Configuration,Configuratie -"File System","Bestanden Systeem" -Database,Database -Welcome,Welkom -"Personal Information","Persoonlijke Informatie" -"User Password",Gebruikerswachtwoord -"Email Address",e-mailadres -Password,Wachtwoord -"Confirm Password","Bevestig wachtwoord" -Continue,Doorgaan -Download,Download -"Login Information","Log in Gegevens" -"Required Fields","Benodigde Velden" -"Save Session Files In","Sla Sessie Bestanden Op In" -Locale,Lokaal -"Time Zone",Tijdszone -"Default Currency","Standaard Currency" -Validation,Validatie -"Magento Connect Manager Deployment","Magento Connect Manager Deployment" -"Downloading and installing Magento, please wait...","Magento aan het downloaden en installeren, wachten aub..." -"Setting preferred state to: %1","Setting preferred state to: %1" -"The URL ""%1"" is not accessible.","The URL ""%1"" is not accessible." -"The URL ""%1"" is invalid.","The URL ""%1"" is invalid." -"Response from the server is invalid.","Response from the server is invalid." -"PHP Extensions ""%1"" must be loaded.","PHP Extensions ""%1"" must be loaded." -"The database server version doesn't match system requirements (required: %1, actual: %2).","The database server version doesn't match system requirements (required: %1, actual: %2)." -"Database server does not support the InnoDB storage engine.","Database-server ondersteunt de InnoDB opslag engine niet." -"Something went wrong while connecting to the database.","Something went wrong while connecting to the database." -"The Database Name field cannot be empty.","The Database Name field cannot be empty." -"The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.","The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter." -"Path ""%1"" must be writable.","Path ""%1"" must be writable." -"Welcome to Magento's Installation Wizard","Welkom bij Magento's Installatiewizard" -"I agree to the above terms and conditions.","Ik accepteer de bovenstaande voorwaarden en condities." -"Web access options",Webtoegangsopties -"Base URL","Basis URL" -"Admin Path","Admin Pad" -"This is the additional path used after your base URL to access your store Admin (e.g, Admin).","This is the additional path used after your base URL to access your store Admin (e.g, Admin)." -"Enable Charts","Charts instellen" -"Enable this option if you want to see the charts on your dashboard.","Enable this option if you want to see the charts on your dashboard." -"Skip Base URL Validation Before the Next Step","Sla Basis-URL Validatie Over Voor de Volgende Stap" -"Check this box only if it is not possible to automatically validate the Base URL.","Bekijk dit vakje alleen als het niet lukt om automatisch Base URL te valideren." -"Use Web Server (Apache) Rewrites","Gebruik Web Server (Apache) Herschrijvingen" -"You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.","You could enable this option to use web server rewrites functionality for improved Search Engine Optimization." -"Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.","Controleer of <code>mod_rewrite</code> is ingeschakeld in uw Apache configuratie." -"Use Secure URLs (SSL)","Gebruik Beveiligde URL's (SSL)" -"Enable this option only if you have SSL available.","Schakel deze optie alleen in als je SSL geschikbaar hebt." -"Secure Base URL","Veilige Basis URL" -"Provide a complete base URL for SSL connection. For example: %1.","Provide a complete base URL for SSL connection. For example: %1." -"Run admin interface with SSL","Start administratie bedieningspaneel met SSL" -"Skip Secure URL validation before next step","Sla Beveiligde URL validatie over voor volgende stap" -"Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.","Bekijk dit vakje alleen als het niet lukt om automatisch Secure URL te valideren, bijvoorbeeld als HTTP verificatie vereist is." -"Session Storage Options","Sessie Opslag Opties" -"Save Session Data In","Sla Sessie Data Op In" -"Please set all required settings before clicking ""Continue"".","Please set all required settings before clicking ""Continue""." -"Create Admin Account","Creëer Admin Account" -Username,Gebruikersnaam -"Encryption Key","Versleutel Key" -"Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page.","Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page." -Connection,Verbinding -"Database Connection","Database Verbinding" -"Database Type","Database Type" -Host,Host -"Database host","Database host" -"You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock","U kunt een serverpoort specificeren, bv.: localhost:3307<br />Als u niet de standaard UNIX-socket gebruikt, kunt u deze hier specificeren in plaats van host, bv.: /var/run/mysqld/mysqld.sock" -"Database Name","Naam Database" -"Database user name","Database gebruikersnaam" -"Database user password","Database gebruikerswachtwoord" -"Tables Prefix","Tabellen Voorvoegsel" -"(Optional. Leave blank for no prefix)","(Optioneel. Laat leeg als er geen prefix is)" -"All packages were installed. Click 'OK' to continue with installation.","All packages were installed. Click 'OK' to continue with installation." -"Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.","Something went wrong installing the Magento packages. Please read the log, correct any errors and try again." -"As another option, you could try the ""Manual Downloads and Upgrades"" method.","As another option, you could try the ""Manual Downloads and Upgrades"" method." -"Download Magento Core Modules and Updates","Download Magento Core Modules en Updates" -"Full Download / SVN Installation","Volledige Download / SVN installatie" -"If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.","Als u het volledige pakket heeft gedownload, of Magento via SVN heeft geïnstalleerd, dan kan u het beste de pakket installatie en verificatie voorbij gaan door op de knop hieronder te klikken." -"Continue Full Download / SVN Installation","Ga door Met Volledige Download / SVN Installatie" -"Package Management through the Web","Pakket Management door het Web" -"If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.","Als u het liefste de Magento pakketten met het web administratie bedieningspaneel wilt beheren, moeten alle Magento folders en bestanden web beschrijfbare toestemming hebben." -"If your server is running on MS Windows, most probably you will not need to change anything.","Als uw server MS Windows gebruikt hoeft u waarschijnlijk niks te veranderen." -"If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.","Indien u PHP gebruikt als CGI, dan kunt u uw PHP processen onder dezelfde gebruiker uitvoeren als de gebruiker die u heeft gebruikt voor uw Magento bestanden." -"In other cases you will need to make Magento files writeable for the user that the web server process is running under.","In andere gevallen zult u de Magento bestanden beschrijfbare toestemming moeten geven voor de gebruiker waaronder het web proces draait." -"Preferred stability: %1","Preferred stability: %1" -"This is the most stable state available for Magento packages.","This is the most stable state available for Magento packages." -"Choose this if you would like to test storefront and admin functionality.","Choose this if you would like to test storefront and admin functionality." -"Proceed With Automatic Download (%1)","Proceed With Automatic Download (%1)" -"If you are a developer and would like to have the latest public updates, choose this option.","Kies deze optie indien u een ontwikkelaar bent en de laatste updates wilt ontvangen." -"Please note that it is much less stable than beta.","Houd er rekening mee dat het veel minder stabiel is dan beta." -"Manual Downloads and Upgrades","Handmatig Downloaden en Upgraden" -"If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.","Indien u de installatiewizard over een oudere Magento versie laat installeren, moet u deze methode gebruiken." -"If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.","Indien u uw Magento folders niet beschrijfbaar wilt, of kunt maken voor het webproces, dan kunt u het PEAR bestand gelocaliseerd in de root van de Magento installatie gebruiken." -"Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.","Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option." -"Run this in your shell from Magento root folder:","Voer dit in uw shell van uw Magento root folder uit:" -"Click the button below when the installation is finished.","Click the button below when the installation is finished." -"Continue After Manual Download","Ga door Na Handmatige Download" -"You're All Set","U Bent Klaar" -"Get ready to experience Open-Source eCommerce Evolved.","Maak je klaar om de nieuwe versie Open-Source eCommerce te ervaren." -"Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).","Voor u doorgaat met opslaan, maak a.u.b. een notitie van uw versleutelingscode (Magento gebruikt het om wachtwoorden, creditcards en meer te versleutelen)." -"(Make sure you keep it in a safe place.)","(Zorg ervoor dat u het op een veilige plaats bewaard)" -"Go to Frontend","Ga naar Frontend" -"Go to Backend","Ga naar Backend" -Localization,Lokalisatie -"Locale settings","Lokale instellingen" -"Magento Installation Wizard","Magento Installatiewizard" -Magento,Magento -"Help Us Keep Magento Healthy","Help Us Keep Magento Healthy" -"Report All Bugs","Rapporteer Alle Bugs" -"(ver. %1)","(ver. %1)" -Installation,Installatie -"Having trouble installing Magento?","Moeilijkheden met het installeren van Magento?" -"Check out our","Bekijk onze" -"Installation Guide","Installatie Handleiding" -"License Agreement",Licentie-overeenkomst -"You're All Set!","U Bent Klaar!" diff --git a/app/code/Magento/Install/i18n/pt_BR.csv b/app/code/Magento/Install/i18n/pt_BR.csv deleted file mode 100644 index 42e2fbc84f96b2dec83032800c088cd1a9052e76..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/i18n/pt_BR.csv +++ /dev/null @@ -1,118 +0,0 @@ -"User Name","Nome do Usuário" -"First Name","Primeiro nome" -"Last Name","Último nome" -Email,E-mail -"Password Confirmation","Confirmação de Senha" -Configuration,Configuração -"File System","Arquivo de Sistema" -Database,"Base de Dados" -Welcome,"Bem Vindo" -"Personal Information","Informações pessoais" -"User Password","Senha do Usuário" -"Email Address","Endereço de e-mail" -Password,Senha -"Confirm Password","Confirmar a senha" -Continue,Continue -Download,Baixar -"Login Information","Informações de login" -"Required Fields","Campos Obrigatórios" -"Save Session Files In","Salve Arquivos de Sessão Em" -Locale,Locale -"Time Zone","Fuso Horário" -"Default Currency","Moeda Padrão" -Validation,Validação -"Magento Connect Manager Deployment","Implementação do Gerenciador de Conexão Magento" -"Downloading and installing Magento, please wait...","Baixando e instalando o Magento, por favor, espere..." -"Setting preferred state to: %1","Setting preferred state to: %1" -"The URL ""%1"" is not accessible.","The URL ""%1"" is not accessible." -"The URL ""%1"" is invalid.","The URL ""%1"" is invalid." -"Response from the server is invalid.","Response from the server is invalid." -"PHP Extensions ""%1"" must be loaded.","PHP Extensions ""%1"" must be loaded." -"The database server version doesn't match system requirements (required: %1, actual: %2).","The database server version doesn't match system requirements (required: %1, actual: %2)." -"Database server does not support the InnoDB storage engine.","O servidor do banco de dados não suporta o mecanismo de armazenamento InnoDB." -"Something went wrong while connecting to the database.","Something went wrong while connecting to the database." -"The Database Name field cannot be empty.","The Database Name field cannot be empty." -"The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.","The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter." -"Path ""%1"" must be writable.","Path ""%1"" must be writable." -"Welcome to Magento's Installation Wizard","Bem-vindo ao Assistente de Instalação do Magento" -"I agree to the above terms and conditions.","Eu concordo com os termos e condições acima." -"Web access options","Opções de acesso web" -"Base URL","URL Base" -"Admin Path","Caminho Administrativo" -"This is the additional path used after your base URL to access your store Admin (e.g, Admin).","This is the additional path used after your base URL to access your store Admin (e.g, Admin)." -"Enable Charts","Habilitar Gráficos" -"Enable this option if you want to see the charts on your dashboard.","Enable this option if you want to see the charts on your dashboard." -"Skip Base URL Validation Before the Next Step","Pular Validação URL Base Antes do Próximo Passo" -"Check this box only if it is not possible to automatically validate the Base URL.","Marque esta caixa apenas se não é possÃvel validar automaticamente o URL Base." -"Use Web Server (Apache) Rewrites","Use Servidor Web (Apache) Reescrito" -"You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.","You could enable this option to use web server rewrites functionality for improved Search Engine Optimization." -"Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.","Por favor, certifique-se que <code>mod_rewrite</code> está ativado na configuração Apache." -"Use Secure URLs (SSL)","Use URLs (SSL) Seguros" -"Enable this option only if you have SSL available.","Habilite esta opção se tiver SSL disponÃvel." -"Secure Base URL","URL Base Segura" -"Provide a complete base URL for SSL connection. For example: %1.","Provide a complete base URL for SSL connection. For example: %1." -"Run admin interface with SSL","Execute a interface de administração com SSL" -"Skip Secure URL validation before next step","Pular Validação URL Segura antes do Próximo Passo" -"Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.","Marque esta caixa apenas se não é possÃvel validar automaticamente o URL Seguro, por exemplo se a autenticação HTTP é necessária." -"Session Storage Options","Opções de Armazenamento de Sessão" -"Save Session Data In","Salve Dados de Sessão Em" -"Please set all required settings before clicking ""Continue"".","Please set all required settings before clicking ""Continue""." -"Create Admin Account","Crie uma Conta de Administrador" -Username,"Nome do usuário" -"Encryption Key","Chave criptografada." -"Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page.","Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page." -Connection,Conexão -"Database Connection","Conexão de Base de Dados" -"Database Type","Tipo de Banco de Dados" -Host,Anfitrião -"Database host","Servidor de banco de dados" -"You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock","Você pode especificar a porta do servidor, ex.: localhost:3307<br />Se você não estiver usando o socket UNIX predefinido, você pode especificá-lo aqui em vez do host, ex.: /var/run/mysqld/mysqld.sock" -"Database Name","Nome da Base de Dados" -"Database user name","Nome de usuário do banco de dados" -"Database user password","Senha de usuário do banco de dados" -"Tables Prefix","Prefixo das Tabelas" -"(Optional. Leave blank for no prefix)","(Opcional. Deixe em branco para nenhum prefixo)" -"All packages were installed. Click 'OK' to continue with installation.","All packages were installed. Click 'OK' to continue with installation." -"Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.","Something went wrong installing the Magento packages. Please read the log, correct any errors and try again." -"As another option, you could try the ""Manual Downloads and Upgrades"" method.","As another option, you could try the ""Manual Downloads and Upgrades"" method." -"Download Magento Core Modules and Updates","Download de atualizações e módulos centrais do Magento" -"Full Download / SVN Installation","Download Completo / Instalação do SVN" -"If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.","Se você tiver baixado o pacote completo ou instalado Magento através de SVN, você deve pular pacotes de instalação e validação clicando no botão abaixo." -"Continue Full Download / SVN Installation","Continue a Baixar Tudo/Instalação SVN" -"Package Management through the Web","Gerenciamento de Pacotes através da Web" -"If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.","Se você deseja gerenciar pacotes Magento através da interface de administração web, você precisará ter permissões web graváveis aplicadas a todas as pastas e arquivos Magento." -"If your server is running on MS Windows, most probably you will not need to change anything.","Se o servidor estiver correndo em MS Windows, muito provavelmente você não vai precisar mudar nada." -"If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.","Se você estiver executando o PHP como CGI, seus processos PHP podem ser executados sob o mesmo usuário como o usuário que você usou ao fazer o carregamento de arquivos Magento." -"In other cases you will need to make Magento files writeable for the user that the web server process is running under.","Em outros casos, você vai precisar fazer arquivos Magento graváveis para o usuário em que o processo do servidor web está em execução." -"Preferred stability: %1","Preferred stability: %1" -"This is the most stable state available for Magento packages.","This is the most stable state available for Magento packages." -"Choose this if you would like to test storefront and admin functionality.","Choose this if you would like to test storefront and admin functionality." -"Proceed With Automatic Download (%1)","Proceed With Automatic Download (%1)" -"If you are a developer and would like to have the latest public updates, choose this option.","Se você é um desenvolvedor e gostaria de ter as últimas atualizações públicas, escolha esta opção." -"Please note that it is much less stable than beta.","Por favor note que é muito menos estável do que o beta." -"Manual Downloads and Upgrades","Transferências de Manual e Atualizações" -"If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.","Se você estiver executando o assistente de instalação sobre uma instalação anteriormente baixada e instalada de Magento, prossiga com este método." -"If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.","Se você não quiser ou não for capaz de ter pastas Magento graváveis para o processo web, você poderia usar PEAR executável localizado na raiz da instalação do Magento." -"Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.","Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option." -"Run this in your shell from Magento root folder:","Execute isto em seu sistema operativo a partir da pasta raiz Magento:" -"Click the button below when the installation is finished.","Click the button below when the installation is finished." -"Continue After Manual Download","Continue Depois de Baixar Manualmente" -"You're All Set","Você Está Pronto" -"Get ready to experience Open-Source eCommerce Evolved.","Prepare-se para experimentar o Open-Source eCommerce Evolved." -"Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).","Antes de continuar para sua loja, por favor, anote sua chave criptografada (Magento a utiliza para criptografar senhas, cartões de crédito e mais)." -"(Make sure you keep it in a safe place.)","(Certifique-se de o manter em um local seguro.)" -"Go to Frontend","Ir para o Frontend" -"Go to Backend","Ir para o Backend" -Localization,Localização -"Locale settings","Configurações locais" -"Magento Installation Wizard","Assistente de Instalação Magento" -Magento,Magento -"Help Us Keep Magento Healthy","Help Us Keep Magento Healthy" -"Report All Bugs","Reporte Todos os Erros" -"(ver. %1)","(ver. %1)" -Installation,Instalação -"Having trouble installing Magento?","Tendo problemas na instalação do Magento?" -"Check out our","Confira nosso" -"Installation Guide","Guia de Instalação" -"License Agreement","Contrato de Licença" -"You're All Set!","Você Está Pronto!" diff --git a/app/code/Magento/Install/i18n/zh_CN.csv b/app/code/Magento/Install/i18n/zh_CN.csv deleted file mode 100644 index 083c1904003edb6f01b36d07288df790145a3114..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/i18n/zh_CN.csv +++ /dev/null @@ -1,118 +0,0 @@ -"User Name",用户å -"First Name",åå— -"Last Name",å§“æ° -Email,电å邮件 -"Password Confirmation",密ç 确认 -Configuration,é…ç½® -"File System",文件系统 -Database,æ•°æ®åº“ -Welcome,欢迎 -"Personal Information",ä¸ªäººä¿¡æ¯ -"User Password",用户密ç -"Email Address",编辑电åé‚®ä»¶åœ°å€ -Password,密ç -"Confirm Password",确认密ç -Continue,ç»§ç» -Download,下载 -"Login Information",ç™»å½•ä¿¡æ¯ -"Required Fields",å¿…é¡»çš„å—æ®µ -"Save Session Files In",ä¿å˜ä¼šè¯æ–‡ä»¶è‡³ -Locale,区域 -"Time Zone",时区 -"Default Currency",é»˜è®¤è´§å¸ -Validation,éªŒè¯ -"Magento Connect Manager Deployment",Magento内容管ç†å™¨éƒ¨ç½² -"Downloading and installing Magento, please wait...",æ£åœ¨ä¸‹è½½å’Œå®‰è£…Magento,请ç¨å€™... -"Setting preferred state to: %1","Setting preferred state to: %1" -"The URL ""%1"" is not accessible.","The URL ""%1"" is not accessible." -"The URL ""%1"" is invalid.","The URL ""%1"" is invalid." -"Response from the server is invalid.","Response from the server is invalid." -"PHP Extensions ""%1"" must be loaded.","PHP Extensions ""%1"" must be loaded." -"The database server version doesn't match system requirements (required: %1, actual: %2).","The database server version doesn't match system requirements (required: %1, actual: %2)." -"Database server does not support the InnoDB storage engine.","æ•°æ®åº“æœåС噍䏿”¯æŒ InnoDB å˜å‚¨å¼•擎。" -"Something went wrong while connecting to the database.","Something went wrong while connecting to the database." -"The Database Name field cannot be empty.","The Database Name field cannot be empty." -"The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter.","The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter." -"Path ""%1"" must be writable.","Path ""%1"" must be writable." -"Welcome to Magento's Installation Wizard",欢迎使用Magento安装å‘导 -"I agree to the above terms and conditions.",æˆ‘åŒæ„上述åˆçº¦å’Œæ¡æ¬¾ã€‚ -"Web access options",Web访问选项 -"Base URL",备份URL -"Admin Path",管ç†è·¯å¾„ -"This is the additional path used after your base URL to access your store Admin (e.g, Admin).","This is the additional path used after your base URL to access your store Admin (e.g, Admin)." -"Enable Charts",å¯ç”¨å›¾è¡¨ -"Enable this option if you want to see the charts on your dashboard.","Enable this option if you want to see the charts on your dashboard." -"Skip Base URL Validation Before the Next Step",在开始下一æ¥ä¹‹å‰è·³è¿‡åŸºæœ¬URLéªŒè¯ -"Check this box only if it is not possible to automatically validate the Base URL.",如果ä¸èƒ½è‡ªåŠ¨éªŒè¯åŸºæœ¬URL,就选ä¸è¯¥é€‰é¡¹ã€‚ -"Use Web Server (Apache) Rewrites",使用WebæœåŠ¡å™¨ï¼ˆApache)é‡å†™ -"You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.","You could enable this option to use web server rewrites functionality for improved Search Engine Optimization." -"Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.",请确ä¿åœ¨Apacheé…ç½®ä¸å¯ç”¨äº†<code>mod_rewrite</code>。 -"Use Secure URLs (SSL)",使用安全URL(SSL) -"Enable this option only if you have SSL available.",如果您å¯ä»¥ä½¿ç”¨SSL,就选ä¸è¯¥é€‰é¡¹ã€‚ -"Secure Base URL",安全基本URL -"Provide a complete base URL for SSL connection. For example: %1.","Provide a complete base URL for SSL connection. For example: %1." -"Run admin interface with SSL",使用SSLè¿è¡Œç®¡ç†ç•Œé¢ã€‚ -"Skip Secure URL validation before next step",在开始下一æ¥ä¹‹å‰è·³è¿‡å®‰å…¨URLéªŒè¯ -"Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.",如果ä¸èƒ½è‡ªåŠ¨éªŒè¯å®‰å…¨URL,例如如果需è¦HTTP验è¯ï¼Œå°±è¯·é€‰æ‹©è¯¥é€‰é¡¹ã€‚ -"Session Storage Options",会è¯å˜å‚¨é€‰é¡¹ -"Save Session Data In",ä¿å˜ä¼šè¯æ•°æ®è‡³ -"Please set all required settings before clicking ""Continue"".","Please set all required settings before clicking ""Continue""." -"Create Admin Account",创建管ç†å¸æˆ· -Username,用户å -"Encryption Key",åŠ å¯†å¯†é’¥ -"Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page.","Magento uses this key to encrypt passwords, credit cards and more. If you don't fill in this field, we'll create your encryption key and show it to you on the next page." -Connection,连接 -"Database Connection",æ•°æ®åº“连接 -"Database Type",æ•°æ®åº“类型 -Host,主机 -"Database host",æ•°æ®åº“主机 -"You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock","您å¯ä»¥æŒ‡å®šæœåŠ¡å™¨ç«¯å£ï¼Œä¾‹å¦‚: localhost:3307<br />如果没有使用默认的UNIX socket,则å¯ä»¥åœ¨æ¤æŒ‡å®šï¼Œè€Œä¸ç”¨åœ¨ä¸»æœºä¸æŒ‡å®šï¼Œä¾‹å¦‚: /var/run/mysqld/mysqld.sock" -"Database Name",æ•°æ®åº“åç§° -"Database user name",æ•°æ®åº“用户å -"Database user password",æ•°æ®åº“用户密ç -"Tables Prefix",è¡¨æ ¼å‰ç¼€ -"(Optional. Leave blank for no prefix)",(å¯é€‰ï¼Œç•™ç©ºå³å¯ä¸ä½¿ç”¨å‰ç¼€ã€‚) -"All packages were installed. Click 'OK' to continue with installation.","All packages were installed. Click 'OK' to continue with installation." -"Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.","Something went wrong installing the Magento packages. Please read the log, correct any errors and try again." -"As another option, you could try the ""Manual Downloads and Upgrades"" method.","As another option, you could try the ""Manual Downloads and Upgrades"" method." -"Download Magento Core Modules and Updates",下载Magentoæ ¸å¿ƒæ¨¡å—和更新 -"Full Download / SVN Installation",完整下载/SVN安装 -"If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.",如果您下载了完整版,或通过SVN安装Magento,则应点击下列按钮跳过包安装æ“作和验è¯è¿‡ç¨‹ã€‚ -"Continue Full Download / SVN Installation",ç»§ç»å®Œæ•´ä¸‹è½½/SVN安装 -"Package Management through the Web",通过Webè¿›è¡ŒåŒ…ç®¡ç† -"If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.",如果希望通过Web管ç†ç•Œé¢ç®¡ç†Magento包,则需è¦ä¸ºæ‰€æœ‰Magento文件夹和文件应用å¯å†™æƒé™ã€‚ -"If your server is running on MS Windows, most probably you will not need to change anything.",如果您的æœåС噍è¿è¡Œäº†å¾®è½¯Windows,则ä¸éœ€è¦ä¿®æ”¹ä»»ä½•内容。 -"If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.",如果您将PHP作为CGIè¿è¡Œï¼Œæ‚¨PHP的处ç†ä½¿ç”¨çš„èº«ä»½åº”ä¸Žä¸Šä¼ Magento文件所用的用户身份相åŒã€‚ -"In other cases you will need to make Magento files writeable for the user that the web server process is running under.",其他情况下,您ä¾ç„¶éœ€è¦ä¸ºæœåŠ¡å™¨ä¸Šè¿è¡ŒWebæœåŠ¡çš„ç”¨æˆ·æä¾›Magento文件的写æƒé™ã€‚ -"Preferred stability: %1","Preferred stability: %1" -"This is the most stable state available for Magento packages.","This is the most stable state available for Magento packages." -"Choose this if you would like to test storefront and admin functionality.","Choose this if you would like to test storefront and admin functionality." -"Proceed With Automatic Download (%1)","Proceed With Automatic Download (%1)" -"If you are a developer and would like to have the latest public updates, choose this option.",如果您是开å‘人员,希望获得最新的公开更新,请选择该选项。 -"Please note that it is much less stable than beta.",请注æ„,该版本的稳定性ä¸å¦‚Beta版。 -"Manual Downloads and Upgrades",手工下载和å‡çº§ -"If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.",如果您是在è€ç‰ˆæœ¬ä¸‹è½½å¹¶å®‰è£…好的Magento基础上è¿è¡Œå®‰è£…å‘å¯¼ï¼Œè¯·ä½¿ç”¨è¿™ç§æ–¹æ³•。 -"If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.",如果您ä¸å¸Œæœ›ï¼Œæˆ–者ä¸èƒ½æä¾›å¯å†™çš„Magento文件夹,则应使用Magento安装文件ä¸çš„PEAR执行文件。 -"Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.","Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option." -"Run this in your shell from Magento root folder:",在您的外壳ä¸ä»ŽMagentoæ ¹æ–‡ä»¶å¤¹è¿è¡Œè¿™ä¸ªï¼š -"Click the button below when the installation is finished.","Click the button below when the installation is finished." -"Continue After Manual Download",手工下载åŽè¿žæŽ¥ -"You're All Set",您已ç»è®¾ç½®å®Œæ¯•。 -"Get ready to experience Open-Source eCommerce Evolved.",准备体验开æºç”µå商务的进化。 -"Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).",åœ¨ç»§ç»æ‚¨çš„店铺å‰ï¼Œè¯·è®°å½•æ‚¨çš„åŠ å¯†å¯†é’¥ï¼ˆMagentoå°†å…¶ç”¨äºŽåŠ å¯†å¯†ç ã€ä¿¡ç”¨å¡å·ç ç‰ï¼‰ã€‚ -"(Make sure you keep it in a safe place.)",(请务必将其ä¿å˜åœ¨å®‰å…¨çš„地点。) -"Go to Frontend",转到å‰ç«¯ -"Go to Backend",转到åŽç«¯ -Localization,本地化 -"Locale settings",区域设置 -"Magento Installation Wizard",Magento安装å‘导 -Magento,Magento -"Help Us Keep Magento Healthy","Help Us Keep Magento Healthy" -"Report All Bugs",报告所有Bug -"(ver. %1)","(ver. %1)" -Installation,安装 -"Having trouble installing Magento?",安装Magentoæ—¶é‡åˆ°äº†é—®é¢˜ï¼Ÿ -"Check out our",ç»“è´¦æŒ‡å— -"Installation Guide",å®‰è£…æŒ‡å— -"License Agreement",许å¯åè®® -"You're All Set!",您已ç»è®¾ç½®å®Œæ¯•ï¼ diff --git a/app/code/Magento/Install/view/adminhtml/layout/default.xml b/app/code/Magento/Install/view/adminhtml/layout/default.xml deleted file mode 100644 index efbc5c389988e51125d157a801708e2de834a538..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/adminhtml/layout/default.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> - <head> - <link src="Magento_Install::survey_notification.js"/> - </head> - <body/> -</page> diff --git a/app/code/Magento/Install/view/install/layout/install_wizard.xml b/app/code/Magento/Install/view/install/layout/install_wizard.xml deleted file mode 100644 index 202c11765cef93f8ca7362feb4ce2ffaa35ddecc..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/layout/install_wizard.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd"> - <container name="root"> - <block class="Magento\Framework\View\Element\Template" name="page.block"> - <action method="setTemplate"> - <argument name="template" xsi:type="string">Magento_Install::page.phtml</argument> - </action> - <block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright"/> - <container name="left" as="left" label="Left Column"/> - <container name="content" as="content" label="Content"/> - </block> - </container> - <block class="Magento\Install\Block\Db\Main" name="database" as="database"/> -</layout> diff --git a/app/code/Magento/Install/view/install/templates/config.phtml b/app/code/Magento/Install/view/install/templates/config.phtml deleted file mode 100644 index 726cc7f2b13b77c44a39bf9309f3b41a5d321c8a..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/config.phtml +++ /dev/null @@ -1,183 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/** - * Install configuration template - * - * @see \Magento\Install\Block\Config - * @var $this \Magento\Install\Block\Config - */ -?> -<div class="page-head"> - <h3><?php echo __('Configuration') ?></h3> -</div> -<?php echo $this->getLayout()->getMessagesBlock()->getGroupedHtml() ?> -<?php if ($this->getInstaller()->getServerCheckStatus()): ?> -<form action="<?php echo $this->getPostUrl() ?>" method="post" id="form-validate"> - - <!-- database connection --> - <?php echo $this->getLayout()->getBlock('database')->toHtml() ?> - - <fieldset class="group-select"> - <legend><?php echo __('Web access options') ?></legend> - <h4 class="legend"><?php echo __('Web access options') ?></h4> - <ul> - <li> - <label for="base_url"><?php echo __('Base URL') ?> <span class="required">*</span></label><br/> - <input type="text" name="config[unsecure_base_url]" id="base_url" - value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>" - title="<?php echo __('Base URL') ?>" data-validate="{required:true,'validate-url':true}" - class="input-text"/> - </li> - <li> - <label for="backend_frontname"><?php echo __('Admin Path') ?> <span - class="required">*</span></label><br/> - <input type="text" name="config[backend_frontname]" id="backend_frontname" - value="<?php echo $this->getFormData()->getBackendFrontname() ?>" - title="<?php echo __('Admin Path') ?>" data-validate="{required:true,'validate-data':true}" - class="input-text"/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('This is the additional path used after your base URL to access your store Admin (e.g, Admin).') ?></small> - </p> - </li> - <li> - <input type="checkbox" name="config[enable_charts]" id="enable_charts" - value="1" <?php if ($this->getFormData()->getEnableCharts()): ?>checked="checked"<?php endif; ?> /> - <label for="enable_charts"><?php echo __('Enable Charts') ?></label><br/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('Enable this option if you want to see the charts on your dashboard.') ?></small> - </p> - </li> - <li> - <input type="checkbox" name="skip_base_url_validation" id="skip_base_url_validation" - value="1" <?php if ($this->getSkipBaseUrlValidation()): ?>checked="checked"<?php endif; ?> /> - <label - for="skip_base_url_validation"><?php echo __('Skip Base URL Validation Before the Next Step') ?></label><br/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('Check this box only if it is not possible to automatically validate the Base URL.') ?></small> - </p> - </li> - <li> - <input type="checkbox" name="config[use_rewrites]" id="use_rewrites" - value="1" <?php if ($this->getFormData()->getUseRewrites()): ?>checked="checked"<?php endif; ?> /> - <label for="use_rewrites"><?php echo __('Use Web Server (Apache) Rewrites') ?></label><br/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small> - <?php echo __('You could enable this option to use web server rewrites functionality for improved Search Engine Optimization.') ?> - <br/> - <strong><?php echo __('Please make sure that <code>mod_rewrite</code> is enabled in Apache configuration.') ?></strong> - </small> - </p> - </li> - <li> - <input type="checkbox" name="config[use_secure]" id="use_secure" - value="1" <?php if ($this->getFormData()->getUseSecure()): ?>checked="checked"<?php endif ?> /> - <label for="use_secure"><?php echo __('Use Secure URLs (SSL)') ?></label><br/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('Enable this option only if you have SSL available.') ?></small> - </p> - </li> - </ul> - <ul id="use_secure_options" <?php if (!$this->getFormData()->getUseSecure()): ?>style="display:none"<?php endif ?>> - <li> - <label for="secure_base_url"><?php echo __('Secure Base URL') ?> <span class="required">*</span></label><br/> - <input type="text" name="config[secure_base_url]" id="secure_base_url" - value="<?php echo $this->getFormData()->getSecureBaseUrl() ?>" - title="<?php echo __('Secure Base URL') ?>" - data-validate="{required:true,'validate-url':true}" class="input-text"/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('Provide a complete base URL for SSL connection. For example: %1.', '<strong>https://www.mydomain.com/magento/</strong>') ?></small> - </p> - </li> - <li> - <input type="checkbox" name="config[use_secure_admin]" id="use_secure_admin" - value="1" <?php if ($this->getFormData()->getUseSecureAdmin()): ?>checked="checked"<?php endif; ?> /> - <label for="use_secure_admin"><?php echo __('Run admin interface with SSL') ?></label><br/> - </li> - <li> - <input type="checkbox" name="skip_url_validation" id="skip_url_validation" - value="1" <?php if ($this->getSkipUrlValidation()): ?>checked="checked"<?php endif; ?> /> - <label - for="skip_url_validation"><?php echo __('Skip Secure URL validation before next step') ?></label><br/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('Check this box only if it is not possible to automatically validate Secure URL, for example if HTTP authentication is required.') ?></small> - </p> - </li> - </ul> - </fieldset> - - <fieldset class="group-select"> - <legend><?php echo __('Session Storage Options') ?></legend> - <h4 class="legend"><?php echo __('Session Storage Options') ?></h4> - <ul> - <li> - <div class="input-box"> - <label for="password"><?php echo __('Save Session Data In') ?></label><br/> - <?php echo $this->getSessionSaveSelect() ?> - </div> - </li> - </ul> - </fieldset> - - <div class="button-set"> - <p class="required">* <?php echo __('Required Fields') ?></p> - <button class="form-button" type="submit"><span><?php echo __('Continue') ?></span></button> - </div> -</form> -<script type="text/javascript"> -require([ - "jquery", - "Magento_Install/js/install" -], function($){ - - $.mage.install.configureForm('#form-validate', '#use_secure', '#use_secure_options'); - -}); -</script> -<?php else: ?> -<div><?php echo __('Please set all required settings before clicking "Continue".') ?></div> -<div class="button-set"> - <button id="btn-continue" class="form-button" type="button"> - <span><?php echo __('Continue') ?></span></button> - <script type="text/javascript"> -require([ - "jquery", - "Magento_Install/js/install" -], function($){ - - $.mage.install.configureContinue( - '#btn-continue', '<?php echo $this->getUrl('*/*/*', array('_current' => true)) ?>' - ); - -}); -</script> -</div> -<?php endif; ?> diff --git a/app/code/Magento/Install/view/install/templates/create_admin.phtml b/app/code/Magento/Install/view/install/templates/create_admin.phtml deleted file mode 100644 index a5287dc11581868845026ca054cde7b999a1e99b..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/create_admin.phtml +++ /dev/null @@ -1,123 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/** - * Administrator account installation - * - * @see \Magento\Install\Block\Admin - */ -?> -<div class="page-head"> - <h3><?php echo __('Create Admin Account') ?></h3> -</div> -<?php echo $this->getLayout()->getMessagesBlock()->getGroupedHtml() ?> -<form action="<?php echo $this->getPostUrl() ?>" method="post" id="form-validate"> - <fieldset class="group-select wide"> - <legend><?php echo __('Personal Information') ?></legend> - <h4 class="legend"><?php echo __('Personal Information') ?></h4> - <ul> - <li> - <div class="input-box"> - <label for="firstname"><?php echo __('First Name') ?> <span class="required">*</span></label><br/> - <input type="text" name="admin[firstname]" id="firstname" - value="<?php echo $this->getFormData()->getFirstname() ?>" - title="<?php echo __('First Name') ?>" data-validate="{required:true}" - class="input-text"/> - </div> - <div class="input-box"> - <label for="lastname"><?php echo __('Last Name') ?> <span - class="required">*</span></label><br/> - <input type="text" name="admin[lastname]" id="lastname" - value="<?php echo $this->getFormData()->getLastname() ?>" - title="<?php echo __('Last Name') ?>" data-validate="{required:true}" - class="input-text"/> - </div> - </li> - <li> - <label for="email_address"><?php echo __('Email') ?> <span class="required">*</span></label><br/> - <input type="text" name="admin[email]" id="email_address" - value="<?php echo $this->getFormData()->getEmail() ?>" - title="<?php echo __('Email Address') ?>" - data-validate="{required:true,'validate-email':true}" class="input-text"/> - </li> - </ul> - </fieldset> - <fieldset class="group-select wide"> - <legend><?php echo __('Login Information') ?></legend> - <h4 class="legend"><?php echo __('Login Information') ?></h4> - <ul> - <li> - <label for="username"><?php echo __('Username') ?> <span class="required">*</span></label><br/> - <input type="text" name="admin[username]" id="username" - value="<?php echo $this->getFormData()->getUsername() ?>" - title="<?php echo __('Username') ?>" data-validate="{required:true}" class="input-text"/> - </li> - <li> - <div class="input-box"> - <label for="password"><?php echo __('Password') ?> <span - class="required">*</span></label><br/> - <input type="password" name="admin[password]" id="password" - title="<?php echo __('Password') ?>" - data-validate="{required:true,'validate-admin-password':true}" class="input-text"/> - </div> - <div class="input-box"> - <label for="confirmation"><?php echo __('Confirm Password') ?> <span - class="required">*</span></label><br/> - <input type="password" name="admin[password_confirmation]" - title="<?php echo __('Password Confirmation') ?>" id="confirmation" - data-validate="{required:true, equalTo:'#password'}" class="input-text"/> - </div> - </li> - </ul> - </fieldset> - <fieldset class="group-select wide"> - <legend><?php echo __('Encryption Key') ?></legend> - <h4 class="legend"><?php echo __('Encryption Key') ?></h4> - <ul> - <li> - <input type="text" name="encryption_key" id="encryption_key" - value="<?php echo $this->getFormData()->getEncryptionKey() ?>" - title="<?php echo __('Encryption Key') ?>" class="input-text"/> - - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('Magento uses this key to encrypt passwords, credit cards and more. If you don\'t fill in this field, we\'ll create your encryption key and show it to you on the next page.') ?></small> - </p> - </li> - </ul> - </fieldset> - <div class="button-set"> - <p class="required">* <?php echo __('Required Fields') ?></p> - <button class="form-button" type="submit"><span><?php echo __('Continue') ?></span></button> - </div> -</form> -<script type="text/javascript"> -require([ - 'jquery', - "Magento_Install/js/install" -], function($){ - - $.mage.install.createAdmin('#form-validate'); - -}); -</script> diff --git a/app/code/Magento/Install/view/install/templates/db/main.phtml b/app/code/Magento/Install/view/install/templates/db/main.phtml deleted file mode 100644 index 5bd339bf5b9e2230ba00dc24cc7f607d9759b666..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/db/main.phtml +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/** - * Install database configuration template - * - * @see \Magento\Install\Block\Config - * @var $this \Magento\Install\Block\Config - */ -?> -<script type="text/javascript"> -require([ - 'prototype' -], function(){ - -//<![CDATA[ -dbTypeIds = []; -showContent = function(select) -{ - dbTypeIds.each(function (name) { - $(name + '_conn_form').hide() - }); - $(select.value + '_conn_form').show(); -} -//]]> - -}); -</script> - -<fieldset class="group-select"> - <legend><?php echo __('Connection') ?></legend> - <h4 class="legend"><?php echo __('Database Connection') ?></h4> - <ul> - <?php $dbTypeOptions = $this->getDatabaseBlocks(); ?> - <?php if (count($dbTypeOptions) > 0): ?> - <li> - <div class="input-box"> - <label for="prefix"><?php echo __('Database Type') ?></label><br /> - <select name="config[db_model]" onchange="showContent(this)"> - <?php foreach($dbTypeOptions as $block): ?> - <option value="<?php echo $block->getIdPrefix()?>" <?php if($this->getFormData()->getDbModel() == $block->getIdPrefix()):?>selected="selected"<?php endif;?>><?php echo $block->getTitle()?></option> - <?php endforeach; ?> - </select> - </div> - </li> - <?php endif ?> - - <?php foreach ($dbTypeOptions as $block): ?> - <script type="text/javascript"> -require([ - 'prototype' -], function(){ - - //<![CDATA[ - dbTypeIds[dbTypeIds.length] = "<?php echo $block->getIdPrefix(); ?>"; - //]]> - -}); -</script> - <?php $block = $this->getDatabaseBlock($block->getIdPrefix()) ?> - - <div id="<?php echo $block->getIdPrefix() ?>_conn_form" <?php if($this->getFormData()->getDbModel() != $block->getIdPrefix()):?>style="display:none;"<?php endif;?>> - <ul> - <?php echo $block->toHtml(); ?> - </ul> - </div> - <?php endforeach; ?> - </ul> -</fieldset> diff --git a/app/code/Magento/Install/view/install/templates/db/mysql4.phtml b/app/code/Magento/Install/view/install/templates/db/mysql4.phtml deleted file mode 100644 index 859a511eb49da7a01c3cab80fc7ef1060c777548..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/db/mysql4.phtml +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/** - * Install mysql database configuration template - * - * @see \Magento\Install\Block\Config - * @var $this \Magento\Install\Block\Config - */ -?> -<li> - <div class="input-box"> - <label for="host"><?php echo __('Host') ?> <span class="required">*</span></label><br /> - <input type="text" name="connection[<?php echo $this->getIdPrefix()?>][db_host]" id="host" value="<?php echo $this->getFormData()->getDbHost() ?>" title="<?php echo __('Database host') ?>" data-validate="{required:true}" class="input-text" /> - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('You can specify server port, ex.: localhost:3307<br />If you are not using default UNIX socket, you can specify it here instead of host, ex.: /var/run/mysqld/mysqld.sock') ?></small> - </p> - </div> - <div class="input-box"> - <label for="dbname"><?php echo __('Database Name') ?> <span class="required">*</span></label><br /> - <input type="text" name="connection[<?php echo $this->getIdPrefix()?>][db_name]" id="dbname" value="<?php echo $this->getFormData()->getDbName() ?>" title="<?php echo __('Database Name') ?>" data-validate="{required:true}" class="input-text" /> - </div> -</li> -<li> - <div class="input-box"> - <label for="user"><?php echo __('User Name') ?> <span class="required">*</span></label><br /> - <input type="text" name="connection[<?php echo $this->getIdPrefix()?>][db_user]" id="user" value="<?php echo $this->getFormData()->getDbUser() ?>" title="<?php echo __('Database user name') ?>" data-validate="{required:true}" class="input-text" /> - </div> - <div class="input-box"> - <label for="password"><?php echo __('User Password') ?></label><br /> - <input type="password" name="connection[<?php echo $this->getIdPrefix()?>][db_pass]" id="password" value="" title="<?php echo __('Database user password') ?>" class="input-text" /> - </div> -</li> -<li> - <div class="input-box"> - <label for="prefix"><?php echo __('Tables Prefix') ?></label><br /> - <input type="text" name="connection[<?php echo $this->getIdPrefix()?>][db_prefix]" id="prefix" value="<?php echo $this->getFormData()->getDbPrefix() ?>" title="<?php echo __('Tables Prefix') ?>" data-validate="{'validate-data':true}" class="input-text" /> - <p style="margin-top:4px; line-height:1.3em; color:#666;"> - <small><?php echo __('(Optional. Leave blank for no prefix)') ?></small> - </p> - </div> -</li> diff --git a/app/code/Magento/Install/view/install/templates/download.phtml b/app/code/Magento/Install/view/install/templates/download.phtml deleted file mode 100644 index 4a978fd46d4cc3e25a6e4582144e670a67955d29..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/download.phtml +++ /dev/null @@ -1,135 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/** - * Install download choice template - * - * @see \Magento\Install\Block\Download - */ -?> -<script type="text/javascript"> -require([ - 'prototype' -], function(){ - - startInstall = function(state) - { - $$('button').each(function(el) { - el.disabled = true; - el.addClassName('disabled'); - }); - var install = $('install_iframe'); - install.setStyle({'display':'block', 'width':'100%', 'height':'300px'}); - install.src = '<?php echo $this->getUrl('*/*/install') ?>do/start/state/'+state; - } - - installSuccess = function() - { - alert("<?php echo __("All packages were installed. Click 'OK' to continue with installation.") ?>"); - location.href = "<?php echo $this->getNextUrl() ?>"; - $$('button').each(function(el) { - el.disabled = true; - el.removeClassName('disabled'); - }); - } - - installFailure = function() - { - alert("<?php echo __("Something went wrong installing the Magento packages. Please read the log, correct any errors and try again.") ?>\n<?php echo __('As another option, you could try the "Manual Downloads and Upgrades" method.') ?>"); - $$('button').each(function(el) { - el.disabled = true; - el.removeClassName('disabled'); - }); - } - - -}); -</script> -<div class="page-head"> - <h3><?php echo __('Download Magento Core Modules and Updates') ?></h3> -</div> -<?php echo $this->getLayout()->getMessagesBlock()->getGroupedHtml() ?> - -<form action="<?php echo $this->getPostUrl() ?>" method="post" id="form-validate"> -<input type="hidden" id="continue" name="continue" value="svn" /> -<?php if($this->hasLocalCopy()): ?> -<fieldset class="group-select"> - <legend><?php echo __('Full Download / SVN Installation') ?></legend> - <h4 class="legend"><?php echo __('Full Download / SVN Installation') ?></h4> - - <p><?php echo __("If you have downloaded the full package or installed Magento through SVN, you should skip packages installation and validation by clicking the button below.") ?></p> - - <p><button class="form-button" type="submit" onclick="$('continue').value='svn'"><span><?php echo __('Continue Full Download / SVN Installation') ?></span></button></p> -</fieldset> -<?php endif; ?> - -<fieldset class="group-select"> - <legend><?php echo __('Package Management through the Web') ?></legend> - <h4 class="legend"><?php echo __('Package Management through the Web') ?></h4> - - <p><?php echo __("If you wish to manage Magento packages through the web admin interface, you will need to have web writeable permissions applied to all Magento folders and files.") ?></p> - <p><?php echo __("If your server is running on MS Windows, most probably you will not need to change anything.") ?></p> - <p><?php echo __("If you are running PHP as CGI, your PHP processes may run under the same user as the user you used when uploading Magento files.") ?></p> - <p><?php echo __("In other cases you will need to make Magento files writeable for the user that the web server process is running under.") ?></p> - - <h4><?php echo __("Preferred stability: %1", __("BETA")) ?></h4> - <p><?php echo __("This is the most stable state available for Magento packages.") ?><br/><?php echo __("Choose this if you would like to test storefront and admin functionality.") ?></p> - <p><button class="form-button" type="button" onclick="startInstall('beta')"><span><?php echo __('Proceed With Automatic Download (%1)', __('Beta')) ?></span></button></p> -<br/> - <h4><?php echo __("Preferred stability: %1", __("ALPHA")) ?></h4> - <p><?php echo __("If you are a developer and would like to have the latest public updates, choose this option.") ?><br/><?php echo __("Please note that it is much less stable than beta.") ?></p> - <p><button class="form-button" type="button" onclick="startInstall('alpha')"><span><?php echo __('Proceed With Automatic Download (%1)', __('Alpha')) ?></span></button></p> -<br/> - <iframe id="install_iframe" src="<?php echo $this->getUrl('*/*/install') ?>" style="display:none" frameborder="no"></iframe> -</fieldset> - -<fieldset class="group-select"> - <legend><?php echo __('Manual Downloads and Upgrades') ?></legend> - <h4 class="legend"><?php echo __('Manual Downloads and Upgrades') ?></h4> - - <p><?php echo __("If you are running the install wizard over a previously downloaded and installed Magento installation, proceed with this method.") ?></p> - <p><?php echo __("If you do not wish or are not able to have Magento folders writeable for the web process, you could use PEAR executable located in the root of Magento installation.") ?></p> - <p><?php echo __("Please note that only UNIX, Linux and Mac OS X shells are currently supported. For Windows use the '%1' option.", __('Package Management through the Web')) ?></p> - <p><?php echo __("Run this in your shell from Magento root folder:") ?></p> - <pre> -./pear mage-setup -./pear install mage-core/\Magento\Pear_Helpers mage-core/Lib_ZF mage-core/Lib_Varien -./pear install mage-core/Magento_All mage-core/Interface_Install_Default -./pear install mage-core/Interface_Frontend_Default mage-core/Interface_Adminhtml_Default - -</pre> - <p><?php echo __("Click the button below when the installation is finished.") ?></p> - - <p><button class="form-button" type="submit" onclick="$('continue').value='manual'"><span><?php echo __('Continue After Manual Download') ?></span></button></p> -</fieldset> - -</form> - -<script type="text/javascript"> -require(['prototype'], function(){ - - tabs = new Varien.Tabs('.tabs'); - -}); -</script> diff --git a/app/code/Magento/Install/view/install/templates/end.phtml b/app/code/Magento/Install/view/install/templates/end.phtml deleted file mode 100644 index 59dd2dddc123477f8d1bf1f3907504b0c9ae9428..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/end.phtml +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/** - * Installation end page - * - * @see \Magento\Install\Block\End - */ -?> -<div class="page-head"> - <h3><?php echo __("You're All Set") ?>!</h3> -</div> -<?php if ($this->getIframeSourceUrl()): ?> - <iframe id="iframe_box" src="<?php echo $this->getIframeSourceUrl() ?>" frameborder="0" width="650" height="600"></iframe> -<?php endif; ?> -<p><?php echo __('Get ready to experience Open-Source eCommerce Evolved.') ?></p> -<?php if($this->getEncryptionKey()): ?> -<p><?php echo __('Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).') ?></p> -<p><strong><big><?php echo $this->getEncryptionKey() ?></big></strong></p> -<p><?php echo __('(Make sure you keep it in a safe place.)') ?></p> -<?php endif; ?> -<div class="button-set"> - <button class="form-button" onclick="window.open('<?php echo $this->getUrl('') ?>')" type="button"><?php echo __('Go to Frontend') ?></button> - <button class="form-button" onclick="window.open('<?php echo $this->helper('Magento\Backend\Helper\Data')->getHomePageUrl() ?>')" type="button"><?php echo __('Go to Backend') ?></button> -</div> diff --git a/app/code/Magento/Install/view/install/templates/locale.phtml b/app/code/Magento/Install/view/install/templates/locale.phtml deleted file mode 100644 index 8863efafd712fb016e7fb42d50bc9130df896557..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/locale.phtml +++ /dev/null @@ -1,73 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/** - * Install localization template - * - * @see \Magento\Install\Block\Locale - */ -?> -<div class="page-head"> - <h3><?php echo __('Localization') ?></h3> -</div> -<?php echo $this->getLayout()->getMessagesBlock()->getGroupedHtml() ?> - -<form action="<?php echo $this->getPostUrl() ?>" method="get" id="form-validate"> -<fieldset class="group-select"> - <legend><?php echo __('Locale') ?></legend> - <h4 class="legend"><?php echo __('Locale settings') ?></h4> - <ul> - <li> - <div class="input-box"> - <label for="locale"><?php echo __('Locale') ?> <span class="required">*</span></label><br/> - <?php echo $this->getLocaleSelect() ?> - </div> - </li> - <li> - <div class="input-box"> - <label for="timezone"><?php echo __('Time Zone') ?> <span class="required">*</span></label><br/> - <?php echo $this->getTimezoneSelect() ?> - </div> - <div class="input-box"> - <label for="currency"><?php echo __('Default Currency') ?> <span class="required">*</span></label><br/> - <?php echo $this->getCurrencySelect() ?> - </div> - </li> - </ul> -</fieldset> -<div class="button-set"> - <p class="required">* <?php echo __('Required Fields') ?></p> - <button class="form-button" type="submit"><span><?php echo __('Continue') ?></span></button> -</div> -</form> -<script type="text/javascript"> -require([ - "jquery", - "Magento_Install/js/install" -], function($){ - - $.mage.install.changeLocale('#locale', '<?php echo $this->getChangeUrl();?>'); - -}); -</script> diff --git a/app/code/Magento/Install/view/install/templates/page.phtml b/app/code/Magento/Install/view/install/templates/page.phtml deleted file mode 100644 index 83c6dfce4f7b85f4fa15973ffa9518db608c5dae..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/page.phtml +++ /dev/null @@ -1,123 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> - <title><?php echo __('Magento Installation Wizard') ?></title> - - <link rel="icon" href="<?php echo $this->getViewFileUrl('Magento_Theme::favicon.ico') ?>" type="image/x-icon"/> - <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Magento_Theme::favicon.ico') ?>" type="image/x-icon"/> - <script type="text/javascript"> - var require = { - "baseUrl": "<?php echo $this->getViewFileUrl('/') ?>", - "paths": { - "jquery/ui": "jquery/jquery-ui" - } - }; - </script> - - - <script src="<?php echo $this->getViewFileUrl('requirejs/require.js') ?>"></script> - <script src="<?php echo $this->getViewFileUrl('jquery/jquery.js') ?>"></script> - <script src="<?php echo $this->getViewFileUrl('app-config.js') ?>"></script> - - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('Magento_Install::css/mage-js-style.css') ?>" type="text/css" - media="all"/> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('Magento_Install::css/validate.css') ?>" type="text/css" - media="all"/> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/reset.css') ?>" type="text/css" media="all"/> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/boxes.css') ?>" type="text/css" media="all"/> - <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/clears.css') ?>" type="text/css" media="all"/> - <?php echo $this->getTranslatorScript(); ?> -</head> - -<body> -<!-- [start] header --> -<div class="header"> - <div class="header-top-container"> - <div class="header-top"> - <h1 id="logo"> - <a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getViewFileUrl('images/logo.gif') ?>" - title="<?php echo __('Magento') ?>" - alt="<?php echo __('Magento') ?>"/></a> - </h1> - - <?php echo $this->getChildHtml('topSearch') ?> - - <div class="quick-access"> - <div class="account-access"> - <strong> - <?php echo $this->getWelcome() ?></strong> <?php echo $this->getChildHtml('topLeftLinks') ?> - </div> - <div class="shop-access"> - <?php echo $this->getChildHtml('topRightLinks') ?> - </div> - </div> - - </div> - </div> - <?php echo $this->getChildHtml('topMenu') ?> -</div> -<!-- [end] header --> - -<!-- [start] middle --> -<?php echo $this->getChildHtml('store') ?> -<div class="middle-container"> - <div class="middle col-2-left-layout"> - <?php echo $this->getChildHtml('breadcrumbs') ?> - - <!-- [start] left --> - <div class="col-left side-col"> - <?php echo $this->getChildHtml('left') ?> - </div> - <div id="main" class="col-main"> - <!-- [start] global messages --> - <?php echo $this->getChildHtml('global_messages') ?> - <!-- [end] global messages --> - <!-- [start] content --> - <?php echo $this->getChildHtml('content') ?> - <!-- [end] content --> - </div> - </div> - <!-- [end] center --> -</div> -<!-- [end] middle --> - -<!-- [start] footer --> -<div class="footer-container"> - <div class="footer"> - <p class="legality"> - <?php echo __('Help Us Keep Magento Healthy') ?> - <a - href="http://www.magentocommerce.com/bug-tracking" - target="varien_external"><strong><?php echo __('Report All Bugs') ?></strong></a> <?php echo __('(ver. %1)', \Magento\Framework\AppInterface::VERSION) ?> - <br/> - <?php echo $this->getChildHtml('copyright');?> - </p> - </div> -</div> -<!-- [end] footer --> -</body> -</html> diff --git a/app/code/Magento/Install/view/install/templates/state.phtml b/app/code/Magento/Install/view/install/templates/state.phtml deleted file mode 100644 index 46af94b14591232c416414f132bce1db8461258f..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/templates/state.phtml +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -?> -<div style="border:1px solid #ccc; background:#f6f6f6;"> - <h2 style="margin-bottom:0; border-bottom:1px solid #ccc; padding:4px 10px; color:#3c5974; font-size:1.4em;"><?php echo __('Installation') ?></h2> - <ol style="padding:10px; border-top:1px solid #fff;"> - <?php foreach ($this->getDownloaderSteps() as $step): ?> - <li><?php echo $step ?></li> - <?php endforeach; ?> - <li><?php echo __('Download')?></li> - <?php foreach ($steps as $_step): ?> - <li <?php if ($_step->getActive()): ?>style="color:green; font-weight:bold; "<?php endif ?>><?php echo __($_step->getCode()) ?></li> - <?php endforeach ?> - </ol> -</div> - -<br/> -<p> - <?php echo __('Having trouble installing Magento?') ?> - <?php echo __('Check out our') ?> <a href="http://www.magentocommerce.com/magento2/install" - target="installation_guide"><?php echo __('Installation Guide') ?></a> -</p> diff --git a/app/code/Magento/Install/view/install/web/css/mage-js-ee-style.css b/app/code/Magento/Install/view/install/web/css/mage-js-ee-style.css deleted file mode 100644 index 9b58eeb2b3d59328f07cdc3a99cda533b7aa0cc0..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/web/css/mage-js-ee-style.css +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -input.mage-error { - background: none repeat scroll 0 0 #FFF7F5 !important; - border: 1px solid #F47D4E !important; -} - -div.mage-error { - clear: both; - color: #D91A00 !important; - font-size: 11px !important; - padding: 3px 0 0 !important; -} diff --git a/app/code/Magento/Install/view/install/web/css/mage-js-style.css b/app/code/Magento/Install/view/install/web/css/mage-js-style.css deleted file mode 100644 index b580d80a704091c47a7506c8052c2e9c44c1d943..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/web/css/mage-js-style.css +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -button.mage-disabled { - background: none repeat scroll 0% 0% #bbb; - border-color: #bbb; - cursor: default; - color: white; -} - -button.mage-enabled { - background: #f18200; - cursor: pointer; - color: #C73615; -} - diff --git a/app/code/Magento/Install/view/install/web/css/validate.css b/app/code/Magento/Install/view/install/web/css/validate.css deleted file mode 100644 index 95d9adb4ffbb34a414ff8695068f709f10086f08..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/web/css/validate.css +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -input.mage-error, textarea.mage-error, ul.mage-error, select.mage-error { - background: none repeat scroll 0 0 #FAEBE7 !important; - border: 1px dashed #EB340A !important; - -} -div.mage-error { - background: url(../images/validation_advice_bg.gif) no-repeat scroll 2px 1px transparent; - clear: both; - font-size: 0.95em; - font-weight: bold; - line-height: 1.25em; - margin-top: 3px; - min-height: 15px; - padding-left: 17px; - color: #DF280A; -} diff --git a/app/code/Magento/Install/view/install/web/images/validation_advice_bg.gif b/app/code/Magento/Install/view/install/web/images/validation_advice_bg.gif deleted file mode 100644 index 46b1a2267ba5ad31f59a9c6cd8eaac9ee3b0f8ce..0000000000000000000000000000000000000000 Binary files a/app/code/Magento/Install/view/install/web/images/validation_advice_bg.gif and /dev/null differ diff --git a/app/code/Magento/Install/view/install/web/js/install.js b/app/code/Magento/Install/view/install/web/js/install.js deleted file mode 100644 index dd0a3dc1ba7088fd383b487daa7ee40b818d0089..0000000000000000000000000000000000000000 --- a/app/code/Magento/Install/view/install/web/js/install.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/*jshint browser:true jquery:true */ -define([ - "jquery", - "mage/mage", - "mage/validation/validation" -], function($) { - - $.extend(true, $.mage, { - install: { - /** - * Beginning phase of the installation process. Check the box to agree to Terms and - * Conditions, License, etc. and then click the Continue button. - * @param {string} agreeBox Selector for the agree checkbox - * @param {string} submitButton Selector for the submit button - */ - begin: function(agreeBox, submitButton) { - $(agreeBox).on('click', function(e) { - var btn = $(submitButton); - if (e.target.checked) { - btn.removeClass('mage-disabled').addClass('mage-enabled') - .removeAttr('disabled'); - } else { - btn.removeClass('mage-enabled').addClass('mage-disabled') - .attr('disabled', 'disabled'); - } - }); - }, - - /** - * Configuration phase. Prompt for hostname, database information, and options, - * such as whether to enable SSL, referred to as secure options. - * @param {string} form Selector for the configuration form - * @param {string} useSecure Selector for the 'Use Secure (SSL)' checkbox - * @param {string} useSecureOptions Selector for the secure (SSL) options content - */ - configureForm: function(form, useSecure, useSecureOptions) { - $(form).validation(); - $(useSecure).on('click', function(e) { - return e.target.checked ? - $(useSecureOptions).show() : $(useSecureOptions).hide(); - }); - }, - - /** - * Configure phase. Happens when an error occurs and intervention is needed. Prompts - * the user to fix the issue and click a Continue button to proceed. - * @param {string} continueButton Selector for the continue button - * @param {string} url The URL to proceed to next after clicking the button - */ - configureContinue: function(continueButton, url) { - $(continueButton).on('click', function() { - location.href = url; - }); - }, - - /** - * Create backend administrator login form validation. Enter user's name, email, - * admin username, and password. Validate the form. - * @param {string} form Selector for the administrator form - */ - createAdmin: function(form) { - $(form).validation(); - }, - - /** - * Generate a new URL whenever a different locale is selected and refresh the - * page to that new locale based URL. - * @param {string} localeField Selector for the locale input field - * @param {string} url Partial URL used to construct full URL to change the locale - */ - changeLocale: function(localeField, url) { - $(localeField).on('change', function() { - location.href = url + 'locale/' + $(localeField).val() + '/?timezone=' + - $('#timezone').val() + '&currency=' + $('#currency').val(); - }); - } - } - }); - -}); \ No newline at end of file diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json index ce0e0cb048915378706e436319d5b19cfd489300..8abd0ede0e4908fced09e70bb85b88dee850cc3e 100644 --- a/app/code/Magento/Integration/composer.json +++ b/app/code/Magento/Integration/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-user": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", - "magento/module-authorization": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-user": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", + "magento/module-authorization": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php b/app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php index bc364bcda9907222a088b82e7f3df98b4ab34daf..0da0ebbc9869b154753440b3e423baf6d359debb 100644 --- a/app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php +++ b/app/code/Magento/Integration/sql/integration_setup/install-1.0.0.0.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Framework\Module\Setup $installer */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.0-1.0.0.1.php b/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.0-1.0.0.1.php index f6beb08170b82666991656dd93680139bd879777..994951d4f26c5db62938133629a945264ae94f95 100644 --- a/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.0-1.0.0.1.php +++ b/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.0-1.0.0.1.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Integration\Model\Resource\Setup $installer */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( $installer->getTable('integration'), diff --git a/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.1-1.0.0.2.php b/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.1-1.0.0.2.php index 271c328339f9836eeddc1d8829c30f4bd1954f20..b83205d54d2b0150142b63052b5e1e413d3dbdd6 100644 --- a/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.1-1.0.0.2.php +++ b/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.1-1.0.0.2.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Integration\Model\Resource\Setup $installer */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( $installer->getTable('integration'), diff --git a/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.2-1.0.0.3.php b/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.2-1.0.0.3.php index f77a5d32b3cad4fa860034d239e147a24c696d76..ce9a9a55b6c6c3fb5697550a6212a348e5d862b1 100644 --- a/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.2-1.0.0.3.php +++ b/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.2-1.0.0.3.php @@ -24,10 +24,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Integration\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; - -/* @var $connection \Magento\Framework\DB\Adapter\AdapterInterface */ $connection = $installer->getConnection(); $oauthTokenTable = $installer->getTable('oauth_token'); diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json index ffd074ea7b3958dc6debee7cfc8bde81440773d4..194a561b6702d04b6aec5bbe1a5d8a0f8ac4a6b3 100644 --- a/app/code/Magento/LayeredNavigation/composer.json +++ b/app/code/Magento/LayeredNavigation/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Log/Model/Log.php b/app/code/Magento/Log/Model/Log.php index a3841892b636513661d6a3493e0ccb04605bd6ab..96207c06b25066a950e7a88ac60f22f797c6a855 100644 --- a/app/code/Magento/Log/Model/Log.php +++ b/app/code/Magento/Log/Model/Log.php @@ -28,8 +28,6 @@ namespace Magento\Log\Model; * * @method \Magento\Log\Model\Resource\Log _getResource() * @method \Magento\Log\Model\Resource\Log getResource() - * @method string getSessionId() - * @method \Magento\Log\Model\Log setSessionId(string $value) * @method string getFirstVisitAt() * @method \Magento\Log\Model\Log setFirstVisitAt(string $value) * @method string getLastVisitAt() diff --git a/app/code/Magento/Log/Model/Visitor.php b/app/code/Magento/Log/Model/Visitor.php index 915a77c20f65ff1eb46179021574f1445791e8f8..1ef1cf8600c487d6bfd9412fd97512cce9df954c 100644 --- a/app/code/Magento/Log/Model/Visitor.php +++ b/app/code/Magento/Log/Model/Visitor.php @@ -26,8 +26,6 @@ namespace Magento\Log\Model; /** * @method Resource\Visitor _getResource() * @method Resource\Visitor getResource() - * @method string getSessionId() - * @method Visitor setSessionId(string $value) * @method Visitor setFirstVisitAt(string $value) * @method Visitor setLastVisitAt(string $value) * @method Visitor setVisitorId(int $value) diff --git a/app/code/Magento/Log/composer.json b/app/code/Magento/Log/composer.json index c84df82df44771d1adeeb65a258cb79a3708c5e7..e6decb233a938bbed19e33bbde3245e246db8c60 100644 --- a/app/code/Magento/Log/composer.json +++ b/app/code/Magento/Log/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Log/data/log_setup/data-install-1.6.0.0.php b/app/code/Magento/Log/data/log_setup/data-install-1.6.0.0.php index 3a45b26c8bd29c6743cc1b94995c0f7743a4acec..8a4b1313fc9b59cb14e07a4dcf32fdeeef7078ec 100644 --- a/app/code/Magento/Log/data/log_setup/data-install-1.6.0.0.php +++ b/app/code/Magento/Log/data/log_setup/data-install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$installer = $this; /* @var $installer \Magento\Framework\Module\Setup */ +$installer = $this; $data = array( array('type_id' => 1, 'type_code' => 'hour', 'period' => 1, 'period_type' => 'HOUR'), diff --git a/app/code/Magento/Log/sql/log_setup/install-1.6.0.0.php b/app/code/Magento/Log/sql/log_setup/install-1.6.0.0.php index 35be24be9ccbee2a7472a4932e524ee9754e7999..ccfdf163263fedb216b91cc4ac0157c30dcef392 100644 --- a/app/code/Magento/Log/sql/log_setup/install-1.6.0.0.php +++ b/app/code/Magento/Log/sql/log_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); @@ -288,15 +288,6 @@ $table = $installer->getConnection()->newTable( 'Log Visitors Table' ); $installer->getConnection()->createTable($table); -$installer->getConnection()->addForeignKey( - $installer->getFkName('log_visitor', 'visitor_id', 'customer_visitor', 'visitor_id'), - $installer->getTable('log_visitor'), - 'visitor_id', - $installer->getTable('customer_visitor'), - 'visitor_id', - \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, - \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE -); /** * Create table 'log_visitor_info' diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json index 20d701c86dc8ca9b6c9af98425a058fd37816a37..2fb27823c7b173a547a5965d7197db923f1a2968 100644 --- a/app/code/Magento/Msrp/composer.json +++ b/app/code/Magento/Msrp/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-bundle": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-configurable-product": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-downloadable": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-grouped-product": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-bundle": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-configurable-product": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-downloadable": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-grouped-product": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json index 9fe7e3d1c89a5bc7ac01e500e653b0a82bcb0587..e4df9fe320eb0ce1c60eca4ae8dbb2c0558ccce3 100644 --- a/app/code/Magento/Multishipping/composer.json +++ b/app/code/Magento/Multishipping/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml index 2aea13745e908e6e98ffa3c922d151128411b76c..ac9593c75f8802c4e0ae445a0dd085187964ecac 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml @@ -52,16 +52,26 @@ <tr> <td class="col product" data-th="<?php echo $this->escapeHtml(__('Product'));?>"><?php echo $this->getItemHtml($_item->getQuoteItem()) ?></td> <td class="col qty" data-th="<?php echo $this->escapeHtml(__('Qty'));?>"> - <div class="control qty"> - <input type="number" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->escapeHtml($_item->getQty()) ?>" size="2" class="input-text qty" data-validate="{number: true}"/> + <div class="field qty"> + <label for="ship-<?php echo $_index ?>-<?php echo $_item->getQuoteItemId() ?>-qty" class="label"> + <span><?php echo __('Qty') ?></span> + </label> + <div class="control"> + <input type="number" id="ship-<?php echo $_index ?>-<?php echo $_item->getQuoteItemId() ?>-qty" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->escapeHtml($_item->getQty()) ?>" size="2" class="input-text qty" data-validate="{number: true}"/> + </div> </div> </td> <td class="col address" data-th="<?php echo $this->escapeHtml(__('Send To'));?>"> <?php if ($_item->getProduct()->getIsVirtual()): ?> <div class="applicable"><?php echo __('Shipping selection is not applicable.'); ?></div> <?php else: ?> - <div class="control address"> - <?php echo $this->getAddressesHtmlSelect($_item, $_index); ?> + <div class="field address"> + <label for="ship_<?php echo $_index ?>_<?php echo $_item->getQuoteItemId() ?>_address" class="label"> + <span><?php echo __('Send To') ?></span> + </label> + <div class="control"> + <?php echo $this->getAddressesHtmlSelect($_item, $_index); ?> + </div> </div> <?php endif; ?> </td> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml index 43876ba26e0010551c526e37333896cc08a1617c..34fd873537ca4ba0975709d8a277ae29dd30b5ca 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml @@ -43,34 +43,36 @@ </div> </div> <div class="box box-billing-method"> - <strong class="box-title"><span><?php echo __('Payment Method') ?></span></strong> - <div class="box-content"> - <?php echo $this->getChildHtml('payment_methods_before') ?> - <?php /* Payment methods forms list */ ?> - <dl class="items methods-payment" id="payment-methods"> - <?php - $_methods = $this->getMethods(); - $_methodsCount = count($_methods); - ?> - <?php foreach ($_methods as $_method): $_code = $_method->getCode() ?> - <dt class="item-title"> - <?php if ($_methodsCount > 1): ?> - <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if ($this->getSelectedMethodCode() == $_code): ?> checked="checked"<?php endif; ?> class="radio"/> - <?php else : ?> - <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio solo method"/> + <fieldset class="fieldset"> + <legend class="legend box-title"><span><?php echo __('Payment Method') ?></span></legend><br> + <div class="box-content"> + <?php echo $this->getChildHtml('payment_methods_before') ?> + <?php /* Payment methods forms list */ ?> + <dl class="items methods-payment" id="payment-methods"> + <?php + $_methods = $this->getMethods(); + $_methodsCount = count($_methods); + ?> + <?php foreach ($_methods as $_method): $_code = $_method->getCode() ?> + <dt class="item-title"> + <?php if ($_methodsCount > 1): ?> + <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" <?php if ($this->getSelectedMethodCode() == $_code): ?> checked="checked"<?php endif; ?> class="radio"/> + <?php else : ?> + <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio solo method"/> + <?php endif; ?> + <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($_method->getTitle()) ?></label> + </dt> + <?php if ($html = $this->getChildHtml('payment.method.' . $_code)) : ?> + <dd class="item-content"> + <?php echo $html; ?> + </dd> <?php endif; ?> - <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($_method->getTitle()) ?></label> - </dt> - <?php if ($html = $this->getChildHtml('payment.method.' . $_code)) : ?> - <dd class="item-content"> - <?php echo $html; ?> - </dd> - <?php endif; ?> - <?php endforeach; ?> - </dl> - <?php echo $this->getChildHtml('payment_methods_after') ?> - <?php echo $this->getChildHtml('checkout_billing_items') ?> - </div> + <?php endforeach; ?> + </dl> + <?php echo $this->getChildHtml('payment_methods_after') ?> + <?php echo $this->getChildHtml('checkout_billing_items') ?> + </div> + </fieldset> </div> </div> </div> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml index fc03ee38027f2900279bc6f17098829d8a62451a..a0470c099a124a768e12413bd171988707e04972 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/shipping.phtml @@ -55,33 +55,40 @@ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?> <dt class="item-title"><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt> <dd class="item-content"> - <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> - <div class="field choice"> - <?php if ($_rate->getErrorMessage()): ?> - <strong><?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></strong> - <?php else: ?> - <?php if ($_sole) : ?> - <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" class="radio solo method" checked="checked"/> + <fieldset class="fieldset"> + <legend class="legend"> + <span><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></span> + </legend><br> + <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?> + <div class="field choice"> + <?php if ($_rate->getErrorMessage()): ?> + <strong><?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></strong> <?php else: ?> - <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> - <?php endif; ?> - <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> - <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> - <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - <span class="price-including-tax" data-label="<?php echo __('Incl. Tax'); ?>"> - <?php endif; ?> - <?php echo $_incl; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - </span> - <?php endif; ?> - <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> - <span class="price-excluding-tax" data-label="<?php echo __('Excl. Tax'); ?>"><?php echo $_excl; ?></span> - <?php endif; ?> - </label> - <?php endif ?> - </div> - <?php endforeach; ?> + <div class="control"> + <?php if ($_sole) : ?> + <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" class="radio solo method" checked="checked"/> + <?php else: ?> + <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" /> + <?php endif; ?> + </div> + <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> + <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()); ?> + <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + <span class="price-including-tax" data-label="<?php echo __('Incl. Tax'); ?>"> + <?php endif; ?> + <?php echo $_incl; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + </span> + <?php endif; ?> + <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?> + <span class="price-excluding-tax" data-label="<?php echo __('Excl. Tax'); ?>"><?php echo $_excl; ?></span> + <?php endif; ?> + </label> + <?php endif ?> + </div> + <?php endforeach; ?> + </fieldset> </dd> <?php endforeach; ?> </dl> diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json index 33f0cdcbb30c016c62ae546ccf2952a807b6fe13..2095dfd29d1493fea55720f5f40399a75351523f 100644 --- a/app/code/Magento/Newsletter/composer.json +++ b/app/code/Magento/Newsletter/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-widget": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-email": "0.1.0-alpha102", - "magento/module-cron": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-widget": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-email": "0.1.0-alpha103", + "magento/module-cron": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php index fc251177db45dcc94120ec8eb63132ded84e0e19..8f35fc9e46868a2dd130ee0c27a860940a862db4 100644 --- a/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup\Migration */ +/** @var $this \Magento\Framework\Module\Setup */ $installer = $this->createMigrationSetup(); $installer->startSetup(); diff --git a/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php b/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php index 59d6bb8da52e409e895d7f147a7887806f7ea822..8413bb44fcf43e7a289cac128fb955c9d7b63555 100644 --- a/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php +++ b/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php @@ -22,14 +22,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - /** * Newsletter install * * @author Magento Core Team <core@magentocommerce.com> */ + +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml index df99b50994ab432243a4aa2bc43ec80505aea9a5..f898cfe5d74f00330dd1847858d1c645516beab7 100644 --- a/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml +++ b/app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml @@ -26,17 +26,15 @@ <div class="title"><strong>Newsletter</strong></div> <div class="content"> <form class="form subscribe" action="<?php echo $this->getFormActionUrl() ?>" method="post" id="newsletter-validate-detail"> - <fieldset class="fieldset"> - <div class="field newsletter"> - <label class="label" for="newsletter"><span><?php echo __('Sign Up for Our Newsletter:') ?></span></label> - <div class="control"> - <input name="email" type="email" id="newsletter" - placeholder="<?php echo __('Enter your email address') ?>" - data-mage-init='{"newsletter":{"formSelector": "#newsletter-validate-detail", "placeholder": "<?php echo __('Enter your email address') ?>"}}' - data-validate="{required:true, 'validate-email':true}"/> - </div> + <div class="field newsletter"> + <label class="label" for="newsletter"><span><?php echo __('Sign Up for Our Newsletter:') ?></span></label> + <div class="control"> + <input name="email" type="email" id="newsletter" + placeholder="<?php echo __('Enter your email address') ?>" + data-mage-init='{"newsletter":{"formSelector": "#newsletter-validate-detail", "placeholder": "<?php echo __('Enter your email address') ?>"}}' + data-validate="{required:true, 'validate-email':true}"/> </div> - </fieldset> + </div> <div class="actions"> <button class="action subscribe" title="<?php echo __('Subscribe') ?>" type="submit"> <span><?php echo __('Subscribe') ?></span> diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json index 3c2931a9f975ac6af9b44ac37157e07aee26050e..2b06806aa09575ce958bd9e4e74b119b17d1fe4d 100644 --- a/app/code/Magento/OfflinePayments/composer.json +++ b/app/code/Magento/OfflinePayments/composer.json @@ -3,12 +3,12 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-payment": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-payment": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json index 495d293b7df2a5e50865fe694685bb3930b85866..3a7d0d251f57fdde3e3a88beeb06325e0d518935 100644 --- a/app/code/Magento/OfflineShipping/composer.json +++ b/app/code/Magento/OfflineShipping/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-sales-rule": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-sales-rule": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php b/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php index 9196d04196fbf19754cd197f62b78fed9192b70b..2432d3e6996154519e1c0eda0405ded497c77865 100644 --- a/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php +++ b/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Ogone/composer.json b/app/code/Magento/Ogone/composer.json index c7f1e983301be6a0b35cc5c5cdebec65d5ff03da..dc6ff442783adba16798ae21ecdecc47c149f3b7 100644 --- a/app/code/Magento/Ogone/composer.json +++ b/app/code/Magento/Ogone/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Ogone/data/ogone_setup/data-install-1.6.0.0.php b/app/code/Magento/Ogone/data/ogone_setup/data-install-1.6.0.0.php index 1334c28d9aa27dc671f32cd61918c406ecff0219..0348dd7c407d435f423a5d337bcd4a37b0967fce 100644 --- a/app/code/Magento/Ogone/data/ogone_setup/data-install-1.6.0.0.php +++ b/app/code/Magento/Ogone/data/ogone_setup/data-install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$installer = $this; /* @var $installer \Magento\Framework\Module\Setup */ +$installer = $this; $data = array(); $statuses = array( diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json index 173f05e07d6d0f8df8e9f6e2b07ebb3a2ea25d1c..b80a9f8d3a52f4050693a3b9f7f8245526d2759f 100644 --- a/app/code/Magento/PageCache/composer.json +++ b/app/code/Magento/PageCache/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/PayPalRecurringPayment/composer.json b/app/code/Magento/PayPalRecurringPayment/composer.json index 79620286d9627dea9267f23d11566bdea6658c64..c7e5ca5291b3f6b7e2d7d41e97bbbf2a5aaf486d 100644 --- a/app/code/Magento/PayPalRecurringPayment/composer.json +++ b/app/code/Magento/PayPalRecurringPayment/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-paypal": "0.1.0-alpha102", - "magento/module-recurring-payment": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-paypal": "0.1.0-alpha103", + "magento/module-recurring-payment": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json index 9b965355aa3e174a24db5b21a2b4e412e0ea74c5..a10ad27cc9ce58970c39a13eb681d878a4714f5f 100644 --- a/app/code/Magento/Payment/composer.json +++ b/app/code/Magento/Payment/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-centinel": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-centinel": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index 2d78245680de10232bccba4cb1ff4cf342967dde..a1b9235ad8ebd56ab0fb803fcd4bfbd44827cabb 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -135,7 +135,7 @@ class Iframe extends \Magento\Payment\Block\Form $this->_block = $this->getLayout()->createBlock( 'Magento\\Paypal\\Block\\' . str_replace( ' ', - \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR, + '\\', ucwords(str_replace('_', ' ', $this->_paymentMethodCode)) ) . '\\Iframe' ); diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json index 09d9c8a74bfe3711c1951d5604c80cfffe663f01..7cca4e588801dc19e87b41dbe1d482d337a6d8d2 100644 --- a/app/code/Magento/Paypal/composer.json +++ b/app/code/Magento/Paypal/composer.json @@ -3,25 +3,25 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-centinel": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-centinel": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Paypal/data/paypal_setup/data-upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/Paypal/data/paypal_setup/data-upgrade-1.6.0.2-1.6.0.3.php index 11cc8e870d65f4b0a695bed1e0a9fba87929068e..b34584387c7a07dd74e18e208523fd7e7bbd50b4 100644 --- a/app/code/Magento/Paypal/data/paypal_setup/data-upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/Paypal/data/paypal_setup/data-upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Framework\Module\Setup */ +/** @var $this \Magento\Sales\Model\Resource\Setup */ $installer = $this; $connection = $installer->getConnection(); $installer->startSetup(); diff --git a/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php b/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php index 9607f307fe10090d7c5de15034667c382c65f608..b1809bf6af86343c0881cab69917571bf72ffc17 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Sales\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /** diff --git a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php index 215a0efabd59d4e3df264b6ca31a6f268ff150f3..7355597d8f51809043be3ebe127562419a106e33 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Sales\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /** diff --git a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php index 026c521e712702df1628b5661f70883ab56827f1..96281ede42f6d4a832bd786a917a9b0a691b1f42 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Sales\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( diff --git a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.3-1.6.0.4.php b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.3-1.6.0.4.php index 2ab3222b039ddd83eb65a1b1d8580cdb59964ca2..03fdc17f2ead9205c6ab0d7d30539508f90cbaf1 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.3-1.6.0.4.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.3-1.6.0.4.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Sales\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection() diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json index c3ab69a918a65a1f1e666c8f364c3c15c4ee9b18..5c946c684d0a68291116bc5a3a43764d258b117d 100644 --- a/app/code/Magento/Persistent/composer.json +++ b/app/code/Magento/Persistent/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-cron": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-cron": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php b/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php index 24112e2023070631cb351b510b17480bec8a7e5d..fb33978aa5d690ca5080aba62b810f48e85913f8 100644 --- a/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php +++ b/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json index 6f7242980e32cef12cc68b51e37f19d287433cc9..838a97b3f97567325410c309cf36fac20c01f8a5 100644 --- a/app/code/Magento/ProductAlert/composer.json +++ b/app/code/Magento/ProductAlert/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/ProductAlert/sql/productalert_setup/install-1.6.0.0.php b/app/code/Magento/ProductAlert/sql/productalert_setup/install-1.6.0.0.php index c7d4e70b70be8521006106e2cead2b2baed79b2b..7eac79e51e1153a314a8263c27dde20a038b82e6 100644 --- a/app/code/Magento/ProductAlert/sql/productalert_setup/install-1.6.0.0.php +++ b/app/code/Magento/ProductAlert/sql/productalert_setup/install-1.6.0.0.php @@ -27,8 +27,9 @@ * * @author Magento Core Team <core@magentocommerce.com> */ + +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); /** diff --git a/app/code/Magento/RecurringPayment/composer.json b/app/code/Magento/RecurringPayment/composer.json index 9b1c2893c7c4fe323851281bf393529e6ce80e09..b4b05b2f40d1bce9f054d3f8dd91d12966035a12 100644 --- a/app/code/Magento/RecurringPayment/composer.json +++ b/app/code/Magento/RecurringPayment/composer.json @@ -3,22 +3,22 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/RecurringPayment/data/recurringpayment_setup/data-install-1.0.0.0.php b/app/code/Magento/RecurringPayment/data/recurringpayment_setup/data-install-1.0.0.0.php index a6d44ef5166187c793bbfbce9a1197563647d04f..b0e5a0f627607e8c944fcafbbe8fc70861ddb18c 100644 --- a/app/code/Magento/RecurringPayment/data/recurringpayment_setup/data-install-1.0.0.0.php +++ b/app/code/Magento/RecurringPayment/data/recurringpayment_setup/data-install-1.0.0.0.php @@ -21,7 +21,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Catalog\Model\Resource\Setup */ + +/** @var $this \Magento\RecurringPayment\Model\Resource\Setup */ $this->installEntities(); $entityTypeId = $this->getEntityTypeId(\Magento\Catalog\Model\Product::ENTITY); $attributeSetId = $this->getAttributeSetId($entityTypeId, 'Default'); diff --git a/app/code/Magento/RecurringPayment/sql/recurringpayment_setup/install-1.0.0.0.php b/app/code/Magento/RecurringPayment/sql/recurringpayment_setup/install-1.0.0.0.php index 3a7e310032da46fb0e9f94fcf9f036bc4c7c0e7c..06f5e086605256f45e1ad4d73ab557501464d9e2 100644 --- a/app/code/Magento/RecurringPayment/sql/recurringpayment_setup/install-1.0.0.0.php +++ b/app/code/Magento/RecurringPayment/sql/recurringpayment_setup/install-1.0.0.0.php @@ -21,7 +21,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Catalog\Model\Resource\Setup */ + +/** @var $this \Magento\Setup\Module\SetupModule */ $this->startSetup(); /** diff --git a/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view.phtml index 33630f8d88988ffb5d99bd160c761f09f947741d..2eb34f80e9f65c74664c5fe596dae3e5c53dd31d 100644 --- a/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view.phtml +++ b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view.phtml @@ -24,97 +24,108 @@ ?> <?php /* @var $this \Magento\RecurringPayment\Block\Payment\View */ ?> -<div class="order recurring details"> - <div class="actions"> +<div class="order-recurring-details"> + <?php /* info tabs */ ?> + <?php $layout = $this->getLayout(); ?> + <?php $infoTabs = $this->getGroupChildNames('info_tabs');?> + + <div class="actions-toolbar"> <div class="primary"> + <?php if ($this->getCanActivate()): ?> + <button type="button" title="<?php echo __('Activate') ?>" class="action activate" + onclick="if( confirm('<?php echo $this->getConfirmationMessage() ?>') ) { window.location.href = '<?php echo $this->getActivateUrl() ?>'; } return false;"> + <span><?php echo __('Activate') ?></span> + </button> + <?php endif; ?> <?php if ($this->getCanCancel()): ?> <button type="button" title="<?php echo __('Cancel') ?>" class="action cancel" onclick="if( confirm('<?php echo $this->getConfirmationMessage() ?>') ) { window.location.href = '<?php echo $this->getCancelUrl() ?>'; } return false;"> - <span><?php echo __('Cancel') ?></span></button> + <span><?php echo __('Cancel') ?></span> + </button> <?php endif; ?> <?php if ($this->getCanSuspend()): ?> <button type="button" title="<?php echo __('Suspend') ?>" class="action suspend" onclick="if( confirm('<?php echo $this->getConfirmationMessage() ?>') ) { window.location.href = '<?php echo $this->getSuspendUrl() ?>'; } return false;"> - <span><?php echo __('Suspend') ?></span></button> - <?php endif; ?> - <?php if ($this->getCanActivate()): ?> - <button type="button" title="<?php echo __('Activate') ?>" class="action activate" - onclick="if( confirm('<?php echo $this->getConfirmationMessage() ?>') ) { window.location.href = '<?php echo $this->getActivateUrl() ?>'; } return false;"> - <span><?php echo __('Activate') ?></span></button> + <span><?php echo __('Suspend') ?></span> + </button> <?php endif; ?> <?php if ($this->getCanUpdate()): ?> <button type="button" title="<?php echo __('Get Update') ?>" class="action update" onclick="if( confirm('<?php echo $this->getConfirmationMessage() ?>') ) { window.location.href = '<?php echo $this->getUpdateUrl() ?>'; } return false;"> - <span><?php echo __('Get Update') ?></span></button> + <span><?php echo __('Get Update') ?></span> + </button> <?php endif; ?> </div> </div> - <?php /* info tabs */ ?> - <?php $layout = $this->getLayout(); ?> - <?php $infoTabs = $this->getGroupChildNames('info_tabs'); ?> - <dl class="order info"> - <dt><?php echo __('About This Payment:') ?></dt> - <dd> - <ul id="order-info-tabs" class="items"> - <?php foreach ($infoTabs as $elementName): ?> - <?php $block = $layout->getBlock($elementName); ?> - <?php if (!$block) continue; ?> - <?php if ($this->getObjectData($block, 'is_view_current')): ?> - <li class="nav item current"> - <strong><?php echo $this->escapeHtml($this->getObjectData($block, 'view_label')) ?></strong> - </li> - <?php else: ?> - <li class="nav item"> - <a href="<?php echo $this->escapeHtml($this->getObjectData($block, 'view_url')) ?>"><?php echo $this->escapeHtml($this->getObjectData($block, 'view_label')) ?></a> - </li> - <?php endif; ?> - <?php endforeach; ?> - </ul> - </dd> - </dl> + <ul id="order-info-tabs" class="items items-info-tabs"> + <?php foreach ($infoTabs as $elementName): ?> + <?php $block = $layout->getBlock($elementName); ?> + <?php if (!$block) continue; ?> + <?php if ($this->getObjectData($block, 'is_view_current')): ?> + <li class="item current"> + <strong><?php echo $this->escapeHtml($this->getObjectData($block, 'view_label')) ?></strong> + </li> + <?php else: ?> + <li class="item"> + <a href="<?php echo $this->escapeHtml($this->getObjectData($block, 'view_url')) ?>"> + <?php echo $this->escapeHtml($this->getObjectData($block, 'view_label')) ?> + </a> + </li> + <?php endif; ?> + <?php endforeach; ?> + </ul> - <?php /* info blocks */ ?> - <!-- info blocks in 2 columns --> - <?php for ($i = 1; $i <= 5; $i++): ?> - <?php $infoBlocks = $this->getGroupChildNames("info_blocks_row_{$i}"); ?> - <?php if ($infoBlocks): ?> - <div class="block view info"> - <?php for ($j = 1; $j <= 2; $j++): ?> - <?php foreach ($infoBlocks as $elementName): ?> - <?php $block = $layout->getBlock($elementName); ?> - <?php if (!$block) continue; ?> - <?php if ($j == $this->getObjectData($block, 'view_column')): ?> - <div class="box box<?php echo $j ?>"> - <strong class="subtitle"> - <span><?php echo $this->escapeHtml($this->getObjectData($block, 'view_label')) ?></span> - </strong> + <div class="order-recurring-details-item"> + <?php /* info blocks */ ?> + <!-- info blocks in 2 columns --> + <?php for ($i = 1; $i <= 5; $i++): ?> + <?php $infoBlocks = $this->getGroupChildNames("info_blocks_row_{$i}"); ?> + <?php if ($infoBlocks): ?> + <div class="block block-view-info"> + <div class="block-content"> + <?php for ($j = 1; $j <= 2; $j++): ?> + <?php foreach ($infoBlocks as $elementName): ?> + <?php $block = $layout->getBlock($elementName); ?> + <?php if (!$block) continue; ?> + <?php if ($j == $this->getObjectData($block, 'view_column')): ?> + <div class="box box<?php echo $j ?>"> + <strong class="box-title"> + <span><?php echo $this->escapeHtml($this->getObjectData($block, 'view_label')) ?></span> + </strong> - <div class="content"> - <?php $html = $layout->renderElement($elementName); ?> - <?php echo($html ? $html : __('No information available.')); ?> - </div> - </div> - <?php endif; ?> - <?php endforeach; ?> - <?php endfor; ?> - </div> - <?php endif; ?> - <?php endfor; ?> + <div class="box-content"> + <?php $html = $layout->renderElement($elementName); ?> + <?php echo($html ? $html : __('No information available.')); ?> + </div> + </div> + <?php endif; ?> + <?php endforeach; ?> + <?php endfor; ?> + </div> + </div> + <?php endif; ?> + <?php endfor; ?> + </div> <!-- table data block --> <?php $table = $this->getChildBlock('table') ?> <?php if ($table): ?> - <div class="recurring order details items"> - <div class="order subtitle caption"> - <strong><?php echo $this->escapeHtml($this->getObjectData($table, 'view_label')) ?></strong></div> - <?php echo $this->getChildHtml('table') ?> + <div class="block block-recurring-details-items"> + <div class="block-title"> + <strong><?php echo $this->escapeHtml($this->getObjectData($table, 'view_label')) ?></strong> + </div> + <div class="block-content"> + <?php echo $this->getChildHtml('table') ?> + </div> </div> <?php endif; ?> - <div class="actions"> - <div class="secondary"><a href="<?php echo $this->getBackUrl() ?>" - class="action back"><span><?php echo __('Back to Recurring Billing Payments') ?></span></a> + <div class="actions-toolbar"> + <div class="secondary"> + <a href="<?php echo $this->getBackUrl() ?>" class="action back"> + <span><?php echo __('Back to Recurring Billing Payments') ?></span> + </a> </div> </div> -</div> +</div> \ No newline at end of file diff --git a/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view/info.phtml b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view/info.phtml index 3ca312b08e5a5e7676a928e99f46719bb39594cb..caacf92f1d880fe2a8329fa3c63ec713645bc2d6 100644 --- a/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view/info.phtml +++ b/app/code/Magento/RecurringPayment/view/frontend/templates/recurring/payment/view/info.phtml @@ -37,8 +37,8 @@ <?php foreach ($this->getRenderedInfo() as $row): ?> <?php $isAmount = $this->getObjectData($row, 'is_amount'); ?> <tr> - <th class="col label" scope="row"><?php echo $this->escapeHtml($this->getObjectData($row, 'label')) ?>:</th> - <td class="col value"><?php echo $this->renderRowValue($row) ?></td> + <th class="col label" scope="row"><span><?php echo $this->escapeHtml($this->getObjectData($row, 'label')) ?>:</span></th> + <td class="col value"><span><?php echo $this->renderRowValue($row) ?></span></td> </tr> <?php endforeach; ?> </tbody> diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json index 05576ea8e8b06ffccdbc86dd377b772276a8a586..2742899c658f87ba921ce9a24dfecb76cdb39194 100644 --- a/app/code/Magento/Reports/composer.json +++ b/app/code/Magento/Reports/composer.json @@ -3,27 +3,27 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-widget": "0.1.0-alpha102", - "magento/module-log": "0.1.0-alpha102", - "magento/module-wishlist": "0.1.0-alpha102", - "magento/module-review": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-downloadable": "0.1.0-alpha102", - "magento/module-sales-rule": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-widget": "0.1.0-alpha103", + "magento/module-log": "0.1.0-alpha103", + "magento/module-wishlist": "0.1.0-alpha103", + "magento/module-review": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-downloadable": "0.1.0-alpha103", + "magento/module-sales-rule": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Reports/sql/reports_setup/install-1.6.0.0.php b/app/code/Magento/Reports/sql/reports_setup/install-1.6.0.0.php index 57220ce51de2c02d7be0e085e97870d3546990b3..5fddea42e51be9e4a70a55907397ffb31c63040c 100644 --- a/app/code/Magento/Reports/sql/reports_setup/install-1.6.0.0.php +++ b/app/code/Magento/Reports/sql/reports_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /* * Prepare database for tables install diff --git a/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0-1.6.0.0.1.php index 7769531278e5305b88eb2521e8d3fa5377633276..dd717d434ac57f4a5e5e83cf50d8ecc2956384c2 100644 --- a/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0-1.6.0.0.1.php +++ b/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0-1.6.0.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /* * Prepare database for tables install diff --git a/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php b/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php index 4163424822f73e96024cf949ebe2a2305a6f7966..6b96db0e92fff7d0b07641bf2185f8f3968ac6ba 100644 --- a/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php +++ b/app/code/Magento/Reports/sql/reports_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /* * Rename incorrectly named tables in early magento 2 development version diff --git a/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml index 595f87c63e85899592c7791f09365a22a272279b..cb1b811a5056131bde0ff5a91a9d14e8bcb00263 100644 --- a/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/product/widget/viewed/item.phtml @@ -77,9 +77,9 @@ $rating = 'short'; <?php endif; ?> <?php else: ?> <?php if ($item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml index 3191111afded1bd75c54657e37657d3b56880932..6865ece0f30cb3d1b3b7f83dcc4cf32ee166bce5 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml @@ -42,64 +42,70 @@ if ($exist = $this->getRecentlyComparedProducts()) { } ?> <?php if ($exist): ?> -<div class="block widget compared <?php echo $mode; ?>"> - <div class="title"> +<div class="block widget block-compared-products-<?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <?php $suffix = $this->getNameInLayout(); ?> - <ol class="mini products list items" id="widget-compared-<?php echo $suffix; ?>"> - <?php $iterator = 1; ?> - <?php foreach($items as $_product): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <a class="product photo" href="<?php echo $_product->getProductUrl() ?>" - title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> - <?php echo $imageBlock->init($_product, $image)->toHtml() ?> - </a> - <div class="product details"> - <strong class="product name"> - <a href="<?php echo $_product->getProductUrl() ?>" - title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"> - <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + <div class="block-content"> + <?php $suffix = $this->getNameInLayout(); ?> + <ol class="product-items" id="widget-compared-<?php echo $suffix; ?>"> + <?php $iterator = 1; ?> + <?php foreach($items as $_product): ?> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a class="product-item-photo" href="<?php echo $_product->getProductUrl() ?>" + title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> + <?php echo $imageBlock->init($_product, $image)->toHtml() ?> </a> - </strong> - <?php echo $this->getProductPriceHtml( - $_product, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-widget-compared-' . $suffix - ] - ) ?> - <?php if($_product->isSaleable()): ?> - <div class="actions"> - <?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?> - <button class="action tocart" - data-mage-init='{"redirectUrl": {"url": "<?php echo $this->getAddToCartUrl($_product) ?>"}}' - type="button" title="<?php echo __('Add to Cart') ?>"> - <span><?php echo __('Add to Cart') ?></span> - </button> - <?php else: ?> - <?php + <div class="product-item-details"> + <strong class="product-item-name"> + <a href="<?php echo $_product->getProductUrl() ?>" + title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"> + <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + </a> + </strong> + <?php echo $this->getProductPriceHtml( + $_product, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-widget-compared-' . $suffix + ] + ) ?> + <div class="product-item-actions"> + <?php if($_product->isSaleable()): ?> + <div class="actions-primary"> + <?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?> + <button class="action tocart primary" + data-mage-init='{"redirectUrl": {"url": "<?php echo $this->getAddToCartUrl($_product) ?>"}}' + type="button" title="<?php echo __('Add to Cart') ?>"> + <span><?php echo __('Add to Cart') ?></span> + </button> + <?php else: ?> + <?php $postDataHelper = $this->helper('Magento\Core\Helper\PostData'); $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]) - ?> - <button class="action tocart" - data-post='<?php echo $postData; ?>' - type="button" title="<?php echo __('Add to Cart') ?>"> - <span><?php echo __('Add to Cart') ?></span> - </button> + ?> + <button class="action tocart primary" + data-post='<?php echo $postData; ?>' + type="button" title="<?php echo __('Add to Cart') ?>"> + <span><?php echo __('Add to Cart') ?></span> + </button> + <?php endif; ?> + </div> + <?php else: ?> + <?php if ($_product->getIsSalable()): ?> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> + <?php else: ?> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> + <?php endif; ?> <?php endif; ?> + </div> </div> - <?php else: ?> - <?php if ($_product->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> - <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> - <?php endif; ?> - <?php endif; ?> - </div> - <?php echo ($iterator==count($items)+1) ? '</li>' : '' ?> - <?php endforeach; ?> - </ol> + </div> + <?php echo ($iterator==count($items)+1) ? '</li>' : '' ?> + <?php endforeach; ?> + </ol> + </div> </div> <?php endif; ?> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml index cca84385bc4617d42cd41c3c7f9c686509609708..2ec85eb1a690e7a0e4b7a41a130431329270bb75 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_images_list.phtml @@ -39,16 +39,16 @@ if ($exist = $this->getRecentlyComparedProducts()) { } ?> <?php if ($exist): ?> -<div class="block widget compared mini products images"> - <div class="title"> +<div class="block widget block-compared-products-images"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> - <ol class="items" id="widget-compared-<?php echo $suffix; ?>"> + <ol id="widget-compared-<?php echo $suffix; ?>" class="product-items product-items-images"> <?php $i=0; foreach ($items as $_product): ?> - <li class="item"> - <a class="product photo" href="<?php echo $_product->getProductUrl() ?>" + <li class="product-item"> + <a class="product-item-photo" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> <?php echo $imageBlock->init($_product, $image)->toHtml() ?> </a> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml index 4aae374818cac4f470a42096addd24e654998c2b..ca9abf4ef471b81747238faaf9742290d811abed 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_names_list.phtml @@ -23,17 +23,17 @@ */ ?> <?php if ($_products = $this->getRecentlyComparedProducts()): ?> -<div class="block widget compared links"> - <div class="title"> +<div class="block widget block-compared-products-names"> + <div class="block-title"> <strong><?php echo __('Recently Compared') ?></span></strong> </div> - <div class="content"> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> - <ol id="widget-compared-<?php echo $suffix; ?>" class="items"> + <ol id="widget-compared-<?php echo $suffix; ?>" class="product-items product-items-names"> <?php $i=0; foreach ($_products as $_product): ?> - <li class="item"> - <strong class="product name"> - <a href="<?php echo $_product->getProductUrl() ?>"> + <li class="product-item"> + <strong class="product-item-name"> + <a href="<?php echo $_product->getProductUrl() ?>" class="product-item-link"> <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> </a> </strong> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml index cec10c808cdad342c28b5f0e0013912e6252c085..bd5504424f2c01f8427bae846a39921b37e921f0 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml @@ -45,26 +45,25 @@ if ($exist = $this->getRecentlyComparedProducts()) { ?> <?php if ($exist):?> - <div class="block widget compared <?php echo $mode; ?>"> - <div class="title"> + <div class="block widget block-compared-products-<?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php echo '<!-- ' . $image . '-->' ?> - <div class="products wrapper <?php echo $mode; ?>"> - <ol class="products list items <?php echo $type; ?>"> + <div class="products-<?php echo $mode; ?> <?php echo $mode; ?>"> + <ol class="product-items <?php echo $type; ?>"> <?php $iterator = 1; ?> <?php foreach($items as $_item): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a href="<?php echo $this->getProductUrl($_item) ?>" class="product photo"> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-photo"> <?php echo $imageBlock->init($_item, $image)->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" - href="<?php echo $this->getProductUrl($_item) ?>"> + href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-link"> <?php echo $this->escapeHtml($_item->getName()) ?> </a> </strong> @@ -80,9 +79,9 @@ if ($exist = $this->getRecentlyComparedProducts()) { <?php echo $this->getReviewsSummaryHtml($_item, $rating) ?> <?php endif; ?> <?php if($showWishlist || $showCompare || $showCart): ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if($showCart): ?> - <div class="primary"> + <div class="actions-primary"> <?php if($_item->isSaleable()): ?> <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?> <button class="action tocart primary" @@ -103,16 +102,16 @@ if ($exist = $this->getRecentlyComparedProducts()) { <?php endif; ?> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if($showWishlist || $showCompare): ?> - <div class="secondary-addto-links" data-role="add-to-links"> + <div class="actions-secondary" data-role="add-to-links"> <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> <a href="#" data-post='<?php echo $this->getAddToWishlistParams($_item); ?>' @@ -140,6 +139,7 @@ if ($exist = $this->getRecentlyComparedProducts()) { <?php endforeach ?> </ol> </div> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif;?> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml index 49566e2fb98a8b0c71b4ed7cd89576356401aa5c..82db388a23e5217574c051aa084a538517f636eb 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml @@ -35,6 +35,7 @@ if ($exist = $this->getRecentlyComparedProducts()) { $image = 'recently_compared_products_list_content_widget'; $title = __('Recently Compared'); $items = $exist; + $_helper = $this->helper('Magento\Catalog\Helper\Output'); $showWishlist = true; $showCompare = true; @@ -45,26 +46,25 @@ if ($exist = $this->getRecentlyComparedProducts()) { ?> <?php if ($exist):?> - <div class="block widget compared <?php echo $mode; ?>"> - <div class="title"> + <div class="block widget block-compared-products-<?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php echo '<!-- ' . $image . '-->' ?> - <div class="products wrapper <?php echo $mode; ?>"> - <ol class="products list items <?php echo $type; ?>"> + <div class="products-<?php echo $mode; ?> <?php echo $mode; ?>"> + <ol class="product-items <?php echo $type; ?>"> <?php $iterator = 1; ?> <?php foreach($items as $_item): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a href="<?php echo $this->getProductUrl($_item) ?>" class="product photo"> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-photo"> <?php echo $imageBlock->init($_item, $image)->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" - href="<?php echo $this->getProductUrl($_item) ?>"> + href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-link"> <?php echo $this->escapeHtml($_item->getName()) ?> </a> </strong> @@ -80,9 +80,9 @@ if ($exist = $this->getRecentlyComparedProducts()) { <?php echo $this->getReviewsSummaryHtml($_item, $rating) ?> <?php endif; ?> <?php if($showWishlist || $showCompare || $showCart): ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if($showCart): ?> - <div class="primary"> + <div class="actions-primary"> <?php if($_item->isSaleable()): ?> <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?> <button class="action tocart primary" @@ -103,16 +103,16 @@ if ($exist = $this->getRecentlyComparedProducts()) { <?php endif; ?> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if($showWishlist || $showCompare): ?> - <div class="secondary-addto-links" data-role="add-to-links"> + <div class="actions-secondary" data-role="add-to-links"> <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> <a href="#" data-post='<?php echo $this->getAddToWishlistParams($_item); ?>' @@ -134,12 +134,21 @@ if ($exist = $this->getRecentlyComparedProducts()) { <?php endif; ?> </div> <?php endif; ?> + <?php if($description):?> + <div class="product-item-description"> + <?php echo $_helper->productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" + href="<?php echo $this->getProductUrl($_item) ?>" + class="action more"><?php echo __('Learn More') ?></a> + </div> + <?php endif; ?> </div> </div> <?php echo ($iterator==count($items)+1) ? '</li>' : '' ?> <?php endforeach ?> </ol> </div> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif;?> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml index 8f9164b5577f6c753def762b4730877e17f575e4..3f00ac3007bcb52734f28587a93c0437ee7e7660 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml @@ -28,7 +28,7 @@ */ ?> <?php -if ($exist = $this->getRecentlyViewedProducts()) { +if ($exist = ($this->getRecentlyViewedProducts() && $this->getRecentlyViewedProducts()->getSize())) { $type = 'widget-viewed'; $mode = 'list'; @@ -37,7 +37,7 @@ if ($exist = $this->getRecentlyViewedProducts()) { $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); $image = 'recently_viewed_products_images_names_widget'; $title = __('Recently Viewed'); - $items = $exist; + $items = $this->getRecentlyViewedProducts(); $showWishlist = false; $showCompare = false; @@ -47,25 +47,26 @@ if ($exist = $this->getRecentlyViewedProducts()) { } ?> <?php if ($exist): ?> -<div class="block widget viewed <?php echo $mode; ?>"> - <div class="title"> +<div class="block widget block-viewed-products-<?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> - <ol class="mini products list items" id="widget-viewed-<?php echo $suffix; ?>"> + <ol class="product-items" id="widget-viewed-<?php echo $suffix; ?>"> <?php $iterator = 1; ?> <?php foreach($items as $_product): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a class="product photo" href="<?php echo $_product->getProductUrl() ?>" + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a class="product-item-photo" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> <?php echo $imageBlock->init($_product, $image)->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a href="<?php echo $_product->getProductUrl() ?>" - title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> + title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" + class="product-item-link"> <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> </a> </strong> @@ -77,11 +78,11 @@ if ($exist = $this->getRecentlyViewedProducts()) { 'price_id_suffix' => '-widget-viewed-' . $suffix ] ) ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if($_product->isSaleable()): ?> - <div class="primary"> + <div class="actions-primary"> <?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?> - <button class="action tocart" + <button class="action tocart primary" data-mage-init='{"redirectUrl": {"url": "<?php echo $this->getAddToCartUrl($_product) ?>"}}' type="button" title="<?php echo __('Add to Cart') ?>"> <span><?php echo __('Add to Cart') ?></span> @@ -91,16 +92,16 @@ if ($exist = $this->getRecentlyViewedProducts()) { $postDataHelper = $this->helper('Magento\Core\Helper\PostData'); $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); ?> - <button type="button" class="action tocart" data-post='<?php echo $postData; ?>'> + <button type="button" class="action tocart primary" data-post='<?php echo $postData; ?>'> <span><?php echo __('Add to Cart') ?></span> </button> <?php endif; ?> </div> <?php else: ?> <?php if ($_product->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml index 0c512054bfe59b6e54721bc168e32d7cab00f952..2781e39802cc989d8828d9d8019a5ba61d4e5415 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml @@ -28,13 +28,13 @@ */ ?> <?php -if ($exist = $this->getRecentlyViewedProducts()) { +if ($exist = ($this->getRecentlyViewedProducts() && $this->getRecentlyViewedProducts()->getSize())) { $type = 'widget-viewed'; $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); $image = 'recently_viewed_products_images_only_widget'; $title = __('Recently Viewed'); - $items = $exist; + $items = $this->getRecentlyViewedProducts(); $showWishlist = false; $showCompare = false; @@ -44,17 +44,17 @@ if ($exist = $this->getRecentlyViewedProducts()) { } ?> <?php if ($exist): ?> - <div class="block widget viewed mini products images"> - <div class="title"> + <div class="block widget block-viewed-products-images"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> - <ol class="items" id="widget-viewed-<?php echo $suffix; ?>"> + <ol id="widget-viewed-<?php echo $suffix; ?>" class="product-items product-items-images"> <?php $iterator = 1; ?> <?php foreach($items as $_product): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <a class="product photo" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <a class="product-item-photo" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"> <?php echo $imageBlock->init($_product, $image)->toHtml() ?> </a> <?php echo ($iterator==count($items)+1) ? '</li>' : '' ?> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml index 64183f1df8470e6cdb7757f64f03e402f82ad02a..a5c9bbfd8611324f569cdc072d65b4b8b0edc7bf 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_names_list.phtml @@ -27,18 +27,18 @@ * @var $this \Magento\Reports\Block\Product\Viewed */ ?> -<?php if ($_products = $this->getRecentlyViewedProducts()): ?> -<div class="block widget viewed links"> - <div class="title"> +<?php if (($_products = $this->getRecentlyViewedProducts()) && $_products->getSize() ): ?> +<div class="block widget block-viewed-products-names"> + <div class="block-title"> <strong><?php echo __('Recently Viewed') ?></strong> </div> - <div class="content"> + <div class="block-content"> <?php $suffix = $this->getNameInLayout(); ?> - <ol id="widget-viewed-<?php echo $suffix; ?>" class="items"> + <ol id="widget-viewed-<?php echo $suffix; ?>" class="product-items product-items-names"> <?php foreach ($_products as $_product): ?> - <li class="item"> - <strong class="product name"> - <a href="<?php echo $_product->getProductUrl() ?>"> + <li class="product-item"> + <strong class="product-item-name"> + <a href="<?php echo $_product->getProductUrl() ?>" class="product-item-link"> <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> </a> </strong> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml index 9eb0c4aba76910e722ad681946fb8e479236eac8..cd09fc6784b8ba6ab90ccb0304007d4450ab18fa 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml @@ -28,7 +28,7 @@ */ ?> <?php -if ($exist = $this->getRecentlyViewedProducts()) { +if ($exist = ($this->getRecentlyViewedProducts() && $this->getRecentlyViewedProducts()->getSize())) { $type = 'widget-viewed'; $mode = 'grid'; @@ -37,7 +37,7 @@ if ($exist = $this->getRecentlyViewedProducts()) { $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); $image = 'recently_viewed_products_grid_content_widget'; $title = __('Recently Viewed'); - $items = $exist; + $items = $this->getRecentlyViewedProducts(); $showWishlist = true; $showCompare = true; @@ -47,26 +47,25 @@ if ($exist = $this->getRecentlyViewedProducts()) { } ?> <?php if ($exist):?> - <div class="block widget viewed <?php echo $mode; ?>"> - <div class="title"> + <div class="block widget block-viewed-products-<?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php echo '<!-- ' . $image . '-->' ?> - <div class="products wrapper <?php echo $mode; ?>"> - <ol class="products list items <?php echo $type; ?>"> + <div class="products-<?php echo $mode; ?> <?php echo $mode; ?>"> + <ol class="product-items <?php echo $type; ?>"> <?php $iterator = 1; ?> <?php foreach($items as $_item): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a href="<?php echo $this->getProductUrl($_item) ?>" class="product photo"> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-photo"> <?php echo $imageBlock->init($_item, $image)->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" - href="<?php echo $this->getProductUrl($_item) ?>"> + href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-link"> <?php echo $this->escapeHtml($_item->getName()) ?> </a> </strong> @@ -82,12 +81,14 @@ if ($exist = $this->getRecentlyViewedProducts()) { <?php echo $this->getReviewsSummaryHtml($_item, $rating) ?> <?php endif; ?> <?php if($showWishlist || $showCompare || $showCart): ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if($showCart): ?> - <div class="primary"> + <div class="actions-primary"> <?php if($_item->isSaleable()): ?> <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?> - <button class="action tocart primary" data-mage-init='{"redirectUrl": {"url": "<?php echo $this->getAddToCartUrl($_item) ?>"}}' type="button" title="<?php echo __('Add to Cart') ?>"> + <button class="action tocart primary" + data-mage-init='{"redirectUrl": {"url": "<?php echo $this->getAddToCartUrl($_item) ?>"}}' + type="button" title="<?php echo __('Add to Cart') ?>"> <span><?php echo __('Add to Cart') ?></span> </button> <?php else: ?> @@ -103,15 +104,15 @@ if ($exist = $this->getRecentlyViewedProducts()) { <?php endif; ?> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if($showWishlist || $showCompare): ?> - <div class="secondary-addto-links" data-role="add-to-links"> + <div class="actions-secondary" data-role="add-to-links"> <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> <a href="#" class="action towishlist" data-action="add-to-wishlist" @@ -138,6 +139,7 @@ if ($exist = $this->getRecentlyViewedProducts()) { <?php endforeach ?> </ol> </div> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif;?> diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml index 764f026b57793feef66d4fb1d57575ac28b87c12..a461737e45ee7cd54bc8ae008795aa4efff4a2f4 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml @@ -28,7 +28,7 @@ */ ?> <?php -if ($exist = $this->getRecentlyViewedProducts()) { +if ($exist = ($this->getRecentlyViewedProducts() && $this->getRecentlyViewedProducts()->getSize())) { $type = 'widget-viewed'; $mode = 'list'; @@ -37,7 +37,8 @@ if ($exist = $this->getRecentlyViewedProducts()) { $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image'); $image = 'recently_viewed_products_list_content_widget'; $title = __('Recently Viewed'); - $items = $exist; + $items = $this->getRecentlyViewedProducts(); + $_helper = $this->helper('Magento\Catalog\Helper\Output'); $showWishlist = true; $showCompare = true; @@ -48,26 +49,25 @@ if ($exist = $this->getRecentlyViewedProducts()) { ?> <?php if ($exist):?> - <div class="block widget viewed <?php echo $mode; ?>"> - <div class="title"> + <div class="block widget block-viewed-products-<?php echo $mode; ?>"> + <div class="block-title"> <strong><?php echo $title; ?></strong> </div> - <div class="content"> - <?php echo $this->getPagerHtml() ?> + <div class="block-content"> <?php echo '<!-- ' . $image . '-->' ?> - <div class="products wrapper <?php echo $mode; ?>"> - <ol class="products list items <?php echo $type; ?>"> + <div class="products-<?php echo $mode; ?> <?php echo $mode; ?>"> + <ol class="product-items <?php echo $type; ?>"> <?php $iterator = 1; ?> <?php foreach($items as $_item): ?> - <?php echo ($iterator++==1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a href="<?php echo $this->getProductUrl($_item) ?>" class="product photo"> + <?php echo ($iterator++==1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-photo"> <?php echo $imageBlock->init($_item, $image)->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"> + <div class="product-item-details"> + <strong class="product-item-name"> <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" - href="<?php echo $this->getProductUrl($_item) ?>"> + href="<?php echo $this->getProductUrl($_item) ?>" class="product-item-link"> <?php echo $this->escapeHtml($_item->getName()) ?> </a> </strong> @@ -83,9 +83,9 @@ if ($exist = $this->getRecentlyViewedProducts()) { <?php echo $this->getReviewsSummaryHtml($_item, $rating) ?> <?php endif; ?> <?php if($showWishlist || $showCompare || $showCart): ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if($showCart): ?> - <div class="primary"> + <div class="actions-primary"> <?php if($_item->isSaleable()): ?> <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?> <button class="action tocart primary" @@ -106,16 +106,16 @@ if ($exist = $this->getRecentlyViewedProducts()) { <?php endif; ?> <?php else: ?> <?php if ($_item->getIsSalable()): ?> - <p class="stock available"><span><?php echo __('In stock') ?></span></p> + <div class="stock available"><span><?php echo __('In stock') ?></span></div> <?php else: ?> - <p class="stock unavailable"><span><?php echo __('Out of stock') ?></span></p> + <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> <?php if($showWishlist || $showCompare): ?> - <div class="secondary-addto-links" data-role="add-to-links"> + <div class="actions-secondary" data-role="add-to-links"> <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> <a href="#" class="action towishlist" data-action="add-to-wishlist" @@ -136,12 +136,21 @@ if ($exist = $this->getRecentlyViewedProducts()) { <?php endif; ?> </div> <?php endif; ?> + <?php if($description):?> + <div class="product-item-description"> + <?php echo $_helper->productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + <a title="<?php echo $this->escapeHtml($_item->getName()) ?>" + href="<?php echo $this->getProductUrl($_item) ?>" + class="action more"><?php echo __('Learn More') ?></a> + </div> + <?php endif; ?> </div> </div> <?php echo ($iterator==count($items)+1) ? '</li>' : '' ?> <?php endforeach ?> </ol> </div> + <?php echo $this->getPagerHtml() ?> </div> </div> <?php endif;?> diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json index f68102891f30dd6ffbd29603729ce407918a1494..d890eb8dd6427e2442fddfe934cb962bff49f074 100644 --- a/app/code/Magento/RequireJs/composer.json +++ b/app/code/Magento/RequireJs/composer.json @@ -3,11 +3,11 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Review/Block/Adminhtml/Rss.php b/app/code/Magento/Review/Block/Adminhtml/Rss.php index 1f0b689ca0456537e1162a45d0744b8e24211c94..833afb450d6b2e3202dc3e550699cd38985813a7 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rss.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rss.php @@ -120,4 +120,12 @@ class Rss extends \Magento\Backend\Block\AbstractBlock implements DataProviderIn { return array(); } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return true; + } } diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json index c720f19c152d7a8b5245113020ef3896dbe80616..acf1ecf72c66d936cac35769192058dcdedc19c6 100644 --- a/app/code/Magento/Review/composer.json +++ b/app/code/Magento/Review/composer.json @@ -3,20 +3,20 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-newsletter": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-newsletter": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Review/sql/review_setup/install-1.6.0.0.php b/app/code/Magento/Review/sql/review_setup/install-1.6.0.0.php index d8a831a16963410a55a76be210eaaabeed7a16cd..9e9dc000f00991f36414479ff54af53ee216d6c6 100644 --- a/app/code/Magento/Review/sql/review_setup/install-1.6.0.0.php +++ b/app/code/Magento/Review/sql/review_setup/install-1.6.0.0.php @@ -27,8 +27,9 @@ * * @author Magento Core Team <core@magentocommerce.com> */ + +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); /** diff --git a/app/code/Magento/Review/view/frontend/layout/review_product_list.xml b/app/code/Magento/Review/view/frontend/layout/review_product_list.xml index bdad11bdc9118f747d46969803894ff6ee9a22e2..5c25def487928d57329252d60a39486f1fffdc3d 100644 --- a/app/code/Magento/Review/view/frontend/layout/review_product_list.xml +++ b/app/code/Magento/Review/view/frontend/layout/review_product_list.xml @@ -30,7 +30,7 @@ <block class="Magento\Review\Block\Product\View\Other" name="product.info.other" as="other" template="Magento_Review::product/view/other.phtml" before="product.info.addto"/> </referenceContainer> <referenceContainer name="content"> - <container name="product.info.details" label="invisible" htmlTag="div" htmlClass="product info detailed" after="product.info.media"> + <container name="product.info.details" htmlTag="div" htmlClass="product info detailed" after="product.info.media"> <block class="Magento\Review\Block\Form" name="product.review.form" as="review_form"> <container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before" htmlTag="div" htmlClass="rewards"/> </block> diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml index 11b60ed74379c17fdce1f5a75657af7f43c8b5ef..302bbcfcd7e52ac20bef857a39fec703cfbf982c 100644 --- a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml +++ b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml @@ -26,17 +26,17 @@ <?php $urlForm = $this->getReviewsUrl() . '#review-form'; ?> <?php if ($this->getReviewsCount()): ?> <?php $rating = $this->getRatingSummary(); ?> -<div class="product-reviews-summary<?php echo !$rating ? ' no-rating' :''?>"> +<div class="product-reviews-summary<?php echo !$rating ? ' no-rating' :''?>" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <?php if ($rating):?> <div class="rating-summary"> <span class="label"><span><?php echo __('Rating') ?>:</span></span> <div class="rating-result" title="<?php echo $rating; ?>%"> - <span style="width:<?php echo $rating; ?>%"><span><?php echo $rating; ?>%</span></span> + <span style="width:<?php echo $rating; ?>%"><span><span itemprop="ratingValue"><?php echo $rating; ?></span>% of <span itemprop="bestRating">100</span></span></span> </div> </div> <?php endif;?> <div class="reviews-actions"> - <a class="action view" href="<?php echo $url ?>"><?php echo $this->getReviewsCount() ?> <span><?php echo ($this->getReviewsCount() == 1) ? __('Review') : __('Reviews') ?></span></a> + <a class="action view" href="<?php echo $url ?>"><span itemprop="reviewCount"><?php echo $this->getReviewsCount() ?></span> <span><?php echo ($this->getReviewsCount() == 1) ? __('Review') : __('Reviews') ?></span></a> <a class="action add" href="<?php echo $urlForm ?>"><?php echo __('Add Your Review') ?></a> </div> </div> diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml index 8ab88ed9e1f26b9b9dd167a3ecd7b03863848d5a..934ef890e1345b1e66b336aedadee896a04f224e 100644 --- a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml +++ b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml @@ -43,33 +43,35 @@ </div> <ol class="items review-items"> <?php foreach ($_items as $_review):?> - <li class="item review-item"> - <div class="review-title"><?php echo $this->escapeHtml($_review->getTitle()) ?></div> + <li class="item review-item" itemscope itemprop="review" itemtype="http://schema.org/Review"> + <div class="review-title" itemprop="name"><?php echo $this->escapeHtml($_review->getTitle()) ?></div> <?php if (count($_review->getRatingVotes())): ?> <div class="review-ratings"> <?php foreach ($_review->getRatingVotes() as $_vote): ?> - <div class="rating-summary item"> + <div class="rating-summary item" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"> <span class="label rating-label"><span><?php echo $this->escapeHtml($_vote->getRatingCode()) ?></span></span> <div class="rating-result" title="<?php echo $_vote->getPercent() ?>%"> + <meta itemprop="worstRating" content = "1"/> + <meta itemprop="bestRating" content = "100"/> <span style="width:<?php echo $_vote->getPercent() ?>%"> - <span><?php echo $_vote->getPercent() ?>%</span> + <span itemprop="ratingValue"><?php echo $_vote->getPercent() ?>%</span> </span> </div> </div> <?php endforeach; ?> </div> <?php endif; ?> - <div class="review-content"> + <div class="review-content" itemprop="description"> <?php echo nl2br($this->escapeHtml($_review->getDetail())) ?> </div> <div class="review-details"> <p class="review-author"> <span class="review-details-label"><?php echo __('Review by')?></span> - <strong class="review-details-value"><?php echo $this->escapeHtml($_review->getNickname()) ?></strong> + <strong class="review-details-value" itemprop="author"><?php echo $this->escapeHtml($_review->getNickname()) ?></strong> </p> <p class="review-date"> <span class="review-details-label"><?php echo __('Posted on') ?></span> - <time class="review-details-value"><?php echo $this->formatDate($_review->getCreatedAt(), $format) ?></time> + <time class="review-details-value" itemprop="datePublished" datetime="<?php echo $this->formatDate($_review->getCreatedAt(), $format) ?>"><?php echo $this->formatDate($_review->getCreatedAt(), $format) ?></time> </p> </div> </li> diff --git a/app/code/Magento/Rss/App/Action/Plugin/Authentication.php b/app/code/Magento/Rss/App/Action/Plugin/BackendAuthentication.php similarity index 96% rename from app/code/Magento/Rss/App/Action/Plugin/Authentication.php rename to app/code/Magento/Rss/App/Action/Plugin/BackendAuthentication.php index 62f8f85ec24d0efb46141f8973d9a9ee6584b1f1..04c5159482f3e021e5289fdf5f79fa11b82c995a 100644 --- a/app/code/Magento/Rss/App/Action/Plugin/Authentication.php +++ b/app/code/Magento/Rss/App/Action/Plugin/BackendAuthentication.php @@ -1,6 +1,6 @@ <?php /** - * RSS Authentication plugin + * RSS Backend Authentication plugin * * Magento * @@ -30,10 +30,10 @@ use Magento\Framework\App\ResponseInterface; use Magento\Backend\App\AbstractAction; /** - * Class Authentication + * Class BackendAuthentication * @package Magento\Rss\App\Action\Plugin */ -class Authentication extends \Magento\Backend\App\Action\Plugin\Authentication +class BackendAuthentication extends \Magento\Backend\App\Action\Plugin\Authentication { /** * @var \Magento\Framework\HTTP\Authentication @@ -54,7 +54,6 @@ class Authentication extends \Magento\Backend\App\Action\Plugin\Authentication * @var array */ protected $aclResources = array( - 'authenticate' => 'Magento_Rss::rss', 'feed' => 'Magento_Rss::rss' ); diff --git a/app/code/Magento/Rss/Controller/Adminhtml/Feed.php b/app/code/Magento/Rss/Controller/Adminhtml/Feed.php index f7b52bc2f5ac54262a261a24f4683653c6156325..faa42abcf8c69ed54fb7325c685fff1cb140e7b9 100644 --- a/app/code/Magento/Rss/Controller/Adminhtml/Feed.php +++ b/app/code/Magento/Rss/Controller/Adminhtml/Feed.php @@ -27,7 +27,7 @@ namespace Magento\Rss\Controller\Adminhtml; * Class Feed * @package Magento\Rss\Controller */ -class Feed extends Authenticate +class Feed extends \Magento\Backend\App\Action { /** * @var \Magento\Rss\Model\RssManager diff --git a/app/code/Magento/Rss/Controller/Feed.php b/app/code/Magento/Rss/Controller/Feed.php index b089d377f6bcaa44b7a1de2a2f08f6430c069f9e..84154f4f072ca26175388410e1ffeb31f8d3339f 100644 --- a/app/code/Magento/Rss/Controller/Feed.php +++ b/app/code/Magento/Rss/Controller/Feed.php @@ -25,10 +25,29 @@ namespace Magento\Rss\Controller; /** * Class Feed - * @package Magento\Rss\Controller */ class Feed extends \Magento\Framework\App\Action\Action { + /** + * @var \Magento\Customer\Model\Session + */ + protected $customerSession; + + /** + * @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface + */ + protected $customerAccountService; + + /** + * @var \Magento\Framework\HTTP\Authentication + */ + protected $httpAuthentication; + + /** + * @var \Magento\Framework\Logger + */ + protected $logger; + /** * @var \Magento\Rss\Model\RssManager */ @@ -49,16 +68,52 @@ class Feed extends \Magento\Framework\App\Action\Action * @param \Magento\Rss\Model\RssManager $rssManager * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Rss\Model\RssFactory $rssFactory + * @param \Magento\Customer\Model\Session $customerSession + * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService + * @param \Magento\Framework\HTTP\Authentication $httpAuthentication + * @param \Magento\Framework\Logger $logger */ public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Rss\Model\RssManager $rssManager, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Rss\Model\RssFactory $rssFactory + \Magento\Rss\Model\RssFactory $rssFactory, + \Magento\Customer\Model\Session $customerSession, + \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService, + \Magento\Framework\HTTP\Authentication $httpAuthentication, + \Magento\Framework\Logger $logger ) { $this->rssManager = $rssManager; $this->scopeConfig = $scopeConfig; $this->rssFactory = $rssFactory; + $this->customerSession = $customerSession; + $this->customerAccountService = $customerAccountService; + $this->httpAuthentication = $httpAuthentication; + $this->logger = $logger; parent::__construct($context); } + + /** + * @return bool + */ + protected function auth() + { + if (!$this->customerSession->isLoggedIn()) { + list($login, $password) = $this->httpAuthentication->getCredentials(); + try { + $customer = $this->customerAccountService->authenticate($login, $password); + $this->customerSession->setCustomerDataAsLoggedIn($customer); + $this->customerSession->regenerateId(); + } catch (\Exception $e) { + $this->logger->logException($e); + } + } + + if (!$this->customerSession->isLoggedIn()) { + $this->httpAuthentication->setAuthenticationFailed('RSS Feeds'); + return false; + } + + return true; + } } diff --git a/app/code/Magento/Rss/Controller/Feed/Index.php b/app/code/Magento/Rss/Controller/Feed/Index.php index 9d75a3d85dc9d68276befc93237749453e6ec073..00b304f67802dc130f9abf99b20aa71ea2cfc1e8 100644 --- a/app/code/Magento/Rss/Controller/Feed/Index.php +++ b/app/code/Magento/Rss/Controller/Feed/Index.php @@ -51,6 +51,10 @@ class Index extends \Magento\Rss\Controller\Feed throw new NotFoundException($e->getMessage()); } + if ($provider->isAuthRequired() && !$this->auth()) { + return; + } + if (!$provider->isAllowed()) { throw new NotFoundException(); } diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json index cf505b7d1c7b7ff8bf8519e7bcdbcbe53af2fe09..12d22eadd1ab38a3ee12716ddacb3ab2fe490498 100644 --- a/app/code/Magento/Rss/composer.json +++ b/app/code/Magento/Rss/composer.json @@ -3,13 +3,14 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Rss/etc/adminhtml/di.xml b/app/code/Magento/Rss/etc/adminhtml/di.xml index 111c8235aaeb05c7579a833ba67f4cc5679dd346..cb233310af3f83b1910ae1ae18e4debe65bec779 100644 --- a/app/code/Magento/Rss/etc/adminhtml/di.xml +++ b/app/code/Magento/Rss/etc/adminhtml/di.xml @@ -24,7 +24,7 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd"> - <type name="Magento\Rss\Controller\Adminhtml\Authenticate"> - <plugin name="adminAuthentication" type="Magento\Rss\App\Action\Plugin\Authentication"/> + <type name="Magento\Rss\Controller\Adminhtml\Feed"> + <plugin name="adminAuthentication" type="Magento\Rss\App\Action\Plugin\BackendAuthentication"/> </type> </config> diff --git a/app/code/Magento/Rss/etc/module.xml b/app/code/Magento/Rss/etc/module.xml index 81e93a9cbbf6f156eb463c7f5258f77d1ad87af4..08f7a9fe4235f9c8cff44558bab4d60b9ed04f08 100644 --- a/app/code/Magento/Rss/etc/module.xml +++ b/app/code/Magento/Rss/etc/module.xml @@ -28,6 +28,7 @@ <depends> <module name="Magento_Store"/> <module name="Magento_Backend"/> + <module name="Magento_Customer"/> </depends> </module> </config> diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json index 952040ed37c321a4939ad773b0a1dd5838170f91..02b8dfdb00a8bb4943966603c4585d6b01b54501 100644 --- a/app/code/Magento/Rule/composer.json +++ b/app/code/Magento/Rule/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php index 4be492dfaff0f8d92808511b1831758d0d9bf69e..7fc392efcec60ba1fab8903e475a9f1ee5b676bc 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractForm.php @@ -199,7 +199,7 @@ abstract class AbstractForm extends \Magento\Sales\Block\Adminhtml\Order\Create\ if ($inputType == 'select' || $inputType == 'multiselect') { $options = array(); foreach ($attribute->getOptions() as $optionData) { - $options[] = \Magento\Framework\Service\SimpleDataObjectConverter::toFlatArray($optionData); + $options[] = \Magento\Framework\Api\SimpleDataObjectConverter::toFlatArray($optionData); } $element->setValues($options); } elseif ($inputType == 'date') { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php index 928a84110c7e97a0379504a376735253034d5975..d3725c32ffe8ea4b95ffda4863908ec6cf98e46d 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php @@ -26,7 +26,7 @@ namespace Magento\Sales\Block\Adminhtml\Order\Create\Form; use Magento\Framework\Data\Form\Element\AbstractElement; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; use Magento\Framework\Pricing\PriceCurrencyInterface; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensibleDataObjectConverter; /** * Create order account form diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php index 4520924cca414bc0a7d711fe15b1603492a7bbeb..f3d45333bb3e46c06d46218a0d1ef1340d8f0952 100644 --- a/app/code/Magento/Sales/Model/AdminOrder/Create.php +++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php @@ -24,8 +24,6 @@ namespace Magento\Sales\Model\AdminOrder; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; -use Magento\Customer\Service\V1\AddressMetadataServiceInterface; use Magento\Customer\Service\V1\CustomerAddressServiceInterface; use Magento\Customer\Service\V1\Data\AddressBuilder as CustomerAddressBuilder; use Magento\Customer\Service\V1\Data\CustomerBuilder; @@ -1221,7 +1219,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode $customerForm = $this->_metadataFormFactory->create( \Magento\Customer\Service\V1\CustomerMetadataServiceInterface::ENTITY_TYPE_CUSTOMER, 'adminhtml_checkout', - \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerDataObject), + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerDataObject), false, CustomerForm::DONT_IGNORE_INVISIBLE ); @@ -1248,7 +1246,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode $data = isset($data['region']) && is_array($data['region']) ? array_merge($data, $data['region']) : $data; $addressForm = $this->_metadataFormFactory->create( - AddressMetadataServiceInterface::ENTITY_TYPE_ADDRESS, + \Magento\Customer\Api\AddressMetadataInterface::ENTITY_TYPE_ADDRESS, 'adminhtml_customer_address', $data, $isAjax, @@ -1499,7 +1497,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode $this->getQuote()->updateCustomerData($customer); $data = array(); - $customerData = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer); + $customerData = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer); foreach ($form->getAttributes() as $attribute) { $code = sprintf('customer_%s', $attribute->getAttributeCode()); $data[$code] = isset( @@ -1671,7 +1669,7 @@ class Create extends \Magento\Framework\Object implements \Magento\Checkout\Mode } $this->getQuote()->updateCustomerData($customerDataObject); - $customerData = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerDataObject); + $customerData = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerDataObject); foreach ($this->_createCustomerForm($customerDataObject)->getUserAttributes() as $attribute) { if (isset($customerData[$attribute->getAttributeCode()])) { $quoteCode = sprintf('customer_%s', $attribute->getAttributeCode()); diff --git a/app/code/Magento/Sales/Model/Order/Payment/TransactionRepository.php b/app/code/Magento/Sales/Model/Order/Payment/TransactionRepository.php index e9d96d6a6c6f8bed2cfcd1cd7307244dff6583e6..1b51916e335f9fa49928827cb44ba93cfe0ffed9 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/TransactionRepository.php +++ b/app/code/Magento/Sales/Model/Order/Payment/TransactionRepository.php @@ -25,8 +25,8 @@ namespace Magento\Sales\Model\Order\Payment; use Magento\Sales\Model\Resource\Order\Payment\Transaction as TransactionResource; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; /** * Repository class for \Magento\Sales\Model\Order\Payment\Transaction @@ -55,12 +55,12 @@ class TransactionRepository private $registry = array(); /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ private $filterBuilder; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ private $searchCriteriaBuilder; @@ -126,10 +126,10 @@ class TransactionRepository /** * Find entities by criteria * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $criteria * @return Transaction[] */ - public function find(\Magento\Framework\Service\V1\Data\SearchCriteria $criteria) + public function find(\Magento\Framework\Api\SearchCriteria $criteria) { /** @var TransactionResource\Collection $collection */ $collection = $this->transactionCollectionFactory->create(); diff --git a/app/code/Magento/Sales/Model/OrderConverter.php b/app/code/Magento/Sales/Model/OrderConverter.php index 83ab755637ace381bbdffc07f29c6ea59682d3b6..47ea3ab4a14fbe06fb83608b0ca03f7a948c5236 100644 --- a/app/code/Magento/Sales/Model/OrderConverter.php +++ b/app/code/Magento/Sales/Model/OrderConverter.php @@ -109,7 +109,7 @@ class OrderConverter /** * Get Order Items - * + * * @param OrderData $dataObject * @return array */ diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php index d20517b11e5057492d39c02ca0192b38edd8a29f..72165ecb21c34cf23ec0d6f7a440f6d55362a6cc 100644 --- a/app/code/Magento/Sales/Model/Quote.php +++ b/app/code/Magento/Sales/Model/Quote.php @@ -709,7 +709,7 @@ class Quote extends \Magento\Framework\Model\AbstractModel { /* @TODO: remove model usage in favor of Data Object in scope of MAGETWO-19930 */ $customer = $this->_customerFactory->create(); - $customer->setData(\Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerData)); + $customer->setData(\Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerData)); $customer->setId($customerData->getId()); $this->setCustomer($customer); return $this; diff --git a/app/code/Magento/Sales/Model/Rss/NewOrder.php b/app/code/Magento/Sales/Model/Rss/NewOrder.php index 6d763f59050985ce066d9bd69953f51bfafaa0b5..efda9d697cc46f1348b4e349ef574aa2b48ab29d 100644 --- a/app/code/Magento/Sales/Model/Rss/NewOrder.php +++ b/app/code/Magento/Sales/Model/Rss/NewOrder.php @@ -168,4 +168,12 @@ class NewOrder implements DataProviderInterface { return array(); } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return true; + } } diff --git a/app/code/Magento/Sales/Model/Rss/OrderStatus.php b/app/code/Magento/Sales/Model/Rss/OrderStatus.php index e134b4781019a8181707be5814903eccfbe0a6a5..e42181069f4a1a82525560b16e80c829c4ff4a94 100644 --- a/app/code/Magento/Sales/Model/Rss/OrderStatus.php +++ b/app/code/Magento/Sales/Model/Rss/OrderStatus.php @@ -234,4 +234,12 @@ class OrderStatus implements DataProviderInterface { return array(); } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return true; + } } diff --git a/app/code/Magento/Sales/Service/V1/Action/CreditmemoCommentsList.php b/app/code/Magento/Sales/Service/V1/Action/CreditmemoCommentsList.php index bbb755e832f0f84c770f8933d385a099cc684a07..9defd3bccefe05b705cc549f753cb4bd29923e70 100644 --- a/app/code/Magento/Sales/Service/V1/Action/CreditmemoCommentsList.php +++ b/app/code/Magento/Sales/Service/V1/Action/CreditmemoCommentsList.php @@ -24,9 +24,9 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Service\V1\Data\CommentMapper; -use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Api\FilterBuilder; use Magento\Sales\Model\Order\Creditmemo\CommentRepository; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Sales\Service\V1\Data\CommentSearchResultsBuilder; /** @@ -45,12 +45,12 @@ class CreditmemoCommentsList protected $commentMapper; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $criteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ protected $filterBuilder; @@ -62,8 +62,8 @@ class CreditmemoCommentsList /** * @param \Magento\Sales\Model\Order\Creditmemo\CommentRepository $commentRepository * @param \Magento\Sales\Service\V1\Data\CommentMapper $commentMapper - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $criteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $criteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder * @param \Magento\Sales\Service\V1\Data\CommentSearchResultsBuilder $searchResultsBuilder */ public function __construct( diff --git a/app/code/Magento/Sales/Service/V1/Action/CreditmemoList.php b/app/code/Magento/Sales/Service/V1/Action/CreditmemoList.php index 3b38db63556aa1bb9c971211f3f57e20dd5d85d8..7d9cf4af02629422681940f8943ae22a8b1b7657 100644 --- a/app/code/Magento/Sales/Service/V1/Action/CreditmemoList.php +++ b/app/code/Magento/Sales/Service/V1/Action/CreditmemoList.php @@ -25,7 +25,7 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Service\V1\Data\CreditmemoMapper; use Magento\Sales\Model\Order\CreditmemoRepository; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; use Magento\Sales\Service\V1\Data\CreditmemoSearchResultsBuilder; /** @@ -66,8 +66,8 @@ class CreditmemoList /** * Invoke CreditmemoList service * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria + * @return \Magento\Framework\Api\SearchResults */ public function invoke(SearchCriteria $searchCriteria) { diff --git a/app/code/Magento/Sales/Service/V1/Action/InvoiceCommentsList.php b/app/code/Magento/Sales/Service/V1/Action/InvoiceCommentsList.php index f5d8730ab96ab772b12feecd8b1f3221eac632df..d42d74c36cffd729ed926b478539c1abdcbb19e9 100644 --- a/app/code/Magento/Sales/Service/V1/Action/InvoiceCommentsList.php +++ b/app/code/Magento/Sales/Service/V1/Action/InvoiceCommentsList.php @@ -24,9 +24,9 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Service\V1\Data\CommentMapper; -use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Api\FilterBuilder; use Magento\Sales\Model\Order\Invoice\CommentRepository; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Sales\Service\V1\Data\CommentSearchResultsBuilder; /** @@ -45,12 +45,12 @@ class InvoiceCommentsList protected $commentMapper; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $criteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ protected $filterBuilder; @@ -62,8 +62,8 @@ class InvoiceCommentsList /** * @param \Magento\Sales\Model\Order\Invoice\CommentRepository $commentRepository * @param \Magento\Sales\Service\V1\Data\CommentMapper $commentMapper - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $criteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $criteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder * @param \Magento\Sales\Service\V1\Data\CommentSearchResultsBuilder $searchResultsBuilder */ public function __construct( diff --git a/app/code/Magento/Sales/Service/V1/Action/InvoiceList.php b/app/code/Magento/Sales/Service/V1/Action/InvoiceList.php index 8632bc4d1c96837fc740f6aa883f06800f657b06..604336082717a896f9464e89b37d34c6ec0e49f1 100644 --- a/app/code/Magento/Sales/Service/V1/Action/InvoiceList.php +++ b/app/code/Magento/Sales/Service/V1/Action/InvoiceList.php @@ -26,7 +26,7 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Model\Order\InvoiceRepository; use Magento\Sales\Service\V1\Data\InvoiceMapper; use Magento\Sales\Service\V1\Data\InvoiceSearchResultsBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class InvoiceList @@ -67,7 +67,7 @@ class InvoiceList * Invoke InvoiceList service * * @param SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @return \Magento\Framework\Api\SearchResults */ public function invoke(SearchCriteria $searchCriteria) { diff --git a/app/code/Magento/Sales/Service/V1/Action/OrderCommentsList.php b/app/code/Magento/Sales/Service/V1/Action/OrderCommentsList.php index 7fec849be43a9680721b561b8f7dce3763a72132..e78f59757bc13259364389488a78fc4994303368 100644 --- a/app/code/Magento/Sales/Service/V1/Action/OrderCommentsList.php +++ b/app/code/Magento/Sales/Service/V1/Action/OrderCommentsList.php @@ -25,8 +25,8 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Model\Order\Status\HistoryRepository; use Magento\Sales\Service\V1\Data\OrderStatusHistoryMapper; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\FilterBuilder; use Magento\Sales\Service\V1\Data\OrderStatusHistorySearchResultsBuilder; /** diff --git a/app/code/Magento/Sales/Service/V1/Action/OrderList.php b/app/code/Magento/Sales/Service/V1/Action/OrderList.php index 65b92272eff7351b49da3e8b2784253431a06a8c..a506e22a6a092a3a65c7148297c990f2bbe01a77 100644 --- a/app/code/Magento/Sales/Service/V1/Action/OrderList.php +++ b/app/code/Magento/Sales/Service/V1/Action/OrderList.php @@ -26,7 +26,7 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Model\OrderRepository; use Magento\Sales\Service\V1\Data\OrderMapper; use Magento\Sales\Service\V1\Data\OrderSearchResultsBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class OrderList @@ -66,7 +66,7 @@ class OrderList /** * Invoke OrderList service * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Service\V1\Data\OrderSearchResults */ public function invoke(SearchCriteria $searchCriteria) diff --git a/app/code/Magento/Sales/Service/V1/Action/ShipmentCommentsList.php b/app/code/Magento/Sales/Service/V1/Action/ShipmentCommentsList.php index 85e8a150860ac997492adea7a3ee1cf4c698507a..e8448cab8490c5d9f8f7d92f08c1d62c770a13e9 100644 --- a/app/code/Magento/Sales/Service/V1/Action/ShipmentCommentsList.php +++ b/app/code/Magento/Sales/Service/V1/Action/ShipmentCommentsList.php @@ -24,9 +24,9 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Service\V1\Data\CommentMapper; -use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Api\FilterBuilder; use Magento\Sales\Model\Order\Shipment\CommentRepository; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Sales\Service\V1\Data\CommentSearchResultsBuilder; /** @@ -45,12 +45,12 @@ class ShipmentCommentsList protected $commentMapper; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $criteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ protected $filterBuilder; @@ -62,8 +62,8 @@ class ShipmentCommentsList /** * @param \Magento\Sales\Model\Order\Shipment\CommentRepository $commentRepository * @param \Magento\Sales\Service\V1\Data\CommentMapper $commentMapper - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $criteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $criteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder * @param \Magento\Sales\Service\V1\Data\CommentSearchResultsBuilder $searchResultsBuilder */ public function __construct( diff --git a/app/code/Magento/Sales/Service/V1/Action/ShipmentList.php b/app/code/Magento/Sales/Service/V1/Action/ShipmentList.php index 766b66457f9719c457b800fa6246f675874c17be..5862905697e6fbc2a249d1e5f28ff1761ef1d2d4 100644 --- a/app/code/Magento/Sales/Service/V1/Action/ShipmentList.php +++ b/app/code/Magento/Sales/Service/V1/Action/ShipmentList.php @@ -26,7 +26,7 @@ namespace Magento\Sales\Service\V1\Action; use Magento\Sales\Model\Order\ShipmentRepository; use Magento\Sales\Service\V1\Data\ShipmentMapper; use Magento\Sales\Service\V1\Data\ShipmentSearchResultsBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class ShipmentList @@ -67,7 +67,7 @@ class ShipmentList * Invoke ShipmentList service * * @param SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @return \Magento\Framework\Api\SearchResults */ public function invoke(SearchCriteria $searchCriteria) { diff --git a/app/code/Magento/Sales/Service/V1/CreditmemoRead.php b/app/code/Magento/Sales/Service/V1/CreditmemoRead.php index 84e6634a203c0a4d6c937ed5a51b021702d58671..73e70710fdee832611d84356d0bcb602e4ab7703 100644 --- a/app/code/Magento/Sales/Service/V1/CreditmemoRead.php +++ b/app/code/Magento/Sales/Service/V1/CreditmemoRead.php @@ -26,7 +26,7 @@ namespace Magento\Sales\Service\V1; use Magento\Sales\Service\V1\Action\CreditmemoGet; use Magento\Sales\Service\V1\Action\CreditmemoList; use Magento\Sales\Service\V1\Action\CreditmemoCommentsList; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class CreditmemoRead @@ -75,7 +75,7 @@ class CreditmemoRead implements CreditmemoReadInterface /** * @param SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @return \Magento\Framework\Api\SearchResults */ public function search(SearchCriteria $searchCriteria) { diff --git a/app/code/Magento/Sales/Service/V1/CreditmemoReadInterface.php b/app/code/Magento/Sales/Service/V1/CreditmemoReadInterface.php index 8f59c3beb0898ad580d34f3342c0ff3f941445da..dc065962988070e45134bff246d3edf939ae4176 100644 --- a/app/code/Magento/Sales/Service/V1/CreditmemoReadInterface.php +++ b/app/code/Magento/Sales/Service/V1/CreditmemoReadInterface.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; interface CreditmemoReadInterface { @@ -35,8 +35,8 @@ interface CreditmemoReadInterface public function get($id); /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria + * @return \Magento\Framework\Api\SearchResults */ public function search(SearchCriteria $searchCriteria); diff --git a/app/code/Magento/Sales/Service/V1/Data/Comment.php b/app/code/Magento/Sales/Service/V1/Data/Comment.php index 716dc4432dc5be594fc55d7c68535b0a0bd205f9..454d8155fd04519e5e2caeecb8ddb4b5ee91da10 100644 --- a/app/code/Magento/Sales/Service/V1/Data/Comment.php +++ b/app/code/Magento/Sales/Service/V1/Data/Comment.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class InvoiceComment diff --git a/app/code/Magento/Sales/Service/V1/Data/Creditmemo.php b/app/code/Magento/Sales/Service/V1/Data/Creditmemo.php index 53eec05829018d12c17424a0ace4022020c6f7de..19091fd9ec597bbd8161a41807969fd7fd38ed77 100644 --- a/app/code/Magento/Sales/Service/V1/Data/Creditmemo.php +++ b/app/code/Magento/Sales/Service/V1/Data/Creditmemo.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class Creditmemo diff --git a/app/code/Magento/Sales/Service/V1/Data/CreditmemoItem.php b/app/code/Magento/Sales/Service/V1/Data/CreditmemoItem.php index 1e8b6c8a197a387dd6c55e9b9d18ccc39b2ff1c9..d42481cb7bd987fdb21045d269b93c1c949f9a03 100644 --- a/app/code/Magento/Sales/Service/V1/Data/CreditmemoItem.php +++ b/app/code/Magento/Sales/Service/V1/Data/CreditmemoItem.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class CreditmemoItem diff --git a/app/code/Magento/Sales/Service/V1/Data/CreditmemoMapper.php b/app/code/Magento/Sales/Service/V1/Data/CreditmemoMapper.php index bc2dbfc1c0848a250af9c746617c171d6960c9af..72ee099a6617fa692a6428bbe98057748079e9ae 100644 --- a/app/code/Magento/Sales/Service/V1/Data/CreditmemoMapper.php +++ b/app/code/Magento/Sales/Service/V1/Data/CreditmemoMapper.php @@ -66,7 +66,7 @@ class CreditmemoMapper /** * @param \Magento\Sales\Model\Order\Creditmemo $creditmemo - * @return \Magento\Framework\Service\Data\AbstractExtensibleObject + * @return \Magento\Framework\Api\AbstractExtensibleObject */ public function extractDto(\Magento\Sales\Model\Order\Creditmemo $creditmemo) { diff --git a/app/code/Magento/Sales/Service/V1/Data/Invoice.php b/app/code/Magento/Sales/Service/V1/Data/Invoice.php index 792de8a3da6eae53da61511d99a2d744fa5d72d2..f19739937140213bf8acc072e3b4669d4d320351 100644 --- a/app/code/Magento/Sales/Service/V1/Data/Invoice.php +++ b/app/code/Magento/Sales/Service/V1/Data/Invoice.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class Invoice diff --git a/app/code/Magento/Sales/Service/V1/Data/InvoiceItem.php b/app/code/Magento/Sales/Service/V1/Data/InvoiceItem.php index de74d451a0ac69fb5aaf3053b8df1449d43554d8..4776c0e7a7cec8325cdbd30a06153d0ac86244ef 100644 --- a/app/code/Magento/Sales/Service/V1/Data/InvoiceItem.php +++ b/app/code/Magento/Sales/Service/V1/Data/InvoiceItem.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class InvoiceItem diff --git a/app/code/Magento/Sales/Service/V1/Data/InvoiceMapper.php b/app/code/Magento/Sales/Service/V1/Data/InvoiceMapper.php index f4768093c54abe2d22ac04d45b0747bd8546a8c6..5e061b999697c983257f3ce96bc16c06cbde2eec 100644 --- a/app/code/Magento/Sales/Service/V1/Data/InvoiceMapper.php +++ b/app/code/Magento/Sales/Service/V1/Data/InvoiceMapper.php @@ -65,7 +65,7 @@ class InvoiceMapper /** * @param \Magento\Sales\Model\Order\Invoice $object - * @return \Magento\Framework\Service\Data\AbstractExtensibleObject + * @return \Magento\Framework\Api\AbstractExtensibleObject */ public function extractDto(\Magento\Sales\Model\Order\Invoice $object) { diff --git a/app/code/Magento/Sales/Service/V1/Data/Order.php b/app/code/Magento/Sales/Service/V1/Data/Order.php index c314f83583f98e0a098b314341abf45be4234fc3..ab07670bbd44f721520fdd11c63eb8b9589a1f3f 100644 --- a/app/code/Magento/Sales/Service/V1/Data/Order.php +++ b/app/code/Magento/Sales/Service/V1/Data/Order.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class Order diff --git a/app/code/Magento/Sales/Service/V1/Data/OrderAddress.php b/app/code/Magento/Sales/Service/V1/Data/OrderAddress.php index bbff300f00948068505cd6ef7b40b6609c5ae12f..7fef2ec9c666f0b2a4aaa6f5e3ad01fcd83a7c99 100644 --- a/app/code/Magento/Sales/Service/V1/Data/OrderAddress.php +++ b/app/code/Magento/Sales/Service/V1/Data/OrderAddress.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class OrderAddress diff --git a/app/code/Magento/Sales/Service/V1/Data/OrderItem.php b/app/code/Magento/Sales/Service/V1/Data/OrderItem.php index 04208de6e802d1d24a76043b18adc9a3f9352846..73a38141dfc0758b2d709cf6f3c3bb11b1e3c02d 100644 --- a/app/code/Magento/Sales/Service/V1/Data/OrderItem.php +++ b/app/code/Magento/Sales/Service/V1/Data/OrderItem.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class OrderItem diff --git a/app/code/Magento/Sales/Service/V1/Data/OrderPayment.php b/app/code/Magento/Sales/Service/V1/Data/OrderPayment.php index f38b6dc5fe8876568c3446cea4a2f905331b1104..404f83accad6dc5f6674917057ebb71e2c861eca 100644 --- a/app/code/Magento/Sales/Service/V1/Data/OrderPayment.php +++ b/app/code/Magento/Sales/Service/V1/Data/OrderPayment.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class OrderPayment diff --git a/app/code/Magento/Sales/Service/V1/Data/OrderStatusHistory.php b/app/code/Magento/Sales/Service/V1/Data/OrderStatusHistory.php index e980a7e983e330e7cded8b2fa7ec78acd6d0d655..d5c48cc7ce7e7edf517081224e5190d39c39c83f 100644 --- a/app/code/Magento/Sales/Service/V1/Data/OrderStatusHistory.php +++ b/app/code/Magento/Sales/Service/V1/Data/OrderStatusHistory.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class OrderStatusHistory diff --git a/app/code/Magento/Sales/Service/V1/Data/Shipment.php b/app/code/Magento/Sales/Service/V1/Data/Shipment.php index 4b3cfbc5a260f0c89cbb65c9f23e85a1d18dacf9..b53b62c6d982d0202cc1d20c2d11592fe0267a94 100644 --- a/app/code/Magento/Sales/Service/V1/Data/Shipment.php +++ b/app/code/Magento/Sales/Service/V1/Data/Shipment.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class Shipment diff --git a/app/code/Magento/Sales/Service/V1/Data/ShipmentItem.php b/app/code/Magento/Sales/Service/V1/Data/ShipmentItem.php index 2c0c7adc8878860c0cb5daa62a80957eb4859fdd..c9a2fa73a3a37dff1cc6d140f150c35e85ca34c3 100644 --- a/app/code/Magento/Sales/Service/V1/Data/ShipmentItem.php +++ b/app/code/Magento/Sales/Service/V1/Data/ShipmentItem.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class ShipmentItem diff --git a/app/code/Magento/Sales/Service/V1/Data/ShipmentTrack.php b/app/code/Magento/Sales/Service/V1/Data/ShipmentTrack.php index a4bba0c831cb92f62cd66ac5152a37da9802e0d1..fdc5b1d18e1c2cc4a78b0dccb553b9f3e71aae71 100644 --- a/app/code/Magento/Sales/Service/V1/Data/ShipmentTrack.php +++ b/app/code/Magento/Sales/Service/V1/Data/ShipmentTrack.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * Class ShipmentTrack diff --git a/app/code/Magento/Sales/Service/V1/Data/Transaction.php b/app/code/Magento/Sales/Service/V1/Data/Transaction.php index 8a5fd6564c89421e23a7b201e9e500c6975b29ac..4b91c7dbd2d2f72885f865a7bfe83af6abc6741f 100644 --- a/app/code/Magento/Sales/Service/V1/Data/Transaction.php +++ b/app/code/Magento/Sales/Service/V1/Data/Transaction.php @@ -24,7 +24,7 @@ namespace Magento\Sales\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject as DataObject; +use Magento\Framework\Api\AbstractExtensibleObject as DataObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Sales/Service/V1/Data/Transaction/AdditionalInformation.php b/app/code/Magento/Sales/Service/V1/Data/Transaction/AdditionalInformation.php index 3ecf08e07dc653b9c69da464d669c3324f9202e5..5cc7ec4977c1c0faf2458f476a97bbea2d494934 100644 --- a/app/code/Magento/Sales/Service/V1/Data/Transaction/AdditionalInformation.php +++ b/app/code/Magento/Sales/Service/V1/Data/Transaction/AdditionalInformation.php @@ -24,7 +24,7 @@ namespace Magento\Sales\Service\V1\Data\Transaction; -use Magento\Framework\Service\Data\AbstractSimpleObject as DataObject; +use Magento\Framework\Api\AbstractSimpleObject as DataObject; /** * @codeCoverageIgnore diff --git a/app/code/Magento/Sales/Service/V1/Data/TransactionBuilder.php b/app/code/Magento/Sales/Service/V1/Data/TransactionBuilder.php index 0e5d852db59212b39a2715a6b2fbed81d57d96b8..bb2a7073f92b12d0872db8e4fb0ad5c7836c4898 100644 --- a/app/code/Magento/Sales/Service/V1/Data/TransactionBuilder.php +++ b/app/code/Magento/Sales/Service/V1/Data/TransactionBuilder.php @@ -27,7 +27,7 @@ namespace Magento\Sales\Service\V1\Data; /** * Builder class for \Magento\Sales\Service\V1\Data\Transaction */ -class TransactionBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class TransactionBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * {@inheritdoc} diff --git a/app/code/Magento/Sales/Service/V1/InvoiceRead.php b/app/code/Magento/Sales/Service/V1/InvoiceRead.php index a890060aa7f3f5b032e941ac6e3a537b8098348c..19fdb2b1dc079a95a577a77e64797d3ea00ca61e 100644 --- a/app/code/Magento/Sales/Service/V1/InvoiceRead.php +++ b/app/code/Magento/Sales/Service/V1/InvoiceRead.php @@ -26,7 +26,7 @@ namespace Magento\Sales\Service\V1; use Magento\Sales\Service\V1\Action\InvoiceGet; use Magento\Sales\Service\V1\Action\InvoiceList; use Magento\Sales\Service\V1\Action\InvoiceCommentsList; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class InvoiceRead @@ -79,8 +79,8 @@ class InvoiceRead implements InvoiceReadInterface } /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria + * @return \Magento\Framework\Api\SearchResults */ public function search(SearchCriteria $searchCriteria) { diff --git a/app/code/Magento/Sales/Service/V1/InvoiceReadInterface.php b/app/code/Magento/Sales/Service/V1/InvoiceReadInterface.php index b566d1be23c9caaf553c6198de1c45e9004eca80..61979ce246a2f55e052497881438bcbbc4b30b84 100644 --- a/app/code/Magento/Sales/Service/V1/InvoiceReadInterface.php +++ b/app/code/Magento/Sales/Service/V1/InvoiceReadInterface.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; interface InvoiceReadInterface { @@ -35,8 +35,8 @@ interface InvoiceReadInterface public function get($id); /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria + * @return \Magento\Framework\Api\SearchResults */ public function search(SearchCriteria $searchCriteria); diff --git a/app/code/Magento/Sales/Service/V1/OrderRead.php b/app/code/Magento/Sales/Service/V1/OrderRead.php index dc3a72c3d295bf56dfcfbee593b2861cea736105..fa5a497568b6858f1c6b0f19d379c71ee87ca661 100644 --- a/app/code/Magento/Sales/Service/V1/OrderRead.php +++ b/app/code/Magento/Sales/Service/V1/OrderRead.php @@ -27,7 +27,7 @@ use Magento\Sales\Service\V1\Action\OrderGet; use Magento\Sales\Service\V1\Action\OrderList; use Magento\Sales\Service\V1\Action\OrderCommentsList; use Magento\Sales\Service\V1\Action\OrderGetStatus; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class OrderRead @@ -83,7 +83,7 @@ class OrderRead implements OrderReadInterface } /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Service\V1\Data\OrderSearchResults */ public function search(SearchCriteria $searchCriteria) diff --git a/app/code/Magento/Sales/Service/V1/OrderReadInterface.php b/app/code/Magento/Sales/Service/V1/OrderReadInterface.php index 4862680cfee36ed1a35ceeea316e072c29968551..418d3db00b67836fc4f5236c56ae0baa2afb835f 100644 --- a/app/code/Magento/Sales/Service/V1/OrderReadInterface.php +++ b/app/code/Magento/Sales/Service/V1/OrderReadInterface.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; interface OrderReadInterface { @@ -35,7 +35,7 @@ interface OrderReadInterface public function get($id); /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Service\V1\Data\OrderSearchResults */ public function search(SearchCriteria $searchCriteria); diff --git a/app/code/Magento/Sales/Service/V1/ShipmentRead.php b/app/code/Magento/Sales/Service/V1/ShipmentRead.php index 333cc714834e12b9217e37a2aab01d469011c59a..0ae6561b8f4478d9b46b362170979ad902a12d23 100644 --- a/app/code/Magento/Sales/Service/V1/ShipmentRead.php +++ b/app/code/Magento/Sales/Service/V1/ShipmentRead.php @@ -27,7 +27,7 @@ use Magento\Sales\Service\V1\Action\ShipmentGet; use Magento\Sales\Service\V1\Action\ShipmentList; use Magento\Sales\Service\V1\Action\ShipmentCommentsList; use Magento\Sales\Service\V1\Action\ShipmentLabelGet; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class ShipmentRead @@ -83,8 +83,8 @@ class ShipmentRead implements ShipmentReadInterface } /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria + * @return \Magento\Framework\Api\SearchResults */ public function search(SearchCriteria $searchCriteria) { diff --git a/app/code/Magento/Sales/Service/V1/ShipmentReadInterface.php b/app/code/Magento/Sales/Service/V1/ShipmentReadInterface.php index c4da5bab4cfc624d2c0a27562deb283af4037b8d..9ce01290592e5a529e1be2195046dbe4dc72d57b 100644 --- a/app/code/Magento/Sales/Service/V1/ShipmentReadInterface.php +++ b/app/code/Magento/Sales/Service/V1/ShipmentReadInterface.php @@ -23,7 +23,7 @@ */ namespace Magento\Sales\Service\V1; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; interface ShipmentReadInterface { @@ -35,8 +35,8 @@ interface ShipmentReadInterface public function get($id); /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria - * @return \Magento\Framework\Service\V1\Data\SearchResults + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria + * @return \Magento\Framework\Api\SearchResults */ public function search(SearchCriteria $searchCriteria); diff --git a/app/code/Magento/Sales/Service/V1/TransactionRead.php b/app/code/Magento/Sales/Service/V1/TransactionRead.php index 26412a89a42f88893d2bd9479834103d015194ef..afe3e14a53342444a20aa2ff7d33acaf36b4ac4d 100644 --- a/app/code/Magento/Sales/Service/V1/TransactionRead.php +++ b/app/code/Magento/Sales/Service/V1/TransactionRead.php @@ -24,7 +24,7 @@ namespace Magento\Sales\Service\V1; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; use Magento\Sales\Model\Order\Payment\TransactionRepository; class TransactionRead implements TransactionReadInterface diff --git a/app/code/Magento/Sales/Service/V1/TransactionReadInterface.php b/app/code/Magento/Sales/Service/V1/TransactionReadInterface.php index 1a354f4be5efd1a582ccfebd997735b9cfcda3f7..c1e532e1709255f6be4691d758dfe315b041c338 100644 --- a/app/code/Magento/Sales/Service/V1/TransactionReadInterface.php +++ b/app/code/Magento/Sales/Service/V1/TransactionReadInterface.php @@ -24,7 +24,7 @@ namespace Magento\Sales\Service\V1; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; interface TransactionReadInterface { @@ -37,7 +37,7 @@ interface TransactionReadInterface public function get($id); /** - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Service\V1\Data\TransactionSearchResults */ public function search(SearchCriteria $searchCriteria); diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json index bd064e27f46000600ebba889f8898f6d0a4d7fd7..4c296da9b427185731440a30cfddf3d77e85a180 100644 --- a/app/code/Magento/Sales/composer.json +++ b/app/code/Magento/Sales/composer.json @@ -3,31 +3,31 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-authorization": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-sales-rule": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-widget": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-gift-message": "0.1.0-alpha102", - "magento/module-reports": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-wishlist": "0.1.0-alpha102", - "magento/module-email": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-authorization": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-sales-rule": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-widget": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-gift-message": "0.1.0-alpha103", + "magento/module-reports": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-wishlist": "0.1.0-alpha103", + "magento/module-email": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Sales/sql/sales_setup/install-1.6.0.0.php b/app/code/Magento/Sales/sql/sales_setup/install-1.6.0.0.php index 4f14d6335252f0d4bb21b3c1011644ced79bf97e..408e985eb95845b90df2ad9adcf2268fe6fc9611 100644 --- a/app/code/Magento/Sales/sql/sales_setup/install-1.6.0.0.php +++ b/app/code/Magento/Sales/sql/sales_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Sales\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.0-1.6.0.1.php index d57e55ea2ebdde959dfd77e0a48781de8c57c76b..af18b0bdaa8eefd25e87c51220dca1b64ecc0247 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.0-1.6.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.1-1.6.0.2.php index bf9cd2bfef2b6b0cdc66e81c0cb2e942e8e08c7e..252edee3a82c26e73b7250d8b97277faaaec7a41 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); $installer->getConnection()->addColumn( diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.11-1.6.0.12.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.11-1.6.0.12.php index ccdf1e0c72c099acde62e57acd63fc9ab19c0c9e..978444e5eee2722b4229192ad863d6114942867e 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.11-1.6.0.12.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.11-1.6.0.12.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.2-1.6.0.3.php index 693bef0eb3d54e4e1b0870246a35cb2121347028..0f31627236011a835737fa2afad8369920bf20a3 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( $installer->getTable('sales_flat_shipment'), diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.3-1.6.0.4.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.3-1.6.0.4.php index 0378e84b995493f81f553490f000a4dfc04626e9..8d5542163ff7ade2e3f54c6c34d7753c90bec330 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.3-1.6.0.4.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.3-1.6.0.4.php @@ -26,7 +26,7 @@ * Create aggregation tables for updated_at fields */ -/** @var $installer \Magento\Sales\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); $connection->createTable( diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.4-1.6.0.5.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.4-1.6.0.5.php index 273e1b64957117ca155be3ce8ffacdfb4bcdd911..a40b49fec9fc0ec62fab5b956401dbb5f778ab90 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.4-1.6.0.5.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.4-1.6.0.5.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( $installer->getTable('sales_flat_order_item'), diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.6-1.6.0.7.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.6-1.6.0.7.php index 802059097a5458741f2b256d0f25c5c37e253ba8..14d993e9bc309fc33cbb6e1066395b05dd256ecb 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.6-1.6.0.7.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.6-1.6.0.7.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->getConnection()->addColumn( diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.7-1.6.0.8.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.7-1.6.0.8.php index f070bb0f18e889f5aee1dbc02670dc2ddd28fdf0..fdcdff51c72ebe856a34d169f7e2cf4bcfed5312 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.7-1.6.0.8.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.7-1.6.0.8.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $invoiceTable = $installer->getTable('sales_flat_invoice'); diff --git a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.8-1.6.0.9.php b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.8-1.6.0.9.php index 32611d5bf33f3004e9c5c77f1da8355a06753e44..b4dbc035aee32f59add3b2485ffd53334db364d2 100644 --- a/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.8-1.6.0.9.php +++ b/app/code/Magento/Sales/sql/sales_setup/upgrade-1.6.0.8-1.6.0.9.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Sales\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_guest_info_links.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_guest_info_links.xml index 5ad4d941f6e678e7cc990dc06d60de457c2775e0..7e6860af50b2d71a118750ca22e8a8856f31921e 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_guest_info_links.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_guest_info_links.xml @@ -25,10 +25,10 @@ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <body> - <referenceBlock name="sales.order.info"> - <block class="Magento\Framework\View\Element\Html\Links" as="links" name="sales.order.info.links"> + <referenceContainer name="content"> + <block class="Magento\Framework\View\Element\Html\Links" as="links" name="sales.order.info.links" before="-"> <arguments> - <argument name="css_class" xsi:type="string">items</argument> + <argument name="css_class" xsi:type="string">items order-links</argument> </arguments> <block class="Magento\Sales\Block\Order\Link" name="sales.order.info.links.information"> <arguments> @@ -58,6 +58,6 @@ </arguments> </block> </block> - </referenceBlock> + </referenceContainer> </body> </page> diff --git a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml index 4ca94efa82f9fab79c6fb1775a2f8e18f35fbd8d..097820a12d80ac3176cee3d72c740972bbfd83f2 100644 --- a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml +++ b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml @@ -31,23 +31,31 @@ ?> <?php $_items = $this->getItems()?> <?php if($_items): ?> -<div class="block reorder"> - <div class="title"> +<div class="block block-reorder"> + <div class="block-title"> <strong><?php echo __('My Orders') ?></strong> </div> - <div class="content"> + <div class="block-content"> <form method="post" class="form reorder" action="<?php echo $this->getFormActionUrl() ?>" id="reorder-validate-detail"> <strong class="subtitle"><?php echo __('Last Ordered Items') ?></strong> - <ol class="items" id="cart-sidebar-reorder"> + <ol id="cart-sidebar-reorder" class="product-items product-items-names"> <?php $_showAddButtonFlag = false ?> <?php foreach ($_items as $_item): ?> - <li class="item"> + <li class="product-item"> <?php if ($this->isItemAvailableForReorder($_item)): ?> <?php $_showAddButtonFlag = true ?> - <input type="checkbox" name="order_items[]" id="reorder-item-<?php echo $_item->getId() ?>" value="<?php echo $_item->getId() ?>" title="<?php echo __('Add to Cart') ?>" - class="checkbox" data-validate='{"validate-one-checkbox-required-by-name": true}'/> + <div class="field item choice"> + <label class="label" for="reorder-item-<?php echo $_item->getId() ?>"><span><?php echo __('Add to Cart') ?></span></label> + <div class="control"> + <input type="checkbox" name="order_items[]" id="reorder-item-<?php echo $_item->getId() ?>" value="<?php echo $_item->getId() ?>" title="<?php echo __('Add to Cart') ?>" + class="checkbox" data-validate='{"validate-one-checkbox-required-by-name": true}'/> + </div> + </div> <?php endif; ?> - <strong class="product name"><a href="<?php echo $_item->getProduct()->getProductUrl() ?>"><?php echo $this->escapeHtml($_item->getName()) ?></a></strong> + <strong class="product-item-name"> + <a href="<?php echo $_item->getProduct()->getProductUrl() ?>" + class="product-item-link"><?php echo $this->escapeHtml($_item->getName()) ?></a> + </strong> </li> <?php endforeach; ?> </ol> diff --git a/app/code/Magento/SalesRule/Block/Rss/Discounts.php b/app/code/Magento/SalesRule/Block/Rss/Discounts.php index 53b24bc09be4256ff0388ce248edc0b05a99ca04..cd661947b4b23311aa3b5719c0d927761f1684eb 100644 --- a/app/code/Magento/SalesRule/Block/Rss/Discounts.php +++ b/app/code/Magento/SalesRule/Block/Rss/Discounts.php @@ -188,4 +188,12 @@ class Discounts extends \Magento\Framework\View\Element\AbstractBlock implements } return $data; } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + return false; + } } diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php index 05aeedaa89c663d2ac24a533ea04ec8e7c5f4584..d89f7a695852a1c9a76c0b4c36c5c63ec679d86d 100644 --- a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php +++ b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php @@ -58,6 +58,11 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac */ protected $_rulesIdsFilter; + /** + * @var \Magento\SalesRule\Model\Resource\Report\RuleFactory $ruleFactory + */ + protected $_ruleFactory; + /** * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Framework\Logger $logger @@ -171,7 +176,7 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac return $this; } - $rulesList = $this->_ruleFactory->getUniqRulesNamesList(); + $rulesList = $this->_ruleFactory->create()->getUniqRulesNamesList(); $rulesFilterSqlParts = array(); foreach ($this->_rulesIdsFilter as $ruleId) { diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json index a53b5480102227e178b69fbda9b2a83a6ccb5138..56b42d7c447e24d4d57984a7144d1d0479ff89a8 100644 --- a/app/code/Magento/SalesRule/composer.json +++ b/app/code/Magento/SalesRule/composer.json @@ -3,26 +3,26 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-rule": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-reports": "0.1.0-alpha102", - "magento/module-catalog-rule": "0.1.0-alpha102", - "magento/module-widget": "0.1.0-alpha102", - "magento/module-cron": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-rule": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-reports": "0.1.0-alpha103", + "magento/module-catalog-rule": "0.1.0-alpha103", + "magento/module-widget": "0.1.0-alpha103", + "magento/module-cron": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/SalesRule/sql/salesrule_setup/install-1.6.0.0.php b/app/code/Magento/SalesRule/sql/salesrule_setup/install-1.6.0.0.php index 32f2aaad57375fa8db7e9db2efdce380702319ef..5bdfccba3faef4cf3e59d456cb919c7ef459fbfe 100644 --- a/app/code/Magento/SalesRule/sql/salesrule_setup/install-1.6.0.0.php +++ b/app/code/Magento/SalesRule/sql/salesrule_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.0-1.6.0.1.php index 4545c73b4214c22094bbd11bd1ae26f9147bf649..3e25238187764bac505a8fbd9610d1be0bfef20c 100644 --- a/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.0-1.6.0.1.php @@ -22,8 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$installer = $this; -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); $connection->createTable( diff --git a/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.1-1.6.0.2.php index dd138da18bd766b114aa0413f2f1c42ddb2e00cc..656e8b88ef73420285acfebdf40ca161ae5f8d94 100644 --- a/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -23,7 +23,7 @@ */ /** - * @var $installer \Magento\Framework\Module\Setup + * @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; diff --git a/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php index ee5589dbd91beb382fd20f021f4a53c452aca2d8..443d92baa25f7d5e08d4c67eea9b206b9ab95cfe 100644 --- a/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json index e3269ead358e1b28e11723f3761bfde66b776286..4ceeea36119a931f5901e71ce1791c3943ac6244 100644 --- a/app/code/Magento/Search/composer.json +++ b/app/code/Magento/Search/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/framework": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php b/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php index dc72c579abc3f0e45cf8b9dbcfc3c72d79756c81..f81b228658c2b0fd52724448ec45521e30e94695 100644 --- a/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php +++ b/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Sendfriend/composer.json b/app/code/Magento/Sendfriend/composer.json index ab35dfe1ffacc2caf60bcfb7c45cb849a0a36458..d1b5e5e445dcc350d5d1037d8d9c028996e4fd07 100644 --- a/app/code/Magento/Sendfriend/composer.json +++ b/app/code/Magento/Sendfriend/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Sendfriend/sql/sendfriend_setup/install-1.6.0.0.php b/app/code/Magento/Sendfriend/sql/sendfriend_setup/install-1.6.0.0.php index a9540607f72cdae022eb082592fdac1e405b5eb9..6404e5ccbba2caddf855298b0a6c95974657dfdb 100644 --- a/app/code/Magento/Sendfriend/sql/sendfriend_setup/install-1.6.0.0.php +++ b/app/code/Magento/Sendfriend/sql/sendfriend_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json index ba8d4194e890c2404fb384f4e0ae3ed65c891869..7b306b9cec0d821f9487e8e18ea7251a0096b3a2 100644 --- a/app/code/Magento/Shipping/composer.json +++ b/app/code/Magento/Shipping/composer.json @@ -3,23 +3,23 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-contact": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-payment": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-contact": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-payment": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "ext-gd": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml index d755b37e5c7db1b24742bfe15c69ef75805d416b..c4aaa46ebe2cb11aee0310d4bdb3cdcdecd8154d 100644 --- a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml +++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml @@ -156,12 +156,12 @@ <?php /* end for each tracking information */ ?> <?php endforeach; ?> <?php else: ?> - <p class="empty"><?php echo __('There is no tracking available for this shipment.'); ?></p> + <div class="message info empty"><div><?php echo __('There is no tracking available for this shipment.'); ?></div></div> <?php endif; ?> <?php endforeach; ?> <?php else: ?> - <p class="empty"><?php echo __('There is no tracking available.'); ?></p> + <div class="message info empty"><div><?php echo __('There is no tracking available.'); ?></div></div> <?php endif; ?> <div class="actions"> <button type="button" @@ -171,4 +171,4 @@ <span><?php echo __('Close Window') ?></span> </button> </div> -</div> \ No newline at end of file +</div> diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json index e9d89e4571e48395eff7c9772c184272061cad15..2f74fa2dc411dbb583b4a3612f0c609c3a8ffb00 100644 --- a/app/code/Magento/Sitemap/composer.json +++ b/app/code/Magento/Sitemap/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-catalog-url-rewrite": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-catalog-url-rewrite": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Sitemap/sql/sitemap_setup/install-1.6.0.0.php b/app/code/Magento/Sitemap/sql/sitemap_setup/install-1.6.0.0.php index 6961163e6ff9089b0e30e7ae18527fff30a329ed..aea99f0298e6c579d337d16da6dbc02778fddb8b 100644 --- a/app/code/Magento/Sitemap/sql/sitemap_setup/install-1.6.0.0.php +++ b/app/code/Magento/Sitemap/sql/sitemap_setup/install-1.6.0.0.php @@ -22,9 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -/* @var $installer \Magento\Framework\Module\Setup */ - +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Store/Model/Config/Reader/DefaultReader.php b/app/code/Magento/Store/Model/Config/Reader/DefaultReader.php index 72c6baa10461d61834eb8b97e6aadd3cd4915dd8..f870859d61770bfd6699895a939373ebf377c873 100644 --- a/app/code/Magento/Store/Model/Config/Reader/DefaultReader.php +++ b/app/code/Magento/Store/Model/Config/Reader/DefaultReader.php @@ -42,27 +42,19 @@ class DefaultReader implements \Magento\Framework\App\Config\Scope\ReaderInterfa */ protected $_collectionFactory; - /** - * @var \Magento\Framework\App\State - */ - protected $_appState; - /** * @param \Magento\Framework\App\Config\Initial $initialConfig * @param \Magento\Framework\App\Config\Scope\Converter $converter * @param \Magento\Store\Model\Resource\Config\Collection\ScopedFactory $collectionFactory - * @param \Magento\Framework\App\State $appState */ public function __construct( \Magento\Framework\App\Config\Initial $initialConfig, \Magento\Framework\App\Config\Scope\Converter $converter, - \Magento\Store\Model\Resource\Config\Collection\ScopedFactory $collectionFactory, - \Magento\Framework\App\State $appState + \Magento\Store\Model\Resource\Config\Collection\ScopedFactory $collectionFactory ) { $this->_initialConfig = $initialConfig; $this->_converter = $converter; $this->_collectionFactory = $collectionFactory; - $this->_appState = $appState; } /** @@ -73,17 +65,17 @@ class DefaultReader implements \Magento\Framework\App\Config\Scope\ReaderInterfa public function read() { $config = $this->_initialConfig->getData(\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT); - if ($this->_appState->isInstalled()) { - $collection = $this->_collectionFactory->create( - array('scope' => \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT) - ); - $dbDefaultConfig = array(); - foreach ($collection as $item) { - $dbDefaultConfig[$item->getPath()] = $item->getValue(); - } - $dbDefaultConfig = $this->_converter->convert($dbDefaultConfig); - $config = array_replace_recursive($config, $dbDefaultConfig); + + $collection = $this->_collectionFactory->create( + array('scope' => \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT) + ); + $dbDefaultConfig = array(); + foreach ($collection as $item) { + $dbDefaultConfig[$item->getPath()] = $item->getValue(); } + $dbDefaultConfig = $this->_converter->convert($dbDefaultConfig); + $config = array_replace_recursive($config, $dbDefaultConfig); + return $config; } } diff --git a/app/code/Magento/Store/Model/Config/Reader/Store.php b/app/code/Magento/Store/Model/Config/Reader/Store.php index a00f4092cbb530bb5eb689eb1da798dbc8094339..6709807f94a70854d703e2a89431c3f469b584b7 100644 --- a/app/code/Magento/Store/Model/Config/Reader/Store.php +++ b/app/code/Magento/Store/Model/Config/Reader/Store.php @@ -52,11 +52,6 @@ class Store implements \Magento\Framework\App\Config\Scope\ReaderInterface */ protected $_storeFactory; - /** - * @var \Magento\Framework\App\State - */ - protected $_appState; - /** * @var \Magento\Framework\StoreManagerInterface */ @@ -68,7 +63,6 @@ class Store implements \Magento\Framework\App\Config\Scope\ReaderInterface * @param \Magento\Store\Model\Config\Converter $converter * @param \Magento\Store\Model\Resource\Config\Collection\ScopedFactory $collectionFactory * @param \Magento\Store\Model\StoreFactory $storeFactory - * @param \Magento\Framework\App\State $appState * @param \Magento\Framework\StoreManagerInterface $storeManager */ public function __construct( @@ -77,7 +71,6 @@ class Store implements \Magento\Framework\App\Config\Scope\ReaderInterface \Magento\Store\Model\Config\Converter $converter, \Magento\Store\Model\Resource\Config\Collection\ScopedFactory $collectionFactory, \Magento\Store\Model\StoreFactory $storeFactory, - \Magento\Framework\App\State $appState, \Magento\Framework\StoreManagerInterface $storeManager ) { $this->_initialConfig = $initialConfig; @@ -85,7 +78,6 @@ class Store implements \Magento\Framework\App\Config\Scope\ReaderInterface $this->_converter = $converter; $this->_collectionFactory = $collectionFactory; $this->_storeFactory = $storeFactory; - $this->_appState = $appState; $this->_storeManager = $storeManager; } @@ -94,43 +86,36 @@ class Store implements \Magento\Framework\App\Config\Scope\ReaderInterface * * @param string $code * @return array + * @throws NoSuchEntityException */ public function read($code = null) { - if ($this->_appState->isInstalled()) { - if (empty($code)) { - $store = $this->_storeManager->getStore(); - } elseif (($code == \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT)) { - $store = $this->_storeManager->getDefaultStoreView(); - } else { - $store = $this->_storeFactory->create(); - $store->load($code); - } + if (empty($code)) { + $store = $this->_storeManager->getStore(); + } elseif (($code == \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT)) { + $store = $this->_storeManager->getDefaultStoreView(); + } else { + $store = $this->_storeFactory->create(); + $store->load($code); + } - if (!$store->getCode()) { - throw NoSuchEntityException::singleField('storeCode', $code); - } - $websiteConfig = $this->_scopePool->getScope( - \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE, - $store->getWebsite()->getCode() - )->getSource(); - $config = array_replace_recursive($websiteConfig, $this->_initialConfig->getData("stores|{$code}")); + if (!$store->getCode()) { + throw NoSuchEntityException::singleField('storeCode', $code); + } + $websiteConfig = $this->_scopePool->getScope( + \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE, + $store->getWebsite()->getCode() + )->getSource(); + $config = array_replace_recursive($websiteConfig, $this->_initialConfig->getData("stores|{$code}")); - $collection = $this->_collectionFactory->create( - array('scope' => \Magento\Store\Model\ScopeInterface::SCOPE_STORES, 'scopeId' => $store->getId()) - ); - $dbStoreConfig = array(); - foreach ($collection as $item) { - $dbStoreConfig[$item->getPath()] = $item->getValue(); - } - $config = $this->_converter->convert($dbStoreConfig, $config); - } else { - $websiteConfig = $this->_scopePool->getScope( - \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE, - \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT - )->getSource(); - $config = $this->_converter->convert($websiteConfig, $this->_initialConfig->getData("stores|{$code}")); + $collection = $this->_collectionFactory->create( + array('scope' => \Magento\Store\Model\ScopeInterface::SCOPE_STORES, 'scopeId' => $store->getId()) + ); + $dbStoreConfig = array(); + foreach ($collection as $item) { + $dbStoreConfig[$item->getPath()] = $item->getValue(); } + $config = $this->_converter->convert($dbStoreConfig, $config); return $config; } } diff --git a/app/code/Magento/Store/Model/Config/Reader/Website.php b/app/code/Magento/Store/Model/Config/Reader/Website.php index eadead79c46a6cf2da61355fe8c31790448436b2..73eca953d1f5df0fda148af7a39fa6b9f959f082 100644 --- a/app/code/Magento/Store/Model/Config/Reader/Website.php +++ b/app/code/Magento/Store/Model/Config/Reader/Website.php @@ -50,33 +50,25 @@ class Website implements \Magento\Framework\App\Config\Scope\ReaderInterface */ protected $_websiteFactory; - /** - * @var \Magento\Framework\App\State - */ - protected $_appState; - /** * @param \Magento\Framework\App\Config\Initial $initialConfig * @param \Magento\Framework\App\Config\ScopePool $scopePool * @param \Magento\Framework\App\Config\Scope\Converter $converter * @param \Magento\Store\Model\Resource\Config\Collection\ScopedFactory $collectionFactory * @param \Magento\Store\Model\WebsiteFactory $websiteFactory - * @param \Magento\Framework\App\State $appState */ public function __construct( \Magento\Framework\App\Config\Initial $initialConfig, \Magento\Framework\App\Config\ScopePool $scopePool, \Magento\Framework\App\Config\Scope\Converter $converter, \Magento\Store\Model\Resource\Config\Collection\ScopedFactory $collectionFactory, - \Magento\Store\Model\WebsiteFactory $websiteFactory, - \Magento\Framework\App\State $appState + \Magento\Store\Model\WebsiteFactory $websiteFactory ) { $this->_initialConfig = $initialConfig; $this->_scopePool = $scopePool; $this->_converter = $converter; $this->_collectionFactory = $collectionFactory; $this->_websiteFactory = $websiteFactory; - $this->_appState = $appState; } /** @@ -92,22 +84,21 @@ class Website implements \Magento\Framework\App\Config\Scope\ReaderInterface $this->_initialConfig->getData("websites|{$code}") ); - if ($this->_appState->isInstalled()) { - $website = $this->_websiteFactory->create(); - $website->load($code); - $collection = $this->_collectionFactory->create( - array('scope' => \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES, 'scopeId' => $website->getId()) - ); - $dbWebsiteConfig = array(); - foreach ($collection as $configValue) { - $dbWebsiteConfig[$configValue->getPath()] = $configValue->getValue(); - } - $dbWebsiteConfig = $this->_converter->convert($dbWebsiteConfig); + $website = $this->_websiteFactory->create(); + $website->load($code); + $collection = $this->_collectionFactory->create( + array('scope' => \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES, 'scopeId' => $website->getId()) + ); + $dbWebsiteConfig = array(); + foreach ($collection as $configValue) { + $dbWebsiteConfig[$configValue->getPath()] = $configValue->getValue(); + } + $dbWebsiteConfig = $this->_converter->convert($dbWebsiteConfig); - if (count($dbWebsiteConfig)) { - $config = array_replace_recursive($config, $dbWebsiteConfig); - } + if (count($dbWebsiteConfig)) { + $config = array_replace_recursive($config, $dbWebsiteConfig); } + return $config; } } diff --git a/app/code/Magento/Store/Model/StorageFactory.php b/app/code/Magento/Store/Model/StorageFactory.php index 200629e0aac06b367deb13e638ef5ab76634e2f3..080b830f595c5223bd74bda9ad2440caa56cc326 100644 --- a/app/code/Magento/Store/Model/StorageFactory.php +++ b/app/code/Magento/Store/Model/StorageFactory.php @@ -33,18 +33,11 @@ class StorageFactory protected $_objectManager; /** - * Default storage class name + * Storage class name * * @var string */ - protected $_defaultStorageClassName; - - /** - * Installed storage class name - * - * @var string - */ - protected $_installedStorageClassName; + protected $_storageClassName; /** * @var \Magento\Framework\StoreManagerInterface[] @@ -95,8 +88,7 @@ class StorageFactory * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\App\RequestInterface $request - * @param string $defaultStorageClassName - * @param string $installedStorageClassName + * @param string $storageClassName * @param string $writerModel */ public function __construct( @@ -108,13 +100,11 @@ class StorageFactory \Magento\Framework\App\Http\Context $httpContext, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\App\RequestInterface $request, - $defaultStorageClassName = 'Magento\Store\Model\Storage\DefaultStorage', - $installedStorageClassName = 'Magento\Store\Model\Storage\Db', + $storageClassName = 'Magento\Store\Model\Storage\Db', $writerModel = '' ) { $this->_objectManager = $objectManager; - $this->_defaultStorageClassName = $defaultStorageClassName; - $this->_installedStorageClassName = $installedStorageClassName; + $this->_storageClassName = $storageClassName; $this->_eventManager = $eventManager; $this->_log = $logger; $this->_appState = $appState; @@ -134,8 +124,7 @@ class StorageFactory */ public function get(array $arguments = array()) { - $className = - $this->_appState->isInstalled() ? $this->_installedStorageClassName : $this->_defaultStorageClassName; + $className = $this->_storageClassName; if (false == isset($this->_cache[$className])) { /** @var $storage \Magento\Framework\StoreManagerInterface */ @@ -147,7 +136,7 @@ class StorageFactory ); } $this->_cache[$className] = $storage; - if ($className === $this->_installedStorageClassName) { + if ($className === $this->_storageClassName) { $this->_reinitStores($storage, $arguments); $useSid = $this->_scopeConfig->isSetFlag( \Magento\Framework\Session\SidResolver::XML_PATH_USE_FRONTEND_SID, diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json index 3a9e2b96925e77ac614ca9f194b31a49539f28b9..a83b62964452f33a904188e0f7f379b527d3981f 100644 --- a/app/code/Magento/Store/composer.json +++ b/app/code/Magento/Store/composer.json @@ -3,14 +3,14 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-core": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-ui": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-core": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-ui": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Store/sql/store_setup/install-2.0.0.0.php b/app/code/Magento/Store/sql/store_setup/install-2.0.0.0.php index 88ae298ff33aec4e212e53607d9feaa265b0bced..fb5a480ef00f6734f5319a8213006f414baea163 100644 --- a/app/code/Magento/Store/sql/store_setup/install-2.0.0.0.php +++ b/app/code/Magento/Store/sql/store_setup/install-2.0.0.0.php @@ -21,9 +21,10 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + use Magento\Framework\DB\Ddl\Table; -/* @var $installer \Magento\Core\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Tax/Model/Rate/Source.php b/app/code/Magento/Tax/Model/Rate/Source.php index f2d3501db1d2c0508e9541690b3e2373d13c3c9c..2b239acf0be24161b793f74516b3aaa2a3456ab0 100644 --- a/app/code/Magento/Tax/Model/Rate/Source.php +++ b/app/code/Magento/Tax/Model/Rate/Source.php @@ -25,7 +25,7 @@ namespace Magento\Tax\Model\Rate; use Magento\Tax\Service\V1\TaxRateServiceInterface; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Convert\Object as Converter; use Magento\Tax\Service\V1\Data\TaxRate; diff --git a/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php b/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php index 33032cf2252e75010419aaff7241a35697111784..f7f08a311a03c0d57d5b9d05974a40e748714de1 100644 --- a/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php +++ b/app/code/Magento/Tax/Model/TaxClass/Source/Customer.php @@ -38,12 +38,12 @@ class Customer extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource protected $taxClassService; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $searchCriteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ protected $filterBuilder; @@ -51,13 +51,13 @@ class Customer extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource * Initialize dependencies. * * @param \Magento\Tax\Service\V1\TaxClassServiceInterface $taxClassService - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder */ public function __construct( \Magento\Tax\Service\V1\TaxClassServiceInterface $taxClassService, - \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder, - \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, + \Magento\Framework\Api\FilterBuilder $filterBuilder ) { $this->taxClassService = $taxClassService; $this->searchCriteriaBuilder = $searchCriteriaBuilder; diff --git a/app/code/Magento/Tax/Model/TaxClass/Source/Product.php b/app/code/Magento/Tax/Model/TaxClass/Source/Product.php index c102950e4a0d4bb5137b35434c2a37cfb49c723f..73acebbcdfb9c6a2cbcf91c1dbf55411f3c68a07 100644 --- a/app/code/Magento/Tax/Model/TaxClass/Source/Product.php +++ b/app/code/Magento/Tax/Model/TaxClass/Source/Product.php @@ -38,12 +38,12 @@ class Product extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource protected $_taxClassService; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $_searchCriteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ protected $_filterBuilder; @@ -66,16 +66,16 @@ class Product extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource * @param \Magento\Tax\Model\Resource\TaxClass\CollectionFactory $classesFactory * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $optionFactory * @param \Magento\Tax\Service\V1\TaxClassServiceInterface $taxClassService - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder */ public function __construct( \Magento\Core\Helper\Data $coreData, \Magento\Tax\Model\Resource\TaxClass\CollectionFactory $classesFactory, \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $optionFactory, \Magento\Tax\Service\V1\TaxClassServiceInterface $taxClassService, - \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder, - \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder + \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, + \Magento\Framework\Api\FilterBuilder $filterBuilder ) { $this->_coreData = $coreData; $this->_classesFactory = $classesFactory; diff --git a/app/code/Magento/Tax/Model/TaxClass/Type/Customer.php b/app/code/Magento/Tax/Model/TaxClass/Type/Customer.php index 31db5326917402e2b735403f418f1d3a4896883e..46b02037569f0726467cb3434ab71680b20b5da7 100644 --- a/app/code/Magento/Tax/Model/TaxClass/Type/Customer.php +++ b/app/code/Magento/Tax/Model/TaxClass/Type/Customer.php @@ -34,12 +34,12 @@ class Customer extends \Magento\Tax\Model\TaxClass\AbstractType protected $groupService; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder + * @var \Magento\Framework\Api\FilterBuilder */ protected $filterBuilder; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder + * @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $searchCriteriaBuilder; @@ -53,15 +53,15 @@ class Customer extends \Magento\Tax\Model\TaxClass\AbstractType /** * @param \Magento\Tax\Model\Calculation\Rule $calculationRule * @param \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService - * @param \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder - * @param \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder + * @param \Magento\Framework\Api\FilterBuilder $filterBuilder + * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder * @param array $data */ public function __construct( \Magento\Tax\Model\Calculation\Rule $calculationRule, \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService, - \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder, - \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder, + \Magento\Framework\Api\FilterBuilder $filterBuilder, + \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, array $data = array() ) { parent::__construct($calculationRule, $data); diff --git a/app/code/Magento/Tax/Service/V1/Collection/TaxRateCollection.php b/app/code/Magento/Tax/Service/V1/Collection/TaxRateCollection.php index d98d973389ee29bddebc2555819ff8e32457e213..7f9661fb82529ade0ad3c4ed3ee335700a6469a3 100644 --- a/app/code/Magento/Tax/Service/V1/Collection/TaxRateCollection.php +++ b/app/code/Magento/Tax/Service/V1/Collection/TaxRateCollection.php @@ -25,13 +25,13 @@ namespace Magento\Tax\Service\V1\Collection; use Magento\Core\Model\EntityFactory; -use Magento\Framework\Service\AbstractServiceCollection; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\AbstractServiceCollection; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Tax\Model\Calculation\Rate\Converter; use Magento\Tax\Service\V1\TaxRateServiceInterface; use Magento\Tax\Service\V1\Data\TaxRate; -use Magento\Framework\Service\V1\Data\SortOrderBuilder; +use Magento\Framework\Api\SortOrderBuilder; /** * Tax rate collection for a grid backed by Services diff --git a/app/code/Magento/Tax/Service/V1/Collection/TaxRuleCollection.php b/app/code/Magento/Tax/Service/V1/Collection/TaxRuleCollection.php index ee563608238f8c92610b6fd329d28e02422dcd43..412906c6f581fbc868e8f3034fdbbf2ffc343d07 100644 --- a/app/code/Magento/Tax/Service/V1/Collection/TaxRuleCollection.php +++ b/app/code/Magento/Tax/Service/V1/Collection/TaxRuleCollection.php @@ -25,13 +25,13 @@ namespace Magento\Tax\Service\V1\Collection; use Magento\Core\Model\EntityFactory; -use Magento\Framework\Service\AbstractServiceCollection; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\AbstractServiceCollection; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Tax\Model\Calculation\TaxRuleConverter; use Magento\Tax\Service\V1\TaxRuleServiceInterface; use Magento\Tax\Service\V1\Data\TaxRule; -use Magento\Framework\Service\V1\Data\SortOrderBuilder; +use Magento\Framework\Api\SortOrderBuilder; /** * Tax rule collection for a grid backed by Services diff --git a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails.php b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails.php index 932f00208902ffa3cb5a66b9e350fb345ff584ed..c8162539d41c245c8e43b52b08a38d3a94afa13a 100644 --- a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails.php +++ b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -class OrderTaxDetails extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class OrderTaxDetails extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTax.php b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTax.php index 8e93f552661ca7d80d1ec25a64024f474891ed8f..4a8468d86526833e01b5f103d3342532f1d6eb0d 100644 --- a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTax.php +++ b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTax.php @@ -23,7 +23,7 @@ */ namespace Magento\Tax\Service\V1\Data\OrderTaxDetails; -class AppliedTax extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class AppliedTax extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTaxBuilder.php b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTaxBuilder.php index 246873d51f865bc250c74fac30f7a6f668521a79..ab56a3a40f22ef218599018a9a48c55c09dfead8 100644 --- a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTaxBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/AppliedTaxBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Tax\Service\V1\Data\OrderTaxDetails; * * @method AppliedTax create() */ -class AppliedTaxBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class AppliedTaxBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set tax rate code diff --git a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/Item.php b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/Item.php index 4a821da981928c77dd5d3291229b1a5b08b058c1..51e8dcefd5d7da642851e9539d0bccc5d2fdd687 100644 --- a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/Item.php +++ b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/Item.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data\OrderTaxDetails; -class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Item extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/ItemBuilder.php b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/ItemBuilder.php index aadb4c89817f0d3efa88e4e6fa3849005f6a978d..f96ecf5e2c1b8e389bc2f564a5adfc030dc86a55 100644 --- a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/ItemBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetails/ItemBuilder.php @@ -23,8 +23,8 @@ */ namespace Magento\Tax\Service\V1\Data\OrderTaxDetails; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Builder for the Item Data Object @@ -32,7 +32,7 @@ use Magento\Framework\Service\Data\MetadataServiceInterface; * @method Item create() */ -class ItemBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ItemBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Applied Tax data object builder @@ -44,13 +44,13 @@ class ItemBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObje /** * Initialize dependencies * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param AppliedTaxBuilder $appliedTaxBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, AppliedTaxBuilder $appliedTaxBuilder diff --git a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetailsBuilder.php b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetailsBuilder.php index 9d3e50fb30185c148fdeb39ceed31b22831f7d60..ad33bc878b23d5d47c158f42eca78404cd762094 100644 --- a/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetailsBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/OrderTaxDetailsBuilder.php @@ -26,15 +26,15 @@ namespace Magento\Tax\Service\V1\Data; use \Magento\Tax\Service\V1\Data\OrderTaxDetails\AppliedTaxBuilder; use \Magento\Tax\Service\V1\Data\OrderTaxDetails\ItemBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Builder for the OrderTaxDetails Data Object * * @method OrderTaxDetails create() */ -class OrderTaxDetailsBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class OrderTaxDetailsBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Applied Tax data object builder @@ -53,14 +53,14 @@ class OrderTaxDetailsBuilder extends \Magento\Framework\Service\Data\AbstractExt /** * Initialize dependencies * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param AppliedTaxBuilder $appliedTaxBuilder * @param ItemBuilder $itemBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, AppliedTaxBuilder $appliedTaxBuilder, diff --git a/app/code/Magento/Tax/Service/V1/Data/QuoteDetails.php b/app/code/Magento/Tax/Service/V1/Data/QuoteDetails.php index 960ef5d5f4f924bc5132f24781a39c95ee47b9b7..f45a598e094e3ea8fcdc6dcd2ffe8d3d1db7049d 100644 --- a/app/code/Magento/Tax/Service/V1/Data/QuoteDetails.php +++ b/app/code/Magento/Tax/Service/V1/Data/QuoteDetails.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -class QuoteDetails extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class QuoteDetails extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/Item.php b/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/Item.php index 79ef1884876d39f7ba76b4da85c410387e7db685..a96253ea29eda8599766547e7da6c3c1e81d29c1 100644 --- a/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/Item.php +++ b/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/Item.php @@ -23,7 +23,7 @@ */ namespace Magento\Tax\Service\V1\Data\QuoteDetails; -class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Item extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/ItemBuilder.php b/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/ItemBuilder.php index b74b0d23e660bc072f6cd7f0f8f3da3eea8631cc..4606696a560095fa10dd9bb2c3b4e31328cf787a 100644 --- a/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/ItemBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/QuoteDetails/ItemBuilder.php @@ -23,15 +23,15 @@ */ namespace Magento\Tax\Service\V1\Data\QuoteDetails; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Builder for the Item Service Data Object * * @method Item create() */ -class ItemBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ItemBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * TaxClassKey data object builder @@ -43,13 +43,13 @@ class ItemBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObje /** * Initialize dependencies * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param \Magento\Tax\Service\V1\Data\TaxClassKeyBuilder $taxClassKeyBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, \Magento\Tax\Service\V1\Data\TaxClassKeyBuilder $taxClassKeyBuilder diff --git a/app/code/Magento/Tax/Service/V1/Data/QuoteDetailsBuilder.php b/app/code/Magento/Tax/Service/V1/Data/QuoteDetailsBuilder.php index d571b054b23d906eb7adc2e41208be2856aa8831..3ca8f0b566507d21568dc787fe4557385af1d8ac 100644 --- a/app/code/Magento/Tax/Service/V1/Data/QuoteDetailsBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/QuoteDetailsBuilder.php @@ -23,15 +23,15 @@ */ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * QuoteDetailsBuilder * * @method QuoteDetails create() */ -class QuoteDetailsBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class QuoteDetailsBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * QuoteDetails item builder @@ -57,7 +57,7 @@ class QuoteDetailsBuilder extends \Magento\Framework\Service\Data\AbstractExtens /** * Initialize dependencies. * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param \Magento\Tax\Service\V1\Data\QuoteDetails\ItemBuilder $itemBuilder @@ -65,7 +65,7 @@ class QuoteDetailsBuilder extends \Magento\Framework\Service\Data\AbstractExtens * @param \Magento\Customer\Service\V1\Data\AddressBuilder $addressBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, \Magento\Tax\Service\V1\Data\QuoteDetails\ItemBuilder $itemBuilder, diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxClass.php b/app/code/Magento/Tax/Service/V1/Data/TaxClass.php index 27453f66efa9f89489778d27dcbd3f36b3d1ba12..6aa09ad9aafa6b7ede5a9148271dd2e66433b8e1 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxClass.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxClass.php @@ -27,7 +27,7 @@ namespace Magento\Tax\Service\V1\Data; /** * Tax class data */ -class TaxClass extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class TaxClass extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxClassBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxClassBuilder.php index 06f41a59881d935a424ad629edb3dbb162886cf4..2d1b47d530921d432b88f6c46f995fb86a089696 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxClassBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxClassBuilder.php @@ -29,7 +29,7 @@ namespace Magento\Tax\Service\V1\Data; * * @method TaxClass create() */ -class TaxClassBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class TaxClassBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set tax class ID. diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxClassKey.php b/app/code/Magento/Tax/Service/V1/Data/TaxClassKey.php index e689608f07deb92ca81dd1bfa9eeb096d38fdde9..85790435fc209b3cb6c2837ba4dc77b078789974 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxClassKey.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxClassKey.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Class TaxClassKey diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxClassKeyBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxClassKeyBuilder.php index 9a19219f2bdb0cf8c48380ed93683cad0863b707..c5083076fd5bef445bed4265615eb7b912e016c7 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxClassKeyBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxClassKeyBuilder.php @@ -23,14 +23,14 @@ */ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * Builder for the TaxClassKey Service Data Object * * @method TaxClassKey create() */ -class TaxClassKeyBuilder extends AbstractExtensibleObjectBuilder +class TaxClassKeyBuilder extends ExtensibleObjectBuilder { /** * Set type of tax class key diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResults.php b/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResults.php index b06d170acab0452803245c202a004adcb3619dea..301c93285af5d80740e1f55a289431ecaa8a5579 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResults.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResults.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\V1\Data\SearchResults; +use Magento\Framework\Api\SearchResults; /** * Data object for Tax class search results. diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResultsBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResultsBuilder.php index 24bf667ed20253f02aa4c21dd7dd0dc2316cf13d..d1a5b4d6b140ff914463278f79b67c57d6c9bb59 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResultsBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxClassSearchResultsBuilder.php @@ -24,11 +24,11 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\AbstractSearchResultsBuilder; /** * Builder for the TaxClassSearchResults Service Data Object diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetails.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetails.php index a5253acf400c7405c124f6373bebb495d2631273..fbe30022a56f5d56193dff712eae70a004e6cab8 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetails.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetails.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -class TaxDetails extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class TaxDetails extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTax.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTax.php index ead2f0446d224939a586b35a7fab632fd383318a..64673a0de00d54c7206a67c82d951805db351808 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTax.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTax.php @@ -23,7 +23,7 @@ */ namespace Magento\Tax\Service\V1\Data\TaxDetails; -class AppliedTax extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class AppliedTax extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxBuilder.php index 30131187acfebbcc0ede84ec855507e323e9caf7..63155d19996a4f52c38b41243db5e7091db5d16b 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxBuilder.php @@ -23,15 +23,15 @@ */ namespace Magento\Tax\Service\V1\Data\TaxDetails; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Builder for the AppliedTax Service Data Object * * @method AppliedTax create() */ -class AppliedTaxBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class AppliedTaxBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * AppliedTaxRate builder @@ -43,13 +43,13 @@ class AppliedTaxBuilder extends \Magento\Framework\Service\Data\AbstractExtensib /** * Initialize dependencies. * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param AppliedTaxRateBuilder $appliedTaxRateBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, AppliedTaxRateBuilder $appliedTaxRateBuilder diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRate.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRate.php index b51bdb50050b6d386210eed4a240be22c8a03a05..b7ec7f750388dad7531cc4f9be735fce92ca23a2 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRate.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRate.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data\TaxDetails; -class AppliedTaxRate extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class AppliedTaxRate extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRateBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRateBuilder.php index a194002298c7144ee7b047d7cf18dbdf71212227..eb6c94c6464df8b354b64fe18d22f25eae600622 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRateBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/AppliedTaxRateBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Tax\Service\V1\Data\TaxDetails; * * @method AppliedTaxRate create() */ -class AppliedTaxRateBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class AppliedTaxRateBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set code diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/Item.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/Item.php index 2ad971b0e15fc40080b08e782f51173cffb3c829..7018f26bd9da0126afb9b77557df301626880790 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/Item.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/Item.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data\TaxDetails; -class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Item extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/ItemBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/ItemBuilder.php index 1d7b840c96768dd1be1f73f15f1de29d86a0982b..d61795ea390c432aff11ecc770555d937169a851 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetails/ItemBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetails/ItemBuilder.php @@ -23,8 +23,8 @@ */ namespace Magento\Tax\Service\V1\Data\TaxDetails; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; use Magento\Tax\Service\V1\Data\TaxDetails; /** @@ -33,7 +33,7 @@ use Magento\Tax\Service\V1\Data\TaxDetails; * @method Item create() */ -class ItemBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ItemBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Applied Tax data object builder @@ -45,13 +45,13 @@ class ItemBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObje /** * Initialize dependencies * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param AppliedTaxBuilder $appliedTaxBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, \Magento\Tax\Service\V1\Data\TaxDetails\AppliedTaxBuilder $appliedTaxBuilder diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxDetailsBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxDetailsBuilder.php index 8a8cecc50b5f839ec4ad2977a439d4b4117737b0..3d52a7ab547e87cf5b94501e90902df81b460763 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxDetailsBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxDetailsBuilder.php @@ -24,15 +24,15 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; /** * Builder for the TaxDetails Data Object * * @method TaxDetails create() */ -class TaxDetailsBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class TaxDetailsBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Applied Tax data object builder @@ -51,14 +51,14 @@ class TaxDetailsBuilder extends \Magento\Framework\Service\Data\AbstractExtensib /** * Initialize dependencies * - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param TaxDetails\AppliedTaxBuilder $appliedTaxBuilder * @param TaxDetails\ItemBuilder $taxDetailsItemBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, \Magento\Tax\Service\V1\Data\TaxDetails\AppliedTaxBuilder $appliedTaxBuilder, diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRate.php b/app/code/Magento/Tax/Service/V1/Data/TaxRate.php index 392f7972fe4691faac5ea0d6604be168965c1af7..cafe4fd0a6ef13c2bbc6def58733a7fa0e95341f 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRate.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRate.php @@ -27,7 +27,7 @@ namespace Magento\Tax\Service\V1\Data; /** * Service data object for a tax percentage rate associated with a location. */ -class TaxRate extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class TaxRate extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRateBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxRateBuilder.php index ace17cc49ab7e7fcfbdba1f2ad64b0446eba63fa..0a541e6d09e0b2f2a5c97d13953aedda983b5b68 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRateBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRateBuilder.php @@ -23,16 +23,16 @@ */ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; /** * Builder for the TaxRate Service Data Object * * @method TaxRate create() */ -class TaxRateBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class TaxRateBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * ZipRange builder diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResults.php b/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResults.php index f753577e6c1eec7132c5144f91cdc31ac61d9506..b8d5846be3569987dea57ef10257a50df77e8ec2 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResults.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResults.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\V1\Data\SearchResults; +use Magento\Framework\Api\SearchResults; /** * TaxRateSearchResults Service Data Object used for the search service requests diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilder.php index 6abb194855510a9ca1b3ab68edca0fc3a737d64b..47aac3fbd86bceae6c6f50416635c58db27642a9 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilder.php @@ -24,11 +24,11 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\AbstractSearchResultsBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; /** * Builder for the TaxRateSearchResults Service Data Object diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRateTitle.php b/app/code/Magento/Tax/Service/V1/Data/TaxRateTitle.php index ee60eeca7c6ac21955cd2eb64719813962a5b37a..eedf443864df7426eac402d27f482269400bbb8c 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRateTitle.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRateTitle.php @@ -27,7 +27,7 @@ namespace Magento\Tax\Service\V1\Data; /** * A localized tax rate title associated with a store view. */ -class TaxRateTitle extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class TaxRateTitle extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRateTitleBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxRateTitleBuilder.php index a5121077eef50064f38d649f7f0100b85bef5f68..98f0233da781c8bf748da627346e244c0e40e1bd 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRateTitleBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRateTitleBuilder.php @@ -29,7 +29,7 @@ namespace Magento\Tax\Service\V1\Data; * * @method TaxRateTitle create() */ -class TaxRateTitleBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class TaxRateTitleBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set store id diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRule.php b/app/code/Magento/Tax/Service/V1/Data/TaxRule.php index 187d8558799f4ebfc9e4f7ba9bf56af686a079ff..0687a096ef4b29963e7e3ffc9cf46390f969be36 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRule.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRule.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Class TaxRule diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRuleBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxRuleBuilder.php index e4df9c04b9d2b04ac29ebe9967a65a335021538d..6499999341de49a8054e824f4eb8fb575f4c24ff 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRuleBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRuleBuilder.php @@ -23,17 +23,17 @@ */ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; /** * Builder for the TaxRule Service Data Object * * @method \Magento\Tax\Service\V1\Data\TaxRule create() */ -class TaxRuleBuilder extends AbstractExtensibleObjectBuilder +class TaxRuleBuilder extends ExtensibleObjectBuilder { /** * TaxRate builder diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResults.php b/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResults.php index e67aef7bf7da0499743caa73f91fd27770c571ef..cc218c0181bc561168084b33c1dfb0406152a43a 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResults.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResults.php @@ -24,7 +24,7 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\V1\Data\SearchResults; +use Magento\Framework\Api\SearchResults; /** * TaxRuleSearchResults Service Data Object used for the search service requests diff --git a/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilder.php b/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilder.php index 6992b3aa8973a04022a1c19ff55f60f746db2873..41c16cbd6fd288d5d09aa1fe19c9402fc6cbf249 100644 --- a/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilder.php @@ -24,11 +24,11 @@ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\AbstractSearchResultsBuilder; /** * Builder for the TaxRuleSearchResults Service Data Object diff --git a/app/code/Magento/Tax/Service/V1/Data/ZipRange.php b/app/code/Magento/Tax/Service/V1/Data/ZipRange.php index be136de70c6d8c24476f788a251d580d505bdfe8..c000f69eb39d78b5147014bb87d1b47df7ad251e 100644 --- a/app/code/Magento/Tax/Service/V1/Data/ZipRange.php +++ b/app/code/Magento/Tax/Service/V1/Data/ZipRange.php @@ -23,7 +23,7 @@ */ namespace Magento\Tax\Service\V1\Data; -class ZipRange extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class ZipRange extends \Magento\Framework\Api\AbstractExtensibleObject { /**#@+ * Constants defined for keys of array, makes typos less likely diff --git a/app/code/Magento/Tax/Service/V1/Data/ZipRangeBuilder.php b/app/code/Magento/Tax/Service/V1/Data/ZipRangeBuilder.php index 8899b747040bfabfd0b5298c8387e9b73843a8cd..401e182ec7f72da5673bbbaa56f0f5d67fa32ba2 100644 --- a/app/code/Magento/Tax/Service/V1/Data/ZipRangeBuilder.php +++ b/app/code/Magento/Tax/Service/V1/Data/ZipRangeBuilder.php @@ -28,7 +28,7 @@ namespace Magento\Tax\Service\V1\Data; * * @method ZipRange create() */ -class ZipRangeBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class ZipRangeBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set zip range starting point diff --git a/app/code/Magento/Tax/Service/V1/TaxClassService.php b/app/code/Magento/Tax/Service/V1/TaxClassService.php index 17fead87ae02d6311dfe8018ce491076b6f27eed..e7a0eae8fe975cf9296b8c4e1ca0f339dbfc8c2d 100644 --- a/app/code/Magento/Tax/Service/V1/TaxClassService.php +++ b/app/code/Magento/Tax/Service/V1/TaxClassService.php @@ -26,10 +26,10 @@ namespace Magento\Tax\Service\V1; use Magento\Framework\Exception\InputException; use Magento\Framework\Model\Exception as ModelException; -use Magento\Framework\Service\V1\Data\Search\FilterGroup; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteria; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Tax\Model\ClassModelRegistry; use Magento\Tax\Model\Converter; use Magento\Tax\Model\Resource\TaxClass\Collection as TaxClassCollection; @@ -39,7 +39,7 @@ use Magento\Tax\Service\V1\Data\TaxClassSearchResultsBuilder; use Magento\Tax\Service\V1\Data\TaxClass as TaxClassDataObject; use Magento\Tax\Service\V1\Data\TaxClassKey; use Magento\Framework\Exception\CouldNotDeleteException; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\SortOrder; /** * Tax class service. @@ -233,11 +233,11 @@ class TaxClassService implements TaxClassServiceInterface /** * Retrieve tax classes which match a specific criteria. * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Tax\Service\V1\Data\TaxClassSearchResults containing Data\TaxClass * @throws \Magento\Framework\Exception\InputException */ - public function searchTaxClass(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria) + public function searchTaxClass(\Magento\Framework\Api\SearchCriteria $searchCriteria) { $this->searchResultsBuilder->setSearchCriteria($searchCriteria); /** @var TaxClassCollection $collection */ diff --git a/app/code/Magento/Tax/Service/V1/TaxClassServiceInterface.php b/app/code/Magento/Tax/Service/V1/TaxClassServiceInterface.php index 3e0fecaec15042a66eb3fdcdea72eb0a35ee1ba4..8f0458f26b23d7389c63e2a3f7b93db0ff2c25a4 100644 --- a/app/code/Magento/Tax/Service/V1/TaxClassServiceInterface.php +++ b/app/code/Magento/Tax/Service/V1/TaxClassServiceInterface.php @@ -79,11 +79,11 @@ interface TaxClassServiceInterface /** * Retrieve tax classes which match a specific criteria. * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Tax\Service\V1\Data\TaxClassSearchResults containing Data\TaxClass * @throws \Magento\Framework\Exception\InputException */ - public function searchTaxClass(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function searchTaxClass(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Get tax class id diff --git a/app/code/Magento/Tax/Service/V1/TaxRateService.php b/app/code/Magento/Tax/Service/V1/TaxRateService.php index 8c3ff014ee0744b55ed0939adb6bdc94a3d5b101..53153be278f4eed7c1f895e84fea5fb9e651986a 100644 --- a/app/code/Magento/Tax/Service/V1/TaxRateService.php +++ b/app/code/Magento/Tax/Service/V1/TaxRateService.php @@ -28,8 +28,8 @@ use Magento\Directory\Model\CountryFactory; use Magento\Directory\Model\RegionFactory; use Magento\Framework\Exception\InputException; use Magento\Framework\Model\Exception as ModelException; -use Magento\Framework\Service\V1\Data\Search\FilterGroup; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Framework\Api\SearchCriteria; use Magento\Tax\Model\Calculation\Rate as RateModel; use Magento\Tax\Model\Calculation\Rate\Converter; use Magento\Tax\Model\Calculation\RateFactory; @@ -37,7 +37,7 @@ use Magento\Tax\Model\Calculation\RateRegistry; use Magento\Tax\Model\Resource\Calculation\Rate\Collection; use Magento\Tax\Service\V1\Data\TaxRate as TaxRateDataObject; use Magento\Tax\Service\V1\Data\TaxRateBuilder; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\SortOrder; /** * Handles tax rate CRUD operations @@ -296,8 +296,9 @@ class TaxRateService implements TaxRateServiceInterface } $regionCode = $taxRate->getRegionId(); + // if regionCode eq 0 (all regions *), do not validate with existing region list if (\Zend_Validate::is($regionCode, 'NotEmpty') && - !\Zend_Validate::is($this->regionFactory->create()->load($regionCode)->getId(), 'NotEmpty')) { + ($regionCode != "0" && !\Zend_Validate::is($this->regionFactory->create()->load($regionCode)->getId(), 'NotEmpty'))) { $exception->addError(InputException::INVALID_FIELD_VALUE, ['fieldName' => 'region_id', 'value' => $regionCode]); } diff --git a/app/code/Magento/Tax/Service/V1/TaxRateServiceInterface.php b/app/code/Magento/Tax/Service/V1/TaxRateServiceInterface.php index 6d123f0a17b9633a5f18af615d0508de35ad8bee..a59786f899707957d598f031c40426ebd2efe12e 100644 --- a/app/code/Magento/Tax/Service/V1/TaxRateServiceInterface.php +++ b/app/code/Magento/Tax/Service/V1/TaxRateServiceInterface.php @@ -69,9 +69,9 @@ interface TaxRateServiceInterface /** * Search TaxRates * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Tax\Service\V1\Data\TaxRateSearchResults containing Data\TaxRate objects * @throws \Magento\Framework\Exception\InputException If there is a problem with the input */ - public function searchTaxRates(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function searchTaxRates(\Magento\Framework\Api\SearchCriteria $searchCriteria); } diff --git a/app/code/Magento/Tax/Service/V1/TaxRuleService.php b/app/code/Magento/Tax/Service/V1/TaxRuleService.php index dc20b4eb17e2eca157163c9a380c2885f1a34615..53e60b4850e3099d3159890a926e72390a32cae9 100644 --- a/app/code/Magento/Tax/Service/V1/TaxRuleService.php +++ b/app/code/Magento/Tax/Service/V1/TaxRuleService.php @@ -27,10 +27,10 @@ namespace Magento\Tax\Service\V1; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Model\Exception as ModelException; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\Search\FilterGroup; -use Magento\Framework\Service\V1\Data\SearchCriteria; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\Search\FilterGroup; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Tax\Model\ClassModel as TaxClassModel; use Magento\Tax\Model\Calculation\Rule as TaxRuleModel; use Magento\Tax\Model\Calculation\RuleFactory as TaxRuleModelFactory; @@ -39,7 +39,7 @@ use Magento\Tax\Model\Calculation\TaxRuleRegistry; use Magento\Tax\Model\Resource\Calculation\Rule\Collection; use Magento\Tax\Service\V1\Data\TaxRule; use Magento\Tax\Service\V1\Data\TaxRuleBuilder; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\SortOrder; /** * TaxRuleService implementation. diff --git a/app/code/Magento/Tax/Service/V1/TaxRuleServiceInterface.php b/app/code/Magento/Tax/Service/V1/TaxRuleServiceInterface.php index 92a5f66116c78bb9193e2abb1db7e632070f5120..4ba9513fe80311e721e05b52fee8c7b942cbdfec 100644 --- a/app/code/Magento/Tax/Service/V1/TaxRuleServiceInterface.php +++ b/app/code/Magento/Tax/Service/V1/TaxRuleServiceInterface.php @@ -71,11 +71,11 @@ interface TaxRuleServiceInterface /** * Search TaxRules * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Tax\Service\V1\Data\TaxRuleSearchResults containing Data\TaxRule objects * @throws \Magento\Framework\Exception\InputException If there is a problem with the input */ - public function searchTaxRules(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria); + public function searchTaxRules(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Get rates by customerTaxClassId and productTaxClassId diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json index dcc259ffc1e1ee843c6c09fc46c7cf7d4fc78c2e..817f2a38a57f14ad2a2c7c9c84a55ad2bd5bf3e9 100644 --- a/app/code/Magento/Tax/composer.json +++ b/app/code/Magento/Tax/composer.json @@ -3,23 +3,23 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-reports": "0.1.0-alpha102", - "magento/module-configurable-product": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-reports": "0.1.0-alpha103", + "magento/module-configurable-product": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Tax/data/tax_setup/data-install-1.6.0.0.php b/app/code/Magento/Tax/data/tax_setup/data-install-1.6.0.0.php index fa59896796de57fad9b07fb0ca61553a686f0749..908fad931ed6546c24df65b15b17caa22f14ac59 100644 --- a/app/code/Magento/Tax/data/tax_setup/data-install-1.6.0.0.php +++ b/app/code/Magento/Tax/data/tax_setup/data-install-1.6.0.0.php @@ -21,6 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** @var $installer \Magento\Tax\Model\Resource\Setup */ $installer = $this; diff --git a/app/code/Magento/Tax/data/tax_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Tax/data/tax_setup/data-upgrade-1.6.0.0-1.6.0.1.php index 34f36f1e584875b313de70db87ac213c9204473b..37e6e859b2db51e7faf15321f7983acd291defcb 100644 --- a/app/code/Magento/Tax/data/tax_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Tax/data/tax_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -21,13 +21,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** @var $installer \Magento\Tax\Model\Resource\Setup */ $installer = $this; -//New attributes order and properties +// New attributes order and properties $properties = array('is_required', 'default_value'); $attributesOrder = array( - //Product Details tab + // Product Details tab 'tax_class_id' => array('Product Details' => 40, 'is_required' => 0, 'default_value' => 2), ); diff --git a/app/code/Magento/Tax/sql/tax_setup/install-1.6.0.0.php b/app/code/Magento/Tax/sql/tax_setup/install-1.6.0.0.php index 2a533edbc3fd66527e4ead4c1e5cc50e1fd19d31..1e7077297913d1234bc641724d45348fcd9a3f57 100644 --- a/app/code/Magento/Tax/sql/tax_setup/install-1.6.0.0.php +++ b/app/code/Magento/Tax/sql/tax_setup/install-1.6.0.0.php @@ -21,10 +21,11 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Tax\Model\Resource\Setup */ + +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); -// + /** * Create table 'tax/class' */ diff --git a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.0-1.6.0.1.php index be126bcc8955907ad4c09c011e512a561803b02c..4c4276f51b54c56f479280f855c404b683919c0b 100644 --- a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.0-1.6.0.1.php @@ -22,8 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$installer = $this; -/** @var $installer \Magento\Tax\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); $connection->createTable( diff --git a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.1-1.6.0.2.php index 05307b452d9b4c0eb9e71333337879ffa45477bc..18ef18d6db66c283a882f00c12eb557618bee230 100644 --- a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Tax\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; /** diff --git a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.2-1.6.0.3.php index c8a5ae6014e857ce22e950560b0bf1e956f4db60..e92cfba3ba41dc670fa0c9a09051a8eadd94808f 100644 --- a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.2-1.6.0.3.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Tax\Model\Resource\Setup */ /** * Add new field to 'sales_order_tax_item' diff --git a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.4-1.6.0.5.php b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.4-1.6.0.5.php index dcaa10f21c2da6005441382d69020a02dace2241..6b158569525eb1090ba9df0b249cd6b75a1bcfdc 100644 --- a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.4-1.6.0.5.php +++ b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.4-1.6.0.5.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Tax\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.5-1.6.0.6.php b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.5-1.6.0.6.php index b054b82c416d6b1d44b5fb04d7186d8c63e8f660..badd905bc687c02ae9ac70f3940817655af7c36c 100644 --- a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.5-1.6.0.6.php +++ b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.5-1.6.0.6.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Tax\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.6-1.6.0.7.php b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.6-1.6.0.7.php index ee47d2d995693616ac86b72585e7e6ffc2b4f424..557166c02d862d52016529d213a04f82fe41de95 100644 --- a/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.6-1.6.0.7.php +++ b/app/code/Magento/Tax/sql/tax_setup/upgrade-1.6.0.6-1.6.0.7.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Tax\Model\Resource\Setup $installer */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json index 47930195b403ef725f0285c3c6b263d15ddf95cd..c84e9abf1d8b303da05799b3d5e1b23b19318006 100644 --- a/app/code/Magento/TaxImportExport/composer.json +++ b/app/code/Magento/TaxImportExport/composer.json @@ -3,15 +3,15 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json index d9480153a73c5b36875c9ba75242241e13382ec8..6d93b9068ee4dde0b12c1baad3c92a01e3c3d1d5 100644 --- a/app/code/Magento/Theme/composer.json +++ b/app/code/Magento/Theme/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-translation": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-translation": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Theme/view/adminhtml/web/css/theme.css b/app/code/Magento/Theme/view/adminhtml/web/css/theme.css index 72f6a1e18372f1bfea75cf2aca613a2dea009145..e829101e787b6f8cf4e7751a44ee0e640abe95ed 100644 --- a/app/code/Magento/Theme/view/adminhtml/web/css/theme.css +++ b/app/code/Magento/Theme/view/adminhtml/web/css/theme.css @@ -57,7 +57,6 @@ height: 15px; left: 0; margin: 2px 5px; - outline: medium none; overflow: hidden; position: absolute; top: -1px; diff --git a/app/code/Magento/Theme/view/base/templates/root.phtml b/app/code/Magento/Theme/view/base/templates/root.phtml index 69698b5ae3ba977e8ef1948b7ac7da87a065b469..c7cf97ce4f07f095d760ead2b74ba90d3c431840 100644 --- a/app/code/Magento/Theme/view/base/templates/root.phtml +++ b/app/code/Magento/Theme/view/base/templates/root.phtml @@ -27,6 +27,7 @@ <head <?php echo $headAttributes ?>> <?php echo $requireJs ?> <?php echo $headContent ?> + <?php echo $headAdditional ?> </head> <body data-container="body" data-mage-init='{"loaderAjax": {}, "loader": {}}' <?php echo $bodyAttributes ?>> <?php echo $layoutContent ?> diff --git a/app/code/Magento/Theme/view/frontend/layout/default.xml b/app/code/Magento/Theme/view/frontend/layout/default.xml index ec9999cd0680374d064fc1ba320e787fc3c8fccf..a2e2a6548a7ea1a272cd08cf890bf3ce3132c613 100644 --- a/app/code/Magento/Theme/view/frontend/layout/default.xml +++ b/app/code/Magento/Theme/view/frontend/layout/default.xml @@ -40,11 +40,18 @@ </arguments> </block> </referenceBlock> + <referenceContainer name="main.content"> + <block class="Magento\Framework\View\Element\Template" name="skip_to_content.target" before="-" template="Magento_Theme::html/skiptarget.phtml"> + <arguments> + <argument name="target_id" xsi:type="string">contentarea</argument> + </arguments> + </block> + </referenceContainer> <referenceContainer name="header.container"> <container name="header.panel" label="Page Header Panel" htmlTag="div" htmlClass="panel header"> <block class="Magento\Framework\View\Element\Template" name="skip_to_content" template="Magento_Theme::html/skip.phtml"> <arguments> - <argument name="target" xsi:type="string">maincontent</argument> + <argument name="target" xsi:type="string">contentarea</argument> <argument name="label" translate="true" xsi:type="string">Skip to content</argument> </arguments> </block> @@ -66,7 +73,7 @@ </referenceContainer> <referenceContainer name="columns.top"> <block class="Magento\Theme\Block\Html\Title" name="page.main.title" template="html/title.phtml"/> - <container name="page.messages" label="invisible" htmlTag="div" htmlClass="page messages"> + <container name="page.messages" htmlTag="div" htmlClass="page messages"> <block class="Magento\Framework\View\Element\Messages" name="global_messages" as="global_messages"/> <block class="Magento\Framework\View\Element\Messages" name="messages" as="messages"/> </container> diff --git a/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml index ee47a3ae122b51ad94994c754c4f26505dcfb86b..79d58b9baf801125d30b2fc885ef0cb5a13eaf5e 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml @@ -128,20 +128,20 @@ </div> <?php endif; ?> - <?php if($this->isShowPerPage()): ?> - <div class="limiter"> - <strong class="limiter-label"><?php echo __('Show') ?></strong> - <select id="limiter" data-mage-redirect="{'event':'change'}" class="limiter-options"> - <?php foreach ($this->getAvailableLimit() as $_key => $_limit): ?> + <?php if($this->isShowPerPage()): ?> + <div class="limiter"> + <strong class="limiter-label"><?php echo __('Show') ?></strong> + <select id="limiter" data-mage-redirect="{'event':'change'}" class="limiter-options"> + <?php foreach ($this->getAvailableLimit() as $_key => $_limit): ?> <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if ($this->isLimitCurrent($_key)): ?> - selected="selected"<?php endif ?>> + selected="selected"<?php endif ?>> <?php echo $_limit ?> </option> - <?php endforeach; ?> - </select> - <span class="limiter-text"><?php echo __('per page') ?></span> - </div> - <?php endif ?> + <?php endforeach; ?> + </select> + <span class="limiter-text"><?php echo __('per page') ?></span> + </div> + <?php endif ?> <?php if($this->getUseContainer()): ?> </div> diff --git a/app/design/install/Magento/basic/web/bootstrap.js b/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml similarity index 87% rename from app/design/install/Magento/basic/web/bootstrap.js rename to app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml index 03eeff549bdb0da689c202e7c885747f23eab5d6..8cccadf1ebf497778cb33cf3d21624236ac4404f 100644 --- a/app/design/install/Magento/basic/web/bootstrap.js +++ b/app/code/Magento/Theme/view/frontend/templates/html/skiptarget.phtml @@ -1,5 +1,5 @@ +<?php /** - * * Magento * * NOTICE OF LICENSE @@ -21,9 +21,6 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ - require([ - "jquery", - "jquery/jquery-migrate" - ], function(jQuery){ - jQuery.migrateMute = true; - }) \ No newline at end of file +$target_id = $this->getTargetId(); +?> +<a id="<?php echo $target_id?>" name="<?php echo $target_id?>" tabindex="0"></a> diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json index d1b8ab8ea658d1cba9227536ce19deedf4990555..1ab6d63afbdefb1b536951849ef8117288880718 100644 --- a/app/code/Magento/Translation/composer.json +++ b/app/code/Magento/Translation/composer.json @@ -3,14 +3,14 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-core": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-core": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php b/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php index 64112cae78f5eea9f0b0ba33410f2bc0725a2686..13b36844926574fa001b713cf8a7f5bef77b322a 100644 --- a/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php +++ b/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json index 45d8eceb7261fce2f358d2f3ae98783bcab1b106..313b30b38c45db80de767f581154b0da624330c3 100644 --- a/app/code/Magento/Ui/composer.json +++ b/app/code/Magento/Ui/composer.json @@ -3,13 +3,13 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json index 04b84901b25a5e4b6fc6c96990459b2fceb3eb1f..81119a2bf504218847b02c3e0ba4840ade7ebf2d 100644 --- a/app/code/Magento/Ups/composer.json +++ b/app/code/Magento/Ups/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewrite.php b/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewrite.php index 3367b44794dc15a9067fe853539a20d339921ccf..6e75a58253862db52d09ce4fb58baec6aac14380 100644 --- a/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewrite.php +++ b/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewrite.php @@ -23,7 +23,7 @@ */ namespace Magento\UrlRewrite\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Data abstract class for url storage diff --git a/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewriteBuilder.php b/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewriteBuilder.php index 54bd4a3185d772bf9574c23afb5b96d46496bad8..a9ba3784fdf3aaf39c900fdb7b678f07886dc835 100644 --- a/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewriteBuilder.php +++ b/app/code/Magento/UrlRewrite/Service/V1/Data/UrlRewriteBuilder.php @@ -23,12 +23,12 @@ */ namespace Magento\UrlRewrite\Service\V1\Data; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * Data builder class for url rewrite */ -class UrlRewriteBuilder extends AbstractExtensibleObjectBuilder +class UrlRewriteBuilder extends ExtensibleObjectBuilder { /** * @var array @@ -45,7 +45,7 @@ class UrlRewriteBuilder extends AbstractExtensibleObjectBuilder */ public function getData() { - return array_merge($this->defaultValues, $this->_data); + return array_merge($this->defaultValues, $this->data); } /** diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json index 4e321ab1b9b72e240447cf66433eab2dd1326361..7d14b5527fd55813d652296eba5a62012128a860 100644 --- a/app/code/Magento/UrlRewrite/composer.json +++ b/app/code/Magento/UrlRewrite/composer.json @@ -3,18 +3,18 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-store": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-catalog-url-rewrite": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-cms-url-rewrite": "0.1.0-alpha102", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-store": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-catalog-url-rewrite": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-cms-url-rewrite": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php b/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php index ff6c4a26e0fa01a38bb93bb2a6695ca83afa6aff..3005fa867935f4d7ccba4cdc21b41524b2ea7cf5 100644 --- a/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php +++ b/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Core\Model\Resource\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json index a5af18ba5523c0859eae7f0970ae44c04841b25a..34af5709eb0619508a6736df023c86a03b8c363a 100644 --- a/app/code/Magento/User/composer.json +++ b/app/code/Magento/User/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-authorization": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-integration": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-authorization": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-integration": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php b/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php index 78272f107d22491d470803d6c7b3e1dc9c7888b8..5765c3d1dbdf50b35d15d8ffb473dd55ec1cd0f8 100644 --- a/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php +++ b/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php index 58db217b95a1bad09d69ae27660198b7973a8b12..5223b80b6b0f96615e95e445cfd2335e754aa62b 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php index 61e9fb37c2795e0c3c3f0bb48a1a4eda7acc4263..b090b204ee1307d9ae61a6becc940ebf8800032c 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php index 499d748d464654aeff4cfb79ebae6e1b5ab9fc0c..9a4c3e6ce52b33b84e7b1d864a0333855343842b 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php index a9139152218674169ec7d5b9c82ce627da1cbdd9..cd3451caea02cfa0873ececa24e09c4aac223111 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json index fc50c5cb50e009f76fbc2e0ca8100046bc9362af..414c0721039c05ce907c689514826915a8e0e80c 100644 --- a/app/code/Magento/Usps/composer.json +++ b/app/code/Magento/Usps/composer.json @@ -3,19 +3,19 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-shipping": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-shipping": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "lib-libxml": "*", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Usps/data/usps_setup/data-install-2.0.0.0.php b/app/code/Magento/Usps/data/usps_setup/data-install-2.0.0.0.php index 1e8e68561d3d86444127016e27a6ee38f06e6066..364c60c6ed589b83cb086423908e51b85f574244 100644 --- a/app/code/Magento/Usps/data/usps_setup/data-install-2.0.0.0.php +++ b/app/code/Magento/Usps/data/usps_setup/data-install-2.0.0.0.php @@ -22,6 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $configDataTable = $installer->getTable('core_config_data'); $connection = $installer->getConnection(); diff --git a/app/code/Magento/Webapi/Controller/Rest.php b/app/code/Magento/Webapi/Controller/Rest.php index 56a19d27bb111fad8245a2f84d90d9ebb5544dca..8160f5d95ed0fa5152e7e7d2062669cb493ebce7 100644 --- a/app/code/Magento/Webapi/Controller/Rest.php +++ b/app/code/Magento/Webapi/Controller/Rest.php @@ -175,7 +175,7 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface $inputData = $this->overrideParams($inputData, $route->getParameters()); $inputParams = $this->_serializer->getInputData($serviceClassName, $serviceMethodName, $inputData); $service = $this->_objectManager->get($serviceClassName); - /** @var \Magento\Framework\Service\Data\AbstractExtensibleObject $outputData */ + /** @var \Magento\Framework\Api\AbstractExtensibleObject $outputData */ $outputData = call_user_func_array([$service, $serviceMethodName], $inputParams); $outputData = $this->dataObjectConverter->processServiceOutput( $outputData, diff --git a/app/code/Magento/Webapi/Controller/Rest/Request.php b/app/code/Magento/Webapi/Controller/Rest/Request.php index 367bb8e83c5e8fa72ee0c10b4dff21a1ba6faa83..e94c5a813389fc0e7066af9cd728e86c57ea27b7 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Request.php +++ b/app/code/Magento/Webapi/Controller/Rest/Request.php @@ -26,7 +26,7 @@ namespace Magento\Webapi\Controller\Rest; -use Magento\Framework\Service\SimpleDataObjectConverter; +use Magento\Framework\Api\SimpleDataObjectConverter; use Magento\Webapi\Model\Rest\Config as RestConfig; class Request extends \Magento\Webapi\Controller\Request diff --git a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Json.php b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Json.php index 5de267179136c2dce0b5424f3ca9549a022a5b19..dc840e4966421a8b47fcd0984a89d19c3b443125 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Json.php +++ b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Json.php @@ -25,7 +25,7 @@ */ namespace Magento\Webapi\Controller\Rest\Request\Deserializer; -use \Magento\Framework\App\State; +use Magento\Framework\App\State; class Json implements \Magento\Webapi\Controller\Rest\Request\DeserializerInterface { @@ -55,7 +55,7 @@ class Json implements \Magento\Webapi\Controller\Rest\Request\DeserializerInterf * @param string $encodedBody Posted content from request. * @return array|null Return NULL if content is invalid. * @throws \InvalidArgumentException - * @throws \Magento\Webapi\Exception If decoding error was encountered. + * @throws \Magento\Webapi\Exception If decoding error occurs or in case of empty argument type */ public function deserialize($encodedBody) { @@ -64,6 +64,9 @@ class Json implements \Magento\Webapi\Controller\Rest\Request\DeserializerInterf sprintf('"%s" data type is invalid. String is expected.', gettype($encodedBody)) ); } + if (empty($encodedBody)) { + throw new \Magento\Webapi\Exception(__('Request body should not be empty.')); + } try { $decodedBody = $this->_helper->jsonDecode($encodedBody); } catch (\Zend_Json_Exception $e) { diff --git a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php index e5f234d5eb0247cd48b791d1e492e28342654005..4c91e51e1a87fa3832e11c5ef97cb9edc83fb79a 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php +++ b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php @@ -60,7 +60,7 @@ class Xml implements \Magento\Webapi\Controller\Rest\Request\DeserializerInterfa * @param string $xmlRequestBody XML document * @return array Data converted from XML document to array. Root node is excluded from response. * @throws \InvalidArgumentException In case of invalid argument type. - * @throws \Magento\Webapi\Exception If decoding error occurs. + * @throws \Magento\Webapi\Exception If decoding error occurs or in case of empty argument type */ public function deserialize($xmlRequestBody) { @@ -69,6 +69,9 @@ class Xml implements \Magento\Webapi\Controller\Rest\Request\DeserializerInterfa sprintf('"%s" data type is invalid. String is expected.', gettype($xmlRequestBody)) ); } + if (empty($xmlRequestBody)) { + throw new \Magento\Webapi\Exception(__('Request body is expected.')); + } /** Disable external entity loading to prevent possible vulnerability */ $previousLoaderState = libxml_disable_entity_loader(true); set_error_handler(array($this, 'handleErrors')); diff --git a/app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php b/app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php index 5b8db14e58ca073bb903cd608c406d500fd169e8..8fb3242d983850f0a87e2b4646ade3da01223643 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php +++ b/app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php @@ -24,9 +24,9 @@ namespace Magento\Webapi\Controller\Rest\Response; -use Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Service\ExtensibleDataObjectConverter; -use Magento\Webapi\Model\DataObjectProcessor; +use Magento\Framework\Api\AbstractExtensibleObject; +use Magento\Framework\Api\ExtensibleDataObjectConverter; +use Magento\Framework\Reflection\DataObjectProcessor; /** * Data object converter for REST diff --git a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php index c0a91eb2dc4740ef9b9b2f639cd5a962b01e1a48..7af9aec600d5140a2c621e86248396194327ae83 100644 --- a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php +++ b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php @@ -27,15 +27,17 @@ namespace Magento\Webapi\Controller; use Magento\Framework\ObjectManager; use Magento\Framework\ObjectManager\Config as ObjectManagerConfig; -use Magento\Framework\Service\Config\Reader as ServiceConfigReader; -use Magento\Framework\Service\Data\AttributeValue; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Webapi\Model\Config\ClassReflector\TypeProcessor; -use Magento\Webapi\Model\DataObjectProcessor; +use Magento\Framework\Api\Config\Reader as ServiceConfigReader; +use Magento\Framework\Api\AttributeValue; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Reflection\TypeProcessor; use Zend\Code\Reflection\ClassReflection; use Zend\Code\Reflection\MethodReflection; use Zend\Code\Reflection\ParameterReflection; -use Magento\Framework\Service\SimpleDataObjectConverter; +use Magento\Framework\Api\SimpleDataObjectConverter; +use Magento\Framework\Exception\SerializationException; +use Magento\Webapi\Exception as WebapiException; +use Magento\Framework\Serialization\DataBuilderFactory; /** * Deserializes arguments from API requests. @@ -44,11 +46,11 @@ use Magento\Framework\Service\SimpleDataObjectConverter; */ class ServiceArgsSerializer { - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */ - protected $_typeProcessor; + /** @var \Magento\Framework\Reflection\TypeProcessor */ + protected $typeProcessor; - /** @var ObjectManager */ - protected $_objectManager; + /** @var DataBuilderFactory */ + protected $builderFactory; /** @var ServiceConfigReader */ protected $serviceConfigReader; @@ -56,30 +58,24 @@ class ServiceArgsSerializer /** @var AttributeValueBuilder */ protected $attributeValueBuilder; - /** @var \Magento\Framework\ObjectManager\Config */ - protected $objectManagerConfig; - /** * Initialize dependencies. * * @param TypeProcessor $typeProcessor - * @param ObjectManager $objectManager + * @param DataBuilderFactory $builderFactory * @param ServiceConfigReader $serviceConfigReader * @param AttributeValueBuilder $attributeValueBuilder - * @param ObjectManagerConfig $objectManagerConfig */ public function __construct( TypeProcessor $typeProcessor, - ObjectManager $objectManager, + DataBuilderFactory $builderFactory, ServiceConfigReader $serviceConfigReader, - AttributeValueBuilder $attributeValueBuilder, - ObjectManagerConfig $objectManagerConfig + AttributeValueBuilder $attributeValueBuilder ) { - $this->_typeProcessor = $typeProcessor; - $this->_objectManager = $objectManager; + $this->typeProcessor = $typeProcessor; + $this->builderFactory = $builderFactory; $this->serviceConfigReader = $serviceConfigReader; $this->attributeValueBuilder = $attributeValueBuilder; - $this->objectManagerConfig = $objectManagerConfig; } /** @@ -166,7 +162,7 @@ class ServiceArgsSerializer $data = is_array($data) ? $data : []; $class = new ClassReflection($className); - $builder = $this->getBuilder($className); + $builder = $this->builderFactory->getDataBuilder($className); foreach ($data as $propertyName => $value) { // Converts snake_case to uppercase CamelCase to help form getter/setter method names @@ -175,7 +171,7 @@ class ServiceArgsSerializer $methodName = $this->_processGetterMethod($class, $camelCaseProperty); $methodReflection = $class->getMethod($methodName); if ($methodReflection->isPublic()) { - $returnType = $this->_typeProcessor->getGetterReturnType($methodReflection)['type']; + $returnType = $this->typeProcessor->getGetterReturnType($methodReflection)['type']; $setterName = 'set' . $camelCaseProperty; if ($camelCaseProperty === 'CustomAttributes') { $setterValue = $this->convertCustomAttributeValue($value, $returnType, $className); @@ -188,25 +184,6 @@ class ServiceArgsSerializer return $builder->create(); } - /** - * Returns a builder for a given classname. - * - * @param string $className - * @return object a builder instance - */ - protected function getBuilder($className) - { - $paramInstanceClassName = $this->objectManagerConfig->getPreference($className); - if (is_subclass_of($paramInstanceClassName, '\\' . DataObjectProcessor::BASE_MODEL_CLASS)) { - // By convention, need to lookup the concrete class preference for the data interface type and - // gets its builder. - return $this->_objectManager->create($paramInstanceClassName . "DataBuilder"); - } - // By convention, for complex parameters that don't inherit from the data interface, - // create the name of the builder type by appending Builder to the end - return $this->_objectManager->create($className . "Builder"); - } - /** * Convert custom attribute data array to array of AttributeValue Data Object * @@ -290,21 +267,26 @@ class ServiceArgsSerializer * @param mixed $value * @param string $type Convert given value to the this type * @return mixed + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected function _convertValue($value, $type) { - $isArrayType = $this->_typeProcessor->isArrayType($type); + $isArrayType = $this->typeProcessor->isArrayType($type); if ($isArrayType && isset($value['item'])) { $value = $this->_removeSoapItemNode($value); } - if ($this->_typeProcessor->isTypeSimple($type) || $this->_typeProcessor->isTypeAny($type)) { - $result = $this->_typeProcessor->processSimpleAndAnyType($value, $type); + if ($this->typeProcessor->isTypeSimple($type) || $this->typeProcessor->isTypeAny($type)) { + try { + $result = $this->typeProcessor->processSimpleAndAnyType($value, $type); + } catch (SerializationException $e) { + throw new WebapiException($e->getMessage()); + } } else { /** Complex type or array of complex types */ if ($isArrayType) { // Initializing the result for array type else it will return null for empty array $result = is_array($value) ? [] : null; - $itemType = $this->_typeProcessor->getArrayItemType($type); + $itemType = $this->typeProcessor->getArrayItemType($type); if (is_array($value)) { foreach ($value as $key => $item) { $result[$key] = $this->_createFromArray($itemType, $item); diff --git a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php index d687f7fa50d26ace9e558270dc4cd47b3cad4499..aa5e525823f5dcd322b66c03f976dd1c9c3b5036 100644 --- a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php +++ b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php @@ -23,11 +23,11 @@ */ namespace Magento\Webapi\Controller\Soap\Request; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\ExtensibleDataInterface; use Magento\Framework\AuthorizationInterface; use Magento\Framework\Exception\AuthorizationException; -use Magento\Webapi\Model\DataObjectProcessor; -use Magento\Framework\Service\SimpleDataObjectConverter; +use Magento\Framework\Reflection\DataObjectProcessor; +use Magento\Framework\Api\SimpleDataObjectConverter; use Magento\Webapi\Controller\ServiceArgsSerializer; use Magento\Webapi\Controller\Soap\Request as SoapRequest; use Magento\Webapi\Exception as WebapiException; diff --git a/app/code/Magento/Webapi/Helper/Data.php b/app/code/Magento/Webapi/Helper/Data.php index 53dec2cb713e2f3138e99783c902df18eb416762..f177aac385b0b7bdec754662a1590f31c99486b8 100644 --- a/app/code/Magento/Webapi/Helper/Data.php +++ b/app/code/Magento/Webapi/Helper/Data.php @@ -24,7 +24,7 @@ namespace Magento\Webapi\Helper; use Magento\Integration\Controller\Adminhtml\Integration as IntegrationController; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -108,6 +108,20 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper $serviceNameParts[] = $serviceVersion; } return $serviceNameParts; + } elseif (preg_match(\Magento\Webapi\Model\Config::API_PATTERN, $className, $matches)) { + $moduleNamespace = $matches[1]; + $moduleName = $matches[2]; + $moduleNamespace = ($moduleNamespace == 'Magento') ? '' : $moduleNamespace; + $serviceNameParts = explode('\\', trim($matches[3], '\\')); + if ($moduleName == $serviceNameParts[0]) { + /** Avoid duplication of words in service name */ + $moduleName = ''; + } + $parentServiceName = $moduleNamespace . $moduleName . array_shift($serviceNameParts); + array_unshift($serviceNameParts, $parentServiceName); + //Add temporary dummy version + $serviceNameParts[] = 'V1'; + return $serviceNameParts; } throw new \InvalidArgumentException(sprintf('The service interface name "%s" is invalid.', $className)); } diff --git a/app/code/Magento/Webapi/Model/Config.php b/app/code/Magento/Webapi/Model/Config.php index 065fcea3c779ab68c36cc76729f0ee89c8b2f08b..6605b5391d8ea927e737210cae8f8e3c384c6744 100644 --- a/app/code/Magento/Webapi/Model/Config.php +++ b/app/code/Magento/Webapi/Model/Config.php @@ -42,6 +42,8 @@ class Config */ const SERVICE_CLASS_PATTERN = '/^(.+?)\\\\(.+?)\\\\Service\\\\(V\d+)+(\\\\.+)Interface$/'; + const API_PATTERN = '/^(.+?)\\\\(.+?)\\\\Api(\\\\.+)Interface$/'; + /** * @var WebapiCache */ diff --git a/app/code/Magento/Webapi/Model/Config/ClassReflector.php b/app/code/Magento/Webapi/Model/Config/ClassReflector.php index bb736f6a21cee9b558744a762b3086c5edbd44ca..f96676c0e7b9d9ca7c7b25d2cd294932a375cfd5 100644 --- a/app/code/Magento/Webapi/Model/Config/ClassReflector.php +++ b/app/code/Magento/Webapi/Model/Config/ClassReflector.php @@ -31,15 +31,17 @@ use Zend\Server\Reflection\ReflectionMethod; */ class ClassReflector { - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */ + /** + * @var \Magento\Framework\Reflection\TypeProcessor + */ protected $_typeProcessor; /** * Construct reflector. * - * @param \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor + * @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor */ - public function __construct(\Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor) + public function __construct(\Magento\Framework\Reflection\TypeProcessor $typeProcessor) { $this->_typeProcessor = $typeProcessor; } diff --git a/app/code/Magento/Webapi/Model/Soap/Server.php b/app/code/Magento/Webapi/Model/Soap/Server.php index 750cfef9b62f80f90c3c4fe48559ebc574c6d53e..2551b604200761f9d32757d2c4d7996dba5c0b04 100644 --- a/app/code/Magento/Webapi/Model/Soap/Server.php +++ b/app/code/Magento/Webapi/Model/Soap/Server.php @@ -51,19 +51,29 @@ class Server */ protected $_configScope; - /** @var \Magento\Framework\DomDocument\Factory */ + /** + * @var \Magento\Framework\DomDocument\Factory + */ protected $_domDocumentFactory; - /** @var \Magento\Webapi\Controller\Soap\Request */ + /** + * @var \Magento\Webapi\Controller\Soap\Request + */ protected $_request; - /** @var \Magento\Framework\StoreManagerInterface */ + /** + * @var \Magento\Framework\StoreManagerInterface + */ protected $_storeManager; - /** @var \Magento\Webapi\Model\Soap\Server\Factory */ + /** + * @var \Magento\Webapi\Model\Soap\Server\Factory + */ protected $_soapServerFactory; - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */ + /** + * @var \Magento\Framework\Reflection\TypeProcessor + */ protected $_typeProcessor; /** @@ -80,7 +90,7 @@ class Server * @param \Magento\Framework\DomDocument\Factory $domDocumentFactory * @param \Magento\Framework\StoreManagerInterface $storeManager * @param \Magento\Webapi\Model\Soap\Server\Factory $soapServerFactory - * @param \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor + * @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @throws \Magento\Webapi\Exception */ @@ -91,7 +101,7 @@ class Server \Magento\Framework\DomDocument\Factory $domDocumentFactory, \Magento\Framework\StoreManagerInterface $storeManager, \Magento\Webapi\Model\Soap\Server\Factory $soapServerFactory, - \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor, + \Magento\Framework\Reflection\TypeProcessor $typeProcessor, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig ) { if (!extension_loaded('soap')) { diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php b/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php index 5cf87b1c11cdb417492fd583fea57e0018578b8f..7b1057b8915d27e0db480d029837749eed63b233 100644 --- a/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php +++ b/app/code/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategy.php @@ -41,7 +41,7 @@ class ComplexTypeStrategy extends AbstractComplexTypeStrategy */ const APP_INF_NS = 'inf'; - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */ + /** @var \Magento\Framework\Reflection\TypeProcessor */ protected $_typeProcessor; /** @@ -54,9 +54,9 @@ class ComplexTypeStrategy extends AbstractComplexTypeStrategy /** * Construct strategy with config helper. * - * @param \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor + * @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor */ - public function __construct(\Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor) + public function __construct(\Magento\Framework\Reflection\TypeProcessor $typeProcessor) { $this->_typeProcessor = $typeProcessor; } diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php index 0b68461418b9ad9cc314b0e96ffe23d89e2f61a1..815aa42ee4efd3705da6e038cb658e9217924db7 100644 --- a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php +++ b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php @@ -51,7 +51,7 @@ class Generator */ protected $_apiConfig; - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */ + /** @var \Magento\Framework\Reflection\TypeProcessor */ protected $_typeProcessor; /** @@ -72,14 +72,14 @@ class Generator * @param \Magento\Webapi\Model\Soap\Config $apiConfig * @param Factory $wsdlFactory * @param \Magento\Webapi\Model\Cache\Type $cache - * @param \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor + * @param \Framework\Magento\Reflection\TypeProcessor $typeProcessor * @param \Magento\Framework\StoreManagerInterface $storeManager */ public function __construct( \Magento\Webapi\Model\Soap\Config $apiConfig, Factory $wsdlFactory, \Magento\Webapi\Model\Cache\Type $cache, - \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor, + \Magento\Framework\Reflection\TypeProcessor $typeProcessor, \Magento\Framework\StoreManagerInterface $storeManager ) { $this->_apiConfig = $apiConfig; diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json index 8cd768b4e0435f597a2cae7ded9ab951d46f1821..25cede30adf7d70aa8f4f652faf91bec8739348b 100644 --- a/app/code/Magento/Webapi/composer.json +++ b/app/code/Magento/Webapi/composer.json @@ -3,17 +3,17 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-authorization": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-integration": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-user": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-authorization": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-integration": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-user": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Webapi/etc/di.xml b/app/code/Magento/Webapi/etc/di.xml index 6f433e197564dc1128f116919f8eef5cd9691b22..21f0547d276674f7d367cce1c684724befae02be 100644 --- a/app/code/Magento/Webapi/etc/di.xml +++ b/app/code/Magento/Webapi/etc/di.xml @@ -65,4 +65,9 @@ </argument> </arguments> </type> + <type name="Magento\Framework\Reflection\DataObjectProcessor"> + <arguments> + <argument name="cache" xsi:type="object">Magento\Webapi\Model\Cache\Type</argument> + </arguments> + </type> </config> diff --git a/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php b/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php index b647a6132b615079581a7e3d7e7b1742ebfb63d5..f82f378e0bc905331b0af8a58991889b2cbfe83e 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php index 0c8b235061c83756f46357eb3d9f943bfa365c8d..ef1b64d31cf4fc98ccd96a78798b9fc883bb8c1d 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Framework\Module\Setup $installer */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php index 13894ac9c4d5ee6de695a0588a7c2776784eb934..382ba191354a4368abab374aa832261377936476 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Framework\Module\Setup $installer */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php index 7bb63515a7c01785f9259a3b89ea36fe74e483d1..7712580225ec27460398ce78cabf68d0c1420603 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Framework\Module\Setup $installer */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php index ed311385098e498c1a640247f790634977e600d7..3c7f908293490c1ed437df6dd8a673354fe0e466 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Framework\Module\Setup $installer */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); diff --git a/app/code/Magento/Weee/Model/Tax.php b/app/code/Magento/Weee/Model/Tax.php index 664502c723977fdd4fd3b6d4e0174cf0eda89c36..3f983cde38f646f51a51496963a284b0c6f4ad85 100644 --- a/app/code/Magento/Weee/Model/Tax.php +++ b/app/code/Magento/Weee/Model/Tax.php @@ -28,6 +28,7 @@ use Magento\Framework\Pricing\PriceCurrencyInterface; use Magento\Store\Model\Website; use Magento\Customer\Model\Converter as CustomerConverter; use Magento\Tax\Model\Calculation; +use Magento\Customer\Service\V1\CustomerAddressServiceInterface as AddressServiceInterface; class Tax extends \Magento\Framework\Model\AbstractModel { @@ -105,6 +106,11 @@ class Tax extends \Magento\Framework\Model\AbstractModel */ protected $priceCurrency; + /** + * @var AddressServiceInterface + */ + protected $_addressService; + /** * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry @@ -112,6 +118,7 @@ class Tax extends \Magento\Framework\Model\AbstractModel * @param \Magento\Framework\StoreManagerInterface $storeManager * @param \Magento\Tax\Model\CalculationFactory $calculationFactory * @param \Magento\Customer\Model\Session $customerSession + * @param AddressServiceInterface $addressService * @param \Magento\Tax\Helper\Data $taxData * @param Resource\Tax $resource * @param CustomerConverter $customerConverter @@ -127,6 +134,7 @@ class Tax extends \Magento\Framework\Model\AbstractModel \Magento\Framework\StoreManagerInterface $storeManager, \Magento\Tax\Model\CalculationFactory $calculationFactory, \Magento\Customer\Model\Session $customerSession, + AddressServiceInterface $addressService, \Magento\Tax\Helper\Data $taxData, \Magento\Weee\Model\Resource\Tax $resource, CustomerConverter $customerConverter, @@ -139,6 +147,7 @@ class Tax extends \Magento\Framework\Model\AbstractModel $this->_storeManager = $storeManager; $this->_calculationFactory = $calculationFactory; $this->_customerSession = $customerSession; + $this->_addressService = $addressService; $this->_taxData = $taxData; $this->customerConverter = $customerConverter; $this->weeeConfig = $weeeConfig; @@ -247,9 +256,14 @@ class Tax extends \Magento\Framework\Model\AbstractModel /** @var \Magento\Tax\Model\Calculation $calculator */ $calculator = $this->_calculationFactory->create(); - if ($shipping) { + if ($shipping && $shipping->getCountryId()) { $customerTaxClass = $shipping->getQuote()->getCustomerTaxClassId(); } else { + // if customer logged use it default shipping and billing address + if ($customerId = $this->_customerSession->getCustomerId()) { + $shipping = $this->_addressService->getDefaultShippingAddress($customerId); + $billing = $this->_addressService->getDefaultBillingAddress($customerId); + } $customerTaxClass = null; } diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json index 8c696bf9f40307f30e398f48f3ee1d2859e1662f..d455549da8f503cd1a945dfe7253bb58b6bce597 100644 --- a/app/code/Magento/Weee/composer.json +++ b/app/code/Magento/Weee/composer.json @@ -3,21 +3,21 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-tax": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-directory": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-eav": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-bundle": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-tax": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-directory": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-eav": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-bundle": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php b/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php index 18f4680e81c39ef3ffbad7cf18bac26a0320cb6b..842fc4fb4bbd5bd8026c111596d9d42837034136 100644 --- a/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php +++ b/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Sales\Model\Resource\Setup */ +/** @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); /** diff --git a/app/code/Magento/Widget/Model/NamespaceResolver.php b/app/code/Magento/Widget/Model/NamespaceResolver.php index d0ad316e2f1f9796301cfddfb409e7a3d7c8c0d3..aa0f58b4855739a3e5e4ed548e47968d69335408 100644 --- a/app/code/Magento/Widget/Model/NamespaceResolver.php +++ b/app/code/Magento/Widget/Model/NamespaceResolver.php @@ -66,8 +66,8 @@ class NamespaceResolver $explodeString = strpos( $name, - \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR - ) === false ? '_' : \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR; + '\\' + ) === false ? '_' : '\\'; $name = explode($explodeString, strtolower($name)); $partsNum = count($name); diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json index fba71ba0cca40be1db3e746a15fb54b39ab43f96..7e6a5e30b44a434d4c34346f74778e32274baf3a 100644 --- a/app/code/Magento/Widget/composer.json +++ b/app/code/Magento/Widget/composer.json @@ -3,16 +3,16 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-cms": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-cms": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php index b37f109a62ffa1ca891ac9031a616a91ff2b2fca..a6891755ce3293bfcbfc2865f4298c7e1f38a0c4 100644 --- a/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Framework\Module\Setup\Migration */ +/** @var $this \Magento\Framework\Module\Setup */ $installer = $this->createMigrationSetup(); $installer->startSetup(); diff --git a/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php b/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php index 189db7d90bc347b8bd7f39c4a3f293c2d5a35db5..2f38c10d4aa371a09aece6f8a9d32e487c1a5711 100644 --- a/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php +++ b/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php index 604925dda45d9bd7d218385bd4ed84df2d47eb28..fa0c70054040e58eb76baefbba2a1c36e51e9d06 100644 --- a/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Framework\Module\Setup */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Wishlist/Block/Item/Configure.php b/app/code/Magento/Wishlist/Block/Item/Configure.php index 5d8f40d837535849ed23cd857dac99719c9448e5..fe762e92b3bbb1213c4f2bffc6a0642de0c3c106 100644 --- a/app/code/Magento/Wishlist/Block/Item/Configure.php +++ b/app/code/Magento/Wishlist/Block/Item/Configure.php @@ -63,6 +63,16 @@ class Configure extends \Magento\Framework\View\Element\Template parent::__construct($context, $data); } + /** + * Return wishlist widget options + * + * @return array + */ + public function getWishlistOptions() + { + return ['productType' => $this->getProduct()->getTypeId()]; + } + /** * Returns product being edited * diff --git a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php index 0b9ef0a96aa6446ac84f02395aa486990cb84f90..ad360b004cc102799fa83c197625f3bc68c27723 100644 --- a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php +++ b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php @@ -34,4 +34,18 @@ class EmailLink extends Link * @var string */ protected $_template = 'rss/email.phtml'; + + /** + * @return string + */ + protected function getLinkParams() + { + $params = parent::getLinkParams(); + $wishlist = $this->wishlistHelper->getWishlist(); + $sharingCode = $wishlist->getSharingCode(); + if ($sharingCode) { + $params['sharing_code'] = $sharingCode; + } + return $params; + } } diff --git a/app/code/Magento/Wishlist/Model/Rss/Wishlist.php b/app/code/Magento/Wishlist/Model/Rss/Wishlist.php index 7d9632b68c2cff47163905e107b7fb4a61d52885..00da15cb568daeddd36c2bfb240873ccf06fc88b 100644 --- a/app/code/Magento/Wishlist/Model/Rss/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Rss/Wishlist.php @@ -77,6 +77,16 @@ class Wishlist implements DataProviderInterface */ protected $wishlistBlock; + /** + * @var \Magento\Framework\App\RequestInterface + */ + protected $request; + + /** + * @var \Magento\Customer\Model\CustomerFactory + */ + protected $customerFactory; + /** * @param \Magento\Wishlist\Helper\Rss $wishlistHelper * @param \Magento\Wishlist\Block\Customer\Wishlist $wishlistBlock @@ -85,7 +95,11 @@ class Wishlist implements DataProviderInterface * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Framework\View\LayoutInterface $layout + * @param \Magento\Framework\App\RequestInterface $request + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Wishlist\Helper\Rss $wishlistHelper, @@ -95,7 +109,9 @@ class Wishlist implements DataProviderInterface \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Event\ManagerInterface $eventManager, - \Magento\Framework\View\LayoutInterface $layout + \Magento\Customer\Model\CustomerFactory $customerFactory, + \Magento\Framework\View\LayoutInterface $layout, + \Magento\Framework\App\RequestInterface $request ) { $this->wishlistHelper = $wishlistHelper; $this->wishlistBlock = $wishlistBlock; @@ -104,7 +120,9 @@ class Wishlist implements DataProviderInterface $this->urlBuilder = $urlBuilder; $this->scopeConfig = $scopeConfig; $this->eventManager = $eventManager; + $this->customerFactory = $customerFactory; $this->layout = $layout; + $this->request = $request; } /** @@ -173,7 +191,7 @@ class Wishlist implements DataProviderInterface $description .= '</td></tr></table>'; $data['entries'][] = (array( - 'title' => $this->outputHelper->productAttribute($product, $product->getName(), 'name'), + 'title' => $product->getName(), 'link' => $productUrl, 'description' => $description )); @@ -213,7 +231,9 @@ class Wishlist implements DataProviderInterface */ public function getHeader() { - $title = __('%1\'s Wishlist', $this->wishlistHelper->getCustomerName()); + $customerId = $this->getWishlist()->getCustomerId(); + $customer = $this->customerFactory->create()->load($customerId); + $title = __('%1\'s Wishlist', $customer->getName()); $newUrl = $this->urlBuilder->getUrl( 'wishlist/shared/index', array('code' => $this->getWishlist()->getSharingCode()) @@ -230,12 +250,6 @@ class Wishlist implements DataProviderInterface protected function getWishlist() { $wishlist = $this->wishlistHelper->getWishlist(); - $currentCustomer = $this->wishlistHelper->getCustomer(); - if (!$wishlist->getVisibility() && $currentCustomer - && ($wishlist->getCustomerId() != $currentCustomer->getId()) - ) { - $wishlist->unsetData(); - } return $wishlist; } @@ -274,4 +288,15 @@ class Wishlist implements DataProviderInterface { return array(); } + + /** + * {@inheritdoc} + */ + public function isAuthRequired() + { + if ($this->request->getParam('sharing_code') == $this->getWishlist()->getSharingCode()) { + return false; + } + return true; + } } diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json index a244ab1d6fc7d587950dea7b9bd88bd799447151..cd936a1bca3f9dfe93859e53703abde2715c5ef1 100644 --- a/app/code/Magento/Wishlist/composer.json +++ b/app/code/Magento/Wishlist/composer.json @@ -3,25 +3,25 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/module-store": "0.1.0-alpha102", - "magento/module-customer": "0.1.0-alpha102", - "magento/module-catalog": "0.1.0-alpha102", - "magento/module-core": "0.1.0-alpha102", - "magento/module-checkout": "0.1.0-alpha102", - "magento/module-theme": "0.1.0-alpha102", - "magento/module-catalog-inventory": "0.1.0-alpha102", - "magento/module-rss": "0.1.0-alpha102", - "magento/module-backend": "0.1.0-alpha102", - "magento/module-bundle": "0.1.0-alpha102", - "magento/module-sales": "0.1.0-alpha102", - "magento/module-grouped-product": "0.1.0-alpha102", - "magento/module-configurable-product": "0.1.0-alpha102", - "magento/module-downloadable": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/module-store": "0.1.0-alpha103", + "magento/module-customer": "0.1.0-alpha103", + "magento/module-catalog": "0.1.0-alpha103", + "magento/module-core": "0.1.0-alpha103", + "magento/module-checkout": "0.1.0-alpha103", + "magento/module-theme": "0.1.0-alpha103", + "magento/module-catalog-inventory": "0.1.0-alpha103", + "magento/module-rss": "0.1.0-alpha103", + "magento/module-backend": "0.1.0-alpha103", + "magento/module-bundle": "0.1.0-alpha103", + "magento/module-sales": "0.1.0-alpha103", + "magento/module-grouped-product": "0.1.0-alpha103", + "magento/module-configurable-product": "0.1.0-alpha103", + "magento/module-downloadable": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-module", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php b/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php index 31fec1759bbd534a44eb7786683569eca51d45c7..3334dab095ff14932ae91b34b8fac3e4b1fb95b5 100644 --- a/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php +++ b/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php @@ -22,8 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer \Magento\Setup\Module\SetupModule */ $installer = $this; -/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_bundle.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_bundle.xml index f275f2e67b097ecb4399d72dc49f864f3ddf2354..29bfe1698beae3a9b097746f358c30ea62a2f72b 100644 --- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_bundle.xml +++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_bundle.xml @@ -65,7 +65,7 @@ </action> </referenceBlock> <referenceContainer name="content"> - <container name="bundle.options.container" label="invisible" htmlTag="div" htmlClass="bundle-options-container" after="product.info.main"/> + <container name="bundle.options.container" htmlTag="div" htmlClass="bundle-options-container" after="product.info.main"/> </referenceContainer> <referenceContainer name="product.info.type"> <block class="Magento\Bundle\Block\Catalog\Product\View\Type\Bundle" name="product.info.bundle" as="product_type_data" template="catalog/product/view/type/bundle.phtml"/> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml index 4e793ba41d3c5eb0794f4747d107e7371fdc1609..06451c891ef8c060abc3c5fa9558f615737f3fd2 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/column/comment.phtml @@ -27,4 +27,11 @@ $item = $this->getItem(); ?> -<textarea placeholder="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->defaultCommentString() ?>" name="description[<?php echo $item->getWishlistItemId() ?>]" title="<?php echo __('Comment') ?>" class="product-item-comment"><?php echo($this->escapeHtml($item->getDescription())) ?></textarea> +<div class="field comment-box"> + <label class="label" for="product-item-comment-<?php echo $item->getWishlistItemId() ?>"> + <span><?php echo __('Comment') ?></span> + </label> + <div class="control"> + <textarea id="product-item-comment-<?php echo $item->getWishlistItemId() ?>" placeholder="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->defaultCommentString() ?>" name="description[<?php echo $item->getWishlistItemId() ?>]" title="<?php echo __('Comment') ?>" class="product-item-comment"><?php echo($this->escapeHtml($item->getDescription())) ?></textarea> + </div> +</div> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml index 91c766864274167dadc6ed413cd539dacf87abd9..60b463609a733d243b474311751db25754abf94d 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml @@ -32,7 +32,7 @@ $columns = $this->getColumns(); <?php if (count($this->getItems())): ?> <ol class="product-items"> <?php foreach ($this->getItems() as $item): ?> - <?php echo ($iterator++==1) ? '<li class="product-item" id="item_<?php echo $item->getId();?>">' : '</li><li class="product-item" id="item_<?php echo $item->getId();?>">' ?> + <?php echo ($iterator++==1) ? '<li class="product-item" id="item_' . $item->getId() . '">' : '</li><li class="product-item" id="item_' . $item->getId() .'">' ?> <div class="product-item-info"> <?php foreach ($columns as $column): ?> <?php $column->setItem($item); echo $column->toHtml($item);?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml index 95031f47d8600f1aa8239f03533e01b7c5392513..8342b8aba91fb14b4928f1a7295854e5d6bd242f 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml @@ -101,5 +101,5 @@ $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im </div> </form> <?php else: ?> - <p><?php echo __('Wish List is empty now.') ?></p> + <div class="message info empty"><div><?php echo __('Wish List is empty now.') ?></div></div> <?php endif ?> diff --git a/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml index f95a99dc897b6b3e2b94d99b8f636c35312b07a0..6a055b7cfd710405fde41b3f6cc22ff2374a63c6 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/sidebar.phtml @@ -29,27 +29,31 @@ $wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data'); ?> <?php if ($wishlistHelper->isAllow()) : ?> <?php $imageBlock = $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image');?> - <div class="block wishlist"> - <div class="title"> + <div class="block block-wishlist"> + <div class="block-title"> <strong><?php echo $this->getTitle(); ?></strong> <?php if($count > 0): ?> - <span class="counter qty"><?php echo ($count == 1) ? __('1 item') : __('%1 items',$count) ?></span> + <span class="counter"><?php echo ($count == 1) ? __('1 item') : __('%1 items',$count) ?></span> <?php endif; ?> </div> - <div class="content"> + <div class="block-content"> <strong class="subtitle"><?php echo __('Last Added Items') ?></strong> <?php if ($this->hasWishlistItems()): ?> - <ol class="items minilist products" id="wishlist-sidebar"> + <ol class="product-items" id="wishlist-sidebar"> <?php $iterator = 1; ?> <?php foreach ($this->getWishlistItems() as $item): ?> <?php $product = $item->getProduct(); ?> - <?php echo ($iterator++ == 1) ? '<li class="item product">' : '</li><li class="item product">' ?> - <div class="product"> - <a class="product photo" href="<?php echo $this->getProductUrl($item) ?>" title="<?php echo $this->escapeHtml($product->getName()) ?>"> + <?php echo ($iterator++ == 1) ? '<li class="product-item">' : '</li><li class="product-item">' ?> + <div class="product-item-info"> + <a class="product-item-photo" href="<?php echo $this->getProductUrl($item) ?>" + title="<?php echo $this->escapeHtml($product->getName()) ?>"> <?php echo $imageBlock->init($product, 'wishlist_sidebar_block')->toHtml() ?> </a> - <div class="product details"> - <strong class="product name"><a href="<?php echo $this->getProductUrl($item) ?>"><?php echo $this->escapeHtml($product->getName()) ?></a></strong> + <div class="product-item-details"> + <strong class="product-item-name"> + <a href="<?php echo $this->getProductUrl($item) ?>" + class="product-item-link"><?php echo $this->escapeHtml($product->getName()) ?></a> + </strong> <?php echo $this->getProductPriceHtml( $product, @@ -58,20 +62,25 @@ $wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data'); ['item' => $item] ); ?> - <div class="product actions"> + <div class="product-item-actions"> <?php if ($product->isSaleable() && $product->isVisibleInSiteVisibility()): ?> - <?php if ($product->getTypeInstance()->hasRequiredOptions($product)): ?> - <div class="primary"><a href="<?php echo $this->getItemAddToCartUrl($item) ?>" class="action tocart primary"><span><?php echo __('Add to Cart') ?></span></a></div> - <?php else: ?> - <?php - $postDataHelper = $this->helper('Magento\Core\Helper\PostData'); - $postData = $postDataHelper->getPostData($this->getItemAddToCartUrl($item), ['product' => $product->getEntityId()]) - ?> - <div class="primary"><button type="button" class="action tocart primary" data-post='<?php echo $postData; ?>'><span><?php echo __('Add to Cart') ?></span></button></div> + <div class="actions-primary"> + <?php if ($product->getTypeInstance()->hasRequiredOptions($product)): ?> + <a href="<?php echo $this->getItemAddToCartUrl($item) ?>" + class="action tocart primary"><span><?php echo __('Add to Cart') ?></span></a> + <?php else: ?> + <?php + $postDataHelper = $this->helper('Magento\Core\Helper\PostData'); + $postData = $postDataHelper->getPostData($this->getItemAddToCartUrl($item), ['product' => $product->getEntityId()]) + ?> + <button type="button" class="action tocart primary" data-post='<?php echo $postData; ?>'><span><?php echo __('Add to Cart') ?></span></button> <?php endif; ?> + </div> <?php endif; ?> - <div class="secondary"> - <a href="#" data-post='<?php echo $this->getItemRemoveParams($item) ?>' title="<?php echo __('Remove This Item') ?>" class="btn-remove action delete"> + <div class="actions-secondary"> + <a href="#" data-post='<?php echo $this->getItemRemoveParams($item) ?>' + title="<?php echo __('Remove This Item') ?>" + class="btn-remove action delete"> <span><?php echo __('Remove This Item') ?></span> </a> </div> @@ -81,11 +90,15 @@ $wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data'); <?php echo ($iterator == count($this->getWishlistItems()) + 1) ? '</li>' : '' ?> <?php endforeach; ?> </ol> - <div class="actions"> - <a class="action details" href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getListUrl() ?>"><span><?php echo __('Go to Wish List') ?></span></a> + <div class="actions-toolbar"> + <div class="primary"> + <a class="action details" + href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getListUrl() ?>" + title="<?php echo __('Go to Wish List') ?>"><span><?php echo __('Go to Wish List') ?></span></a> + </div> </div> <?php else: ?> - <p class="message info empty"><?php echo __('You have no items in your wish list.') ?></p> + <div class="empty"><?php echo __('You have no items in your wish list.') ?></div> <?php endif ?> </div> </div> diff --git a/app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js b/app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js index 4156bc37f062da6fc3f9a0f4f69b36ace025b755..a8f81505c12634f12ff4f1b2ada4b5e97a69271c 100644 --- a/app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js +++ b/app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js @@ -56,6 +56,8 @@ define([ var self = this; $('[data-action="add-to-wishlist"]').each(function(index, element) { var params = $(element).data('post'); + if (!params) + params = {}; params.data = $.extend({}, params.data, dataToAdd, {'qty': $(self.options.qtyInfo).val()}); $(element).data('post', params); }); diff --git a/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module.less b/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module.less index 6f705d63f3c094ff59b31dbbc94fb14acfcf484d..b207acdbc2778b0245a6d941b7471578b536adfb 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module.less +++ b/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module.less @@ -167,7 +167,6 @@ margin-left: -3px; } &.active { - outline: 0; &:after { content: @icon-pointer-up; } @@ -365,7 +364,6 @@ } &:active, &.active { - outline: 0; &:before { content: @icon-pointer-up; } diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json index 857fbb7947eb6e23eeb79455bf6bf5bbbbfad489..ef648d9f8788d250d68289e322e2069e2ebe6eb1 100644 --- a/app/design/adminhtml/Magento/backend/composer.json +++ b/app/design/adminhtml/Magento/backend/composer.json @@ -3,11 +3,11 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-theme", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/design/adminhtml/Magento/backend/theme.xml b/app/design/adminhtml/Magento/backend/theme.xml index b02fedb1371cfbb0ba49b9a9d45bea0b3deb87f1..480251aaa9d559c716459dd16ee95a1aed305b30 100644 --- a/app/design/adminhtml/Magento/backend/theme.xml +++ b/app/design/adminhtml/Magento/backend/theme.xml @@ -24,5 +24,5 @@ --> <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento 2 backend</title> - <version>0.1.0-alpha102</version> + <version>0.1.0-alpha103</version> </theme> diff --git a/app/design/adminhtml/Magento/backend/web/css/admin.less b/app/design/adminhtml/Magento/backend/web/css/admin.less index 7fc011493c8dd2faeb53694cbbaac6d917e44c48..b79253b0f6c150679e081ec36bfb1d9e7f83aa6e 100644 --- a/app/design/adminhtml/Magento/backend/web/css/admin.less +++ b/app/design/adminhtml/Magento/backend/web/css/admin.less @@ -637,7 +637,6 @@ input[type=tel]:focus, input[type=color]:focus, textarea:focus, select:focus { - outline: 0; border-color: #75b9f0; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); } @@ -1848,9 +1847,6 @@ address { button:not(.primary):active { background-color: #cac3b4; border: 1px solid #989287; - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; } button:not(.primary):hover { background-color: #cac3b4; @@ -1883,9 +1879,6 @@ address { button.primary:active { background-color: #026294; border: 1px solid #004c74; - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; color: #ffffff; } button.primary:hover { @@ -2493,44 +2486,45 @@ address { text-shadow: 0 1px 0 #fff; } -/* - Universal Sidebar Tabs --------------------------------------- */ +// +// Universal Sidebar Tabs +// -------------------------------------- // TODO: for "Product" page only while refactoring */ - .side-col .ui-tabs .ui-accordion-header { - position: relative; margin: 10px 0 0; - padding: 5px 20px; - cursor: pointer; - color: #524c44; - text-shadow: 0 1px 0 #fff; -} - -.side-col .ui-tabs .ui-accordion-header:focus { - outline: none; -} - -.side-col .ui-accordion-header:before { - position: absolute; - left: 4px; - top: 7px; - font-family: 'MUI-Icons'; - font-style: normal; - speak: none; - font-weight: normal; - -webkit-font-smoothing: antialiased; - content: '\e02a'; /* arrow right icon */ - font-size: 14px; - color: #ada79e; -} - -.side-col .ui-accordion-header:hover:before { - color: #777; -} - -.side-col .ui-accordion-header-active:before { - content: '\e02c'; /* arrow down icon */ + padding: 0; + &:focus { + outline: none; + } + span { + color: #524c44; + cursor: pointer; + display: block; + position: relative; + padding: 5px 20px; + text-shadow: 0 1px 0 #fff; + &:before { + position: absolute; + left: 4px; + top: 7px; + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + content: '\e02a'; // arrow right icon + font-size: 14px; + color: #ada79e; + } + } + &:hover { + span:before { + color: #777; + } + } + &-active span:before { + content: '\e02c'; // arrow down icon + } } .side-col .tabs { @@ -2563,11 +2557,6 @@ address { transition: background 0.3s ease-in-out; } -.side-col .tabs > li a:active, -.side-col .tabs > li a:focus { - outline: none; -} - .side-col .tabs > li a:hover { background: #fff; } diff --git a/app/design/adminhtml/Magento/backend/web/css/source/navigation.less b/app/design/adminhtml/Magento/backend/web/css/source/navigation.less index 3ef24330dadb841d1ce0bf805c89a8920306233b..cd8a963a0cb9778c6d7d87c5f208a4c37a7395b3 100644 --- a/app/design/adminhtml/Magento/backend/web/css/source/navigation.less +++ b/app/design/adminhtml/Magento/backend/web/css/source/navigation.less @@ -127,10 +127,6 @@ font-weight: @baseFontWeightBold; } -.navigation .level-0 > a:focus { - outline: none; -} - .navigation .level-0 > .submenu { opacity: 0; visibility: hidden; diff --git a/app/design/adminhtml/Magento/backend/web/js/theme.js b/app/design/adminhtml/Magento/backend/web/js/theme.js index 9839f7fe2b0822d2efc26193c353f0cf87a3b069..45d64c5d896b5cfab1cd05a88cb139eeeaabecba 100644 --- a/app/design/adminhtml/Magento/backend/web/js/theme.js +++ b/app/design/adminhtml/Magento/backend/web/js/theme.js @@ -23,13 +23,14 @@ define([ "jquery", + 'mage/smart-keyboard-handler', "jquery/ui", "jquery/hover-intent", "jquery/jquery.details", "jquery/jquery.tabs", "mage/backend/floating-header", "jquery/farbtastic" // $(..).farbtastic() -],function($) { +],function($, keyboardHandler) { 'use strict'; $.widget('mage.globalSearch', { @@ -430,6 +431,8 @@ define([ toggleColorPickerPosition(); }); switcherForIe8(); + + keyboardHandler.init(); }); $(document).on('ajaxComplete', function() { diff --git a/app/design/adminhtml/Magento/backend/web/less/lib/buttons.less b/app/design/adminhtml/Magento/backend/web/less/lib/buttons.less index e8993ab3e1a984c7f4fcd05606e6e92fd67029d9..f5c5cf88b7058d6dedd42b09b071c4d1d6320a42 100644 --- a/app/design/adminhtml/Magento/backend/web/less/lib/buttons.less +++ b/app/design/adminhtml/Magento/backend/web/less/lib/buttons.less @@ -107,9 +107,6 @@ // position: relative; // z-index: 1; // padding: 0; -// &:focus { -// outline: none; -// } // > span { // text-indent: -999em; // display: block; @@ -144,16 +141,10 @@ .action-default.primary { //&:extend(.PrimaryAddButton all); border-radius: 2px 0 0 2px; - &:focus { - outline: none; - } } } > .action-default.primary { border-radius: 2px 0 0 2px; - &:focus { - outline: none; - } } > .action-toggle.primary { &:extend(.PrimaryButton all); @@ -169,9 +160,6 @@ position: relative; z-index: 2; filter: none; - &:focus { - outline: none; - } &:before { text-align: center; } diff --git a/app/design/adminhtml/Magento/backend/web/mui/base.css b/app/design/adminhtml/Magento/backend/web/mui/base.css index 210ff9cd67c9c360910c1ec85a4e5ba7860ea7d0..3730b65e174e2431d27933b01f0ebc5b61892679 100644 --- a/app/design/adminhtml/Magento/backend/web/mui/base.css +++ b/app/design/adminhtml/Magento/backend/web/mui/base.css @@ -163,26 +163,6 @@ select[size] { height: auto; } -input[type=text]:focus, -input[type=password]:focus, -input[type=datetime]:focus, -input[type=datetime-local]:focus, -input[type=date]:focus, -input[type=month]:focus, -input[type=time]:focus, -input[type=week]:focus, -input[type=number]:focus, -input[type=range]:focus, -input[type=email]:focus, -input[type=url]:focus, -input[type=search]:focus, -input.search:focus, -input[type=tel]:focus, -input[type=color]:focus, -textarea:focus { - outline: 0; -} - input[type="radio"], input[type="checkbox"] { margin: 3px 0; diff --git a/app/design/adminhtml/Magento/backend/web/mui/reset.css b/app/design/adminhtml/Magento/backend/web/mui/reset.css index bef14e456b0c9199c4a44674eb7223b8aa9c2cc5..c833fdb6697b13fbb55b2f87c5eead1400d95bbe 100644 --- a/app/design/adminhtml/Magento/backend/web/mui/reset.css +++ b/app/design/adminhtml/Magento/backend/web/mui/reset.css @@ -123,19 +123,10 @@ a:hover { color: #06e; } -a:focus { - outline: thin dotted; -} - /** * Improve readability when focused and also mouse hovered in all browsers. */ -a:active, -a:hover { - outline: 0; -} - /* ========================================================================== Typography ========================================================================== */ diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/listings.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/listings.less index 093fc88ccf310bc8b371d10c17f7b7e3a1f10aa6..61dee9410deaf3934033d0a960fe9f2c27f80b0e 100644 --- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/listings.less +++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/listings.less @@ -45,10 +45,10 @@ .products { margin: @indent-l-base 0; } + .product { &-items { &:extend(.abstract-reset-list all); - margin-left: -20px; } &-item { vertical-align: top; @@ -56,8 +56,7 @@ width: 100%/2; display: inline-block; } - .box-sizing(); - padding-left: 20px; + &:extend(.abstract-add-box-sizing all); &-name { .product-name(); @@ -192,6 +191,17 @@ } } +.column.main { + .product { + &-items { + margin-left: -20px; + } + &-item { + padding-left: 20px; + } + } +} + .price-container { .price { .font-size(14); @@ -304,7 +314,7 @@ .page-products.layout-3 .products-grid .product-item { width: 100%/3 } } .responsive(@break) when (@break = @screen-m) { - .page-products .products-grid .product-item{ width: 100%/3 } + .page-products .products-grid .product-item { width: 100%/3 } .page-products.layout-1 .products-grid .product-item { width: 100%/4 } .page-products.layout-3 .products-grid .product-item { width: 100%/2 } } @@ -316,7 +326,6 @@ .page-products .products-grid .product-item { width: 100%/4; width: 200px; - //margin: 0; margin-left: calc(~"(100% - 4 * 200px) / 3"); padding: 0; &:nth-child(4n+1) { diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module.less index f3b185bd8011ab3cc8649860f8449ae7b7307bd2..1947f63b1314ae6f905bb07cb17fc768a8548a75 100644 --- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/module.less @@ -103,9 +103,8 @@ } // -// Product grid and list item +// Product images general container //-------------------------------------- - .product-image { &-container { display: inline-block; @@ -157,7 +156,6 @@ .active { display: block; line-height: 1; - outline: @border-width-base solid @link-color-active; } } } @@ -306,6 +304,95 @@ .button-as-link(); } +// +// Sidebar product view +//-------------------------------------- +.sidebar { + .product-items { + .product-item { + margin-bottom: @indent-base; + position: relative; + &-info { + position: relative; + width: auto; + .product-item-photo { + position: absolute; + left: 0; + top: 0; + } + } + &-name { + margin-top: 0; + } + &-details { + margin: 0 0 0 85px; + } + &-actions { + display: block; + margin-top: @indent-s-base; + } + } + .price-box { + display: block; + font-weight: @font-weight-semibold; + margin: 7px 0; + } + .text { + margin-right: 8px; + } + .counter { + color: @color-primary-lighter; + font-size: 12px; + white-space: nowrap; + } + .minilist { + .price { + display: inline; + padding: 0; + } + .weee:before { + display: inline-block; + } + } + } + .action { + &.delete { + &:extend(.abstract-remove-button-for-blocks all); + position: absolute; + right: 0; + top: 0; + } + } + .subtitle { + &:extend(.abstract-no-display all); + } + + // + // Product images only + //-------------------------------------- + .product-items-images { + &:extend(.abstract-add-clearfix all); + margin-left: -@indent-xs-base; + .product-item { + &:extend(.abstract-add-box-sizing all); + float: left; + padding-left: @indent-xs-base; + } + } + + // + // Product names only + //-------------------------------------- + .product-items-names { + .product-item { + margin-bottom: @indent-s-base; + } + .product-item-name { + margin: 0; + } + } +} + // // Mobile //-------------------------------------- @@ -338,6 +425,59 @@ } } } + .sidebar { + .product-items { + .product-item { + &-info { + .product-item-photo { + position: relative; + left: auto; + top: auto; + float: left; + margin: 0 @indent-s-base @indent-s-base 0; + } + } + &-details { + margin: 0; + } + &-actions { + clear: left; + } + } + } + } + + .product-add-form { + &:extend(.abstract-revert-field-type-desktop all); + } + + .table-wrapper.comparison { + .table-overflow(); + } +} + +// +// Desktop large +//-------------------------------------- +.responsive(@break) when (@break = @screen-xl) { + .sidebar { + .product-items { + .product-item { + &-info { + .product-item-photo { + float: none; + margin: 0; + position: absolute; + left: 0; + top: 0; + } + } + &-details { + margin-left: 85px; + } + } + } + } } // @@ -402,15 +542,6 @@ } } -// -// Desktop -//-------------------------------------- -.responsive(@break) when (@break = @screen-m) { - .product-add-form { - &:extend(.abstract-revert-field-type-desktop all); - } -} - // // Compare Products Page //-------------------------------------- @@ -526,41 +657,31 @@ body.catalog-product-compare-index { top: 0; left: 0; width: auto; - background: #fff; + background: @page-bg-color; } -.block.compare { - .item { - position: relative; - .product.name { - margin-left: 22px; - } - .action.delete { +.block-compare { + .block-title { + &:extend(.abstract-block-title all); + } + .product-item .product-item-name { + margin-left: 22px; + } + .action { + &.delete { &:extend(.abstract-remove-button-for-blocks all); position: absolute; left: -6px; top: 0; } + &.compare { + &:extend(.abstract-revert-secondary-color all); + } } - .text { - margin-right: 8px; - } - .counter.qty { - color: #999999; - font-size: 12px; - white-space: nowrap; + .counter { + &:extend(.abstract-block-items-counter all); } .actions-toolbar { - margin: 17px 0; - max-width: 178px; - } -} - -// -// Desktop -//-------------------------------------- -.responsive(@break) when (@break = @screen-m) { - .table-wrapper.comparison { - .table-overflow(); + margin: 17px 0 0; } } diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/toolbar.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/toolbar.less index 23b02a0b1cedfe36dfb03960bac626d1d29424a7..16e29bb4d4cea7f68b7d628ae09ce8e10773d5b8 100644 --- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/toolbar.less +++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/toolbar.less @@ -58,6 +58,9 @@ } .limiter { display: none; + .control { + display: inline-block; + } } } } diff --git a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/widgets.less b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/widgets.less index ce46bfbe12765c03dd2a02f299004f6b2a65c726..bc2266339ac819f4dc54a9cc78f94a171eed6050 100644 --- a/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/widgets.less +++ b/app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/widgets.less @@ -33,16 +33,50 @@ div.widget.category.link { &:extend(.abstract-margin-for-blocks-and-widgets all); } -.block.widget.new { +.block.widget { + .product-item-info { + width: auto; + } .pager { - padding: @indent-s-base; - background: @panel-bg; - margin-bottom: @indent-xl-base; - text-align: center; - .pages { + padding: 0; + .toolbar-amount { + float: none; + .font-size(12); + } + .pages-item-previous { + padding-left: 0; + } + .pages-item-next { + position: relative; } - .amount { - margin: 0 0 7px; + .items { + white-space: nowrap; + } + } +} + +.responsive(@break) when (@break = @screen-s) { + .block.widget .products-grid .product-item, + .layout-1 .block.widget .products-grid .product-item, + .layout-3 .block.widget .products-grid .product-item { width: 100%/3 } +} +.responsive(@break) when (@break = @screen-m) { + .block.widget .products-grid .product-item{ width: 100%/3 } + .layout-1 .block.widget .products-grid .product-item { width: 100%/4 } + .layout-3 .block.widget .products-grid .product-item { width: 100%/2 } +} +.responsive(@break) when (@break = @screen-l) { + .block.widget .products-grid .product-item { width: 100%/5 } + .layout-1 .block.widget .products-grid .product-item { width: 100%/6 } + .layout-3 .block.widget .products-grid .product-item { width: 100%/4 } + .block.widget .products-grid .product-items { margin: 0; } + .block.widget .products-grid .product-item { + width: 100%/4; + width: 200px; + margin-left: calc(~"(100% - 4 * 200px) / 3"); + padding: 0; + &:nth-child(4n+1) { + margin-left: 0; } } } @@ -51,12 +85,14 @@ div.widget.category.link { // Desktop //-------------------------------------- .responsive(@break) when (@break = @screen-m) { - .block.widget.new { - .pager { - text-align: left; - .amount { - float: right; - margin: 7px 0 0; + .sidebar .block.widget .pager { + .item:not(.pages-item-next):not(.pages-item-previous) { + &:extend(.abstract-no-display-desktop all); + } + .pages-item-next { + padding: 0; + .action { + margin: 0; } } } diff --git a/app/design/frontend/Magento/blank/Magento_CatalogSearch/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_CatalogSearch/web/css/source/module.less index 1d5e06c29b0260f4d0b669233e5f365373f0a0ea..2f16064257d2fe77c42a9e2e85c504288d5045d0 100644 --- a/app/design/frontend/Magento/blank/Magento_CatalogSearch/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_CatalogSearch/web/css/source/module.less @@ -44,10 +44,6 @@ ); display: inline-block; float: right; - &:active, - &:focus { - outline: none !important; - } } .action.search { display: none; @@ -196,7 +192,6 @@ ); .button-reset(); &:focus { - outline: none; &:before { color: #333; } diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/layout/checkout_cart_index.xml b/app/design/frontend/Magento/blank/Magento_Checkout/layout/checkout_cart_index.xml index 00c4f37dc87b8b1ce9c973786e1cb2bcbdd96aaf..116127da26696b7a294bd920c53b6ff4017e9425 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/layout/checkout_cart_index.xml +++ b/app/design/frontend/Magento/blank/Magento_Checkout/layout/checkout_cart_index.xml @@ -26,7 +26,7 @@ <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="checkout.cart.items"> - <container name="checkout.cart.container" label="invisible" htmlTag="div" htmlClass="cart-container" before="-"> + <container name="checkout.cart.container" htmlTag="div" htmlClass="cart-container" before="-"> <container name="cart.summary" label="Cart Summary Container" htmlTag="div" htmlClass="cart-summary" after="-"> <block class="Magento\Framework\View\Element\Template" name="checkout.cart.summary.title" before="-" template="Magento_Core::text.phtml"> <arguments> diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/cart.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/cart.less index 91735dce9d30b3f3cef19333ef6a836b12724877..83685ab682c584a5d5403d88397899eae659baf0 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/cart.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/cart.less @@ -99,6 +99,14 @@ } } } + .fieldset.estimate { + >.legend { + &:extend(.abstract-visually-hidden all); + } + >.legend + br { + &:extend(.abstract-no-display all); + } + } } .actions-toolbar { > .primary { @@ -203,9 +211,12 @@ } &.qty { .input-text { - margin-top: -3px; + margin-top: -5px; width: 45px; } + .label { + &:extend(.abstract-visually-hidden all); + } } } .item { @@ -217,7 +228,7 @@ .col { &.item { display: block; - padding: 25px 70px 10px 75px; + padding: 25px 0 10px 75px; position: relative; min-height: 75px; } @@ -256,10 +267,7 @@ width: 100%; } &-item-details { - display: table-cell; - vertical-align: top; white-space: normal; - width: 99%; } &-item-name { display: inline-block; @@ -272,55 +280,26 @@ // Product options .item-options { font-size: @font-size-s; - margin-top: @indent-s-base; margin-bottom: @indent-s-base; &:extend(.abstract-product-options-list all); &:extend(.abstract-add-clearfix all); } + + .product-item-name + .item-options { + margin-top: @indent-s-base; + } + .product-image-wrapper { &:extend(.abstract-reset-image-wrapper all); } + .action.configure { + display: inline-block; + margin: 0 0 @indent-base; + } } &-container { - .form.cart { - .actions.main { - text-align: center; - } - .action { - &.continue { - .link-as-button(); - .button( - @_button-padding: 7px 15px 7px 0, - @_button-icon-use: true, - @_button-font-content: @icon-prev, - @_button-icon-font-size: 32px, - @_button-icon-font-line-height: 16px, - @_button-icon-font-position: before - ); - border-radius: 3px; - font-weight: bold; - &:active { - box-shadow: inset 0 3px 1px rgba(0,0,0,.29); - } - } - &.update { - .button-icon( - @icon-update, - @_icon-font-size: 32px, - @_icon-font-line-height: 16px - ); - padding-left: 5px; - } - &.update, - &.continue, - &.clear { - margin: 0 auto 10px; - } - &.update, - &.clear { - display: block; - } - } + .form-cart { + &:extend(.abstract-shopping-cart-items all); } .checkout-methods-items { &:extend(.abstract-reset-list all); @@ -394,25 +373,8 @@ .cart { &-container { &:extend(.abstract-add-clearfix-desktop all); - .form.cart { - float: left; - width: 73%; - position: relative; - .actions { - text-align: left; - } - .action { - &.continue { - float: left; - } - &.update { - float: right; - } - &.clear { - float: right; - margin-right: 10px; - } - } + .form-cart { + &:extend(.abstract-shopping-cart-items-desktop all); } .widget { float: left; @@ -451,13 +413,21 @@ text-align: right; } } - .product-item-photo { - display: table-cell; - padding-right: 20px; - vertical-align: top; - width: 1%; - position: static; - max-width: 100%; + .product { + &-item-photo { + display: table-cell; + padding-right: 20px; + vertical-align: top; + width: 1%; + position: static; + max-width: 100%; + } + &-item-details { + display: table-cell; + vertical-align: top; + white-space: normal; + width: 99%; + } } } } diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/minicart.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/minicart.less index 22e40949327f2034f2c6e1af82a1ea0cd239468a..00cbefcc616111c5fa9d92d0ac9b9561fccb8b49 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/minicart.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/minicart.less @@ -160,7 +160,7 @@ &:extend(.abstract-reset-image-wrapper all); } .product { - &.photo { + &-item-photo { float: left; } &-item-name { @@ -174,7 +174,7 @@ color: @link-color; } } - &.details { + &-item-details { padding-left: 88px; .price { font-weight: @font-weight-bold; diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module.less index b3aaeb647954e8bb43d50c289e52882e97391a30..6242519ebf8a197b33fd733522ee36e1b58333c7 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module.less @@ -90,6 +90,30 @@ margin: 0; } } + .legend.payments-title { + &:extend(.abstract-visually-hidden all); + } + } + .methods-shipping { + .item-content { + .fieldset { + > .legend { + &:extend(.abstract-visually-hidden all); + } + > .legend + br { + &:extend(.abstract-no-display all); + } + > .field { + margin: 20px 0 0; + &:before { + display: none; + } + .control { + display: inline-block; + } + } + } + } } .form { .form-hasrequired(bottom); @@ -118,6 +142,16 @@ } } + .step-content { + .field.street { + .field.additional { + .label { + &:extend(.abstract-visually-hidden all); + } + } + } + } + .opc-payment-additional { margin: 0 0 5px; + .opc-payment { diff --git a/app/design/frontend/Magento/blank/Magento_Customer/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Customer/web/css/source/module.less index b39de5b6008cc269d6b3629b1867a0dba66175d8..2b68a6603247b54a9f54d9664eddf58a95cc668e 100644 --- a/app/design/frontend/Magento/blank/Magento_Customer/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Customer/web/css/source/module.less @@ -98,6 +98,11 @@ width: auto; } } + .limiter { + >.label { + &:extend(.abstract-visually-hidden all); + } + } .block:not(.widget) { &:extend(.abstract-account-blocks all); } @@ -124,6 +129,16 @@ } } +// checkout address (create shipping address) +.field.street { + .field.additional { + .label { + &:extend(.abstract-visually-hidden all); + } + } +} + + // // Blocks & Widgets //-------------------------------------- diff --git a/app/design/frontend/Magento/blank/Magento_Downloadable/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Downloadable/web/css/source/module.less index 9668329f8303dc7dc84fd3ba2165bc7da34e7335..8578b5782042ee61c33c1777a7b926f9d540308b 100644 --- a/app/design/frontend/Magento/blank/Magento_Downloadable/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Downloadable/web/css/source/module.less @@ -71,6 +71,13 @@ display: none!important; } } + .product-options-wrapper { + .fieldset { + .legend.links-title { + &:extend(.abstract-visually-hidden all); + } + } + } } // diff --git a/app/design/frontend/Magento/blank/Magento_Multishipping/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Multishipping/web/css/source/module.less index 3a25ffa50c91a1ce69b85f7f111a8e7c9e7586b9..7fc6c502bcc4f294543127490f6f6e18a422fc45 100644 --- a/app/design/frontend/Magento/blank/Magento_Multishipping/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Multishipping/web/css/source/module.less @@ -42,6 +42,14 @@ text-align: center; width: 45px; } + .label { + &:extend(.abstract-visually-hidden all); + } + } + &.address { + .label { + &:extend(.abstract-visually-hidden all); + } } &.item { .action.edit { @@ -100,6 +108,27 @@ .block { &:extend(.abstract-add-clearfix all); + + .methods-shipping { + .item-content { + .fieldset { + > .legend { + &:extend(.abstract-visually-hidden all); + } + > .legend + br { + &:extend(.abstract-no-display all); + } + > .field { + &:before { + display: none; + } + .control { + display: inline-block; + } + } + } + } + } } .block-title, @@ -154,6 +183,15 @@ } } + .box-billing-method { + .fieldset { + margin: 0; + .legend.box-title { + margin: 0 0 5px; + } + } + } + .hidden { &:extend(.abstract-no-display all); } diff --git a/app/design/frontend/Magento/blank/Magento_RecurringPayment/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_RecurringPayment/web/css/source/module.less index a82b30a271c4c5ab16deb41b2ce1eb4117a55693..3b4a30ec9cb442f9b42942002a6629aa35bfe865 100644 --- a/app/design/frontend/Magento/blank/Magento_RecurringPayment/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_RecurringPayment/web/css/source/module.less @@ -28,3 +28,74 @@ margin: 0 0 5px; } } + +.items-info-tabs { + border-bottom: @border-width-base solid @border-color-base; + margin-bottom: 10px; + .item { + display: inline-block; + margin-right: 20px; + } +} + +.order-recurring-details { + > .actions-toolbar { + margin: 0 0 @indent-base; + } +} + +.order-recurring-details-item { + margin-bottom: 40px; + padding: 10px; + .table.data { + .table-resize( + @_td-padding-left: 0, + @_td-padding-right: 0 + ); + } +} + + +// +// Mobile +//-------------------------------------- +.responsive-smaller(@break) when (@break = @screen-xs) { + .table-recurring-payments { + td { + &:first-child { + span { + display: block; + } + } + } + } +} + +.responsive-smaller(@break) when (@break = @screen-s) { + .table-wrapper.recurring-payments { + &:extend(.abstract-account-table-border all); + } + .order-recurring-details { + .order-recurring-details-item { + padding: 10px 0; + .table.data { + .table-resize( + @_td-padding-left: 0, + @_td-padding-right: 0 + ); + th, + td { + &:before { + padding-right: 0; + } + } + } + } + } +} + +// +// Desktop +//-------------------------------------- +.responsive(@break) when (@break = @screen-m) { +} \ No newline at end of file diff --git a/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/module.less index 6f647382de2b010f10f2b4023845c83cfedb9f80..fe6d03ac1c8d2227846a10d6d9855d0dcc424cfe 100644 --- a/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Sales/web/css/source/module.less @@ -130,13 +130,25 @@ } } -.block.reorder { - .item { +.block-reorder { + .block-title { + &:extend(.abstract-block-title all); + } + .product-item { .checkbox { position: relative; top: 2px; vertical-align: baseline; } + .label { + &:extend(.abstract-visually-hidden all); + } + .field.item { + display: inline-block; + } + } + .product-item-name { + display: inline-block; } .actions-toolbar { margin: 17px 0; @@ -144,7 +156,7 @@ } .sidebar-main & .subtitle, .sidebar-additional & .subtitle { - display: none; + &:extend(.abstract-no-display all); } } diff --git a/app/design/frontend/Magento/blank/Magento_Theme/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Theme/web/css/source/module.less index 180d1f20051848ab9511f62545e01bd8918c1e7c..1315cd91a95631f0fcf4d92ba806bd2b5b7c7f17 100644 --- a/app/design/frontend/Magento/blank/Magento_Theme/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Theme/web/css/source/module.less @@ -218,12 +218,7 @@ body { max-width: 100%; } .block-title { - strong { - display: inline-block; - font-size: ceil((@font-size-base * 1.28)); // 18px - font-weight: @font-weight-light; - margin: 0 0 @indent-base; - } + &:extend(.abstract-block-title all); } } diff --git a/app/design/frontend/Magento/blank/Magento_Wishlist/web/css/source/module.less b/app/design/frontend/Magento/blank/Magento_Wishlist/web/css/source/module.less index 7ab662f736630b4b245b0ef02917abd53792363d..210b3551cac25adf8bc4efe50af2a3402fc236cf 100644 --- a/app/design/frontend/Magento/blank/Magento_Wishlist/web/css/source/module.less +++ b/app/design/frontend/Magento/blank/Magento_Wishlist/web/css/source/module.less @@ -92,60 +92,15 @@ } } -.block.wishlist { - .item.product { - margin-bottom: 14px; - > .product { - position: relative; - .product.photo { - position: absolute; - left: 0; - top: 0; - } - .product.details { - margin: 0 25px 0 64px; - padding: 0; - } - } - } - .price-box { - display: block; - margin: 7px 0; - } - .actions { - margin: 7px 0; - .action.delete { - &:extend(.abstract-remove-button-for-blocks all); - position: absolute; - right: 0; - top: 0; - } - a.action.tocart { - .link-as-button(); - } +.block-wishlist { + .block-title { + &:extend(.abstract-block-title all); } - .text { - margin-right: 8px; + .counter { + &:extend(.abstract-block-items-counter all); } - .counter.qty { - color: #999; - font-size: 12px; - white-space: nowrap; - } - .sidebar-main &, - .sidebar-additional & { - .subtitle { - display: none; - } - } - .minilist { - .price { - display: inline; - padding: 0; - } - .weee:before { - display: inline-block; - } + .product-item-name { + margin-right: @indent-m-base; } } @@ -166,6 +121,11 @@ } &-tooltip { } + .comment-box { + .label { + &:extend(.abstract-visually-hidden all); + } + } &-comment { display: block; margin: @indent-s-base 0; @@ -188,6 +148,7 @@ } } } + // // Mobile //-------------------------------------- @@ -201,7 +162,7 @@ position: relative; border-bottom: 1px solid @color-secondary; &:first-child { - border-top: 1px solid @color-secondary; + border-top: 1px solid @color-secondary; } &-info { } @@ -258,7 +219,22 @@ } } } + + // + // Grid view for wishlist + //-------------------------------------- + .wishlist-index-index { + .product { + &-item { + width: 100%; + &-info { + width: auto; + } + } + } + } } + // // Desktop //-------------------------------------- @@ -300,32 +276,6 @@ } } } -} - -// -// Grid view for wishlist -//-------------------------------------- -// -// Mobile -//-------------------------------------- -.responsive-smaller(@break) when (@break = @screen-m) { - .wishlist-index-index { - .product { - &-item { - width: 100%; - &-info { - width: auto; - } - } - } - } - -} - -// -// Desktop -//-------------------------------------- -.responsive(@break) when (@break = @screen-m) { .wishlist-index-index { .product { &-item { diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json index 4bd7756956f05c410c74f8dcd558d774d73c4b95..08082d03c50e0fae001ef8aae20b961917fd7db6 100644 --- a/app/design/frontend/Magento/blank/composer.json +++ b/app/design/frontend/Magento/blank/composer.json @@ -3,11 +3,11 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-theme", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/design/frontend/Magento/blank/etc/view.xml b/app/design/frontend/Magento/blank/etc/view.xml index 687d5e3514b2ccee450e55599081cf4545e23e44..a1df13023b5ceed8421ce62b819872950c11c469 100644 --- a/app/design/frontend/Magento/blank/etc/view.xml +++ b/app/design/frontend/Magento/blank/etc/view.xml @@ -85,29 +85,29 @@ <var name="product_page_more_views:height">90</var> <var name="side_column_widget_product_thumbnail:type">thumbnail</var> - <var name="side_column_widget_product_thumbnail:width">50</var> - <var name="side_column_widget_product_thumbnail:ratio">1</var> - <var name="side_column_widget_product_thumbnail:height">50</var> + <var name="side_column_widget_product_thumbnail:width">75</var> + <var name="side_column_widget_product_thumbnail:ratio">0.8</var> + <var name="side_column_widget_product_thumbnail:height">90</var> <var name="new_products_content_widget_list:type">small_image</var> - <var name="new_products_content_widget_list:width">166</var> + <var name="new_products_content_widget_list:width">270</var> <var name="new_products_content_widget_list:ratio">1</var> - <var name="new_products_content_widget_list:height">166</var> + <var name="new_products_content_widget_list:height">270</var> <var name="new_products_content_widget_grid:type">small_image</var> - <var name="new_products_content_widget_grid:width">166</var> + <var name="new_products_content_widget_grid:width">220</var> <var name="new_products_content_widget_grid:ratio">1</var> - <var name="new_products_content_widget_grid:height">166</var> + <var name="new_products_content_widget_grid:height">220</var> <var name="recently_compared_products_images_names_widget:type">thumbnail</var> - <var name="recently_compared_products_images_names_widget:width">50</var> - <var name="recently_compared_products_images_names_widget:ratio">1</var> - <var name="recently_compared_products_images_names_widget:height">50</var> + <var name="recently_compared_products_images_names_widget:width">75</var> + <var name="recently_compared_products_images_names_widget:ratio">0.8</var> + <var name="recently_compared_products_images_names_widget:height">90</var> <var name="recently_viewed_products_images_names_widget:type">small_image</var> - <var name="recently_viewed_products_images_names_widget:width">50</var> - <var name="recently_viewed_products_images_names_widget:ratio">1</var> - <var name="recently_viewed_products_images_names_widget:height">50</var> + <var name="recently_viewed_products_images_names_widget:width">75</var> + <var name="recently_viewed_products_images_names_widget:ratio">0.8</var> + <var name="recently_viewed_products_images_names_widget:height">90</var> <var name="recently_compared_products_images_only_widget:type">thumbnail</var> <var name="recently_compared_products_images_only_widget:width">76</var> @@ -125,24 +125,24 @@ <var name="bundled_product_customization_page:height">140</var> <var name="recently_compared_products_grid_content_widget:type">small_image</var> - <var name="recently_compared_products_grid_content_widget:width">135</var> + <var name="recently_compared_products_grid_content_widget:width">220</var> <var name="recently_compared_products_grid_content_widget:ratio">1</var> - <var name="recently_compared_products_grid_content_widget:height">135</var> + <var name="recently_compared_products_grid_content_widget:height">220</var> <var name="recently_compared_products_list_content_widget:type">small_image</var> - <var name="recently_compared_products_list_content_widget:width">166</var> + <var name="recently_compared_products_list_content_widget:width">270</var> <var name="recently_compared_products_list_content_widget:ratio">1</var> - <var name="recently_compared_products_list_content_widget:height">166</var> + <var name="recently_compared_products_list_content_widget:height">207</var> <var name="recently_viewed_products_grid_content_widget:type">small_image</var> - <var name="recently_viewed_products_grid_content_widget:width">135</var> + <var name="recently_viewed_products_grid_content_widget:width">220</var> <var name="recently_viewed_products_grid_content_widget:ratio">1</var> - <var name="recently_viewed_products_grid_content_widget:height">135</var> + <var name="recently_viewed_products_grid_content_widget:height">220</var> <var name="recently_viewed_products_list_content_widget:type">small_image</var> - <var name="recently_viewed_products_list_content_widget:width">166</var> + <var name="recently_viewed_products_list_content_widget:width">270</var> <var name="recently_viewed_products_list_content_widget:ratio">1</var> - <var name="recently_viewed_products_list_content_widget:height">166</var> + <var name="recently_viewed_products_list_content_widget:height">270</var> <var name="customer_shared_wishlist:type">small_image</var> <var name="customer_shared_wishlist:width">113</var> @@ -155,9 +155,9 @@ <var name="wishlist_thumbnail:height">200</var> <var name="wishlist_sidebar_block:type">thumbnail</var> - <var name="wishlist_sidebar_block:width">50</var> - <var name="wishlist_sidebar_block:ratio">1</var> - <var name="wishlist_sidebar_block:height">50</var> + <var name="wishlist_sidebar_block:width">75</var> + <var name="wishlist_sidebar_block:ratio">0.8</var> + <var name="wishlist_sidebar_block:height">90</var> <var name="shared_wishlist_email:type">small_image</var> <var name="shared_wishlist_email:width">135</var> @@ -194,9 +194,9 @@ <var name="new_products_images_only_widget:ratio">1</var> <var name="new_products_images_only_widget:height">78</var> - <var name="cart_page_product_thumbnail:type">thumbnail</var> + <var name="cart_page_product_thumbnail:type">small_image</var> <var name="cart_page_product_thumbnail:width">110</var> - <var name="cart_page_product_thumbnail:ratio">1</var> + <var name="cart_page_product_thumbnail:ratio">0.7</var> <var name="cart_page_product_thumbnail:height">160</var> <var name="product_stock_alert_email_product_image:type">small_image</var> diff --git a/app/design/frontend/Magento/blank/theme.xml b/app/design/frontend/Magento/blank/theme.xml index c0df4cc5bb46648db61e6218b31ccd84dcd264aa..777b5718e97b5c0a55bd06dc82bcc2cb28a681f7 100644 --- a/app/design/frontend/Magento/blank/theme.xml +++ b/app/design/frontend/Magento/blank/theme.xml @@ -24,7 +24,7 @@ --> <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Blank</title> - <version>0.1.0-alpha102</version> + <version>0.1.0-alpha103</version> <media> <preview_image>media/preview.jpg</preview_image> </media> diff --git a/app/design/frontend/Magento/blank/web/css/source/abstract.less b/app/design/frontend/Magento/blank/web/css/source/abstract.less index e64e35a527d6901759fa9c89d3e9748a547742fd..28af65406866a0a05c14f6f46e5c89081066ddae 100644 --- a/app/design/frontend/Magento/blank/web/css/source/abstract.less +++ b/app/design/frontend/Magento/blank/web/css/source/abstract.less @@ -802,6 +802,12 @@ } } +.responsive(@break) when (@break = @screen-m) { + .abstract-no-display-desktop { + display: none; + } +} + // // Status //-------------------------------------- @@ -863,3 +869,79 @@ } } } + +// +// Items counter in blocks +//-------------------------------------- +.abstract-block-items-counter { + color: @color-primary-lighter; + .font-size(12px); + white-space: nowrap; +} + +// +// Shopping cart items +//-------------------------------------- +.abstract-shopping-cart-items { + .actions.main { + text-align: center; + } + .action { + &.continue { + .link-as-button(); + .button( + @_button-padding: 7px 15px 7px 0, + @_button-icon-use: true, + @_button-font-content: @icon-prev, + @_button-icon-font-size: 32px, + @_button-icon-font-line-height: 16px, + @_button-icon-font-position: before + ); + border-radius: 3px; + font-weight: bold; + &:active { + box-shadow: inset 0 3px 1px rgba(0,0,0,.29); + } + } + &.update { + .button-icon( + @icon-update, + @_icon-font-size: 32px, + @_icon-font-line-height: 16px + ); + padding-left: 5px; + } + &.update, + &.continue, + &.clear { + margin: 0 auto 10px; + } + &.update, + &.clear { + display: block; + } + } +} + +.responsive(@break) when (@break = @screen-m) { + .abstract-shopping-cart-items-desktop { + float: left; + width: 73%; + position: relative; + .actions { + text-align: left; + } + .action { + &.continue { + float: left; + } + &.update { + float: right; + } + &.clear { + float: right; + margin-right: 10px; + } + } + } +} diff --git a/app/design/frontend/Magento/blank/web/js/theme.js b/app/design/frontend/Magento/blank/web/js/theme.js index ac65a67ce498c846390cbdeb8daa362f9ebd70cb..decc93e7ecbc13d771ef943742e9d93f1397e679 100644 --- a/app/design/frontend/Magento/blank/web/js/theme.js +++ b/app/design/frontend/Magento/blank/web/js/theme.js @@ -22,8 +22,9 @@ */ define([ "jquery", + 'mage/smart-keyboard-handler', "jquery/ui" -],function($) { +],function($, keyboardHandler) { 'use strict'; $(function() { @@ -42,6 +43,8 @@ define([ } $( ".panel.header > .header.links" ).clone().appendTo( "#store\\.links" ); + + keyboardHandler.init(); }); }); diff --git a/app/design/frontend/Magento/plushe/composer.json b/app/design/frontend/Magento/plushe/composer.json index 128997e1ad1258311afeac3192b74540b2b7160f..c261261089081e97384294959d3cdebd80abeee5 100644 --- a/app/design/frontend/Magento/plushe/composer.json +++ b/app/design/frontend/Magento/plushe/composer.json @@ -3,12 +3,12 @@ "description": "N/A", "require": { "php": "~5.4.11|~5.5.0", - "magento/theme-frontend-blank": "0.1.0-alpha102", - "magento/framework": "0.1.0-alpha102", + "magento/theme-frontend-blank": "0.1.0-alpha103", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-theme", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "extra": { "map": [ [ diff --git a/app/design/frontend/Magento/plushe/theme.xml b/app/design/frontend/Magento/plushe/theme.xml index 3e51f53e2a125e08e692b3b102ac3a650ee1c54b..2bafb85bb0e546bddc67c9317cea8fad1ad5f1f4 100644 --- a/app/design/frontend/Magento/plushe/theme.xml +++ b/app/design/frontend/Magento/plushe/theme.xml @@ -24,7 +24,7 @@ --> <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Magento Plushe</title> - <version>0.1.0-alpha102</version> + <version>0.1.0-alpha103</version> <parent>Magento/blank</parent> <media> <preview_image>media/preview.jpg</preview_image> diff --git a/app/design/install/Magento/basic/theme.xml b/app/design/install/Magento/basic/theme.xml deleted file mode 100644 index f9a39ea71075458a6dd0524dd382c5b255eb23e1..0000000000000000000000000000000000000000 --- a/app/design/install/Magento/basic/theme.xml +++ /dev/null @@ -1,28 +0,0 @@ -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> - <title>Magento Basic</title> - <version>0.1.0-alpha102</version> -</theme> diff --git a/app/design/install/Magento/basic/web/css/boxes.css b/app/design/install/Magento/basic/web/css/boxes.css deleted file mode 100644 index 534558699b8a9138a94fc6efc277f77425c00b60..0000000000000000000000000000000000000000 --- a/app/design/install/Magento/basic/web/css/boxes.css +++ /dev/null @@ -1,372 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/*******************************************************/ -/***********[ Magento_CSS_B Common Elements ]***********/ -/*******************************************************/ - - -/********************** Columns */ - -/* All */ -.col2-set, .col3-set, .col4-set, .col5-set { clear:both; } - -/* Col2 */ -.col2-set .col-1, .col2-set .col-2 { width:48.5%; } -.col2-set .col-1 { float:left; } -.col2-set .col-2 { float:right;} - -/* Col2-alt */ -.col2-alt-set .col-1 { width:32%; } -.col2-alt-set .col-2 { width:65%; } -.col2-alt-set .col-1 { float:left; } -.col2-alt-set .col-2 { float:right;} - -/* Col3 */ -.col3-set .col-1, .col3-set .col-2, .col3-set .col-3 { float:left; width:31.3%; } -.col3-set .col-1, .col3-set .col-2 { margin-right:3%; } - -/* Col4 */ -.col4-set .col-1, .col4-set .col-2, .col4-set .col-3, .col4-set .col-4 { float:left; width:22%; } -.col4-set .col-1, .col4-set .col-2, .col4-set .col-3 { margin-right:4%; } - -/* Table Columns */ -table .col-1, table .col-2, table .col-3, table .col-4 { float:none !important; margin:0 !important; } -.col3-set td.spacer { width:3%; } -.col4-set td.spacer { width:4%; } - - - -/********************** Form */ - -/* Form Elements */ -input.input-text, select, textarea { border:1px solid #b6b6b6; font:12px arial, helvetica, sans-serif; } -option, optgroup { font:12px arial, helvetica, sans-serif; } -optgroup { font-weight:bold; } -input.input-text, textarea { padding:2px; } -input.radio, -input.checkbox { margin-right:5px; } -.qty { width:2.5em; } -.group-select label, .form-list label, .payment-methods label { font-weight:bold;} -.button-set { /* Container for form buttons*/ - clear:both; - margin-top:4em; - border-top:1px solid #e4e4e4; - padding-top:8px; - text-align:right; - } -.form-button, .form-button-alt { - overflow:visible; - width:auto; - padding:1px 8px; - background:#f18200; - color:#fff; - border:1px solid #de5400; - font:bold 12px arial, sans-serif !important; - cursor:pointer; - text-align:center; - vertical-align:middle; - } -.form-button span, .form-button-alt span { - white-space:nowrap; - } -.form-button-alt { - border:1px solid #406a83; - background-color:#618499; - } - - -/* Form lists */ -.form-list li { margin-bottom:6px; } -.form-list li .input-box .input-text, .form-list li .input-box textarea { width:250px; } -.form-list li .input-box select { width:256px;} - -.group-select { - margin:28px 0; - border:1px solid #bbafa0; - padding:22px 25px 12px 25px; - background:#fbfaf6; - } -.group-select .legend { - margin-top:-33px; - float:left; - border:1px solid #f19900; - background:#F9F3E3; - padding:0 8px; - color:#E76200; - font-weight:bold; - font-size:1.1em; - } -.group-select li { padding:4px 8px !important; } -.group-select li .input-box { float:left; width:275px; } -.group-select li .input-text, .group-select li select, .group-select li textarea { width:525px; } -.group-select li .input-box .input-text, .group-select li .input-box textarea { width:250px; } -.group-select li .input-box select { width:256px;} - - -/* Form Messages */ -.validation-advice, .required { color:#EB340A; } -.validation-advice { - clear:both; - min-height:15px; - margin-top:3px; - background:url(../images/validation_advice_bg.gif) no-repeat 2px 1px; - padding-left:17px; - font-size:.95em; - font-weight:bold; - line-height:1.25em; - } -.validation-failed { - border:1px dashed #EB340A !important; - background:#faebe7 !important; - } -label.required { - font-weight:bold; - } -p.required { - font-size:.95em; - text-align:right; - } - - -/********************** Messages */ -.messages { width:100%; overflow:hidden; text-align:left; margin-top:10px; } -.messages .message { padding:10px 17px; position:relative; } -.messages .message a { text-decoration:underline; } -.messages .message a:hover { text-decoration:none; } - -.messages .message.error, -.messages .message.success, -.messages .message.note, -.messages .message.notice { border-style:solid !important; border-width:1px !important; font-size:12px !important; } - -.messages .message.error { border-color:#e9581f; background-color:#fff5f3; color:#d91a00; } -.messages .message.error a { color:#d91a00; } - -.messages .message.success { border-color:#446423; background-color:#eff5ea; color:#3d6611; } -.messages .message.success a { color:#3d6611; } - -.messages .message.note, -.messages .message.notice { border-color:#fcd344; background-color:#fafaec; color:#3d6611; } -.messages .message.note a, -.messages .message.notice a { color:#3d6611; } - - -/********************** Headings */ - -.head, .inner-head { line-height:1.25em; text-align:right; } -.head h1,.head h2, .head h3, .head h4, .head h5, -.inner-head h1,.inner-head h2, .inner-head h3, .inner-head h4, .inner-head h5{ margin:0; float:left; } - - -/* Page heading */ -.page-head { margin:0 0 25px 0; border-bottom:1px solid #ccc; } -.page-head-alt { margin:0 0 12px 0; } -.page-head, .page-head-alt { text-align:right; } -.page-head h3, .page-head-alt h3 { - margin:0; - font-size:1.7em !important; - font-weight:normal !important; - text-transform:none !important; - text-align:left; - } -.button-level h3 { /* heading level with buttons */ - float:left; - width:60%; - } - - -/* Category list heading */ -.category-head { - margin-bottom:7px; - } -.category-head h2 { - margin:0; - padding:3px 0; - color:#0a263c; - font-size:1.6em; - line-height:1.3em; - font-weight:normal; - } - - - - -/********************** Lists */ -.disc { margin-bottom:10px; } -.disc li { margin-left:20px; list-style:disc; } - - -/* Bare List */ /* Unstyled list */ -.bare-list { margin:5px 0; } -.bare-list li { margin:3px 0; } - - - -/********************** Space Creators */ - -.no-show { display:none; } -.no-wrap { white-space:nowrap; } -.content-box { min-height:250px; } /* Set minimum height for visual presentation */ -.content { padding:12px 12px 12px 15px; } /* Sets default padding */ -.actions { line-height:1.3em; } -.separator { padding:0 5px;} -.pipe { padding:0 4px; font-size:.95em; } -.divider { - margin:10px 0; - height:1px; - font-size:1px; - line-height:1em; - overflow:hidden; - } - - - - -/***************************************************************/ -/********************[ Magento_CSS_C Layout]********************/ -/***************************************************************/ - - -/********************** Base Layout */ - -/* Structure */ -.header { text-align:left; } -.header-top { width:930px; margin:0 auto; } -.header-nav { width:950px; margin:0 auto; } -.middle { min-height:400px; width:900px; margin:0 auto; text-align:left; position:relative; } -.side-col { width:195px; } -.col-left { float:left; } -.col-main { float:left; } -.col-right { float:right; } -.col-1-layout .col-main { float:none; margin:0; } -.col-2-right-layout .col-main { float:left; width:685px; } -.col-2-left-layout .col-main { float:right; width:685px; } -.col-3-layout .col-main { width:475px; margin-left:17px; } - -/* Style */ -.header { border-top:5px solid #0d2131; } -.header-top-container { border-bottom:1px solid #415966; background:url(../images/header_top_container_bg.jpg) repeat-x 50% 0; } -.header-top { padding:10px 10px 20px; } -.header-nav-container { background:#0a263d; } -.middle-container { background:url(../images/main_container_bg.gif) no-repeat 50% 0 #fbfaf6; } -.middle { background:url(../images/main_bg.gif) no-repeat #fffffe; padding:25px 25px 80px 25px; } - - - -/********************** Header */ - -/* Logo */ -h1#logo { float:left; width:202px; margin:3px 0 0 12px; } -.page-popup h1#logo { display:none; } - - -/* Quick Access*/ -.quick-access { - width:390px; - float:right; - margin-top:28px; - text-align:right; - padding:0 10px; - color:#fff; - } -.quick-access p { margin-bottom:4px; } -.quick-access li { - display:inline; - padding-right:7px; - padding-left:3px; - } -.quick-access li.first { padding-left:0;} -.quick-access li.last { padding-right:0; background:none;} -.account-access p, .account-access ul, .account-access li { display:inline; color:#fff; } -.account-access a, .account-access a:hover { color:#e1f1fb; } -.account-access ul { padding-left:10px; font-size:.95em; } -.shop-access a, .shop-access a:hover { color:#ebbc58; font-size:.95em; } - - -/* Breadcrumbs */ -.breadcrumbs { margin-bottom:13px; font-size:.95em; line-height:1.25em; } -.breadcrumbs li { display:inline; } - - - -/********************** Footer */ -.footer-container { border-top:15px solid #B6D1E2; } -.footer { - width:930px; - margin:0 auto; - padding:1em 1em 4em 1em; - position:relative; - } -.footer .store-switcher { display:inline; padding:0 10px 0 0; vertical-align:middle; } -.footer .informational label { color:#fff; font-weight:bold; padding-right:3px; } -.footer .informational ul { - display:inline; - } -.footer .informational li { - display:inline; - background:url(../images/footer_info_separator.gif) no-repeat 100% 50%; - padding-right:8px; - padding-left:4px; - } -.footer .informational li.last { background:none; padding-right:0; } -.footer .informational a, .footer .informational a:hover { color:#fff; } -.footer .informational a { text-decoration:none; } -.footer .legality { - padding:13px 0; - color:#ecf3f6; - text-align:center; - } -.footer .legality a, .footer .legality a:hover { color:#ecf3f6; } - - -/***************************************************************/ -/******************[ Magento_CSS_F Overrides]*******************/ -/***************************************************************/ - - -/* Alignment */ -.v-top { vertical-align:top; } -.v-middle { vertical-align:middle; } -.v-bottom { vertical-align:bottom; } -.a-left { text-align:left; } -.a-center { text-align:center; } -.a-right { text-align:right; } -.left { float:left; } -.right { float:right !important; } - -.normal-weight { font-weight:normal; } -.auto-width { width:auto;} - -/* Link highlights */ -.link-cart { color:#DC6809 !important; font-weight:bold !important;} -.link-remove { color:#646464 !important;} -.link-print { padding-left:23px; } - -/* Noscript Notice */ -.noscript { border:1px solid #000; border-width:0 0 1px; background:#ffff90; font-size:12px; line-height:1.25; text-align:center; color:#2f2f2f; } -.noscript .noscript-inner { width:950px; margin:0 auto; padding:12px 0 12px; background:url(../images/i_notice.gif) 20px 50% no-repeat; } -.noscript p { margin:0; } - -/* For Demo store only */ -.demo-notice { margin:0; background:#d75f07; padding:5px 10px 6px 10px; color:#fff; line-height:1em; text-align:center; } diff --git a/app/design/install/Magento/basic/web/css/clears.css b/app/design/install/Magento/basic/web/css/clears.css deleted file mode 100644 index 89ecab747a41bf7410f153675ccbe7aa30c0936d..0000000000000000000000000000000000000000 --- a/app/design/install/Magento/basic/web/css/clears.css +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -/*******************************************************/ -/****************[ Magento_CSS_B Clears ]***************/ -/*******************************************************/ - -.page-head:after, -.page-head-alt:after, -.clear:after, -.col2-set:after, -.col3-set:after, -.col4-set:after, -.col2-alt-set:after, -.head:after, -.inner-head:after, -.header-top:after, -.quick-access:after, -.header-nav:after, -#nav:after, -.middle:after, -.product-essential:after, -.button-set:after, -.actions:after, -.legend:after, -.form-list li:after, -.button-container:after, -.ratings:after, -.page-head:after, -.page-head-alt:after, -.group-select li:after, -.search-autocomplete li:after, -.side-col li:after, -.account-box li:after, -.address-list li:after, -.generic-product-list li:after, -.listing-type-list .listing-item:after, -.listing-type-list .product-info .product-reviews:after, -.my-review-detail:after { - content:"."; - display:block; - clear:both; - height:0; - font-size:0; - line-height:0em; - visibility:hidden; - overflow:hidden; - } -.middle {display:inline-block;} diff --git a/app/design/install/Magento/basic/web/css/ie7minus.css b/app/design/install/Magento/basic/web/css/ie7minus.css deleted file mode 100644 index 0fa184f70f3f8ee9521c334b922f18cd134d7536..0000000000000000000000000000000000000000 --- a/app/design/install/Magento/basic/web/css/ie7minus.css +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ - -h1#logo { display:inline; } -.form-button, .form-button-alt { margin-bottom:1px; } -.group-select .legend { position:relative; zoom:1; } - -/* Min-height for IE */ -.login-box .content { height:180px; } -.content-box { height:250px; } -#main { height:400px; } - -.validation-advice { height:15px; } -.error-msg, .success-msg, .note-msg { height:23px; } -.currency-switcher h4 { height:21px; } -.base-mini .head h4, .shopping-cart-collaterals h4 { height:16px; } -.login-box h4 { height:16px; } -.login-box .content { height:230px; } diff --git a/app/design/install/Magento/basic/web/css/iestyles.css b/app/design/install/Magento/basic/web/css/iestyles.css deleted file mode 100644 index f6c642ca2f7c03fedebf032df4cb4ec1e74693f6..0000000000000000000000000000000000000000 --- a/app/design/install/Magento/basic/web/css/iestyles.css +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -.col2-set, -.col3-set, -.col4-set, -.col2-alt-set, -.head, -.page-head, -.page-head-alt, -.header-top-container, -.header-top, -.header-nav-container, -.header-nav, -.quick-access, -#nav, -#nav li, -#nav a, -.middle, -.product-essential, -.button-set, -.actions, -.form-list li, -.button-container, -.ratings, -.page-head, -.page-head-alt, -.group-select li, -.search-autocomplete li, -.side-col li, -.account-box li, -.address-list li, -.listing-type-list .listing-item, -.listing-type-list .product-info .product-reviews, -.account-nav a, -.account-box, -.my-review-detail, -.generic-product-list li { zoom:1; } - -.clear { display:block; clear:both; height:0; font-size:0; line-height:0; overflow:hidden; } - -input.radio, -input.checkbox { width:13px; height:13px; } -.multi-address-checkout-box .box { zoom:1; } -.multi-address-checkout-box .legend { zoom:1; position:relative; margin-left:8px;} -.quick-access li { padding-right:4px; padding-left:6px;} -.search-autocomplete { left:39px !important; } -.mini-search { padding-top:-1px; line-height:1em;} -.home-spot { display:inline; } -.mini-related-items .product-details { margin-left:76px; } -.mini-related-items .product-images input { float:left; margin:-4px 2px 0 -4px; } -.mini-related-items .product-images img { float:left; } -#nav ul li.parent { margin-bottom:-3px;} diff --git a/app/design/install/Magento/basic/web/css/reset.css b/app/design/install/Magento/basic/web/css/reset.css deleted file mode 100644 index 2ebaf16548d78d4e255a38997f51fdd943bcbbd0..0000000000000000000000000000000000000000 --- a/app/design/install/Magento/basic/web/css/reset.css +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -/*********************************************/ -/***********[ Magento_CSS_A Reset ]***********/ -/*********************************************/ - -* { margin:0; padding:0; } - -body { background-color:#496778; color:#2f2f2f; font:12px/1.5 arial, helvetica, sans-serif; text-align:center; } - -a { color:#1e7ec8; text-decoration:underline; } -a:hover { color:#1e7ec8; text-decoration:underline; } -:focus { outline: 0; } - -img { border:0; } - -/* Heading */ -h1, h2, h3, h4, h5, h6, .head { margin-bottom:.4em; line-height:1.3em; color:#0A263C; } -h2 { font-size:1.5em; } -h3 { font-size:1.35em; } -h4 { font-size:1.05em; } -h5 { font-size:1.05em; } -h6 { font-size:.95em; } - -/* Table */ -th { padding:0; text-align:left; vertical-align:top; } -td {padding:0;vertical-align:top;} - -/* Paragraph */ -p { margin-bottom:.8em; } -address { margin-bottom:.4em; } -address { font-style:normal; line-height:1.4em;} -cite { font-style:normal; font-size:10px;} -q:before, q:after{content:'';} - -/* Form */ -form { display:inline;} -fieldset { border:none; } -legend { display:none; display:block !important; height:0; line-height:0; margin:0; overflow:hidden; padding:0; width:0; visibility:hidden; } -label { color:#666; /*font-size:.95em;*/ font-weight:bold; } -input, select, button { vertical-align:middle; } - -/* Lists */ -dt { display:block; font-weight:bold; } -ul,ol { list-style:none; } - -/* Size */ -small { font-size:.9em; } -big { font-size:1.1em; } - -.nowrap { white-space:nowrap; } -.bold { font-weight:bold; } diff --git a/app/design/install/Magento/basic/web/images/error_msg_icon.gif b/app/design/install/Magento/basic/web/images/error_msg_icon.gif deleted file mode 100644 index 9db2351303341d36bef063d1ca7a926be5981aac..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/error_msg_icon.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/footer_bg.gif b/app/design/install/Magento/basic/web/images/footer_bg.gif deleted file mode 100644 index 5c40b5aaa578d3abf145f5528861af27e9e02c13..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/footer_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/footer_container_bg.gif b/app/design/install/Magento/basic/web/images/footer_container_bg.gif deleted file mode 100644 index d280dcad8ab94b5ff49944f6a83b218a5f126dda..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/footer_container_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/footer_info_separator.gif b/app/design/install/Magento/basic/web/images/footer_info_separator.gif deleted file mode 100644 index 81d13b63be184806527c970812b7fb292dd47a5e..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/footer_info_separator.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/footer_informational_bg.gif b/app/design/install/Magento/basic/web/images/footer_informational_bg.gif deleted file mode 100644 index a4161dad9279a1ec40406b21fdd5c84b1f10cbd7..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/footer_informational_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/footer_left.gif b/app/design/install/Magento/basic/web/images/footer_left.gif deleted file mode 100644 index 2019017a9ef0aede78e181899835703f45c09d15..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/footer_left.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/footer_legality_bg.gif b/app/design/install/Magento/basic/web/images/footer_legality_bg.gif deleted file mode 100644 index 2c1cc68d0a48cc241c62894b5616d4fe31e6bf70..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/footer_legality_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/footer_right.gif b/app/design/install/Magento/basic/web/images/footer_right.gif deleted file mode 100644 index 665f8099f8f6ba562bb209d5d1e6cc419fd328e2..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/footer_right.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/header_bg.gif b/app/design/install/Magento/basic/web/images/header_bg.gif deleted file mode 100644 index 5ec714c9c94ad8b10788e544390199fdefd4fab0..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/header_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/header_nav_bg.gif b/app/design/install/Magento/basic/web/images/header_nav_bg.gif deleted file mode 100644 index 479af3cfceee40fb7b3eba0a5754cbaa1d1df59f..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/header_nav_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/header_top_bg.jpg b/app/design/install/Magento/basic/web/images/header_top_bg.jpg deleted file mode 100644 index 6375f3ffdd8ec43f86d3e2fa0c729cad079d9dd8..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/header_top_bg.jpg and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/header_top_container_bg.jpg b/app/design/install/Magento/basic/web/images/header_top_container_bg.jpg deleted file mode 100644 index 02f969177aea73618ee8f61e23d85923cb72dfd6..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/header_top_container_bg.jpg and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/i_notice.gif b/app/design/install/Magento/basic/web/images/i_notice.gif deleted file mode 100644 index 17733eff3fa73171ffbce8254fa0b368d940b74d..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/i_notice.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/main_bg.gif b/app/design/install/Magento/basic/web/images/main_bg.gif deleted file mode 100644 index 5a358b5e10a7ced8eb0bf2b3fd495d00761f38fc..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/main_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/main_container_bg.gif b/app/design/install/Magento/basic/web/images/main_container_bg.gif deleted file mode 100644 index 65664ffa9be41fd80bf34777b734302611556c97..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/main_container_bg.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/note_msg_icon.gif b/app/design/install/Magento/basic/web/images/note_msg_icon.gif deleted file mode 100644 index c9cacc27ae2553a59993d9702953dc19c53c679b..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/note_msg_icon.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/success_msg_icon.gif b/app/design/install/Magento/basic/web/images/success_msg_icon.gif deleted file mode 100644 index 611faffbc5f4254d54bd031f87470be3b32b28cf..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/success_msg_icon.gif and /dev/null differ diff --git a/app/design/install/Magento/basic/web/images/validation_advice_bg.gif b/app/design/install/Magento/basic/web/images/validation_advice_bg.gif deleted file mode 100644 index 46b1a2267ba5ad31f59a9c6cd8eaac9ee3b0f8ce..0000000000000000000000000000000000000000 Binary files a/app/design/install/Magento/basic/web/images/validation_advice_bg.gif and /dev/null differ diff --git a/app/etc/di.xml b/app/etc/di.xml index a8f3e14e5a973cdb569d150bcf92cbcf13b11c47..e8440ff4a4b9c8363ff00772b20d302e00c6a1f7 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -92,17 +92,17 @@ <preference for="Magento\Framework\Mview\View\SubscriptionInterface" type="Magento\Framework\Mview\View\Subscription" /> <preference for="Magento\Framework\Mview\View\ChangelogInterface" type="Magento\Framework\Mview\View\Changelog" /> <preference for="Magento\Framework\View\Design\FileResolution\Fallback\CacheDataInterface" type="Magento\Framework\View\Design\FileResolution\Fallback\CacheData\Flat"/> - <preference for="Magento\Framework\Service\Data\AttributeMetadataBuilderInterface" type="Magento\Framework\Service\Data\AttributeMetadataBuilder"/> - <preference for="Magento\Framework\Service\Data\MetadataServiceInterface" type="Magento\Framework\Service\Config\MetadataConfig"/> + <preference for="Magento\Framework\Api\AttributeMetadataBuilderInterface" type="Magento\Framework\Api\AttributeMetadataBuilder"/> + <preference for="Magento\Framework\Api\MetadataServiceInterface" type="Magento\Framework\Api\Config\MetadataConfig"/> <preference for="Magento\Framework\App\Rss\UrlBuilderInterface" type="Magento\Framework\App\Rss\UrlBuilder"/> <type name="Magento\Framework\Model\Context"> <arguments> <argument name="actionValidator" xsi:type="object">Magento\Framework\Model\ActionValidator\RemoveAction\Proxy</argument> </arguments> </type> - <type name="Magento\Framework\Service\V1\Data\FilterBuilder" shared="false" /> - <type name="Magento\Framework\Service\V1\Data\SearchCriteriaBuilder" shared="false" /> - <type name="Magento\Framework\Service\Data\AttributeValueBuilder" shared="false" /> + <type name="Magento\Framework\Api\FilterBuilder" shared="false" /> + <type name="Magento\Framework\Api\SearchCriteriaBuilder" shared="false" /> + <type name="Magento\Framework\Api\AttributeValueBuilder" shared="false" /> <type name="Magento\Framework\View\Layout\Builder" shared="false" /> <type name="Magento\Framework\View\Page\Builder" shared="false" /> <type name="Magento\Framework\Message\Manager"> diff --git a/app/i18n/magento/de_de/composer.json b/app/i18n/magento/de_de/composer.json index a26529f6fa328a53ec1897338a9cde7fee5a8488..04c5fa37ffb566ddaaa6e9a1559d7ff2c209e5e0 100644 --- a/app/i18n/magento/de_de/composer.json +++ b/app/i18n/magento/de_de/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-de_de", "description": "German (Germany) language", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/en_us/composer.json b/app/i18n/magento/en_us/composer.json index dce772e9fd5397ceac1d7d125717d8a854bc8e4d..2da87721ec06108df3d978fbf26e72e0a436614e 100644 --- a/app/i18n/magento/en_us/composer.json +++ b/app/i18n/magento/en_us/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-en_us", "description": "English (United States) language", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/es_es/composer.json b/app/i18n/magento/es_es/composer.json index 2e2c1cefdfc8af2940ce1f4403c32101109bbe66..2d4801b4d25cff6f444f931464f75255bbaa7b62 100644 --- a/app/i18n/magento/es_es/composer.json +++ b/app/i18n/magento/es_es/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-es_es", "description": "Spanish (Spain) language", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/fr_fr/composer.json b/app/i18n/magento/fr_fr/composer.json index 1e96fab82da5dc5674f72da109ea2364ac1da1e9..dbbea826ea6d3376d7edafb40f0ec57bf0d22757 100644 --- a/app/i18n/magento/fr_fr/composer.json +++ b/app/i18n/magento/fr_fr/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-fr_fr", "description": "French (France) language", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/nl_nl/composer.json b/app/i18n/magento/nl_nl/composer.json index 63b823e5d5476eba701437a07e395473c25e7cf8..7e8220b3a6dfaba2c2e902fe5acddfd8ea13050f 100644 --- a/app/i18n/magento/nl_nl/composer.json +++ b/app/i18n/magento/nl_nl/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-nl_nl", "description": "Dutch (Netherlands) language", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/pt_br/composer.json b/app/i18n/magento/pt_br/composer.json index adb63f32172e89a73ea1a8ef7f7bdf7b7e891f7a..ea16345b323a69cbea0b06c69addeec82e84ef08 100644 --- a/app/i18n/magento/pt_br/composer.json +++ b/app/i18n/magento/pt_br/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-pt_br", "description": "Portuguese (Brazil) language", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/app/i18n/magento/zh_cn/composer.json b/app/i18n/magento/zh_cn/composer.json index ec0e7ec71a8611738f5b188dc86c0dfaf866e7dd..38e1cdcc023900114db8301b0fb933d9a160d50f 100644 --- a/app/i18n/magento/zh_cn/composer.json +++ b/app/i18n/magento/zh_cn/composer.json @@ -1,9 +1,9 @@ { "name": "magento/language-zh_cn", "description": "Chinese (China) language", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { - "magento/framework": "0.1.0-alpha102", + "magento/framework": "0.1.0-alpha103", "magento/magento-composer-installer": "*" }, "type": "magento2-language", diff --git a/composer.json b/composer.json index f0bf973c2669671bd2116a16a9d11c56bcd2861b..6e91b7b16ccb4e8bae3c011aac79418bdda43eab 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/project-community-edition", "description": "Magento project (Community Edition)", "type": "project", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { "php": "~5.4.11|~5.5.0", "zendframework/zend-stdlib": "2.0.3" @@ -53,7 +53,6 @@ "magento/module-grouped-product": "self.version", "magento/module-import-export": "self.version", "magento/module-indexer": "self.version", - "magento/module-install": "self.version", "magento/module-integration": "self.version", "magento/module-layered-navigation": "self.version", "magento/module-log": "self.version", @@ -175,6 +174,49 @@ "tinymce/tinymce": "lib/web/tiny_mce" } }, + "config": { + "use-include-path": true + }, + "autoload": { + "psr-0": { + "Apache_": "lib/internal/", + "Cm_": "lib/internal/", + "Credis_": "lib/internal/", + "Less_": "lib/internal/", + "Symfony\\": "lib/internal/", + "Zend_Date": "app/code/", + "Zend_Mime": "app/code/", + "Zend_": "lib/internal/", + "Zend\\": "lib/internal/" + }, + "psr-4": { + "Magento\\Framework\\": "lib/internal/Magento/Framework/", + "Magento\\": [ + "var/generation/Magento/", + "app/code/Magento/" + ], + "Zend\\Soap\\": "app/code/Zend/Soap/", + "Zend\\": "lib/internal/Zend/" + }, + "classmap": [ + "app/code/" + ] + }, + "include-path": [ + "/lib/internal/", + "/app/code/" + ], + "autoload-dev": { + "psr-4": { + "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", + "Magento\\Tools\\": "dev/tools/Magento/Tools/", + "Magento\\Tools\\License\\": "dev/build/publication/license/", + "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/", + "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", + "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", + "Magento\\ToolkitFramework\\": "dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/" + } + }, "license": [ "OSL-3.0", "AFL-3.0" diff --git a/dev/shell/cache.php b/dev/shell/cache.php index 65e129bb1a8584fe6e185ebdfc6dfb1ece2396c0..c88ea03f2f761da9fe127093100592f665652813 100644 --- a/dev/shell/cache.php +++ b/dev/shell/cache.php @@ -27,6 +27,7 @@ namespace Magento\Framework\App; use Magento\Framework\App\Cache\ManagerApp; +use Magento\Framework\Shell\ComplexParameter; require __DIR__ . '/../../app/bootstrap.php'; @@ -34,7 +35,7 @@ $usage = 'Usage: php -f cache.php -- [--' . ManagerApp::KEY_SET . '=1|0]' . ' [--' . ManagerApp::KEY_CLEAN . ']' . ' [--' . ManagerApp::KEY_FLUSH . ']' . ' [--' . ManagerApp::KEY_TYPES . '=<type1>,<type2>,...]' - . ' [--bootstrap=<json>] + . ' [--bootstrap='. escapeshellarg('INIT_PARAM=foo&ANOTHER_PARAM[key]=bar') . '] --' . ManagerApp::KEY_TYPES . ' - list of cache types, comma-separated. If omitted, all caches will be affected --' . ManagerApp::KEY_SET . ' - enable or disable the specified cache types --' . ManagerApp::KEY_CLEAN . ' - clean data of the specified cache types @@ -53,14 +54,8 @@ if (empty($opt)) { } try { - $params = $_SERVER; - if (isset($opt['bootstrap'])) { - $extra = json_decode($opt['bootstrap'], true); - if (!is_array($extra)) { - throw new \Exception("Unable to decode JSON in the parameter 'bootstrap'"); - } - $params = array_replace_recursive($params, $extra); - } + $bootstrapParam = new ComplexParameter('bootstrap'); + $params = $bootstrapParam->mergeFromArgv($_SERVER, $_SERVER); $params[Bootstrap::PARAM_REQUIRE_MAINTENANCE] = null; $bootstrap = Bootstrap::create(BP, $params); /** @var ManagerApp $app */ diff --git a/dev/shell/install.php b/dev/shell/install.php deleted file mode 100644 index 02783cc5d09fc255f945a835c443cd61c3beaa39..0000000000000000000000000000000000000000 --- a/dev/shell/install.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -use Magento\Framework\App\State as AppState; -use Magento\Framework\App\Bootstrap; - -/** - * Parse command line arguments - */ -$currentArgName = false; -$args = array(); -foreach ($_SERVER['argv'] as $argNameOrValue) { - if (substr($argNameOrValue, 0, 2) == '--') { - // argument name - $currentArgName = substr($argNameOrValue, 2); - // in case if argument doesn't need a value - $args[$currentArgName] = true; - } else { - // argument value - if ($currentArgName) { - $args[$currentArgName] = $argNameOrValue; - } - $currentArgName = false; - } -} - -if (empty($args)) { - $detailedOptions = array('show_locales', 'show_currencies', 'show_timezones', 'show_install_options'); - echo 'Detailed info:' . PHP_EOL; - foreach ($detailedOptions as $option) { - echo ' php -f ' . $_SERVER['argv'][0] . ' -- --' . $option . PHP_EOL; - } - echo "php -f {$_SERVER['argv'][0]} -- [--<install_option_name> \"<option_value>\" ...]\n"; - - $exampleOptions = array( - 'license_agreement_accepted' => 'yes', - 'locale' => 'en_US', - 'timezone' => '"America/Los_Angeles"', - 'default_currency' => 'USD', - 'db_host' => 'localhost', - 'db_name' => 'magento', - 'db_user' => 'root', - 'url' => '"http://magento.local/"', - 'use_rewrites' => 'no', - 'use_secure_admin' => 'yes', - 'admin_lastname' => 'Smith', - 'admin_firstname' => 'John', - 'admin_email' => '"john.smith@some-email.com"', - 'admin_username' => 'admin', - 'admin_password' => '1234qasd', - 'use_secure' => 'no', - 'secure_base_url' => '"https://magento.local"', - 'cleanup_database' => '', - 'bootstrap' => '{"extra":{"key":"value"}}', - ); - echo 'Example of installation:' . PHP_EOL; - echo ' php -f ' . $_SERVER['argv'][0] . ' --'; - foreach ($exampleOptions as $option => $value) { - if (!empty($value)) { - echo ' --' . $option . ' ' . $value; - } else { - echo ' --' . $option; - } - } - echo PHP_EOL; - exit(1); -} - -require __DIR__ . '/../../app/bootstrap.php'; - -$params = $_SERVER; -$params[Bootstrap::PARAM_REQUIRE_IS_INSTALLED] = false; -if (!isset($params[AppState::PARAM_MODE])) { - $params[AppState::PARAM_MODE] = AppState::MODE_DEVELOPER; -} -if (isset($args['bootstrap'])) { - $extra = json_decode($args['bootstrap'], true); - if (!is_array($extra)) { - throw new \Exception("Unable to decode JSON in the parameter 'bootstrap'"); - } - $params = array_replace_recursive($params, $extra); -} -$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); -/** @var \Magento\Install\App\Console $app */ -$app = $bootstrap->createApplication('Magento\Install\App\Console', ['arguments' => $args]); -$bootstrap->run($app); diff --git a/dev/shell/maintenance.php b/dev/shell/maintenance.php deleted file mode 100644 index ce0c850cc8e7720ca172c710ffd699c84df18416..0000000000000000000000000000000000000000 --- a/dev/shell/maintenance.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * Maintenance mode tool - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -define( - 'USAGE', - "Usage: php -f maintenance.php -- [--set=1|0] [--addresses=127.0.0.1,...|none'] [--bootstrap=<json>] - --set - enable or disable maintenance mode - --addresses - list of allowed IP addresses, comma-separated - --bootstrap - add or override parameters of the bootstrap\n" -); -$opt = getopt('', ['set::', 'addresses::', 'bootstrap::']); -if (empty($opt)) { - echo USAGE; -} - -require __DIR__ . '/../../app/bootstrap.php'; -try { - $params = $_SERVER; - if (isset($opt['bootstrap'])) { - $extra = json_decode($opt['bootstrap'], true); - if (!is_array($extra)) { - throw new \Exception("Unable to decode JSON in the parameter 'bootstrap'"); - } - $params = array_replace_recursive($params, $extra); - } - $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); - /** @var \Magento\Framework\App\MaintenanceMode $maintenance */ - $maintenance = $bootstrap->getObjectManager()->get('Magento\Framework\App\MaintenanceMode'); - if (isset($opt['set'])) { - if (1 === (int)$opt['set']) { - echo "Enabling maintenance mode...\n"; - $maintenance->set(true); - } else { - echo "Disabling maintenance mode...\n"; - $maintenance->set(false); - } - } - if (isset($opt['addresses'])) { - $addresses = ('none' == $opt['addresses']) ? '' : $opt['addresses']; - $maintenance->setAddresses($addresses); - } - echo 'Status: maintenance mode is ' . ($maintenance->isOn() ? 'active' : 'not active') . ".\n"; - $addresses = implode(', ', $maintenance->getAddressInfo()); - echo "List of exempt IP-addresses:"; - if ($addresses) { - echo " {$addresses}\n"; - } else { - echo " none.\n"; - } - exit(0); -} catch (Exception $e) { - echo $e; - exit(1); -} diff --git a/dev/shell/run_data_fixtures.php b/dev/shell/run_data_fixtures.php index 2841bec11d7aad1cf49a6adcc156bc0222dc8fe9..240c1552e76c634cdcb6e4aee46c038f6044233f 100644 --- a/dev/shell/run_data_fixtures.php +++ b/dev/shell/run_data_fixtures.php @@ -23,9 +23,11 @@ */ use Magento\Framework\App\State as AppState; +use Magento\Framework\Shell\ComplexParameter; require __DIR__ . '/../../app/bootstrap.php'; -$params = $_SERVER; +$bootstrapParam = new ComplexParameter('bootstrap'); +$params = $bootstrapParam->mergeFromArgv($_SERVER, $_SERVER); if (!isset($params[AppState::PARAM_MODE])) { $params[AppState::PARAM_MODE] = AppState::MODE_DEVELOPER; } diff --git a/dev/shell/uninstall.php b/dev/shell/uninstall.php deleted file mode 100644 index 1d7538276ac408e626596bf8303d2e7e22228120..0000000000000000000000000000000000000000 --- a/dev/shell/uninstall.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Uninstall utility - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -define('USAGE', "Usage: php -f uninstall.php -- [--bootstrap=<json>]\n"); -$opt = getopt('', ['bootstrap::']); - -require __DIR__ . '/../../app/bootstrap.php'; -try { - $params = $_SERVER; - if (isset($opt['bootstrap'])) { - $extra = json_decode($opt['bootstrap'], true); - if (!is_array($extra)) { - throw new \Exception("Unable to decode JSON in the parameter 'bootstrap'"); - } - $params = array_replace_recursive($params, $extra); - } - $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); - $log = new \Zend_Log(new \Zend_Log_Writer_Stream('php://stdout')); - /** @var \Magento\Install\Model\Uninstaller $uninstall */ - $uninstall = $bootstrap->getObjectManager()->create('\Magento\Install\Model\Uninstaller', ['log' => $log]); - $uninstall->uninstall(); - exit(0); -} catch (\Exception $e) { - echo $e; - exit(1); -} diff --git a/dev/tests/functional/.gitignore b/dev/tests/functional/.gitignore index e559b0dd179abcdf7b4e66256b98d1da6810c6a5..f12c1a579105c852eae99d7f3f99befa173cb4a0 100755 --- a/dev/tests/functional/.gitignore +++ b/dev/tests/functional/.gitignore @@ -5,3 +5,4 @@ /config/* !/config/*.dist phpunit.xml +/lib/Mtf/Util/Generate/testcase.xml diff --git a/dev/tests/functional/bootstrap.php b/dev/tests/functional/bootstrap.php index 61b94c8a78c8ef5a7797a24105ef58aa37740c9f..3ce476da9b4bfeb4aa9a5e6ebe19427b1bf40930 100644 --- a/dev/tests/functional/bootstrap.php +++ b/dev/tests/functional/bootstrap.php @@ -25,5 +25,7 @@ session_start(); defined('MTF_BOOT_FILE') || define('MTF_BOOT_FILE', __FILE__); require_once __DIR__ . '/../../../app/bootstrap.php'; +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); restore_error_handler(); require_once __DIR__ . '/vendor/autoload.php'; diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php index ec1bfc0801e7188cee08423faa933e574ff961fe..7d897aa35c8006f72849173c3f0f48e6d7b31a50 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Form.php @@ -34,6 +34,7 @@ use Mtf\Block\Form as FormInstance; * Class Form * Is used to represent any form on the page * + * @SuppressWarnings(PHPMD.NumberOfChildren) */ class Form extends FormInstance { diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php index ed1aa93767d9fa0394f5b52eafc5187f934754b0..b1bbc548972b55af96aa1f2b5b4926147aab1f13 100755 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleItemsOnProductPage.php @@ -96,6 +96,11 @@ class AssertBundleItemsOnProductPage extends AbstractAssertForm ? $assignedProduct['data']['selection_price_value'] : $bundleSelections['products'][$optionKey][$productKey]->getPrice(); + if ($product->hasData('group_price')) { + $groupedPrice = $product->getGroupPrice(); + $price -= $price / 100 * reset($groupedPrice)['price']; + } + $optionData['options'][$productKey] = [ 'title' => $assignedProduct['search_data']['name'], 'price' => number_format($price, 2) diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php index dc2b8ceac32731a2b5976e49c0bbfec88b43dea3..87281821efcca1ea19b116fab22ed326da7efaca 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/Price.php @@ -165,7 +165,7 @@ class Price implements FixtureInterface 'cart_price' => '100.00' ], 'dynamic-50' => [ - 'price_from' => 'As low as $50.00', + 'price_from' => '50.00', ], 'fixed-115' => [ 'price_from' => '115.00', diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php index 05ed1f8a4aba6fa39412a7ae41db8de6611bad1e..daaecc57e42ab14ce2ec7e4a92559ca5bf83aac8 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Handler/BundleProduct/Curl.php @@ -27,16 +27,22 @@ namespace Magento\Bundle\Test\Handler\BundleProduct; use Mtf\System\Config; use Mtf\Fixture\FixtureInterface; use Magento\Catalog\Test\Handler\CatalogProductSimple\Curl as ProductCurl; +use Magento\Bundle\Test\Fixture\BundleProduct; /** - * Class Curl - * Create new bundle product via curl + * Create new bundle product via curl. */ class Curl extends ProductCurl implements BundleProductInterface { /** - * Constructor + * Fixture product. * + * @var BundleProduct + */ + protected $fixture; + + /** + * @constructor * @param Config $configuration */ public function __construct(Config $configuration) @@ -78,7 +84,19 @@ class Curl extends ProductCurl implements BundleProductInterface } /** - * Prepare POST data for creating product request + * Post request for creating bundle product product. + * + * @param FixtureInterface|null $fixture [optional] + * @return array + */ + public function persist(FixtureInterface $fixture = null) + { + $this->fixture = $fixture; + return parent::persist($fixture); + } + + /** + * Prepare POST data for creating product request. * * @param FixtureInterface $fixture * @param string|null $prefix [optional] @@ -115,4 +133,54 @@ class Curl extends ProductCurl implements BundleProductInterface return $this->replaceMappingData($data); } + + /** + * Parse response. + * + * @param string $response + * @return array + */ + protected function parseResponse($response) + { + return array_replace_recursive(parent::parseResponse($response), $this->parseResponseSelections($response)); + } + + /** + * Parse bundle selections in response. + * + * @param string $response + * @return array + */ + protected function parseResponseSelections($response) + { + $selectionIdKey = 1; + $optionIdKey = 2; + $productNameKey = 3; + $responseSelections = []; + $bundleSelections = $this->fixture->getBundleSelections(); + + preg_match_all( + '/{.*"selection_id":"(\d+)".*"option_id":"(\d+)".*"name":"([^"]+)".*}/', + $response, + $matches, + PREG_SET_ORDER + ); + foreach ($matches as $match) { + $productName = $match[$productNameKey]; + $responseSelections[$productName] = [ + 'selection_id' => $match[$selectionIdKey], + 'option_id' => $match[$optionIdKey], + ]; + } + + foreach ($bundleSelections['bundle_options'] as $optionKey => $option) { + foreach ($option['assigned_products'] as $assignedKey => $optionValue) { + $productName = $optionValue['search_data']['name']; + $bundleSelections['bundle_options'][$optionKey]['assigned_products'][$assignedKey] += + $responseSelections[$productName]; + } + } + + return ['bundle_selections' => $bundleSelections]; + } } diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest/test.csv index f30fdc9c2673f0185f3926686dc2b7ffa2136a76..a5cb3ad71d77dcc9d259eefe52e5f749bc0f2257 100644 --- a/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/TestCase/CreateBundleProductEntityTest/test.csv @@ -1,15 +1,15 @@ "product/data/name";"product/data/sku_type";"product/data/sku";"product/data/status";"product/data/price_type";"product/data/price/value";"product/data/price/preset";"product/data/tax_class_id/dataSet";"product/data/quantity_and_stock_status/is_in_stock";"product/data/weight_type";"product/data/weight";"product/data/category";"product/data/description";"product/data/group_price/preset";"product/data/special_price";"product/data/special_from_date/pattern";"product/data/special_to_date/pattern";"product/data/tier_price/preset";"product/data/price_view";"product/data/stock_data/use_config_manage_stock";"product/data/stock_data/manage_stock";"product/data/shipment_type";"product/data/bundle_selections/preset";"product/data/bundle_selections/products";"product/data/checkout_data/preset";"product/data/custom_options/preset";"product/data/custom_options/import_products";"product/data/visibility";"product/data/use_config_gift_message_available";"product/data/gift_message_available";"constraint";"issue" "BundleProduct %isolation%";"-";"bundle_sku_%isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"Bundle Product Dynamic Required";"-";"-";"-";"-";"-";"-";"No";"No";"-";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertBundleItemsOnProductPage";"" "BundleProduct %isolation%";"Fixed";"bundle_sku_%isolation%";"Product offline";"Dynamic";"-";"-";"-";"Out of Stock";"Dynamic";"-";"category_%isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"Separately";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"default";"-";"-";"Catalog, Search";"No";"Yes";"assertProductSaveMessage, assertProductNotSearchableBySku";"" -"BundleProduct %isolation%";"Dynamic";"bundle_sku_%isolation%";"Product online";"Dynamic";"-";"dynamic-200";"-";"In Stock";"Dynamic";"-";"category_%isolation%";"Bundle Product Dynamic";"-";"-";"-";"-";"-";"Price Range";"-";"-";"Together";"all_types_dynamic";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"all_types_bundle_options";"-";"-";"Catalog, Search";"No";"Yes";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertProductSearchableBySku, assertBundleProductPage, assertProductInStock, assertBundleItemsOnProductPage, assertProductVisibleInCategory, assertBundlePriceView, assertBundlePriceType";"Bug: MAGETWO-26969" +"BundleProduct %isolation%";"Dynamic";"bundle_sku_%isolation%";"Product online";"Dynamic";"-";"dynamic-200";"-";"In Stock";"Dynamic";"-";"category_%isolation%";"Bundle Product Dynamic";"-";"-";"-";"-";"-";"Price Range";"-";"-";"Together";"all_types_dynamic";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"all_types_bundle_options";"-";"-";"Catalog, Search";"No";"Yes";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertProductSearchableBySku, assertBundleProductPage, assertProductInStock, assertBundleItemsOnProductPage, assertProductVisibleInCategory, assertBundlePriceView, assertBundlePriceType";"" "BundleProduct %isolation%";"Fixed";"bundle_sku_%isolation%";"-";"Fixed";"10";"fixed-15";"None";"-";"Fixed";"10";"-";"Bundle Product Fixed Required";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default_fixed";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertProductSearchableBySku, assertBundleProductPage, assertBundleItemsOnProductPage";"" -"BundleProduct %isolation%";"Fixed";"bundle_sku_%isolation%";"Product online";"Fixed";"100";"fixed-24";"Taxable Goods";"In Stock";"Fixed";"10";"category_%isolation%";"Bundle Product Fixed";"default";"-";"-";"-";"-";"As Low as";"-";"-";"Separately";"all_types_fixed";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"all_types_bundle_fixed_and_custom_options";"all_types";"-";"Catalog, Search";"No";"No";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertProductVisibleInCategory, assertBundleProductPage, assertProductInStock, assertGroupedPriceOnBundleProductPage, assertBundleItemsOnProductPage, assertBundlePriceView, assertBundlePriceType";"Bug: MAGETWO-26969" +"BundleProduct %isolation%";"Fixed";"bundle_sku_%isolation%";"Product online";"Fixed";"100";"fixed-24";"Taxable Goods";"In Stock";"Fixed";"10";"category_%isolation%";"Bundle Product Fixed";"default";"-";"-";"-";"-";"As Low as";"-";"-";"Separately";"all_types_fixed";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"all_types_bundle_fixed_and_custom_options";"all_types";"-";"Catalog, Search";"No";"No";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertProductVisibleInCategory, assertBundleProductPage, assertProductInStock, assertGroupedPriceOnBundleProductPage, assertBundleItemsOnProductPage, assertBundlePriceView, assertBundlePriceType";"" "BundleProduct %isolation%";"Fixed";"bundle_sku_%isolation%";"Product online";"Fixed";"10";"fixed-1";"Taxable Goods";"Out of Stock";"Fixed";"10";"category_%isolation%";"-";"-";"10";"m/d/Y";"m/d/Y +3 days";"-";"Price Range";"No";"Yes";"Together";"with_not_required_options";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product|catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"with_not_required_options";"-";"-";"Catalog";"No";"No";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertBundleProductPage, assertProductOutOfStock, assertBundlePriceView";"Bug: MAGETWO-26980" -"BundleProduct %isolation%";"Dynamic";"bundle_sku_%isolation%";"-";"Dynamic";"-";"dynamic-50";"-";"-";"Fixed";"10";"-";"-";"-";"-";"-";"-";"default";"As Low as";"No";"No";"Together";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"default";"-";"-";"Search";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertProductSearchableBySku, assertBundleProductPage, assertBundleItemsOnProductPage, assertTierPriceOnBundleProductPage";"Bug: MAGETWO-28914" +"BundleProduct %isolation%";"Dynamic";"bundle_sku_%isolation%";"-";"Dynamic";"-";"dynamic-50";"-";"-";"Fixed";"10";"-";"-";"-";"-";"-";"-";"default";"As Low as";"No";"No";"Together";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductVirtual::50_dollar_product";"default";"-";"-";"Search";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertBundleProductForm, assertProductSearchableBySku, assertBundleProductPage, assertBundleItemsOnProductPage, assertTierPriceOnBundleProductPage";"" "Bundle Dynamic %isolation%";"Dynamic";"sku_bundle_dynamic_%isolation%";"-";"Dynamic";"-";"dynamic-8";"-";"-";"-";"-";"-";"-";"-";"20";"-";"-";"-";"-";"-";"-";"-";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertBundleInCategory";"" "Bundle Dynamic %isolation%";"Dynamic";"sku_bundle_dynamic_%isolation%";"-";"Dynamic";"-";"dynamic-32";"-";"-";"-";"-";"-";"-";"MAGETWO-23061";"-";"-";"-";"-";"-";"-";"-";"-";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertBundleInCategory, assertBundlePriceView, assertBundlePriceType";"" "Bundle Dynamic %isolation%";"Dynamic";"sku_bundle_dynamic_%isolation%";"-";"Dynamic";"-";"dynamic-40";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertBundleInCategory, assertBundlePriceView, assertBundlePriceType";"" -"Bundle Fixed %isolation%";"Fixed";"sku_bundle_fixed_%isolation%";"-";"Fixed";"110";"fixed-115";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"second";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"with_custom_options_1";"drop_down_with_one_option_fixed_price";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"assertProductSaveMessage, assertBundleInCategory, assertBundlePriceView, assertBundlePriceType, assertProductCustomOptionsOnBundleProductPage";"Bug: MAGETWO-28905, MAGETWO-28913" +"Bundle Fixed %isolation%";"Fixed";"sku_bundle_fixed_%isolation%";"-";"Fixed";"110";"fixed-115";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"second";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"with_custom_options_1";"drop_down_with_one_option_fixed_price";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"assertProductSaveMessage, assertBundleInCategory, assertBundlePriceView, assertBundlePriceType, assertProductCustomOptionsOnBundleProductPage";"" "Bundle Fixed %isolation%";"Fixed";"sku_bundle_fixed_%isolation%";"-";"Fixed";"110";"fixed-159";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"second";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"with_custom_options_2";"drop_down_with_one_option_percent_price";"-";"-";"-";"-";"assertProductSaveMessage, assertBundleInCategory, assertBundlePriceView, assertBundlePriceType";"" "Bundle Dynamic %isolation%";"Dynamic";"sku_bundle_dynamic_%isolation%";"-";"Dynamic";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default_dynamic";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage";"" "Bundle Fixed %isolation%";"Fixed";"sku_bundle_fixed_%isolation%";"-";"Fixed";"10";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"second";"catalogProductSimple::100_dollar_product,catalogProductSimple::40_dollar_product";"default";"-";"-";"-";"-";"-";"assertProductSaveMessage";"" diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php index 2ffcee808d0468eb8aa5550edc85fcd44c3bc558..822ecf09c9445d979d29cf3746bb7b2612786b25 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Tab/ProductDetails/CategoryIds.php @@ -25,6 +25,7 @@ namespace Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\ProductDetails; use Mtf\Client\Driver\Selenium\Element\MultisuggestElement; +use Mtf\Client\Element\Locator; /** * Class CategoryIds @@ -45,4 +46,23 @@ class CategoryIds extends MultisuggestElement * @var string */ protected $resultItem = './/li/a/span[@class="category-label"][text()="%s"]'; + + /** + * Selector for click on top page. + * + * @var string + */ + protected $top = './ancestor::body//form[@data-form="edit-product"]'; + + /** + * Set value + * + * @param array|string $values + * @return void + */ + public function setValue($values) + { + $this->find($this->top, Locator::SELECTOR_XPATH)->click(); + parent::setValue($values); + } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php index e1a681048ccdb8525fb431369390b7d6e647f81c..4e34ab73f1692ed83fa1a83e717c322ce6e15eef 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Compare/ListCompare.php @@ -90,6 +90,13 @@ class ListCompare extends Block */ protected $isEmpty = 'p.empty'; + /** + * Selector for message block + * + * @var string + */ + protected $messageBlock = '#messages'; + /** * Get product info * @@ -166,14 +173,22 @@ class ListCompare extends Block } /** - * Remove all products from compare product list + * Remove all products from compare product list. * * @return void */ public function removeAllProducts() { + $this->waitForElementVisible(sprintf($this->removeButton, 1), Locator::SELECTOR_XPATH); + /** @var \Magento\Core\Test\Block\Messages $messageBlock */ + $messageBlock = $this->blockFactory->create( + 'Magento\Core\Test\Block\Messages', + ['element' => $this->browser->find($this->messageBlock)] + ); + while ($this->isProductVisible()) { $this->removeProduct(); + $messageBlock->waitSuccessMessage(); $this->reinitRootElement(); } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php index 9447928dc4c586153ae87b70f9677ca130b72bbd..659703b1092c1211b0cfb4ca191dd7c0778fd1f7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPriceOnProductPageInterface.php @@ -25,7 +25,7 @@ namespace Magento\Catalog\Test\Constraint; use Mtf\Fixture\FixtureInterface; -use Magento\Catalog\Test\Page\Product\CatalogProductView; +use Magento\Catalog\Test\Block\Product\View; /** * Interface AssertPriceOnProductPageInterface @@ -37,11 +37,10 @@ interface AssertPriceOnProductPageInterface * Verify product price on product view page * * @param FixtureInterface $product - * @param CatalogProductView $catalogProductView - * @param string $block + * @param View $productViewBlock * @return void */ - public function assertPrice(FixtureInterface $product, CatalogProductView $catalogProductView, $block); + public function assertPrice(FixtureInterface $product, View $productViewBlock); /** * Set $errorMessage for constraint diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php index 0ac953636b011e68b9ef55d1091488dc99add690..077e6297b0434752c70654cf94a5bf4d4e1b29ac 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductGroupedPriceOnProductPage.php @@ -69,7 +69,7 @@ class AssertProductGroupedPriceOnProductPage extends AbstractConstraint implemen $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); //Process assertions - $this->assertPrice($product, $catalogProductView); + $this->assertPrice($product, $catalogProductView->getViewBlock()); } /** @@ -87,19 +87,14 @@ class AssertProductGroupedPriceOnProductPage extends AbstractConstraint implemen * Verify product special price on product view page * * @param FixtureInterface $product - * @param CatalogProductView $catalogProductView - * @param string $block [optional] + * @param View $productViewBlock * @param string $customerGroup [optional] * @return void */ - public function assertPrice( - FixtureInterface $product, - CatalogProductView $catalogProductView, - $block = '', - $customerGroup = 'NOT LOGGED IN' - ) { + public function assertPrice(FixtureInterface $product, View $productViewBlock, $customerGroup = 'NOT LOGGED IN') + { $this->customerGroup = $customerGroup; - $groupPrice = $this->getGroupedPrice($catalogProductView->{'get' . $block . 'ViewBlock'}(), $product); + $groupPrice = $this->getGroupedPrice($productViewBlock, $product); \PHPUnit_Framework_Assert::assertEquals($groupPrice['fixture'], $groupPrice['onPage'], $this->errorMessage); } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php index 9ea6b1e13d3d1c03737711316838fa882e739d3f..f88c701f2d5039e28c3cc6dc644d5057518b07e5 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductPage.php @@ -129,6 +129,10 @@ class AssertProductPage extends AbstractAssertForm */ protected function verifyPrice() { + if ($this->product->hasData('price') == false) { + return null; + } + $fixtureProductPrice = number_format($this->product->getPrice(), 2); $formProductPrice = $this->productView->getPriceBlock()->getRegularPrice(); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php index ddf0b5357131a413b3f1eff4c9bb8640be91a3ba..5be5ea84a0afc0800a873f339b8e0db2e6065f6a 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductSpecialPriceOnProductPage.php @@ -28,9 +28,10 @@ use Mtf\Client\Browser; use Mtf\Fixture\FixtureInterface; use Mtf\Constraint\AbstractConstraint; use Magento\Catalog\Test\Page\Product\CatalogProductView; +use Magento\Catalog\Test\Block\Product\View; /** - * Class AssertProductSpecialPriceOnProductPage + * Assert that displayed special price on product page equals passed from fixture. */ class AssertProductSpecialPriceOnProductPage extends AbstractConstraint implements AssertPriceOnProductPageInterface { @@ -61,7 +62,7 @@ class AssertProductSpecialPriceOnProductPage extends AbstractConstraint implemen $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); //Process assertions - $this->assertPrice($product, $catalogProductView); + $this->assertPrice($product, $catalogProductView->getViewBlock()); } /** @@ -78,18 +79,14 @@ class AssertProductSpecialPriceOnProductPage extends AbstractConstraint implemen /** * Verify product special price on product view page * - * @param CatalogProductView $catalogProductView * @param FixtureInterface $product - * @param string $block [optional] + * @param View $productViewBlock * @return void */ - public function assertPrice( - FixtureInterface $product, - CatalogProductView $catalogProductView, - $block = '' - ) { + public function assertPrice(FixtureInterface $product, View $productViewBlock) + { $fields = $product->getData(); - $specialPrice = $catalogProductView->getViewBlock()->getPriceBlock()->getSpecialPrice(); + $specialPrice = $productViewBlock->getPriceBlock()->getSpecialPrice(); if (isset($fields['special_price'])) { \PHPUnit_Framework_Assert::assertEquals( number_format($fields['special_price'], 2), diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php index 39c86790468e86cf5e806fdfec5d761418be9abe..805d0c67de2d159eec996ecd8fb5bae839fc2750 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTierPriceOnProductPage.php @@ -31,7 +31,7 @@ use Magento\Catalog\Test\Block\Product\View; use Magento\Catalog\Test\Page\Product\CatalogProductView; /** - * Class AssertProductTierPriceOnProductPage + * Assert that displayed tier price on product page equals passed from fixture. */ class AssertProductTierPriceOnProductPage extends AbstractConstraint implements AssertPriceOnProductPageInterface { @@ -74,7 +74,7 @@ class AssertProductTierPriceOnProductPage extends AbstractConstraint implements $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); //Process assertions - $this->assertPrice($product, $catalogProductView); + $this->assertPrice($product, $catalogProductView->getViewBlock()); } /** @@ -92,21 +92,18 @@ class AssertProductTierPriceOnProductPage extends AbstractConstraint implements * Verify product tier price on product view page * * @param FixtureInterface $product - * @param CatalogProductView $catalogProductView - * @param string $block [optional] + * @param View $productViewBlock * @return void */ - public function assertPrice(FixtureInterface $product, CatalogProductView $catalogProductView, $block = '') + public function assertPrice(FixtureInterface $product, View $productViewBlock) { $noError = true; $match = []; $index = 1; - /** @var View $viewBlock */ - $viewBlock = $catalogProductView->{'get' . $block . 'ViewBlock'}(); $tierPrices = $product->getTierPrice(); foreach ($tierPrices as $tierPrice) { - $text = $viewBlock->getTierPrices($index++); + $text = $productViewBlock->getTierPrices($index++); $noError = (bool)preg_match('#^[^\d]+(\d+)[^\d]+(\d+(?:(?:,\d+)*)+(?:.\d+)*).*#i', $text, $match); if (!$noError) { break; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php index ec87b10f0428961c895eb5a58e78500c669957ef..d2c743eb773f9a3d5264c3b3209fc1018011f11c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php @@ -372,7 +372,7 @@ class CatalogProductAttribute extends InjectableFixture 'is_required' => '', 'default_value' => '', 'input' => '', - 'source' => '\Magento\Catalog\Test\Fixture\CatalogProductAttribute\Options', + 'source' => 'Magento\Catalog\Test\Fixture\CatalogProductAttribute\Options', 'group' => 'manage-options' ]; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml index d4ae55aa0281dd7de217282bd22aa7d8a1d2b632..03fe5c0d756f30ffdc6f6a4d819838850400dfb5 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.xml @@ -293,7 +293,7 @@ <is_required></is_required> <default_value></default_value> <input></input> - <source>\Magento\Catalog\Test\Fixture\CatalogProductAttribute\Options</source> + <source>Magento\Catalog\Test\Fixture\CatalogProductAttribute\Options</source> <group>manage-options</group> </options> </fields> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php index 07f6362e39dd01c566248330715c5b6fbbadae52..cf3d05e77b92a4dae1b284501e615753c06c3958 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php @@ -57,11 +57,12 @@ class CheckoutData implements FixtureInterface public function __construct(array $params, array $data = []) { $this->params = $params; - $this->data = isset($data['preset']) ? $this->getPreset($data['preset']) : $data; - - if (isset($data['data'])) { - $this->data = array_replace_recursive($this->data, $data['data']); + $preset = []; + if (isset($data['preset'])) { + $preset = $this->getPreset($data['preset']); + unset($data['preset']); } + $this->data = empty($preset) ? $data : array_replace_recursive($preset, $data); } /** diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php index afd59f648f0f6ee40d71b6d64d2657cb5fe0edc2..79d06a271e9e0a389b0e82dda30500c4f7192e07 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductAttribute/Curl.php @@ -95,7 +95,7 @@ class Curl extends AbstractCurl implements CatalogProductAttributeInterface $curl->close(); if (!strpos($response, 'data-ui-id="messages-message-success"')) { - throw new \Exception("Product Attribute creating by curl handler was not successful!"); + throw new \Exception("Product Attribute creating by curl handler was not successful! \n" . $response); } $resultData = []; diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php index b670528f8f5d64f37a23e169d4b6a9c472be4f75..f3223f12f5cc02cb4e59e0956bf2f41e5ee92ff9 100755 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php @@ -32,8 +32,7 @@ use Mtf\Handler\Curl as AbstractCurl; use Mtf\Util\Protocol\CurlTransport\BackendDecorator; /** - * Class CreateProduct - * Create new simple product via curl + * Create new simple product via curl. */ class Curl extends AbstractCurl implements CatalogProductSimpleInterface { @@ -117,7 +116,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface ]; /** - * Placeholder for price data sent Curl + * Placeholder for price data sent Curl. * * @var array */ @@ -139,14 +138,14 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface ]; /** - * Select custom options + * Select custom options. * * @var array */ protected $selectOptions = ['Drop-down', 'Radio Buttons', 'Checkbox', 'Multiple Select']; /** - * Post request for creating simple product + * Post request for creating simple product. * * @param FixtureInterface|null $fixture [optional] * @return array @@ -164,7 +163,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } /** - * Prepare POST data for creating product request + * Prepare POST data for creating product request. * * @param FixtureInterface $fixture * @param string|null $prefix [optional] @@ -237,7 +236,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } /** - * Preparation of custom options data + * Preparation of custom options data. * * @param array $fields * @return array @@ -265,7 +264,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } /** - * Convert option name + * Convert option name. * * @param string $optionName * @return string @@ -281,7 +280,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } /** - * Preparation of stock data + * Preparation of stock data. * * @param array $fields * @return array @@ -318,7 +317,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } /** - * Preparation of tier price data + * Preparation of tier price data. * * @param array $fields * @return array @@ -339,7 +338,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } /** - * Remove items from a null + * Remove items from a null. * * @param array $data * @return array @@ -357,7 +356,7 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface } /** - * Create product via curl + * Create product via curl. * * @param array $data * @param array $config @@ -376,13 +375,25 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface if (!strpos($response, 'data-ui-id="messages-message-success"')) { throw new \Exception("Product creation by curl handler was not successful! Response: $response"); } - preg_match("~Location: [^\s]*\/id\/(\d+)~", $response, $matches); - return ['id' => isset($matches[1]) ? $matches[1] : null]; + return $this->parseResponse($response); } /** - * Retrieve URL for request with all necessary parameters + * Parse data in response. + * + * @param string $response + * @return array + */ + protected function parseResponse($response) + { + preg_match('~Location: [^\s]*\/id\/(\d+)~', $response, $matches); + $id = isset($matches[1]) ? $matches[1] : null; + return ['id' => $id]; + } + + /** + * Retrieve URL for request with all necessary parameters. * * @param array $config * @return string diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest/testCreate.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest/testCreate.csv index a375ddbadc6f5b24edd193b399fd844ed968173a..bcce9e2518fcedbc7f810f79a5dc47c6e70512b4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest/testCreate.csv +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest/testCreate.csv @@ -1,19 +1,19 @@ -"product/data/name";"product/data/sku";"product/data/tax_class_id/dataSet";"product/data/price/value";"product/data/special_price";"product/data/short_description";"product/data/description";"product/data/weight";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/visibility";"product/data/custom_options/preset";"product/data/checkout_data/preset";"product/data/custom_options/import_products";"product/data/price/preset";"product/data/group_price/preset";"product/data/tier_price/preset";"constraint";"issue" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10000";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"50";"657";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"drop_down_with_one_option_fixed_price";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10001";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"51";"658";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"drop_down_with_one_option_percent_price";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10002";"90";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"52";"659";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"MAGETWO-23029";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10003";"90";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"53";"660";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"MAGETWO-23030";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10004";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"54";"661";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"MAGETWO-23030";"MAGETWO-23055";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10005";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"55";"662";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"MAGETWO-23029";"MAGETWO-23055";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10006";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"56";"663";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"MAGETWO-23030";"-";"MAGETWO-23002";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10007";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"57";"664";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"MAGETWO-23029";"-";"MAGETWO-23002";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10008";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"58";"665";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductVisibleInCategory, assertProductPage";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10009";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"59";"75";"In Stock";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInStock";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10010";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"60";"0";"Out of Stock";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductOutOfStock";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10011";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"61";"138";"-";"Search";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductSearchableBySku";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10012";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"62";"139";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductSearchableBySku, assertProductPage";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10013";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"63";"140";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"Taxable Goods";"10014";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"64";"141";"-";"-";"-";"-";"-";"-";"default";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductGroupedPriceOnProductPage";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"Taxable Goods";"10015";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"65";"142";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductSpecialPriceOnProductPage";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"None";"10016";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"66";"143";"-";"-";"-";"-";"-";"-";"-";"default";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductTierPriceOnProductPage";"" -"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10017";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"67";"144";"-";"-";"options-suite";"options-suite";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductCustomOptionsOnProductPage";"Bug: MAGETWO-28913" +"product/data/name";"product/data/sku";"product/data/tax_class_id/dataSet";"product/data/price/value";"product/data/special_price";"product/data/short_description";"product/data/description";"product/data/weight";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/visibility";"product/data/custom_options/preset";"product/data/checkout_data/preset";"product/data/custom_options/import_products";"product/data/price/preset";"product/data/group_price/preset";"product/data/tier_price/preset";"constraint" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10000";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"50";"657";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"drop_down_with_one_option_fixed_price";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10001";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"51";"658";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"drop_down_with_one_option_percent_price";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10002";"90";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"52";"659";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"MAGETWO-23029";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10003";"90";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"53";"660";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"MAGETWO-23030";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10004";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"54";"661";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"MAGETWO-23030";"MAGETWO-23055";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10005";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"55";"662";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"MAGETWO-23029";"MAGETWO-23055";"-";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10006";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"56";"663";"-";"-";"drop_down_with_one_option_percent_price";"drop_down_with_one_option_percent_price";"-";"MAGETWO-23030";"-";"MAGETWO-23002";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10007";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"57";"664";"-";"-";"drop_down_with_one_option_fixed_price";"drop_down_with_one_option_fixed_price";"-";"MAGETWO-23029";"-";"MAGETWO-23002";"assertProductSaveMessage, assertProductInGrid, assertProductInCategory, assertProductPage, assertProductInCart" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10008";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"58";"665";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductVisibleInCategory, assertProductPage" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10009";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"59";"75";"In Stock";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInStock" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10010";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"60";"0";"Out of Stock";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductOutOfStock" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10011";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"61";"138";"-";"Search";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductSearchableBySku" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10012";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"62";"139";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductSearchableBySku, assertProductPage" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10013";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"63";"140";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage" +"Simple Product %isolation%";"simple_sku_%isolation%";"Taxable Goods";"10014";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"64";"141";"-";"-";"-";"-";"-";"-";"default";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductGroupedPriceOnProductPage" +"Simple Product %isolation%";"simple_sku_%isolation%";"Taxable Goods";"10015";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"65";"142";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductSpecialPriceOnProductPage" +"Simple Product %isolation%";"simple_sku_%isolation%";"None";"10016";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"66";"143";"-";"-";"-";"-";"-";"-";"-";"default";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductTierPriceOnProductPage" +"Simple Product %isolation%";"simple_sku_%isolation%";"-";"10017";"-";"Simple Product short_description %isolation%";"Simple Product description %isolation%";"67";"144";"-";"-";"options-suite";"options-suite";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage, assertProductCustomOptionsOnProductPage" diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest/testCreate.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest/testCreate.csv index 00f470fea2cc39bb9d92f40b0b6addd6f0b381b1..cbc73ef8063d886dd04e81380951c882ea9c5a25 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest/testCreate.csv +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateVirtualProductEntityTest/testCreate.csv @@ -1,8 +1,8 @@ -"product/data/name";"product/data/sku";"product/data/price/value";"product/data/tax_class_id/dataSet";"product/data/quantity_and_stock_status/qty";"product/data/is_virtual";"product/data/category";"product/data/group_price/preset";"product/data/price/preset";"product/data/tier_price/preset";"product/data/inventory_manage_stock";"product/data/quantity_and_stock_status/is_in_stock";"product/data/custom_options/preset";"product/data/custom_options/import_products";"product/data/visibility";"constraint";"issue" -"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"-";"Yes";"-";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid";"" -"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"None";"999";"Yes";"category_%isolation%";"-";"-";"MAGETWO-23002";"Yes";"In Stock";"-";"-";"Catalog, Search";"assertProductSaveMessage, assertProductVisibleInCategory, assertProductForm, assertProductSearchableBySku";"" -"VirtualProduct %isolation%";"-";"10";"Taxable Goods";"999";"Yes";"-";"-";"MAGETWO-23030";"-";"-";"Out of Stock";"-";"-";"Search";"assertProductSaveMessage, assertProductForm, assertProductSkuAutoGenerated, assertProductSearchableBySku";"" -"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"-";"Yes";"category_%isolation%";"MAGETWO-23055";"-";"-";"-";"-";"-";"-";"Catalog";"assertProductSaveMessage, assertProductForm, assertProductVisibleInCategory";"" -"VirtualProduct %isolation%";"virtual_sku_%isolation%";"9000";"-";"-";"Yes";"-";"MAGETWO-23055";"-";"-";"-";"-";"options-suite";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"assertProductSaveMessage, assertProductSearchableBySku, assertProductPage, assertProductGroupedPriceOnProductPage, assertProductCustomOptionsOnProductPage";"Bug: MAGETWO-28913" -"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"999";"Yes";"-";"-";"MAGETWO-23030";"-";"No";"In Stock";"-";"-";"-";"assertProductSaveMessage, assertProductPage, assertProductSpecialPriceOnProductPage, assertProductInStock";"" -"VirtualProduct %isolation%";"virtual_sku_%isolation%";"9000";"-";"999";"Yes";"-";"-";"-";"default";"-";"Out of Stock";"-";"-";"-";"assertProductSaveMessage, assertProductPage, assertProductTierPriceOnProductPage, assertProductOutOfStock";"" +"product/data/name";"product/data/sku";"product/data/price/value";"product/data/tax_class_id/dataSet";"product/data/quantity_and_stock_status/qty";"product/data/is_virtual";"product/data/category";"product/data/group_price/preset";"product/data/price/preset";"product/data/tier_price/preset";"product/data/inventory_manage_stock";"product/data/quantity_and_stock_status/is_in_stock";"product/data/custom_options/preset";"product/data/custom_options/import_products";"product/data/visibility";"constraint" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"-";"Yes";"-";"-";"-";"-";"-";"-";"-";"-";"-";"assertProductSaveMessage, assertProductInGrid" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"None";"999";"Yes";"category_%isolation%";"-";"-";"MAGETWO-23002";"Yes";"In Stock";"-";"-";"Catalog, Search";"assertProductSaveMessage, assertProductVisibleInCategory, assertProductForm, assertProductSearchableBySku" +"VirtualProduct %isolation%";"-";"10";"Taxable Goods";"999";"Yes";"-";"-";"MAGETWO-23030";"-";"-";"Out of Stock";"-";"-";"Search";"assertProductSaveMessage, assertProductForm, assertProductSkuAutoGenerated, assertProductSearchableBySku" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"-";"Yes";"category_%isolation%";"MAGETWO-23055";"-";"-";"-";"-";"-";"-";"Catalog";"assertProductSaveMessage, assertProductForm, assertProductVisibleInCategory" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"9000";"-";"-";"Yes";"-";"MAGETWO-23055";"-";"-";"-";"-";"options-suite";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"assertProductSaveMessage, assertProductSearchableBySku, assertProductPage, assertProductGroupedPriceOnProductPage, assertProductCustomOptionsOnProductPage" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"10";"-";"999";"Yes";"-";"-";"MAGETWO-23030";"-";"No";"In Stock";"-";"-";"-";"assertProductSaveMessage, assertProductPage, assertProductSpecialPriceOnProductPage, assertProductInStock" +"VirtualProduct %isolation%";"virtual_sku_%isolation%";"9000";"-";"999";"Yes";"-";"-";"-";"default";"-";"Out of Stock";"-";"-";"-";"assertProductSaveMessage, assertProductPage, assertProductTierPriceOnProductPage, assertProductOutOfStock" diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php new file mode 100644 index 0000000000000000000000000000000000000000..9ceb04fdca5bd36cbb400c573633c2ce0ae44cd2 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductStep.php @@ -0,0 +1,79 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Catalog\Test\TestStep; + +use Mtf\Fixture\FixtureFactory; +use Mtf\Fixture\FixtureInterface; +use Mtf\TestStep\TestStepInterface; + +/** + * Create product using handler. + */ +class CreateProductStep implements TestStepInterface +{ + /** + * Product fixture from dataSet. + * + * @var string + */ + protected $product; + + /** + * Factory for Fixtures. + * + * @var FixtureFactory + */ + protected $fixtureFactory; + + /** + * Preparing step properties. + * + * @constructor + * @param FixtureFactory $fixtureFactory + * @param string $product + */ + public function __construct(FixtureFactory $fixtureFactory, $product) + { + $this->product = $product; + $this->fixtureFactory = $fixtureFactory; + } + + /** + * Create product. + * + * @return array + */ + public function run() + { + list($fixtureClass, $dataSet) = explode('::', $this->product); + /** @var FixtureInterface $product */ + $product = $this->fixtureFactory->createByCode(trim($fixtureClass), ['dataSet' => trim($dataSet)]); + if ($product->hasData('id') === false) { + $product->persist(); + } + + return ['product' => $product]; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/InstallWizardConfigFilesTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductOnBackendStep.php similarity index 50% rename from dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/InstallWizardConfigFilesTest.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductOnBackendStep.php index 7bcd1b96499781bc56694a6410a091b51ac29285..2220ea21bbd61bd28104a55d869fbc30e3aa08b8 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/InstallWizardConfigFilesTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductOnBackendStep.php @@ -1,7 +1,5 @@ <?php /** - * Tests that existing install_wizard.xml files are valid to schema individually and merged. - * * Magento * * NOTICE OF LICENSE @@ -23,39 +21,51 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Test\Integrity\Modular; -class InstallWizardConfigFilesTest extends \Magento\TestFramework\TestCase\AbstractConfigFiles +namespace Magento\Catalog\Test\TestStep; + +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; +use Mtf\TestStep\TestStepInterface; +use Mtf\Fixture\InjectableFixture; + +/** + * Open product on backend. + */ +class OpenProductOnBackendStep implements TestStepInterface { /** - * Returns the reader class name that will be instantiated via ObjectManager + * Product fixture. * - * @return string reader class name + * @var InjectableFixture */ - protected function _getReaderClassName() - { - return 'Magento\Install\Model\Config\Reader'; - } + protected $product; /** - * Returns a string that represents the path to the config file, starting in the app directory. - * - * Format is glob, so * is allowed. + * Catalog product index page. * - * @return string + * @var CatalogProductIndex + */ + protected $catalogProductIndex; + + /** + * @constructor + * @param InjectableFixture $product + * @param CatalogProductIndex $catalogProductIndex */ - protected function _getConfigFilePathGlob() + public function __construct(InjectableFixture $product, CatalogProductIndex $catalogProductIndex) { - return '/*/*/etc/install_wizard.xml'; + $this->product = $product; + $this->catalogProductIndex = $catalogProductIndex; } /** - * Returns a path to the per file XSD file, relative to the modules directory. + * Open products on backend. * - * @return string + * @return void */ - protected function _getXsdPath() + public function run() { - return '/Magento/Install/etc/install_wizard_file.xsd'; + $this->catalogProductIndex->open(); + $this->catalogProductIndex->getProductGrid()->searchAndOpen(['sku' => $this->product->getSku()]); } } diff --git a/app/code/Magento/Install/Model/Installer/Db/Factory.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductsOnFrontendStep.php similarity index 56% rename from app/code/Magento/Install/Model/Installer/Db/Factory.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductsOnFrontendStep.php index ce08f2e2ef66b670ebc3e3795bcc6f7b77d37420..ad1e6887aad6bf5ab5b83cce16513d45682bbfe0 100644 --- a/app/code/Magento/Install/Model/Installer/Db/Factory.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/OpenProductsOnFrontendStep.php @@ -22,43 +22,52 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Catalog\Test\TestStep; + +use Mtf\Client\Browser; +use Mtf\TestStep\TestStepInterface; + /** - * Installer DB factory + * Open products on frontend via url. */ -namespace Magento\Install\Model\Installer\Db; - -class Factory +class OpenProductsOnFrontendStep implements TestStepInterface { /** + * Products fixtures. + * * @var array */ - protected $_types = array('mysql4' => 'Magento\Install\Model\Installer\Db\Mysql4'); + protected $products = []; /** - * @var \Magento\Framework\ObjectManager + * Browser. + * + * @var Browser */ - protected $_objectManager; + protected $browser; /** - * @param \Magento\Framework\ObjectManager $objectManager + * Preparing step properties. + * + * @constructor + * @param array $products + * @param Browser $browser */ - public function __construct(\Magento\Framework\ObjectManager $objectManager) + public function __construct(array $products, Browser $browser) { - $this->_objectManager = $objectManager; + $this->products = $products; + $this->browser = $browser; } /** - * Get Installer Db type instance + * Open products on frontend via url. * - * @param string $type - * @return \Magento\Install\Model\Installer\Db\AbstractDb | bool - * @throws \InvalidArgumentException + * @return void */ - public function get($type) + public function run() { - if (!empty($type) && isset($this->_types[(string)$type])) { - return $this->_objectManager->get($this->_types[(string)$type]); + foreach ($this->products as $product) { + $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); } - return false; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductStep.php new file mode 100644 index 0000000000000000000000000000000000000000..e622de16f54f9f0dbca95305f1c795a14ba3ee03 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductStep.php @@ -0,0 +1,70 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Catalog\Test\TestStep; + +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; +use Mtf\TestStep\TestStepInterface; +use Mtf\Fixture\InjectableFixture; + +/** + * Save product step. + */ +class SaveProductStep implements TestStepInterface +{ + /** + * Product fixture. + * + * @var InjectableFixture + */ + protected $product; + + /** + * Catalog product edit page. + * + * @var CatalogProductEdit + */ + protected $catalogProductEdit; + + /** + * @constructor + * @param InjectableFixture $product + * @param CatalogProductEdit $catalogProductEdit + */ + public function __construct(InjectableFixture $product, CatalogProductEdit $catalogProductEdit) + { + $this->product = $product; + $this->catalogProductEdit = $catalogProductEdit; + } + + /** + * Save product. + * + * @return void + */ + public function run() + { + $this->catalogProductEdit->getFormPageActions()->save($this->product); + } +} diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php index 169854ace9580380b56d8657d2ed5d7e96d3f815..82edc1f49a0feb0e3accce5d5a6569f5598eb152 100755 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php @@ -51,7 +51,7 @@ class CartItem extends AbstractCartItem * * @var string */ - protected $bundleOptions = './/dl[contains(@class, "cart-item-options")]/dd[%d]/span[@class="price"][%d]'; + protected $bundleOptions = './/dl[contains(@class, "item-options")]/dd[%d]/span[@class="price"][%d]'; /** * 'Move to Wishlist' button @@ -79,7 +79,7 @@ class CartItem extends AbstractCartItem * * @return string */ - protected function getProductName() + public function getProductName() { $this->_rootElement->find($this->productName)->getText(); } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php index 1291e96f4ffa37c75cebfe00a6eb9a99d04a6617..f46d541ef61f0ffc9ae8d5ff677f41c13530affd 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config.php @@ -25,8 +25,10 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super; use Magento\Backend\Test\Block\Widget\Tab; +use Mtf\Client\Element\Locator; use Mtf\Client\Element; use Magento\Catalog\Test\Fixture\CatalogCategory; +use Magento\Backend\Test\Block\Template; /** * Class Config @@ -63,11 +65,11 @@ class Config extends Tab protected $variationsMatrix = '[data-role="product-variations-matrix"]'; /** - * Selector for variations matrix row + * Selector for template block. * * @var string */ - protected $variationsMatrixRow = '[data-role="product-variations-matrix"] [data-role="row"]'; + protected $template = './ancestor::body'; /** * Selector for variations tab wrapper @@ -146,7 +148,7 @@ class Config extends Tab public function generateVariations() { $this->_rootElement->find($this->generateVariations)->click(); - $this->waitForElementVisible($this->variationsMatrixRow); + $this->getTemplateBlock()->waitLoader(); } /** @@ -157,7 +159,7 @@ class Config extends Tab public function getAttributeBlock() { return $this->blockFactory->create( - '\Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Attribute', + 'Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Attribute', ['element' => $this->_rootElement] ); } @@ -170,11 +172,24 @@ class Config extends Tab public function getVariationsBlock() { return $this->blockFactory->create( - '\Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix', + 'Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix', ['element' => $this->_rootElement->find($this->variationsMatrix)] ); } + /** + * Get template block. + * + * @return Template + */ + public function getTemplateBlock() + { + return $this->blockFactory->create( + 'Magento\Backend\Test\Block\Template', + ['element' => $this->_rootElement->find($this->template, Locator::SELECTOR_XPATH)] + ); + } + /** * Get data of tab * diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php index ea2cf5cfaa7e71a38c87c34753e844eaa7c7edef..e75d50711296bc6089a7f045b027e306d2348f70 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Attribute.php @@ -30,8 +30,7 @@ use Magento\Backend\Test\Block\Widget\Form; use Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Attribute\AttributeSelector; /** - * Class Attribute - * Attribute block in Variation section + * Attribute block in Variation section. */ class Attribute extends Form { @@ -158,6 +157,7 @@ class Attribute extends Form if (!$isExistAttribute && empty($attribute['attribute_id'])) { $this->createNewVariationSet($attribute); + $this->waitBlock($this->newAttributeFrame); $this->fillOptions($attribute); } else { if (!$isExistAttribute) { @@ -169,7 +169,7 @@ class Attribute extends Form } /** - * Create new variation set + * Create new variation set. * * @param array $attribute * @return void @@ -183,7 +183,25 @@ class Attribute extends Form $newAttribute->getTabElement('properties')->fillFormTab($attribute); $newAttribute->_rootElement->find($this->saveAttribute)->click(); - $this->browser->switchToFrame(); + $this->browser->selectWindow(); + } + + /** + * Wait that element is not visible. + * + * @param string $selector + * @param mixed $browser [optional] + * @param string $strategy [optional] + * @return mixed + */ + protected function waitBlock($selector, $browser = null, $strategy = Locator::SELECTOR_CSS) + { + $browser = ($browser != null) ? $browser : $this->browser; + return $browser->waitUntil( + function () use ($browser, $selector, $strategy) { + return $browser->find($selector, $strategy)->isVisible() == false ? true : null; + } + ); } /** @@ -242,7 +260,7 @@ class Attribute extends Form Locator::SELECTOR_XPATH ); - if (!$optionContainer->isVisible() && $this->isVisibleOption($attributeBlock, $count-1)) { + if (!$optionContainer->isVisible() && $this->isVisibleOption($attributeBlock, $count - 1)) { $attributeBlock->find($this->addOption)->click(); } $mapping = $this->dataMapping($option); diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php index 9892a82c76352362fa2a6f3cf9c4f28c3e5b4499..5941ba377cfe9207d50538cd1fd4007fd4bbe355 100755 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Edit/Tab/Super/Config/Matrix.php @@ -26,6 +26,7 @@ namespace Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Edit\Tab\Supe use Mtf\Client\Driver\Selenium\Element; use Mtf\Client\Element\Locator; +use Magento\Backend\Test\Block\Template; use Magento\Backend\Test\Block\Widget\Form; /** @@ -94,19 +95,35 @@ class Matrix extends Form // @codingStandardsIgnoreEnd /** - * Fill variations + * Title of variation matrix css selector. + * + * @var string + */ + protected $matrixTitle = 'h3.title'; + + /** + * Selector for template block. + * + * @var string + */ + protected $template = './ancestor::body'; + + /** + * Fill variations. * * @param array $matrix * @return void */ public function fillVariations(array $matrix) { + $this->_rootElement->find($this->matrixTitle)->click(); $count = 1; foreach ($matrix as $variation) { $variationRow = $this->_rootElement->find( sprintf($this->variationRowByNumber, $count), Locator::SELECTOR_XPATH ); + ksort($variation); $mapping = $this->dataMapping($variation); $this->_fill($mapping, $variationRow); @@ -128,6 +145,7 @@ class Matrix extends Form protected function assignProduct(Element $variationRow, $productId) { $variationRow->find($this->configurableAttribute)->click(); + $this->getTemplateBlock()->waitLoader(); $this->_rootElement->find( sprintf($this->selectAssociatedProduct, $productId), Locator::SELECTOR_XPATH @@ -175,4 +193,17 @@ class Matrix extends Form } return $data; } + + /** + * Get template block. + * + * @return Template + */ + public function getTemplateBlock() + { + return $this->blockFactory->create( + 'Magento\Backend\Test\Block\Template', + ['element' => $this->_rootElement->find($this->template, Locator::SELECTOR_XPATH)] + ); + } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesAbsentOnProductPage.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesAbsentOnProductPage.php new file mode 100644 index 0000000000000000000000000000000000000000..6f80540e34cc6d696140724d228b4fb7d78ef9be --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesAbsentOnProductPage.php @@ -0,0 +1,81 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\ConfigurableProduct\Test\Constraint; + +use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; +use Magento\Catalog\Test\Fixture\CatalogProductAttribute; +use Magento\Catalog\Test\Page\Product\CatalogProductView; +use Mtf\Constraint\AbstractConstraint; +use Mtf\Client\Browser; + +/** + * Assert that deleted products attributes are absent on product page on frontend. + */ +class AssertConfigurableAttributesAbsentOnProductPage extends AbstractConstraint +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert that deleted products attributes are absent on product page on frontend. + * + * @param CatalogProductAttribute[] $deletedProductAttributes + * @param Browser $browser + * @param CatalogProductView $catalogProductView + * @param ConfigurableProductInjectable $product + * @return void + */ + public function processAssert( + array $deletedProductAttributes, + Browser $browser, + CatalogProductView $catalogProductView, + ConfigurableProductInjectable $product + ) { + $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); + $pageOptions = $catalogProductView->getViewBlock()->getOptions($product)['configurable_options']; + + foreach ($deletedProductAttributes as $attribute) { + $attributeLabel = $attribute->getFrontendLabel(); + \PHPUnit_Framework_Assert::assertFalse( + isset($pageOptions[$attributeLabel]), + "Product attribute '$attributeLabel' found on product page on frontend." + ); + } + } + + /** + * Returns a string representation of the object. + * + * @return string + */ + public function toString() + { + return "Product attributes are absent on product page on frontend."; + } +} diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesBlockIsAbsentOnProductPage.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesBlockIsAbsentOnProductPage.php new file mode 100644 index 0000000000000000000000000000000000000000..5b89b2d82e7834ee141c2e197a01096e7727469f --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableAttributesBlockIsAbsentOnProductPage.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\ConfigurableProduct\Test\Constraint; + +use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; +use Magento\Catalog\Test\Page\Product\CatalogProductView; +use Mtf\Constraint\AbstractConstraint; +use Mtf\Client\Browser; + +/** + * Assert that all configurable attributes is absent on product page on frontend. + */ +class AssertConfigurableAttributesBlockIsAbsentOnProductPage extends AbstractConstraint +{ + /** + * Constraint severeness. + * + * @var string + */ + protected $severeness = 'low'; + + /** + * Assert that all products attributes is absent on product page on frontend. + * + * @param Browser $browser + * @param CatalogProductView $catalogProductView + * @param ConfigurableProductInjectable $product + * @return void + */ + public function processAssert( + Browser $browser, + CatalogProductView $catalogProductView, + ConfigurableProductInjectable $product + ) { + $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); + \PHPUnit_Framework_Assert::assertFalse( + $catalogProductView->getConfigurableAttributesBlock()->isVisible(), + "Product attributes are present on product page on frontend." + ); + } + + /** + * Returns a string representation of the object. + * + * @return string + */ + public function toString() + { + return "All product attributes are absent on product page on frontend."; + } +} diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php index 42ca5af842bad65aa2c39fe6ba2fd836b7a9758c..6c4fb04299210b9f589f82cb2cab052e1f22ebf9 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php @@ -32,7 +32,7 @@ use Mtf\Repository\RepositoryFactory; use Mtf\System\Event\EventManagerInterface; /** - * Class ConfigurableProduct + * Configurable product fixture. * * @SuppressWarnings(PHPMD.ExcessivePublicCount) * @SuppressWarnings(PHPMD.TooManyFields) @@ -99,13 +99,18 @@ class ConfigurableProductInjectable extends InjectableFixture ]; protected $defaultDataSet = [ - 'type_id' => 'configurable', - 'attribute_set_id' => ['dataSet' => 'Default'], 'name' => 'Configurable Product %isolation%', 'sku' => 'sku_configurable_product_%isolation%', + 'type_id' => 'configurable', + 'attribute_set_id' => ['dataSet' => 'default'], + 'website_ids' => ['Main Website'], 'price' => ['value' => 100.00], 'weight' => 1, + 'quantity_and_stock_status' => [ + 'is_in_stock' => 'In Stock', + ], 'url_key' => 'configurable-product-%isolation%', + 'configurable_attributes_data' => ['preset' => 'default'], ]; protected $category_ids = [ diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php index 1bf635fa875e696b144717e234b28d3ae20bd8b2..95a00c2c4b9b21d4453e85f5d2158cbf504165ea 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php @@ -25,11 +25,10 @@ namespace Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; /** - * Class CheckoutData - * Data for fill product form on frontend + * Data for fill product form on frontend. * * Data keys: - * - preset (Checkout data verification preset name) + * - preset (Checkout data verification preset name). */ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\CheckoutData { @@ -110,7 +109,45 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch 'price' => 102, ] ], - 'two_new_options_with_special_price' =>[ + 'two_attributes' => [ + 'options' => [ + 'configurable_options' => [ + [ + 'title' => 'attribute_key_0', + 'value' => 'option_key_0', + ], + [ + 'title' => 'attribute_key_1', + 'value' => 'option_key_0', + ] + ] + ], + 'cartItem' => [ + 'price' => 112, + ] + ], + 'three_attributes' => [ + 'options' => [ + 'configurable_options' => [ + [ + 'title' => 'attribute_key_0', + 'value' => 'option_key_0', + ], + [ + 'title' => 'attribute_key_1', + 'value' => 'option_key_0', + ], + [ + 'title' => 'attribute_key_2', + 'value' => 'option_key_0', + ] + ] + ], + 'cartItem' => [ + 'price' => 112, + ] + ], + 'two_new_options_with_special_price' => [ 'options' => [ 'configurable_options' => [ [ diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php index 786bdbc5b5f6df21edf8ef8b476f527676f60ba9..828e7c5d27c89912096fa9623fa0d7927256452a 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php @@ -132,9 +132,7 @@ class ConfigurableAttributesData implements FixtureInterface ] ] ], - 'products' => [ - - ], + 'products' => [], 'attributes' => [ 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown', 'attribute_key_1' => 'catalogProductAttribute::attribute_type_dropdown' @@ -304,6 +302,44 @@ class ConfigurableAttributesData implements FixtureInterface ] ] ], + 'one_new_options' => [ + 'attributes_data' => [ + 'attribute_key_0' => [ + 'options' => [ + 'option_key_0' => [ + 'label' => 'option_key_1_%isolation%', + 'pricing_value' => 1, + 'is_percent' => 'No', + 'include' => 'Yes' + ] + ] + ] + ], + 'attributes' => [], + 'products' => [], + 'matrix' => [] + ], + 'two_new_options_with_zero_products' => [ + 'attributes_data' => [ + 'attribute_key_0' => [ + 'options' => [ + 'option_key_0' => [ + 'label' => 'option_key_1_%isolation%', + 'pricing_value' => 1, + 'is_percent' => 'No', + 'include' => 'Yes' + ], + ] + ] + ], + 'attributes' => [ + 'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_one_option', + ], + 'products' => [ + 'attribute_key_0:option_key_0' => 'catalogProductSimple::out_of_stock', + ], + 'matrix' => [] + ], 'two_options_with_assigned_product' => [ 'attributes_data' => [ 'attribute_key_0' => [ @@ -526,8 +562,7 @@ class ConfigurableAttributesData implements FixtureInterface ]; /** - * Source constructor - * + * @constructor * @param FixtureFactory $fixtureFactory * @param array $data * @param array $params [optional] @@ -536,15 +571,18 @@ class ConfigurableAttributesData implements FixtureInterface { $this->fixtureFactory = $fixtureFactory; $this->params = $params; - $this->data = !isset($data['preset']) ? $data : []; - - $preset = isset($data['preset']) ? $this->getPreset($data['preset']) : []; + $preset = []; + if (isset($data['preset'])) { + $preset = $this->getPreset($data['preset']); + unset($data['preset']); + } + $data = array_replace_recursive($data, $preset); - if (!empty($preset)) { - $this->prepareAttributes($preset); - $this->prepareAttributesData($preset); - $this->prepareProducts($preset); - $this->prepareVariationsMatrix($preset); + if (!empty($data)) { + $this->prepareAttributes($data); + $this->prepareAttributesData($data); + $this->prepareProducts($data); + $this->prepareVariationsMatrix($data); $this->prepareData(); } } @@ -719,7 +757,9 @@ class ConfigurableAttributesData implements FixtureInterface foreach ($this->attributesData as $attributeKey => $attribute) { $variationsMatrix = $this->addVariationMatrix($variationsMatrix, $attribute, $attributeKey); } - $this->variationsMatrix = array_replace_recursive($variationsMatrix, $data['matrix']); + $this->variationsMatrix = isset($data['matrix']) + ? array_replace_recursive($variationsMatrix, $data['matrix']) + : $variationsMatrix; // assigned products foreach ($this->variationsMatrix as $key => $row) { @@ -727,12 +767,30 @@ class ConfigurableAttributesData implements FixtureInterface /** @var CatalogProductSimple $product */ $product = $this->products[$key]; $quantityAndStockStatus = $product->getQuantityAndStockStatus(); + $productData = [ + 'configurable_attribute' => $product->getId(), + 'name' => $product->getName(), + 'sku' => $product->getSku(), + 'quantity_and_stock_status' => [ + 'qty' => $quantityAndStockStatus['qty'] + ], + 'weight' => $product->getWeight() + ]; + $this->variationsMatrix[$key] = array_replace_recursive($this->variationsMatrix[$key], $productData); + } else { + $this->variationsMatrix[$key] = array_replace_recursive( + $this->variationsMatrix[$key], + [ + 'weight' => 1, + 'quantity_and_stock_status' => [ + 'qty' => 10 + ], + ] + ); + } - $this->variationsMatrix[$key]['configurable_attribute'] = $product->getId(); - $this->variationsMatrix[$key]['name'] = $product->getName(); - $this->variationsMatrix[$key]['sku'] = $product->getSku(); - $this->variationsMatrix[$key]['quantity_and_stock_status']['qty'] = $quantityAndStockStatus['qty']; - $this->variationsMatrix[$key]['weight'] = $product->getWeight(); + if (!isset($this->variationsMatrix[$key]['display'])) { + $this->variationsMatrix[$key]['display'] = 'Yes'; } } } @@ -762,16 +820,17 @@ class ConfigurableAttributesData implements FixtureInterface } foreach ($variationsMatrix as $rowKey => $row) { + $randIsolation = mt_rand(1, 100); + $row['name'] .= ' ' . $randIsolation; + $row['sku'] .= '_' . $randIsolation; + $index = 1; foreach ($attribute['options'] as $optionKey => $option) { $compositeKey = "{$attributeKey}:{$optionKey}"; - $optionId = $this->getAttributeOptionId($compositeKey); - $optionId = ($optionId !== null) ? $optionId : $rowKey . $optionKey; - - $row['name'] .= '-' . $optionId; - $row['sku'] .= '_' . $optionId; - + $row['name'] .= ' ' . $index; + $row['sku'] .= '_' . $index; $newRowKey = $rowKey ? "{$rowKey} {$compositeKey}" : $compositeKey; $result[$newRowKey] = $row; + $index++; } } @@ -821,7 +880,9 @@ class ConfigurableAttributesData implements FixtureInterface $option['label'] = isset($option['view']) ? $option['view'] : $option['label']; $attribute['options'][$optionKey] = array_intersect_key($option, array_flip($optionFields)); } - $attribute['label'] = isset($attribute['label']) ? $attribute['label'] : $attribute['frontend_label']; + $attribute['label'] = isset($attribute['label']) + ? $attribute['label'] + : (isset($attribute['frontend_label']) ? $attribute['frontend_label'] : null); $attribute = array_intersect_key($attribute, array_flip($attributeFields)); $this->data['attributes_data'][$attributeKey] = $attribute; @@ -845,7 +906,7 @@ class ConfigurableAttributesData implements FixtureInterface * Return prepared data set * * @param string|null $key - * @return mixed + * @return array */ public function getData($key = null) { diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Product/CatalogProductView.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Product/CatalogProductView.xml index af7e9ddc1bdef34438709847270b9e7c8780b0c2..e33e77d42114433ae704f462b40feb10f703ad98 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Product/CatalogProductView.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Product/CatalogProductView.xml @@ -32,5 +32,10 @@ </configurable> </renders> </viewBlock> + <configurableAttributesBlock> + <class>Magento\ConfigurableProduct\Test\Block\Product\View\ConfigurableOptions</class> + <locator>#product-options-wrapper</locator> + <strategy>css selector</strategy> + </configurableAttributesBlock> </blocks> </page> diff --git a/app/code/Magento/Install/Model/Observer.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php similarity index 55% rename from app/code/Magento/Install/Model/Observer.php rename to dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php index 5de563e82de53320d47208b3a867d537291c1c85..0c3ba787fb052f8d047305701d21fa76f44c9247 100644 --- a/app/code/Magento/Install/Model/Observer.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest.php @@ -22,41 +22,39 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\ConfigurableProduct\Test\TestCase; + +use Mtf\TestCase\Scenario; + /** - * Installation event observer + * Test Flow: + * + * Preconditions: + * 1. Two simple products are created. + * 2. Configurable attribute with two options is created. + * 3. Configurable attribute added to default template. + * 4. Configurable product is created. + * + * Steps: + * 1. Log in to backend. + * 2. Open Products -> Catalog. + * 3. Search and open configurable product from preconditions. + * 4. Fill in data according to dataSet. + * 5. Save product. + * 6. Perform all assertions. + * + * @group Configurable_Product_(MX) + * @ZephyrId MAGETWO-29916 */ -namespace Magento\Install\Model; - -class Observer +class UpdateConfigurableProductEntityTest extends Scenario { /** - * Install Session + * Update configurable product. * - * @var \Magento\Framework\Session\Generic - */ - protected $_session; - - /** - * @param \Magento\Framework\Session\Generic $session - */ - public function __construct(\Magento\Framework\Session\Generic $session) - { - $this->_session = $session; - } - - /** - * @param \Magento\Framework\Event\Observer $observer - * @return $this + * @return array */ - public function bindLocale($observer) + public function test() { - $locale = $observer->getEvent()->getLocale(); - if ($locale) { - $choosedLocale = $this->_session->getLocale(); - if ($choosedLocale) { - $locale->setLocaleCode($choosedLocale); - } - } - return $this; + $this->executeScenario(); } } diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest/test.csv new file mode 100644 index 0000000000000000000000000000000000000000..ed0c03fb5905b0fca1a3d2f766395e06875e92fb --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/UpdateConfigurableProductEntityTest/test.csv @@ -0,0 +1,5 @@ +"description";"attributeTypeAction";"updatedProduct/data/configurable_attributes_data/preset";"updatedProduct/data/checkout_data/preset";"updatedProduct/data/checkout_data/cartItem/price";"updatedProduct/data/name";"updatedProduct/data/sku";"updatedProduct/data/price/value";"updatedProduct/data/category_ids/presets";"updatedProduct/data/short_description";"updatedProduct/data/description";"updatedProduct/data/weight";"updatedProduct/data/quantity_and_stock_status/is_in_stock";"updatedProduct/data/affected_attribute_set";"constraint";"issue" +"Add new option to existed Attribute";"addOptions";"one_new_options";"two_attributes";"153";"Configurable Product %isolation%";"configurable_sku_%isolation%";"99";"default_subcategory";"Configurable short description";"Configurable Product description %isolation%";"3";"In Stock";"-";"assertProductSaveMessage, assertProductInGrid, assertChildProductsInGrid, assertConfigurableProductForm, assertProductInCategory, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart, assertChildProductIsNotDisplayedSeparately";"" +"Add new variations";"";"two_new_options";"three_attributes";"159";"Configurable Product %isolation%";"configurable_sku_%isolation%";"99";"-";"Configurable short description";"Configurable Product description %isolation%";"3";"In Stock";"custom_attribute_set_%isolation%";"assertProductSaveMessage, assertProductInGrid, assertConfigurableProductForm, assertConfigurableProductPage, assertProductInStock, assertConfigurableProductInCart";"Bug: MAGETWO-29997" +"Delete one attribute and add another";"deleteLast";"two_new_options";"two_attributes";"112";"Configurable Product %isolation%";"configurable_sku_%isolation%";"99";"default_subcategory";"Configurable short description";"Configurable Product description %isolation%";"3";"In Stock";"-";"assertProductSaveMessage, assertProductInGrid, assertConfigurableProductForm, assertProductInCategory, assertProductInStock, assertConfigurableProductInCart, assertConfigurableAttributesAbsentOnProductPage";"" +"Delete attribute and add another with products qty = 0";"deleteAll";"two_new_options_with_zero_products";"two_attributes";"";"Configurable Product %isolation%";"configurable_sku_%isolation%";"99";"-";"Configurable short description";"Configurable Product description %isolation%";"3";"In Stock";"-";"assertProductSaveMessage, assertProductInGrid, assertConfigurableProductForm, assertConfigurableAttributesBlockIsAbsentOnProductPage, assertProductOutOfStock";"" diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php new file mode 100644 index 0000000000000000000000000000000000000000..b97638a5eb739e58049d1e16af932a6902536286 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestStep/UpdateConfigurableProductStep.php @@ -0,0 +1,215 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\ConfigurableProduct\Test\TestStep; + +use Mtf\Fixture\FixtureFactory; +use Mtf\TestStep\TestStepInterface; +use Magento\Catalog\Test\Fixture\CatalogProductAttribute; +use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; +use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable; + +/** + * Update configurable product step. + */ +class UpdateConfigurableProductStep implements TestStepInterface +{ + /** + * Catalog product edit page. + * + * @var CatalogProductEdit + */ + protected $catalogProductEdit; + + /** + * Fixture factory. + * + * @var FixtureFactory + */ + protected $fixtureFactory; + + /** + * Catalog product attributes. + * + * @var CatalogProductAttribute + */ + protected $deletedAttributes = []; + + /** + * Old configurable product fixture. + * + * @var ConfigurableProductInjectable + */ + protected $initialProduct; + + /** + * New configurable product fixture. + * + * @var ConfigurableProductInjectable + */ + protected $product; + + /** + * Action type for attribute + * + * @var string + */ + protected $attributeTypeAction = ''; + + /** + * @constructor + * @param FixtureFactory $fixtureFactory + * @param CatalogProductEdit $catalogProductEdit + * @param ConfigurableProductInjectable $product + * @param ConfigurableProductInjectable $updatedProduct + * @param string $attributeTypeAction + */ + public function __construct( + FixtureFactory $fixtureFactory, + CatalogProductEdit $catalogProductEdit, + ConfigurableProductInjectable $product, + ConfigurableProductInjectable $updatedProduct, + $attributeTypeAction + ) { + $this->fixtureFactory = $fixtureFactory; + $this->catalogProductEdit = $catalogProductEdit; + $this->initialProduct = $product; + $this->product = $updatedProduct; + $this->attributeTypeAction = $attributeTypeAction; + } + + /** + * Update configurable product. + * + * @return array + */ + public function run() + { + $product = $this->prepareProduct($this->initialProduct, $this->product, $this->attributeTypeAction); + $this->updateProduct($product); + + return ['product' => $product, 'deletedProductAttributes' => $this->deletedAttributes]; + } + + /** + * Prepare new product for update. + * + * @param ConfigurableProductInjectable $initialProduct + * @param ConfigurableProductInjectable $product + * @param string $attributeTypeAction + * @return ConfigurableProductInjectable + */ + protected function prepareProduct( + ConfigurableProductInjectable $initialProduct, + ConfigurableProductInjectable $product, + $attributeTypeAction + ) { + if ($attributeTypeAction == 'deleteAll') { + $this->deletedAttributes = $initialProduct->getDataFieldConfig('configurable_attributes_data')['source'] + ->getAttributes(); + return $product; + } + + $dataProduct = $product->getData(); + $dataInitialProduct = $initialProduct->getData(); + $oldMatrix = []; + + if ($attributeTypeAction == 'deleteLast') { + array_pop($dataInitialProduct['configurable_attributes_data']['attributes_data']); + $attributes = $initialProduct->getDataFieldConfig('configurable_attributes_data')['source'] + ->getAttributes(); + $this->deletedAttributes[] = array_pop($attributes); + } + + $attributesData = $dataInitialProduct['configurable_attributes_data']['attributes_data']; + if ($attributeTypeAction == 'addOptions') { + $oldMatrix = $dataInitialProduct['configurable_attributes_data']['matrix']; + $this->addOptions($attributesData, $dataProduct['configurable_attributes_data']['attributes_data']); + } else { + $this->addAttributes($attributesData, $dataProduct['configurable_attributes_data']['attributes_data']); + } + + $dataProduct['configurable_attributes_data'] = [ + 'attributes_data' => $attributesData, + 'matrix' => $oldMatrix + ]; + + if ($product->hasData('category_ids')) { + $dataProduct['category_ids']['category'] = $product->getDataFieldConfig('category_ids')['source'] + ->getCategories()[0]; + } + + return $this->fixtureFactory->createByCode('configurableProductInjectable', ['data' => $dataProduct]); + } + + /** + * Add options. + * + * @param array $attributes + * @param array $data + * @return void + */ + protected function addOptions(array &$attributes, array $data) + { + foreach ($attributes as $key => $attribute) { + if (isset($data[$key])) { + $index = count($attribute['options']); + foreach ($data[$key]['options'] as $newOption) { + $attributes[$key]['options']['option_key_' . $index] = $newOption; + $index++; + } + } + } + } + + /** + * Add attributes. + * + * @param array $attributes + * @param array $data + * @return void + */ + protected function addAttributes(array &$attributes, array $data) + { + $index = count($attributes); + foreach ($data as $attribute) { + $attributes['attribute_key_' . $index] = $attribute; + $index++; + } + } + + /** + * Update product. + * + * @param ConfigurableProductInjectable $product + * @return void + */ + protected function updateProduct(ConfigurableProductInjectable $product) + { + $productForm = $this->catalogProductEdit->getProductForm(); + $productForm->openTab('variations'); + $productForm->getTabElement('variations')->deleteAttributes(); + $this->catalogProductEdit->getProductForm()->fill($product); + } +} diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml index 96743be520ff7d4bd7862b9137afc1fa7c230644..01f9ee211125d946229eb697c68227440f1de5c3 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml @@ -54,4 +54,10 @@ <assertConfigurableProductInCustomerWishlistOnBackendGrid module="Magento_ConfigurableProduct"> <severeness>low</severeness> </assertConfigurableProductInCustomerWishlistOnBackendGrid> + <assertConfigurableAttributesAbsentOnProductPage module="Magento_ConfigurableProduct"> + <severeness>low</severeness> + </assertConfigurableAttributesAbsentOnProductPage> + <assertConfigurableAttributesBlockIsAbsentOnProductPage module="Magento_ConfigurableProduct"> + <severeness>low</severeness> + </assertConfigurableAttributesBlockIsAbsentOnProductPage> </constraint> diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/page.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/page.xml deleted file mode 100644 index d9c92344d7dc98121301b239c38a4228f4ac252d..0000000000000000000000000000000000000000 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/page.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" ?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<page module="Magento_ConfigurableProduct"> - <catalogProductEdit> - <mca>catalog/product/edit</mca> - <area>adminhtml</area> - <class>Magento\Configurable\Test\Page\Adminhtml\CatalogProductEdit</class> - </catalogProductEdit> - <catalogProductNew> - <mca>catalog/product/edit</mca> - <area>adminhtml</area> - <class>Magento\Configurable\Test\Page\Adminhtml\CatalogProductNew</class> - </catalogProductNew> - <catalogProductView> - <mca>catalog/product/view</mca> - <area>product</area> - <class>Magento\Configurable\Test\Page\CatalogProductView</class> - </catalogProductView> -</page> diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/scenario.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/scenario.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec175616a73322fe50729e73ec7aa6b20238bdd9 --- /dev/null +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/scenario.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<scenarios xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Mtf/Config/etc/scenario.xsd"> + <scenario name="UpdateConfigurableProductEntityTest" module="Magento_ConfigurableProduct"> + <methods> + <method name="test"> + <steps> + <first>createProduct</first> + <step name="createProduct" module="Magento_Catalog"> + <arguments> + <item name="product">configurableProductInjectable::default</item> + </arguments> + <next>openProductOnBackend</next> + </step> + <step name="openProductOnBackend" module="Magento_Catalog"> + <next>updateConfigurableProduct</next> + </step> + <step name="updateConfigurableProduct" module="Magento_ConfigurableProduct"> + <next>saveProduct</next> + </step> + <step name="saveProduct" module="Magento_Catalog" /> + </steps> + </method> + </methods> + </scenario> +</scenarios> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.xml index cbef022f1223496f4cc62f5bc3d936d1e742259c..d20f43a1bdf9e40e34ca028dda98800140ab60a1 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Block/Form/Register.xml @@ -48,7 +48,7 @@ <input>checkbox</input> </is_subscribed> <password_confirmation> - <selector>[name=confirmation]</selector> + <selector>[name=password_confirmation]</selector> </password_confirmation> </fields> </mapping> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php index 93821cb08bd4ca58fa6f120e9eaef2108139bd37..85e21522b002f534b49e6cf0717c2e12d4eeae07 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php @@ -139,7 +139,7 @@ class AddressInjectable extends InjectableFixture protected $postcode = [ 'attribute_code' => 'postcode', 'backend_type' => 'varchar', - 'is_required' => '1', + 'is_required' => '0', 'default_value' => '', 'input' => 'text', ]; diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.xml index 9e99b6951f7b8ea3ed1e73c8f8be67f20efbfbd6..0935d5e55b1329717670ace50bbb2112780d7725 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.xml @@ -81,7 +81,7 @@ <postcode> <attribute_code>postcode</attribute_code> <backend_type>varchar</backend_type> - <is_required>1</is_required> + <is_required>0</is_required> <default_value></default_value> <input>text</input> </postcode> diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest/test.csv b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest/test.csv index b2504a64899209613c15898b53d1d40dbe3df2d3..726c0a3d22d1f3e99311a02dcc4c37bdf43ee33c 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/ChangeCustomerPasswordTest/test.csv @@ -1,4 +1,4 @@ -"initialCustomer/dataSet";"customer/data/current_password";"customer/data/password";"customer/data/confirmation";"constraint";"issue" +"initialCustomer/dataSet";"customer/data/current_password";"customer/data/password";"customer/data/password_confirmation";"constraint";"issue" "default";"123123q";"123123a";"123123a";"assertCustomerInfoSuccessSavedMessage, assertCustomerPasswordChanged";"Bug: MAGETWO-29412" "default";"123123";"123123a";"123123a";"assertChangePasswordFailMessage";"" "default";"123123q";"123123a";"123123";"assertWrongPassConfirmationMessage";"" diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php index b6f0fc765ccb350822d88bec2a1de92f0678ed3e..2517b2646c33d75cc1672864adc3ae1791aeb539 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php @@ -910,4 +910,9 @@ class DownloadableProductInjectable extends InjectableFixture { return $this->getData('downloadable_sample'); } + + public function getIsVirtual() + { + return $this->getData('is_virtual'); + } } diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml index 87f68c2c92cd2e832b58af28a9c6582463502ae2..fc66c7cc8efc03d9ee3e725f33487a5d540a57e4 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.xml @@ -471,6 +471,11 @@ <group /> <source>Magento\Downloadable\Test\Fixture\DownloadableProductInjectable\CheckoutData</source> </checkout_data> + <is_virtual> + <attribute_code>is_virtual</attribute_code> + <backend_type>virtual</backend_type> + <group>product-details</group> + </is_virtual> </fields> <data_set> <sku></sku> diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php index ac30a17faedf680bd3d19eb013927d1dc97c15fd..f9b743f4eed2187f2b903b0662c500e95476a8e4 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php @@ -53,7 +53,7 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch ], 'cartItem' => [ 'price' => 23, - 'subtotal' => 46 + 'subtotal' => 23 ] ], 'forUpdateMiniShoppingCart' => [ diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/test.csv index d92a96a09b3d2e78783b8dcf909d1135ed17517a..1b875f13b36638b9975b7ce3710d02f80503a68a 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/CreateDownloadableProductEntityTest/test.csv @@ -3,13 +3,13 @@ "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"1";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"default";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertDownloadableSamplesData, assertDownloadableLinksData";"" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"33";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"default";"default";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertDownloadableProductForm, assertProductCustomOptionsOnProductPage, assertProductVisibleInCategory, assertProductPage, assertDownloadableLinksData";"" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"55";"Taxable Goods";"10";"In Stock";"Yes";"-";"-";"-";"-";"-";"-";"-";"with_three_samples";"with_three_links";"two_options";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductCustomOptionsOnProductPage, assertProductInGrid, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage, assertDownloadableLinksData, assertProductInStock, assertProductSearchableBySku";"" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"50";"Out of Stock";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductOutOfStock, assertProductInGrid, assertDownloadableProductForm";"Bug: MAGETWO-28450" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"50";"Out of Stock";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductOutOfStock, assertProductInGrid, assertDownloadableProductForm";"" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"9999";"Taxable Goods";"-";"-";"Yes";"Default Category";"-";"-";"Yes";"123";"No";"123";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductOutOfStock";"" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"98";"None";"5";"In Stock";"Yes";"Default Category";"This is description for downloadable product";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage";"" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"57";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData";"Bug: MAGETWO-28905, MAGETWO-28913" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"57";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData";"" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"65";"Taxable Goods";"11";"In Stock";"Yes";"category %isolation%";"This is description for downloadable product";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductPage, assertProductInGrid, assertDownloadableProductForm, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData";"" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"65";"Taxable Goods";"11";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertDownloadableLinksData, assertProductCustomOptionsOnProductPage";"" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"100";"Taxable Goods";"-";"-";"Yes";"Default Category";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertDownloadableProductForm, assertProductVisibleInCategory, assertProductPage";"" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"10";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"5";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductSpecialPriceOnProductPage";"" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"365";"Taxable Goods";"23";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductGroupedPriceOnProductPage";"" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"250";"Taxable Goods";"65";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"default";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductTierPriceOnProductPage";"" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"10";"Taxable Goods";"10";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"5";"-";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductSpecialPriceOnProductPage";"" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"365";"Taxable Goods";"23";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"default";"-";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductGroupedPriceOnProductPage";"" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"250";"Taxable Goods";"65";"In Stock";"Yes";"category %isolation%";"-";"-";"-";"-";"-";"-";"-";"default";"-";"-";"-";"-";"default";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductTierPriceOnProductPage";"" diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/test.csv index 76855f89835735497ec07514054d1571caab0e4c..c808ff7aad0bd80f564aebf5417636e3c863a05b 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/test.csv +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/TestCase/UpdateDownloadableProductEntityTest/test.csv @@ -4,5 +4,4 @@ "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"9999";"Taxable Goods";"123";"-";"Yes";"-";"Default Category";"-";"-";"Yes";"-";"No";"123";"-";"-";"-";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductOutOfStock" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"48";"None";"5";"In Stock";"Yes";"-";"Default Category";"This is description for downloadable product";"-";"-";"-";"-";"-";"-";"default";"-";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage" "DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"54";"Taxable Goods";"10";"In Stock";"Yes";"-";"category %isolation%";"-";"This is short description for downloadable product";"-";"-";"-";"-";"default";"with_three_links";"default";"-";"Yes";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertDownloadableProductForm, assertProductPage, assertProductCustomOptionsOnProductPage, assertDownloadableSamplesData, assertDownloadableLinksData, assertProductInCategory" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"57";"Taxable Goods";"10";"In Stock";"No";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid" -"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"43";"Taxable Goods";"10";"In Stock";"No";"10";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"40";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertProductSpecialPriceOnProductPage, assertProductPage" +"DownloadableProduct_%isolation%";"DownloadableProduct_%isolation%";"43";"Taxable Goods";"10";"In Stock";"Yes";"10";"-";"-";"-";"-";"-";"-";"-";"-";"-";"-";"40";"No";"downloadableproduct-%isolation%";"assertProductSaveMessage, assertProductInGrid, assertProductSpecialPriceOnProductPage, assertProductPage" diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php index 81f1ff42d667522d4ef05ab1729fe7280d8d6fea..edb4e6da7cc56d74044089de79e7b0e31888e2bd 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AbstractAssertPriceOnGroupedProductPage.php @@ -25,15 +25,14 @@ namespace Magento\GroupedProduct\Test\Constraint; use Mtf\Client\Browser; -use Mtf\Fixture\InjectableFixture; +use Magento\Catalog\Test\Fixture\CatalogProductSimple; use Mtf\Constraint\AbstractConstraint; use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable; use Magento\Catalog\Test\Page\Product\CatalogProductView; use Magento\Catalog\Test\Constraint\AssertPriceOnProductPageInterface; /** - * Class AbstractAssertPriceOnGroupedProductPage - * Assert that displayed price on grouped product page equals passed from fixture + * Assert that displayed grouped price on product page equals passed from fixture. */ abstract class AbstractAssertPriceOnGroupedProductPage extends AbstractConstraint { @@ -71,13 +70,12 @@ abstract class AbstractAssertPriceOnGroupedProductPage extends AbstractConstrain $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html'); $groupedData = $product->getAssociated(); - /** @var InjectableFixture $subProduct */ + /** @var CatalogProductSimple $subProduct */ foreach ($groupedData['products'] as $key => $subProduct) { //Process assertions - $catalogProductView->getViewBlock() - ->{'item' . $typePrice . 'PriceProductBlock'}(++$key); + $catalogProductView->getGroupedProductViewBlock()->{'item' . $typePrice . 'PriceProductBlock'}(++$key); $object->setErrorMessage(sprintf($this->errorMessage, $subProduct->getData('name'))); - $object->assertPrice($subProduct, $catalogProductView, 'Grouped'); + $object->assertPrice($subProduct, $catalogProductView->getGroupedProductViewBlock(), 'Grouped'); } } diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php index 2cf7358439304ec2bbb3ba0ba16498fcff2f926d..c785dbd1eb3c62f68796bd3d870cc4dfd8fb28a6 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php @@ -442,7 +442,7 @@ class GroupedProductInjectable extends InjectableFixture 'is_required' => '0', 'default_value' => '', 'input' => 'text', - 'group' => 'autosettings' + 'group' => 'search-engine-optimization' ]; protected $url_path = [ diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.xml index ce5b11fbd4a648f51e8c25b54de63c7ed68c2376..e34dd6249402914f67d802d33940670eed76f5a1 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.xml @@ -303,6 +303,7 @@ <is_required>0</is_required> <default_value></default_value> <input>text</input> + <group>search-engine-optimization</group> </url_key> <url_path> <attribute_code>url_path</attribute_code> diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Product/CatalogProductView.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Product/CatalogProductView.xml index f59d700538cdbd08871280121229ab4259b23b26..949633ecc2b06d77127abb6821d9ee6ffc391388 100755 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Product/CatalogProductView.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Product/CatalogProductView.xml @@ -32,5 +32,10 @@ </grouped> </renders> </viewBlock> + <groupedProductViewBlock> + <class>Magento\GroupedProduct\Test\Block\Catalog\Product\View</class> + <locator>#maincontent</locator> + <strategy>css selector</strategy> + </groupedProductViewBlock> </blocks> </page> diff --git a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php index 2aa5ed5a7c0149ff5d7995f920cf55e4583c3018..644d0d49fadf43ac348b6fa8b9eeb3cc61841f19 100644 --- a/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php +++ b/dev/tests/functional/tests/app/Magento/ImportExport/Test/Constraint/AssertProductAttributeAbsenceForExport.php @@ -50,8 +50,7 @@ class AssertProductAttributeAbsenceForExport extends AbstractConstraint * @param ImportExport $export * @return void */ - public function processAssert - ( + public function processAssert( AdminExportIndex $exportIndex, CatalogProductAttribute $attribute, ImportExport $export diff --git a/dev/tests/functional/utils/bootstrap.php b/dev/tests/functional/utils/bootstrap.php index b7647311f5d7e576f53b3821ed2f95663ae926e3..e750996917f9606688f84c8af858b38ba13e9311 100644 --- a/dev/tests/functional/utils/bootstrap.php +++ b/dev/tests/functional/utils/bootstrap.php @@ -37,6 +37,8 @@ set_include_path($path); $appRoot = dirname(dirname(dirname(dirname(__DIR__)))); require $appRoot . '/app/bootstrap.php'; +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); $objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER); $objectManager = $objectManagerFactory->create($_SERVER); diff --git a/dev/tests/functional/utils/generate/factory.php b/dev/tests/functional/utils/generate/factory.php index 0b250cebc2edc6bd744ca41d94870b391ef51bdd..6c5801a9e53fc429397e76580f23257f0be6a69a 100644 --- a/dev/tests/functional/utils/generate/factory.php +++ b/dev/tests/functional/utils/generate/factory.php @@ -23,6 +23,8 @@ */ require __DIR__ . '/../../../../../app/bootstrap.php'; +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); $mtfRoot = dirname(dirname(dirname(__FILE__))); @@ -30,15 +32,15 @@ $mtfRoot = str_replace('\\', '/', $mtfRoot); define('MTF_BP', $mtfRoot); define('MTF_TESTS_PATH', MTF_BP . '/tests/app/'); -$path = get_include_path(); -$path = rtrim($path, PATH_SEPARATOR); -$path .= PATH_SEPARATOR . MTF_BP; -$path .= PATH_SEPARATOR . MTF_BP . '/lib'; -$path .= PATH_SEPARATOR . MTF_BP . '/tests/app'; -$path .= PATH_SEPARATOR . MTF_BP . '/generated'; -$path .= PATH_SEPARATOR . MTF_BP . '/vendor/magento/mtf'; -$path .= PATH_SEPARATOR . MTF_BP . '/vendor/phpunit/phpunit'; -set_include_path($path); +$paths = [ + MTF_BP, + MTF_BP . '/lib', + MTF_BP . '/tests/app', + MTF_BP . '/generated', + MTF_BP . '/vendor/magento/mtf', + MTF_BP . '/vendor/phpunit/phpunit' +]; +$includePath->addIncludePath($paths); $om = $bootstrap->getObjectManager(); /** @var \Mtf\Util\Generate\Factory $generator */ diff --git a/dev/tests/functional/utils/generate/page.php b/dev/tests/functional/utils/generate/page.php index aef3f988c6cc4aedb3194ff4ec2627ac0d1052da..b9f0ab521fa27227444bc387146a2092afdbb105 100644 --- a/dev/tests/functional/utils/generate/page.php +++ b/dev/tests/functional/utils/generate/page.php @@ -22,6 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ require_once dirname(__DIR__) . '/' . 'bootstrap.php'; - +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); $objectManager->create('Mtf\Util\Generate\Page')->launch(); \Mtf\Util\Generate\GenerateResult::displayResults(); diff --git a/dev/tests/integration/.gitignore b/dev/tests/integration/.gitignore index 60ecdfd9ed8ee284ae5d8061a164da1dd1525f3d..7f8540b3c77105fd0f3e92ca40bfe743ce2cf517 100644 --- a/dev/tests/integration/.gitignore +++ b/dev/tests/integration/.gitignore @@ -1,4 +1,4 @@ /*.xml -/etc/*.xml !/etc/integration-tests-config.xml /var/ +/etc/*.php diff --git a/dev/shell/run_schema_updater.php b/dev/tests/integration/etc/install-config-mysql.php.dist similarity index 62% rename from dev/shell/run_schema_updater.php rename to dev/tests/integration/etc/install-config-mysql.php.dist index 1e4d4a97e6a5465b967d0d3d89280a6220bd83c0..41d077531ecaeb43ccf0b4592e299b91fbee9ecb 100644 --- a/dev/shell/run_schema_updater.php +++ b/dev/tests/integration/etc/install-config-mysql.php.dist @@ -22,14 +22,16 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -use Magento\Framework\App\State as AppState; - -require __DIR__ . '/../../app/bootstrap.php'; -$params = $_SERVER; -if (!isset($params[AppState::PARAM_MODE])) { - $params[AppState::PARAM_MODE] = AppState::MODE_DEVELOPER; -} -$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); -/** @var \Magento\Framework\Module\Updater $updater */ -$updater = $bootstrap->getObjectManager()->create('\Magento\Framework\Module\Updater'); -$updater->updateScheme(); +return [ + 'db_host' => 'localhost', + 'db_user' => 'root', + 'db_pass' => '', + 'db_name' => 'magento_integration_tests', + 'db_prefix' => '', + 'backend_frontname' => 'backend', + 'admin_username' => \Magento\TestFramework\Bootstrap::ADMIN_NAME, + 'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD, + 'admin_email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL, + 'admin_firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME, + 'admin_lastname' => \Magento\TestFramework\Bootstrap::ADMIN_LASTNAME, +]; diff --git a/setup/module/Magento/Config/config/module.config.php b/dev/tests/integration/etc/install-config-mysql.travis.php.dist similarity index 50% rename from setup/module/Magento/Config/config/module.config.php rename to dev/tests/integration/etc/install-config-mysql.travis.php.dist index 0a0f0abd5917c5139cab587a680d0fcf3eb5e033..a6d3aedc4c820677f3d8f6a7d6ce5bb0485b4c72 100644 --- a/setup/module/Magento/Config/config/module.config.php +++ b/dev/tests/integration/etc/install-config-mysql.travis.php.dist @@ -18,10 +18,20 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ return [ - + 'db_host' => '127.0.0.1', + 'db_user' => 'travis', + 'db_pass' => '', + 'db_name' => 'magento_integration_tests', + 'db_prefix' => 'travis_', + 'backend_frontname' => 'backend', + 'admin_username' => \Magento\TestFramework\Bootstrap::ADMIN_NAME, + 'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD, + 'admin_email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL, + 'admin_firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME, + 'admin_lastname' => \Magento\TestFramework\Bootstrap::ADMIN_LASTNAME, ]; diff --git a/dev/tests/integration/etc/local-mysql.travis.xml.dist b/dev/tests/integration/etc/local-mysql.travis.xml.dist deleted file mode 100644 index cf27d833df66385990f32af948643d1cb0be70b9..0000000000000000000000000000000000000000 --- a/dev/tests/integration/etc/local-mysql.travis.xml.dist +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <install> - <!-- Important: validity of installation date indicates whether an application is installed or not --> - <date><![CDATA[d-d-d-d-d]]></date> - </install> - <crypt> - <key><![CDATA[k-k-k-k-k]]></key> - </crypt> - <db> - <table_prefix><![CDATA[travis_]]></table_prefix> - </db> - <connection name="default"> - <host><![CDATA[127.0.0.1]]></host> - <username><![CDATA[travis]]></username> - <password><![CDATA[]]></password> - <dbName><![CDATA[magento_integration_tests]]></dbName> - <initStatements><![CDATA[SET NAMES utf8]]></initStatements> - <model><![CDATA[mysql4]]></model> - <adapter>Magento\TestFramework\Db\ConnectionAdapter</adapter> - <active>1</active> - </connection> - <resource name="default_setup" connection="default"/> - <session_save><![CDATA[files]]></session_save> - <backend> - <frontName><![CDATA[backend]]></frontName> - </backend> -</config> diff --git a/dev/tests/integration/etc/local-mysql.xml.dist b/dev/tests/integration/etc/local-mysql.xml.dist deleted file mode 100644 index a1f72f5ff0a222883c9fde5bac9c85a575faf496..0000000000000000000000000000000000000000 --- a/dev/tests/integration/etc/local-mysql.xml.dist +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <install> - <!-- Important: validity of installation date indicates whether an application is installed or not --> - <date><![CDATA[d-d-d-d-d]]></date> - </install> - <crypt> - <key><![CDATA[k-k-k-k-k]]></key> - </crypt> - <db> - <table_prefix><![CDATA[]]></table_prefix> - </db> - <connection name="default"> - <host><![CDATA[localhost]]></host> - <username><![CDATA[root]]></username> - <password><![CDATA[]]></password> - <dbName><![CDATA[magento_integration_tests]]></dbName> - <initStatements><![CDATA[SET NAMES utf8]]></initStatements> - <model><![CDATA[mysql4]]></model> - <adapter>Magento\TestFramework\Db\ConnectionAdapter</adapter> - <active>1</active> - </connection> - <resource name="default_setup" connection="default"/> - <session_save><![CDATA[files]]></session_save> - <backend> - <frontName><![CDATA[backend]]></frontName> - </backend> -</config> diff --git a/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php b/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php index 7e951befa35a7babf63ba6c112c814f8776eeef0..ead0a031064c43c734b7380428f065a5291296ee 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Annotation/AppArea.php @@ -41,7 +41,6 @@ class AppArea \Magento\Framework\App\Area::AREA_GLOBAL, \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, \Magento\Framework\App\Area::AREA_FRONTEND, - 'install', 'webapi_rest', 'webapi_soap', 'cron' diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php index efca4bf48e13d87967d153d87ad6aa510823bdad..ee6bd6742fccde0f5a97b7e8e7b11dc3c53139dd 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Application.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php @@ -23,15 +23,13 @@ */ namespace Magento\TestFramework; -use Magento\Authorization\Model\UserContextInterface; +use Magento\Framework\Code\Generator\FileResolver; use Magento\Framework\Filesystem; use Magento\Framework\App\Filesystem\DirectoryList; /** * Encapsulates application installation, initialization and uninstall * - * @todo Implement MAGETWO-1689: Standard Installation Method for Integration Tests - * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class Application @@ -49,9 +47,25 @@ class Application protected $_db; /** - * @var \Magento\Framework\Simplexml\Element + * Shell command executor + * + * @var \Magento\Framework\Shell + */ + protected $_shell; + + /** + * Configuration file that contains installation parameters + * + * @var string */ - protected $_localXml; + private $installConfigFile; + + /** + * The loaded installation parameters + * + * @var array + */ + protected $installConfig; /** * Application *.xml configuration files @@ -72,14 +86,14 @@ class Application * * @var string */ - protected $_installDir; + protected $_tmpDir; /** * Installation destination directory with configuration files * * @var string */ - protected $_installEtcDir; + protected $_configDir; /** * Application initialization parameters @@ -110,58 +124,84 @@ class Application protected $_primaryConfigData = array(); /** + * Object manager factory + * * @var \Magento\TestFramework\ObjectManagerFactory */ protected $_factory; + /** + * A factory method + * + * @param string $installConfigFile + * @param string $globalConfigDir + * @param array $moduleConfigFiles + * @param string $appMode + * @param string $tmpDir + * @param \Magento\Framework\Shell $shell + * @return Application + */ + public static function getInstance( + $installConfigFile, + $globalConfigDir, + array $moduleConfigFiles, + $appMode, + $tmpDir, + \Magento\Framework\Shell $shell + ) { + if (!file_exists($installConfigFile)) { + $installConfigFile = $installConfigFile . '.dist'; + } + $sandboxUniqueId = md5(sha1_file($installConfigFile)); + $installDir = "{$tmpDir}/sandbox-{$sandboxUniqueId}"; + FileResolver::addIncludePath($installDir . '/var/generation/'); + return new \Magento\TestFramework\Application( + $shell, + $installDir, + $installConfigFile, + $globalConfigDir, + $moduleConfigFiles, + $appMode + ); + } + /** * Constructor * - * @param \Magento\TestFramework\Db\AbstractDb $dbInstance - * @param string $installDir - * @param \Magento\Framework\Simplexml\Element $localXml - * @param $globalConfigDir + * @param \Magento\Framework\Shell $shell + * @param string $tmpDir + * @param array $installConfigFile + * @param string $globalConfigDir * @param array $moduleEtcFiles * @param string $appMode */ public function __construct( - \Magento\TestFramework\Db\AbstractDb $dbInstance, - $installDir, - \Magento\Framework\Simplexml\Element $localXml, + \Magento\Framework\Shell $shell, + $tmpDir, + $installConfigFile, $globalConfigDir, array $moduleEtcFiles, $appMode ) { - $this->_db = $dbInstance; - $this->_localXml = $localXml; + $this->_shell = $shell; + $this->installConfigFile = $installConfigFile; $this->_globalConfigDir = realpath($globalConfigDir); $this->_moduleEtcFiles = $moduleEtcFiles; $this->_appMode = $appMode; - $this->_installDir = $installDir; - $this->_installEtcDir = "{$installDir}/etc"; + $this->_tmpDir = $tmpDir; + + $customDirs = $this->getCustomDirs(); + $dirList = new \Magento\Framework\App\Filesystem\DirectoryList(BP, $customDirs); - $generationDir = "{$installDir}/generation"; - $customDirs = array( - DirectoryList::CONFIG => array(DirectoryList::PATH => $this->_installEtcDir), - DirectoryList::VAR_DIR => array(DirectoryList::PATH => $installDir), - DirectoryList::MEDIA => array(DirectoryList::PATH => "{$installDir}/media"), - DirectoryList::STATIC_VIEW => array(DirectoryList::PATH => "{$installDir}/pub_static"), - DirectoryList::GENERATION => array(DirectoryList::PATH => $generationDir), - DirectoryList::CACHE => array(DirectoryList::PATH => $installDir . '/cache'), - DirectoryList::LOG => array(DirectoryList::PATH => $installDir . '/log'), - DirectoryList::THEMES => array(DirectoryList::PATH => BP . '/app/design'), - DirectoryList::SESSION => array(DirectoryList::PATH => $installDir . '/session'), - DirectoryList::TMP => array(DirectoryList::PATH => $installDir . '/tmp'), - DirectoryList::UPLOAD => array(DirectoryList::PATH => $installDir . '/upload'), - ); $this->_initParams = array( \Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => $customDirs, \Magento\Framework\App\State::PARAM_MODE => $appMode ); - $dirList = new \Magento\Framework\App\Filesystem\DirectoryList(BP, $customDirs); $driverPool = new \Magento\Framework\Filesystem\DriverPool; $this->_factory = new \Magento\TestFramework\ObjectManagerFactory($dirList, $driverPool); + + $this->_configDir = $dirList->getPath(DirectoryList::CONFIG); } /** @@ -171,15 +211,64 @@ class Application */ public function getDbInstance() { + if (null === $this->_db) { + if ($this->isInstalled()) { + $localConfigFile = $this->getLocalConfig(); + $localConfig = simplexml_load_file($localConfigFile); + $host = (string)$localConfig->connection->host; + $user = (string)$localConfig->connection->username; + $password = (string)$localConfig->connection->password; + $dbName = (string)$localConfig->connection->dbName; + } else { + $installConfig = $this->getInstallConfig(); + $host = $installConfig['db_host']; + $user = $installConfig['db_user']; + $password = $installConfig['db_pass']; + $dbName = $installConfig['db_name']; + } + $this->_db = new Db\Mysql( + $host, + $user, + $password, + $dbName, + $this->getTempDir(), + $this->_shell + ); + } return $this->_db; } /** - * Get directory path with application instance custom data (cache, temporary directory, etc...) + * Gets installation parameters + * + * @return array + */ + protected function getInstallConfig() + { + if (null === $this->installConfig) { + $this->installConfig = include $this->installConfigFile; + } + return $this->installConfig; + } + + /** + * Gets deployment configuration path + * + * @return string + */ + private function getLocalConfig() + { + return $this->_configDir . '/local.xml'; + } + + /** + * Get path to temporary directory + * + * @return string */ - public function getInstallDir() + public function getTempDir() { - return $this->_installDir; + return $this->_tmpDir; } /** @@ -199,13 +288,14 @@ class Application */ public function isInstalled() { - return is_file($this->_installEtcDir . '/local.xml'); + return is_file($this->getLocalConfig()); } /** * Initialize application * * @param array $overriddenParams + * @return void */ public function initialize($overriddenParams = array()) { @@ -267,6 +357,7 @@ class Application * Reset and initialize again an already installed application * * @param array $overriddenParams + * @return void */ public function reinitialize(array $overriddenParams = array()) { @@ -276,6 +367,8 @@ class Application /** * Run application normally, but with encapsulated initialization options + * + * @return void */ public function run() { @@ -288,94 +381,123 @@ class Application /** * Cleanup both the database and the file system + * + * @return void */ public function cleanup() { - $this->_db->cleanup(); - $this->_cleanupFilesystem(); + /** + * @see \Magento\Setup\Mvc\Bootstrap\InitParamListener::BOOTSTRAP_PARAM + */ + $this->_shell->execute( + 'php -f %s uninstall --magento_init_params=%s', + [BP . '/setup/index.php', $this->getInitParamsQuery()] + ); } /** * Install an application * - * @param string $adminUserName - * @param string $adminPassword - * @param string $adminRoleName + * @return void * @throws \Magento\Framework\Exception */ - public function install($adminUserName, $adminPassword, $adminRoleName) + public function install() { - $this->_ensureDirExists($this->_installDir); - $this->_ensureDirExists($this->_installEtcDir); - $this->_ensureDirExists($this->_installDir . '/media'); - $this->_ensureDirExists($this->_installDir . '/static'); + $dirs = \Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS; + $this->_ensureDirExists($this->_tmpDir); + $this->_ensureDirExists($this->_configDir); + $this->_ensureDirExists($this->_initParams[$dirs][DirectoryList::MEDIA][DirectoryList::PATH]); + $this->_ensureDirExists($this->_initParams[$dirs][DirectoryList::STATIC_VIEW][DirectoryList::PATH]); + $this->_ensureDirExists($this->_initParams[$dirs][DirectoryList::VAR_DIR][DirectoryList::PATH]); + + $this->copyAppConfigFiles(); + + $installParams = $this->getInstallCliParams(); + + // performance optimization: restore DB from last good dump to make installation on top of it (much faster) + $db = $this->getDbInstance(); + if ($db->isDbDumpExists()) { + $db->restoreFromDbDump(); + } + + // run install script + $this->_shell->execute( + 'php -f %s install ' . implode(' ', array_keys($installParams)), + array_merge([BP . '/setup/index.php'], array_values($installParams)) + ); + + // enable only specified list of caches + $cacheScript = BP . '/dev/shell/cache.php'; + $initParamsQuery = $this->getInitParamsQuery(); + $this->_shell->execute('php -f %s -- --set=0 --bootstrap=%s', [$cacheScript, $initParamsQuery]); + $cacheTypes = [ + \Magento\Framework\App\Cache\Type\Config::TYPE_IDENTIFIER, + \Magento\Framework\App\Cache\Type\Layout::TYPE_IDENTIFIER, + \Magento\Framework\App\Cache\Type\Translate::TYPE_IDENTIFIER, + \Magento\Eav\Model\Cache\Type::TYPE_IDENTIFIER, + ]; + $this->_shell->execute( + 'php -f %s -- --set=1 --types=%s --bootstrap=%s', + [$cacheScript, implode(',', $cacheTypes), $initParamsQuery] + ); + + // right after a clean installation, store DB dump for future reuse in tests or running the test suite again + if (!$db->isDbDumpExists()) { + $this->getDbInstance()->storeDbDump(); + } + } - // Copy configuration files - $globalConfigFiles = glob($this->_globalConfigDir . '/{*,*/*}.xml', GLOB_BRACE); + /** + * Copies configuration files from the main code base, so the installation could proceed in the tests directory + * + * @return void + */ + private function copyAppConfigFiles() + { + $globalConfigFiles = glob($this->_globalConfigDir . '/{di.xml,local.xml.template,*/*.xml}', GLOB_BRACE); foreach ($globalConfigFiles as $file) { - $targetFile = $this->_installEtcDir . str_replace($this->_globalConfigDir, '', $file); + $targetFile = $this->_configDir . str_replace($this->_globalConfigDir, '', $file); $this->_ensureDirExists(dirname($targetFile)); copy($file, $targetFile); } foreach ($this->_moduleEtcFiles as $file) { - $targetModulesDir = $this->_installEtcDir . '/modules'; + $targetModulesDir = $this->_configDir . '/modules'; $this->_ensureDirExists($targetModulesDir); copy($file, $targetModulesDir . '/' . basename($file)); } + } - /* Make sure that local.xml does not contain an invalid installation date */ - $installDate = (string)$this->_localXml->install->date; - if ($installDate && strtotime($installDate)) { - throw new \Magento\Framework\Exception('Local configuration must contain an invalid installation date.'); - } - - /* Replace local.xml */ - $targetLocalXml = $this->_installEtcDir . '/local.xml'; - $this->_localXml->asNiceXml($targetLocalXml); - - /* Initialize an application in non-installed mode */ - $this->initialize(); - - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') - ->getArea('install')->load(\Magento\Framework\App\Area::PART_CONFIG); - - /* Run all install and data-install scripts */ - /** @var $updater \Magento\Framework\Module\Updater */ - $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\Module\Updater'); - $updater->updateScheme(); - $updater->updateData(); - - /* Enable configuration cache by default in order to improve tests performance */ - /** @var $cacheState \Magento\Framework\App\Cache\StateInterface */ - $cacheState = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\Cache\StateInterface' - ); - $cacheState->setEnabled(\Magento\Framework\App\Cache\Type\Config::TYPE_IDENTIFIER, true); - $cacheState->setEnabled(\Magento\Framework\App\Cache\Type\Layout::TYPE_IDENTIFIER, true); - $cacheState->setEnabled(\Magento\Framework\App\Cache\Type\Translate::TYPE_IDENTIFIER, true); - $cacheState->setEnabled(\Magento\Eav\Model\Cache\Type::TYPE_IDENTIFIER, true); - $cacheState->persist(); - - /* Fill installation date in local.xml to indicate that application is installed */ - $localXml = file_get_contents($targetLocalXml); - $localXml = str_replace($installDate, date('r'), $localXml, $replacementCount); - if ($replacementCount != 1) { - throw new \Magento\Framework\Exception( - "Unable to replace installation date properly in '{$targetLocalXml}' file." - ); + /** + * Gets a list of CLI params for installation + * + * @return array + */ + private function getInstallCliParams() + { + $params = $this->getInstallConfig(); + /** + * Literal value is used instead of constant, because autoloader is not integrated with Magento Setup app + * @see \Magento\Setup\Mvc\Bootstrap\InitParamListener::BOOTSTRAP_PARAM + */ + $params['magento_init_params'] = $this->getInitParamsQuery(); + $result = []; + foreach ($params as $key => $value) { + if (!empty($value)) { + $result["--{$key}=%s"] = $value; + } } - file_put_contents($targetLocalXml, $localXml, LOCK_EX); - - /* Add predefined admin user to the system */ - $this->_createAdminUser($adminUserName, $adminPassword, $adminRoleName); + return $result; + } - /* Switch an application to installed mode */ - $this->initialize(); - //hot fix for \Magento\Catalog\Model\Product\Attribute\Backend\SkuTest::testGenerateUniqueLongSku - /** @var $appState \Magento\Framework\App\State */ - $appState = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State'); - $appState->setInstallDate(date('r', strtotime('now'))); + /** + * Encodes init params into a query string + * + * @return string + */ + private function getInitParamsQuery() + { + return urldecode(http_build_query($this->_initParams)); } /** @@ -384,7 +506,7 @@ class Application * @param array $params * @return array */ - private function _customizeParams($params) + public function _customizeParams($params) { return array_replace_recursive($this->_initParams, $params); } @@ -407,8 +529,9 @@ class Application /** * Create a directory with write permissions or don't touch existing one * - * @throws \Magento\Framework\Exception * @param string $dir + * @return void + * @throws \Magento\Framework\Exception */ protected function _ensureDirExists($dir) { @@ -421,68 +544,6 @@ class Application } } - /** - * Remove temporary files and directories from the filesystem - */ - protected function _cleanupFilesystem() - { - if (!is_dir($this->_installDir)) { - return; - } - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($this->_installDir, \FilesystemIterator::SKIP_DOTS), - \RecursiveIteratorIterator::CHILD_FIRST - ); - foreach ($iterator as $path) { - $path->isFile() ? unlink($path->getPathname()) : rmdir($path->getPathname()); - } - rmdir($this->_installDir); - } - - /** - * Creates predefined admin user to be used by tests, where admin session is required - * - * @param string $adminUserName - * @param string $adminPassword - * @param string $adminRoleName - */ - protected function _createAdminUser($adminUserName, $adminPassword, $adminRoleName) - { - /** @var $user \Magento\User\Model\User */ - $user = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\User\Model\User'); - $user->setData( - array( - 'firstname' => 'firstname', - 'lastname' => 'lastname', - 'email' => 'admin@example.com', - 'username' => $adminUserName, - 'password' => $adminPassword, - 'is_active' => 1 - ) - ); - $user->save(); - - /** @var $roleAdmin \Magento\Authorization\Model\Role */ - $roleAdmin = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Authorization\Model\Role'); - $roleAdmin->load($adminRoleName, 'role_name'); - - /** @var $roleUser \Magento\Authorization\Model\Role */ - $roleUser = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Authorization\Model\Role'); - $roleUser->setData( - array( - 'parent_id' => $roleAdmin->getId(), - 'tree_level' => $roleAdmin->getTreeLevel() + 1, - 'role_type' => \Magento\Authorization\Model\Acl\Role\User::ROLE_TYPE, - 'user_id' => $user->getId(), - 'user_type' => UserContextInterface::USER_TYPE_ADMIN, - 'role_name' => $user->getFirstname() - ) - ); - $roleUser->save(); - } - /** * Ge current application area * @@ -496,7 +557,8 @@ class Application /** * Load application area * - * @param $areaCode + * @param string $areaCode + * @return void */ public function loadArea($areaCode) { @@ -517,4 +579,29 @@ class Application \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea($areaCode); } } + + /** + * Gets customized directory paths + * + * @return array + */ + protected function getCustomDirs() + { + $path = DirectoryList::PATH; + $var = "{$this->_tmpDir}/var"; + $customDirs = array( + DirectoryList::CONFIG => array($path => "{$this->_tmpDir}/etc"), + DirectoryList::VAR_DIR => array($path => $var), + DirectoryList::MEDIA => array($path => "{$this->_tmpDir}/media"), + DirectoryList::STATIC_VIEW => array($path => "{$this->_tmpDir}/pub_static"), + DirectoryList::GENERATION => array($path => "{$var}/generation"), + DirectoryList::CACHE => array($path => "{$var}/cache"), + DirectoryList::LOG => array($path => "{$var}/log"), + DirectoryList::THEMES => array($path => BP . '/app/design'), + DirectoryList::SESSION => array($path => "{$var}/session"), + DirectoryList::TMP => array($path => "{$var}/tmp"), + DirectoryList::UPLOAD => array($path => "{$var}/upload"), + ); + return $customDirs; + } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/Bootstrap.php b/dev/tests/integration/framework/Magento/TestFramework/Bootstrap.php index da44770f85fa401d57f989be314d94df72047311..19f09f15d9903ec7187120b2456fcf73ce42f2e2 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Bootstrap.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Bootstrap.php @@ -29,12 +29,15 @@ namespace Magento\TestFramework; class Bootstrap { - /** + /**#@+ * Predefined admin user credentials */ const ADMIN_NAME = 'user'; - const ADMIN_PASSWORD = 'password1'; + const ADMIN_EMAIL = 'admin@example.com'; + const ADMIN_FIRSTNAME = 'firstname'; + const ADMIN_LASTNAME = 'lastname'; + /**#@- */ /** * Predefined admin user role name @@ -46,16 +49,6 @@ class Bootstrap */ private $_settings; - /** - * @var string - */ - private $_dbVendorName; - - /** - * @var \Magento\Framework\Simplexml\Element - */ - private $dbConfig; - /** * @var \Magento\TestFramework\Application */ @@ -82,21 +75,21 @@ class Bootstrap private $_shell; /** - * Temporary directory to be used to host the application installation sandbox - * - * @var string + * @var \Magento\TestFramework\Bootstrap\MemoryFactory */ - private $_tmpDir; + private $memoryFactory; /** * Constructor * - * @param \Magento\TestFramework\Bootstrap\Settings $settings, - * @param \Magento\TestFramework\Bootstrap\Environment $envBootstrap, - * @param \Magento\TestFramework\Bootstrap\DocBlock $docBlockBootstrap, + * @param \Magento\TestFramework\Bootstrap\Settings $settings + * @param \Magento\TestFramework\Bootstrap\Environment $envBootstrap + * @param \Magento\TestFramework\Bootstrap\DocBlock $docBlockBootstrap * @param \Magento\TestFramework\Bootstrap\Profiler $profilerBootstrap * @param \Magento\Framework\Shell $shell - * @param string $tmpDir + * @param Application $application + * @param Bootstrap\MemoryFactory $memoryFactory + * @internal param string $tmpDir */ public function __construct( \Magento\TestFramework\Bootstrap\Settings $settings, @@ -104,55 +97,28 @@ class Bootstrap \Magento\TestFramework\Bootstrap\DocBlock $docBlockBootstrap, \Magento\TestFramework\Bootstrap\Profiler $profilerBootstrap, \Magento\Framework\Shell $shell, - $tmpDir + \Magento\TestFramework\Application $application, + \Magento\TestFramework\Bootstrap\MemoryFactory $memoryFactory ) { $this->_settings = $settings; $this->_envBootstrap = $envBootstrap; $this->_docBlockBootstrap = $docBlockBootstrap; $this->_profilerBootstrap = $profilerBootstrap; $this->_shell = $shell; - $this->_tmpDir = $tmpDir; - $this->_application = $this->_createApplication( - array( - $this->_settings->getAsConfigFile('TESTS_LOCAL_CONFIG_FILE'), - $this->_settings->getAsConfigFile('TESTS_LOCAL_CONFIG_EXTRA_FILE') - ), - $this->_settings->get('TESTS_GLOBAL_CONFIG_DIR'), - $this->_settings->getAsMatchingPaths('TESTS_MODULE_CONFIG_FILES'), - $this->_settings->get('TESTS_MAGENTO_MODE') - ); + $this->_application = $application; + $this->memoryFactory = $memoryFactory; } /** * Retrieve the application instance * - * @return \Magento\TestFramework\Application + * @return Application */ public function getApplication() { return $this->_application; } - /** - * Retrieve the database vendor name - * - * @return string - */ - public function getDbVendorName() - { - return $this->_dbVendorName; - } - - /** - * Retrieve the database configuration - * - * @return \Magento\Framework\Simplexml\Element - */ - public function getDbConfig() - { - return $this->dbConfig; - } - /** * Perform bootstrap actions required to completely setup the testing environment */ @@ -166,13 +132,13 @@ class Bootstrap $this->_profilerBootstrap->registerFileProfiler($profilerOutputFile); } - $profilerOutputFile = $this->_settings->getAsFile('TESTS_BAMBOO_PROFILER_FILE'); - $profilerMetricsFile = $this->_settings->getAsFile('TESTS_BAMBOO_PROFILER_METRICS_FILE'); - if ($profilerOutputFile && $profilerMetricsFile) { - $this->_profilerBootstrap->registerBambooProfiler($profilerOutputFile, $profilerMetricsFile); + $profilerBambooOutputFile = $this->_settings->getAsFile('TESTS_BAMBOO_PROFILER_FILE'); + $profilerBambooMetricsFile = $this->_settings->getAsFile('TESTS_BAMBOO_PROFILER_METRICS_FILE'); + if ($profilerBambooOutputFile && $profilerBambooMetricsFile) { + $this->_profilerBootstrap->registerBambooProfiler($profilerBambooOutputFile, $profilerBambooMetricsFile); } - $memoryBootstrap = $this->_createMemoryBootstrap( + $memoryBootstrap = $this->memoryFactory->create( $this->_settings->get('TESTS_MEM_USAGE_LIMIT', 0), $this->_settings->get('TESTS_MEM_LEAK_LIMIT', 0) ); @@ -180,122 +146,5 @@ class Bootstrap $memoryBootstrap->activateLimitValidation(); $this->_docBlockBootstrap->registerAnnotations($this->_application); - - if ($this->_settings->getAsBoolean('TESTS_CLEANUP')) { - $this->_application->cleanup(); - } - if ($this->_application->isInstalled()) { - $this->_application->initialize(); - } else { - $this->_application->install(self::ADMIN_NAME, self::ADMIN_PASSWORD, self::ADMIN_ROLE_NAME); - } - } - - /** - * Create and return new memory bootstrap instance - * - * @param int $memUsageLimit - * @param int $memLeakLimit - * @return \Magento\TestFramework\Bootstrap\Memory - */ - protected function _createMemoryBootstrap($memUsageLimit, $memLeakLimit) - { - return new \Magento\TestFramework\Bootstrap\Memory( - new \Magento\TestFramework\MemoryLimit( - $memUsageLimit, - $memLeakLimit, - new \Magento\TestFramework\Helper\Memory($this->_shell) - ) - ); - } - - /** - * Create and return new application instance - * - * @param array $localConfigFiles - * @param string $globalConfigDir - * @param array $moduleConfigFiles - * @param string $appMode - * @return \Magento\TestFramework\Application - */ - protected function _createApplication( - array $localConfigFiles, - $globalConfigDir, - array $moduleConfigFiles, - $appMode - ) { - $localConfigXml = $this->_loadConfigFiles($localConfigFiles); - $this->dbConfig = $localConfigXml->connection; - $this->_dbVendorName = $this->_determineDbVendorName($this->dbConfig); - $sandboxUniqueId = $this->_calcConfigFilesHash($localConfigFiles); - $installDir = "{$this->_tmpDir}/sandbox-{$this->_dbVendorName}-{$sandboxUniqueId}"; - $dbClass = 'Magento\TestFramework\Db\\' . ucfirst($this->_dbVendorName); - /** @var $dbInstance \Magento\TestFramework\Db\AbstractDb */ - $dbInstance = new $dbClass( - (string)$this->dbConfig->host, - (string)$this->dbConfig->username, - (string)$this->dbConfig->password, - (string)$this->dbConfig->dbName, - $this->_tmpDir, - $this->_shell - ); - return new \Magento\TestFramework\Application( - $dbInstance, - $installDir, - $localConfigXml, - $globalConfigDir, - $moduleConfigFiles, - $appMode - ); - } - - /** - * Calculate and return hash of config files' contents - * - * @param array $configFiles - * @return string - */ - protected function _calcConfigFilesHash($configFiles) - { - $result = array(); - foreach ($configFiles as $configFile) { - $result[] = sha1_file($configFile); - } - $result = md5(implode('_', $result)); - return $result; - } - - /** - * @param array $configFiles - * @return \Magento\Framework\Simplexml\Element - */ - protected function _loadConfigFiles(array $configFiles) - { - /** @var $result \Magento\Framework\Simplexml\Element */ - $result = simplexml_load_string('<config/>', 'Magento\Framework\Simplexml\Element'); - foreach ($configFiles as $configFile) { - /** @var $configXml \Magento\Framework\Simplexml\Element */ - $configXml = simplexml_load_file($configFile, 'Magento\Framework\Simplexml\Element'); - $result->extend($configXml); - } - return $result; - } - - /** - * Retrieve database vendor name from the database connection XML configuration - * - * @param \SimpleXMLElement $dbConfig - * @return string - * @throws \Magento\Framework\Exception - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - protected function _determineDbVendorName(\SimpleXMLElement $dbConfig) - { - $dbVendorAlias = 'mysql4'; - $dbVendorMap = array('mysql4' => 'mysql'); - if (!array_key_exists($dbVendorAlias, $dbVendorMap)) { - throw new \Magento\Framework\Exception("Database vendor '{$dbVendorAlias}' is not supported."); - } - return $dbVendorMap[$dbVendorAlias]; } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/Bootstrap/MemoryFactory.php b/dev/tests/integration/framework/Magento/TestFramework/Bootstrap/MemoryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..cd3cc6c6c2dde3ada99a337ba8915fbd6055ca58 --- /dev/null +++ b/dev/tests/integration/framework/Magento/TestFramework/Bootstrap/MemoryFactory.php @@ -0,0 +1,58 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\TestFramework\Bootstrap; + +class MemoryFactory +{ + + /** + * @var \Magento\Framework\Shell + */ + private $shell; + + /** + * @param \Magento\Framework\Shell $shell + */ + public function __construct(\Magento\Framework\Shell $shell) + { + $this->shell = $shell; + } + + /** + * @param string $memUsageLimit + * @param string $memLeakLimit + * @return Memory + */ + public function create($memUsageLimit, $memLeakLimit) + { + return new \Magento\TestFramework\Bootstrap\Memory( + new \Magento\TestFramework\MemoryLimit( + $memUsageLimit, + $memLeakLimit, + new \Magento\TestFramework\Helper\Memory($this->shell) + ) + ); + } +} diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php b/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php index 0b4c8fadc3bcbddaf2ae754dcfd67bbafdfa502c..9a0c04e5117d23042af54be8aa0dbf04e733513f 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php @@ -78,13 +78,9 @@ abstract class AbstractDb * @param string $schema * @param string $varPath * @param \Magento\Framework\Shell $shell - * @throws \Magento\Framework\Exception */ public function __construct($host, $user, $password, $schema, $varPath, \Magento\Framework\Shell $shell) { - if (!is_dir($varPath) || !is_writable($varPath)) { - throw new \Magento\Framework\Exception("The specified '{$varPath}' is not a directory or not writable."); - } $this->_host = $host; $this->_user = $user; $this->_password = $password; @@ -122,6 +118,43 @@ abstract class AbstractDb */ abstract public function restoreFromDbDump(); + /** + * @return string + */ + abstract public function getVendorName(); + + /** + * @return string + */ + public function getSchema() + { + return $this->_schema; + } + + /** + * @return string + */ + public function getHost() + { + return $this->_host; + } + + /** + * @return string + */ + public function getUser() + { + return $this->_user; + } + + /** + * @return string + */ + public function getPassword() + { + return $this->_password; + } + /** * Create file with sql script content. * Utility method that is used in children classes @@ -134,4 +167,14 @@ abstract class AbstractDb { return file_put_contents($file, $content); } + + /** + * @throws \LogicException + */ + protected function assertVarPathWritable() + { + if (!is_dir($this->_varPath) || !is_writable($this->_varPath)) { + throw new \LogicException("The specified '{$this->_varPath}' is not a directory or not writable."); + } + } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php index ec614b438fc01f3a36fbae6bb9195f97c0f92202..d7d6b1859e77e989ac47f5d6ce956933182b23f1 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php @@ -35,20 +35,27 @@ class Mysql extends \Magento\TestFramework\Db\AbstractDb const DEFAULTS_EXTRA_FILE_NAME = 'defaults_extra.cnf'; /** - * Set initial essential parameters + * MySQL DB dump file * - * @param string $host - * @param string $user - * @param string $password - * @param string $schema - * @param string $varPath - * @param \Magento\Framework\Shell $shell - * @throws \Magento\Framework\Exception + * @var string + */ + private $_dbDumpFile; + + /** + * A file that contains credentials to database, to obscure them from logs + * + * @var string + */ + private $_defaultsExtraFile; + + /** + * {@inheritdoc} */ public function __construct($host, $user, $password, $schema, $varPath, \Magento\Framework\Shell $shell) { parent::__construct($host, $user, $password, $schema, $varPath, $shell); - $this->_createDefaultsExtra(); + $this->_dbDumpFile = $this->_varPath . '/setup_dump_' . $this->_schema . '.sql'; + $this->_defaultsExtraFile = rtrim($this->_varPath, '\\/') . '/' . self::DEFAULTS_EXTRA_FILE_NAME; } /** @@ -56,10 +63,11 @@ class Mysql extends \Magento\TestFramework\Db\AbstractDb */ public function cleanup() { + $this->ensureDefaultsExtraFile(); $this->_shell->execute( 'mysql --defaults-extra-file=%s --host=%s %s -e %s', array( - $this->_getDefaultsExtraFileName(), + $this->_defaultsExtraFile, $this->_host, $this->_schema, "DROP DATABASE `{$this->_schema}`; CREATE DATABASE `{$this->_schema}`" @@ -74,7 +82,7 @@ class Mysql extends \Magento\TestFramework\Db\AbstractDb */ protected function getSetupDbDumpFilename() { - return $this->_varPath . '/setup_dump_' . $this->_schema . '.sql'; + return $this->_dbDumpFile; } /** @@ -92,40 +100,49 @@ class Mysql extends \Magento\TestFramework\Db\AbstractDb */ public function storeDbDump() { + $this->ensureDefaultsExtraFile(); $this->_shell->execute( 'mysqldump --defaults-extra-file=%s --host=%s %s > %s', - array($this->_getDefaultsExtraFileName(), $this->_host, $this->_schema, $this->getSetupDbDumpFilename()) + array($this->_defaultsExtraFile, $this->_host, $this->_schema, $this->getSetupDbDumpFilename()) ); } /** - * Restore db from setup db dump + * {@inheritdoc} + * @throws \LogicException */ public function restoreFromDbDump() { + $this->ensureDefaultsExtraFile(); + if (!$this->isDbDumpExists()) { + throw new \LogicException("DB dump file does not exist: " . $this->getSetupDbDumpFilename()); + } $this->_shell->execute( 'mysql --defaults-extra-file=%s --host=%s %s < %s', - array($this->_getDefaultsExtraFileName(), $this->_host, $this->_schema, $this->getSetupDbDumpFilename()) + array($this->_defaultsExtraFile, $this->_host, $this->_schema, $this->getSetupDbDumpFilename()) ); } /** - * Get defaults extra file name - * - * @return string + * {@inheritdoc} */ - protected function _getDefaultsExtraFileName() + public function getVendorName() { - return rtrim($this->_varPath, '\\/') . '/' . self::DEFAULTS_EXTRA_FILE_NAME; + return 'mysql'; } /** * Create defaults extra file + * + * @return void */ - protected function _createDefaultsExtra() + private function ensureDefaultsExtraFile() { - $extraConfig = array('[client]', 'user=' . $this->_user, 'password="' . $this->_password . '"'); - file_put_contents($this->_getDefaultsExtraFileName(), implode(PHP_EOL, $extraConfig)); - chmod($this->_getDefaultsExtraFileName(), 0644); + if (!file_exists($this->_defaultsExtraFile)) { + $this->assertVarPathWritable(); + $extraConfig = array('[client]', 'user=' . $this->_user, 'password="' . $this->_password . '"'); + file_put_contents($this->_defaultsExtraFile, implode(PHP_EOL, $extraConfig)); + chmod($this->_defaultsExtraFile, 0644); + } } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/Helper/Bootstrap.php b/dev/tests/integration/framework/Magento/TestFramework/Helper/Bootstrap.php index a50dc985775130810e223324cd274f7f00373abe..d17e8ffd5585628e9d2606e2b15e6221ce573e7e 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Helper/Bootstrap.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Helper/Bootstrap.php @@ -100,9 +100,9 @@ class Bootstrap * * @return string */ - public function getAppInstallDir() + public function getAppTempDir() { - return $this->_bootstrap->getApplication()->getInstallDir(); + return $this->_bootstrap->getApplication()->getTempDir(); } /** @@ -115,16 +115,6 @@ class Bootstrap return $this->_bootstrap->getApplication()->getInitParams(); } - /** - * Retrieve the database vendor name used by the bootstrap - * - * @return string - */ - public function getDbVendorName() - { - return $this->_bootstrap->getDbVendorName(); - } - /** * Reinitialize the application instance optionally passing parameters to be overridden. * Intended to be used for the tests isolation purposes. diff --git a/dev/tests/integration/framework/Magento/TestFramework/Indexer/TestCase.php b/dev/tests/integration/framework/Magento/TestFramework/Indexer/TestCase.php index 0ef23f8262cec45f2c9761f9f2a9c9c195887907..57bc012a4a136fa7008aa923c392234f5f09a6d9 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Indexer/TestCase.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Indexer/TestCase.php @@ -25,44 +25,15 @@ namespace Magento\TestFramework\Indexer; class TestCase extends \PHPUnit_Framework_TestCase { - public static function setUpBeforeClass() - { - self::_storeDbState(); - parent::setUpBeforeClass(); - } - public static function tearDownAfterClass() { - self::_getDbInstance()->cleanup(); - self::_restoreDbState(); - parent::tearDownAfterClass(); - } - - /** - * Store current database state to db dump - */ - protected static function _storeDbState() - { - self::_getDbInstance()->storeDbDump(); - } - - /** - * Restore current database state to db dump - */ - protected static function _restoreDbState() - { - self::_getDbInstance()->restoreFromDbDump(); - } - - /** - * Get Database connection instance - * - * @return \Magento\TestFramework\Db\AbstractDb - */ - protected static function _getDbInstance() - { - return \Magento\TestFramework\Helper\Bootstrap::getInstance()->getBootstrap() + $db = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getBootstrap() ->getApplication() ->getDbInstance(); + if (!$db->isDbDumpExists()) { + throw new \LogicException('DB dump does not exist.'); + } + $db->cleanup(); + $db->restoreFromDbDump(); } } diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php index e0ab8a1f019515b818d2bcad525d14f757e7e22a..ee2e73c006238ddf549b3d658cbbd825939ad1d0 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php +++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php @@ -141,7 +141,9 @@ class ObjectManagerFactory extends \Magento\Framework\App\ObjectManagerFactory 'Magento\Framework\Interception\PluginList' => 'Magento\TestFramework\Interception\PluginList', 'Magento\Framework\Interception\ObjectManager\Config' => 'Magento\TestFramework\ObjectManager\Config', - 'Magento\Framework\View\LayoutInterface' => 'Magento\TestFramework\View\Layout' + 'Magento\Framework\View\LayoutInterface' => 'Magento\TestFramework\View\Layout', + 'Magento\Framework\Model\Resource\Type\Db\Pdo\Mysql' => + 'Magento\TestFramework\Db\ConnectionAdapter', ] ); } diff --git a/dev/tests/integration/framework/bootstrap.php b/dev/tests/integration/framework/bootstrap.php index 120edeb10280f3e47c12ef22adeed234ea53d76f..45a5ff876434057a4f6d8892a06652c9bf2d99bd 100644 --- a/dev/tests/integration/framework/bootstrap.php +++ b/dev/tests/integration/framework/bootstrap.php @@ -22,6 +22,8 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ require_once __DIR__ . '/../../../../app/bootstrap.php'; +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); require_once __DIR__ . '/../../static/framework/Magento/TestFramework/Utility/Classes.php'; require_once __DIR__ . '/../../static/framework/Magento/TestFramework/Utility/AggregateInvoker.php'; @@ -29,7 +31,7 @@ $testsBaseDir = dirname(__DIR__); $testsTmpDir = "{$testsBaseDir}/tmp"; $magentoBaseDir = realpath("{$testsBaseDir}/../../../"); -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath( +$includePath->addIncludePath( array("{$testsBaseDir}/framework", "{$testsBaseDir}/testsuite") ); @@ -51,21 +53,52 @@ function tool_autoloader($className) spl_autoload_register('tool_autoloader'); -/* Bootstrap the application */ -$invariantSettings = array('TESTS_LOCAL_CONFIG_EXTRA_FILE' => 'etc/integration-tests-config.xml'); -$bootstrap = new \Magento\TestFramework\Bootstrap( - new \Magento\TestFramework\Bootstrap\Settings($testsBaseDir, $invariantSettings + get_defined_constants()), - new \Magento\TestFramework\Bootstrap\Environment(), - new \Magento\TestFramework\Bootstrap\DocBlock("{$testsBaseDir}/testsuite"), - new \Magento\TestFramework\Bootstrap\Profiler(new \Magento\Framework\Profiler\Driver\Standard()), - new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer()), - $testsTmpDir -); -$bootstrap->runBootstrap(); +try { + /* Bootstrap the application */ + $settings = new \Magento\TestFramework\Bootstrap\Settings($testsBaseDir, get_defined_constants()); -\Magento\TestFramework\Helper\Bootstrap::setInstance(new \Magento\TestFramework\Helper\Bootstrap($bootstrap)); + if ($settings->get('TESTS_EXTRA_VERBOSE_LOG')) { + $logWriter = new \Zend_Log_Writer_Stream('php://output'); + $logWriter->setFormatter(new \Zend_Log_Formatter_Simple('%message%' . PHP_EOL)); + $shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer, new \Zend_Log($logWriter)); + } else { + $shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer); + } -Magento\TestFramework\Utility\Files::setInstance(new Magento\TestFramework\Utility\Files($magentoBaseDir)); + $application = \Magento\TestFramework\Application::getInstance( + $settings->getAsConfigFile('TESTS_INSTALL_CONFIG_FILE'), + $settings->get('TESTS_GLOBAL_CONFIG_DIR'), + $settings->getAsMatchingPaths('TESTS_MODULE_CONFIG_FILES'), + $settings->get('TESTS_MAGENTO_MODE'), + $testsTmpDir, + $shell + ); -/* Unset declared global variables to release the PHPUnit from maintaining their values between tests */ -unset($bootstrap); + $bootstrap = new \Magento\TestFramework\Bootstrap( + $settings, + new \Magento\TestFramework\Bootstrap\Environment(), + new \Magento\TestFramework\Bootstrap\DocBlock("{$testsBaseDir}/testsuite"), + new \Magento\TestFramework\Bootstrap\Profiler(new \Magento\Framework\Profiler\Driver\Standard()), + $shell, + $application, + new \Magento\TestFramework\Bootstrap\MemoryFactory($shell) + ); + $bootstrap->runBootstrap(); + if ($settings->getAsBoolean('TESTS_CLEANUP')) { + $application->cleanup(); + } + if (!$application->isInstalled()) { + $application->install(); + } + $application->initialize(); + + \Magento\TestFramework\Helper\Bootstrap::setInstance(new \Magento\TestFramework\Helper\Bootstrap($bootstrap)); + + \Magento\TestFramework\Utility\Files::setInstance(new Magento\TestFramework\Utility\Files($magentoBaseDir)); + + /* Unset declared global variables to release the PHPUnit from maintaining their values between tests */ + unset($testsBaseDir, $testsTmpDir, $magentoBaseDir, $logWriter, $settings, $shell, $application, $bootstrap); +} catch (\Exception $e) { + echo $e . PHP_EOL; + exit(1); +} diff --git a/dev/tests/integration/framework/tests/unit/framework/bootstrap.php b/dev/tests/integration/framework/tests/unit/framework/bootstrap.php index fcffb0f361e7b00a89e7ef428ecb70d4fb8d9fbf..5c7d9ac968d19abf6a1a96febc00fa2ffab64968 100644 --- a/dev/tests/integration/framework/tests/unit/framework/bootstrap.php +++ b/dev/tests/integration/framework/tests/unit/framework/bootstrap.php @@ -24,4 +24,6 @@ $rootDir = realpath(__DIR__ . '/../../../../../../../'); require_once $rootDir . '/app/bootstrap.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath($rootDir . '/dev/tests/integration/framework'); +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); +$includePath->addIncludePath($rootDir . '/dev/tests/integration/framework'); diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php index 025835bff63a1ec7817f086b97e2b8a3226460f2..1a7c568e112b3ea618011bc5c4424ab26b9f23f5 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php @@ -29,37 +29,26 @@ use Magento\Framework\App\State; class ApplicationTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\TestFramework\Application::getInstallDir() + * @covers \Magento\TestFramework\getTemporaryDir::getTemoraryDir() * @covers \Magento\TestFramework\Application::getDbInstance() * @covers \Magento\TestFramework\Application::getInitParams() */ public function testConstructor() { - $dbInstance = $this->getMockForAbstractClass('Magento\TestFramework\Db\AbstractDb', array(), '', false); - $installDir = '/install/dir'; + $shell = $this->getMock('\Magento\Framework\Shell', [], [], '', false); + $tempDir = '/temp/dir'; $appMode = \Magento\Framework\App\State::MODE_DEVELOPER; - $directoryList = new \Magento\Framework\App\Filesystem\DirectoryList(BP); - $driverPool = new \Magento\Framework\Filesystem\DriverPool; - $filesystem = new \Magento\Framework\Filesystem( - $directoryList, - new \Magento\Framework\Filesystem\Directory\ReadFactory($driverPool), - new \Magento\Framework\Filesystem\Directory\WriteFactory($driverPool), - new \Magento\Framework\Filesystem\File\ReadFactory($driverPool), - new \Magento\Framework\Filesystem\File\WriteFactory($driverPool) - ); $object = new \Magento\TestFramework\Application( - $dbInstance, - $installDir, - new \Magento\Framework\Simplexml\Element('<data/>'), + $shell, + $tempDir, + 'local.xml', '', array(), - $appMode, - $filesystem + $appMode ); - $this->assertSame($dbInstance, $object->getDbInstance(), 'Db instance is not set in Application'); - $this->assertEquals($installDir, $object->getInstallDir(), 'Install directory is not set in Application'); + $this->assertEquals($tempDir, $object->getTempDir(), 'Temp directory is not set in Application'); $initParams = $object->getInitParams(); $this->assertInternalType('array', $initParams, 'Wrong initialization parameters type'); diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/BootstrapTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/BootstrapTest.php index 5f99abeb99ac50253eb539ea51bf05772a196432..c1990026f30e0c25457258f9bd6377909d96bffb 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/BootstrapTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/BootstrapTest.php @@ -30,7 +30,7 @@ namespace Magento\Test; class BootstrapTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\TestFramework\Bootstrap|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\TestFramework\Bootstrap|\PHPUnit_Framework_MockObject_MockObject */ protected $_object; @@ -40,40 +40,44 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_requiredSettings = array( - 'TESTS_LOCAL_CONFIG_FILE' => 'etc/local-mysql.xml', - 'TESTS_LOCAL_CONFIG_EXTRA_FILE' => 'etc/integration-tests-config.xml' + 'TESTS_INSTALL_CONFIG_FILE' => 'etc/install-config-mysql.php', ); /** - * @var \Magento\TestFramework\Bootstrap\Settings + * @var \Magento\TestFramework\Bootstrap\Settings|\PHPUnit_Framework_MockObject_MockObject */ protected $_settings; /** - * @var \Magento\TestFramework\Bootstrap\Environment|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\TestFramework\Bootstrap\Environment|\PHPUnit_Framework_MockObject_MockObject */ protected $_envBootstrap; /** - * @var \Magento\TestFramework\Bootstrap\DocBlock|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\TestFramework\Bootstrap\DocBlock|\PHPUnit_Framework_MockObject_MockObject */ protected $_docBlockBootstrap; /** - * @var \Magento\TestFramework\Bootstrap\Profiler|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\TestFramework\Bootstrap\Profiler|\PHPUnit_Framework_MockObject_MockObject */ protected $_profilerBootstrap; /** - * @var \Magento\TestFramework\Bootstrap\Memory + * @var \Magento\TestFramework\Bootstrap\MemoryFactory|\PHPUnit_Framework_MockObject_MockObject */ - protected $_memoryBootstrap; + protected $memoryFactory; /** - * @var \Magento\Framework\Shell|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Shell|\PHPUnit_Framework_MockObject_MockObject */ protected $_shell; + /** + * @var \Magento\TestFramework\Application|\PHPUnit_Framework_MockObject_MockObject + */ + private $application; + /** * @var string */ @@ -82,10 +86,7 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_integrationTestsDir = realpath(__DIR__ . '/../../../../../../'); - $this->_settings = new \Magento\TestFramework\Bootstrap\Settings( - $this->_integrationTestsDir, - $this->_requiredSettings - ); + $this->_settings = $this->getMock('\Magento\TestFramework\Bootstrap\Settings', [], [], '', false); $this->_envBootstrap = $this->getMock( 'Magento\TestFramework\Bootstrap\Environment', array('emulateHttpRequest', 'emulateSession') @@ -101,21 +102,17 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase array('registerFileProfiler', 'registerBambooProfiler'), array($profilerDriver) ); - $this->_memoryBootstrap = $this->getMock( - 'Magento\TestFramework\Bootstrap\Memory', - array('activateStatsDisplaying', 'activateLimitValidation'), - array(), - '', - false - ); $this->_shell = $this->getMock('Magento\Framework\Shell', array('execute'), array(), '', false); + $this->application = $this->getMock('\Magento\TestFramework\Application', [], [], '', false); + $this->memoryFactory = $this->getMock('\Magento\TestFramework\Bootstrap\MemoryFactory', [], [], '', false); $this->_object = new \Magento\TestFramework\Bootstrap( $this->_settings, $this->_envBootstrap, $this->_docBlockBootstrap, $this->_profilerBootstrap, $this->_shell, - __DIR__ + $this->application, + $this->memoryFactory ); } @@ -130,170 +127,89 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase $this->_shell = null; } - /** - * @param array $fixtureSettings - * @return \Magento\TestFramework\Application|PHPUnit_Framework_MockObject_MockObject - */ - protected function _injectApplicationMock(array $fixtureSettings = array()) - { - $fixtureSettings += $this->_requiredSettings; - $application = $this->getMock( - 'Magento\TestFramework\Application', - array('cleanup', 'isInstalled', 'initialize', 'install'), - array(), - '', - false - ); - $settings = new \Magento\TestFramework\Bootstrap\Settings($this->_integrationTestsDir, $fixtureSettings); - // prevent calling the constructor because of mocking the method it invokes - $this->_object = $this->getMock( - 'Magento\TestFramework\Bootstrap', - array('_createApplication', '_createMemoryBootstrap'), - array(), - '', - false - ); - $this->_object->expects($this->any())->method('_createApplication')->will($this->returnValue($application)); - // invoke the constructor explicitly - $this->_object->__construct( - $settings, - $this->_envBootstrap, - $this->_docBlockBootstrap, - $this->_profilerBootstrap, - $this->_shell, - __DIR__ - ); - $this->_object->expects( - $this->any() - )->method( - '_createMemoryBootstrap' - )->will( - $this->returnValue($this->_memoryBootstrap) - ); - return $application; - } - public function testGetApplication() { - $application = $this->_object->getApplication(); - $this->assertInstanceOf('Magento\TestFramework\Application', $application); - $this->assertStringStartsWith(__DIR__ . '/sandbox-mysql-', $application->getInstallDir()); - $this->assertInstanceOf('Magento\TestFramework\Db\Mysql', $application->getDbInstance()); - $this->assertSame($application, $this->_object->getApplication()); - } - - public function testGetDbVendorName() - { - $this->assertEquals('mysql', $this->_object->getDbVendorName()); + $this->assertSame($this->application, $this->_object->getApplication()); } - public function testRunBootstrapEnvironment() + public function testRunBootstrap() { - $this->_injectApplicationMock(); - $this->_envBootstrap->expects($this->once())->method('emulateHttpRequest')->with($this->identicalTo($_SERVER)); - $this->_envBootstrap->expects( - $this->once() - )->method( - 'emulateSession' - )->with( - $this->identicalTo(isset($_SESSION) ? $_SESSION : null) + $this->_envBootstrap->expects($this->once()) + ->method('emulateHttpRequest') + ->with($this->identicalTo($_SERVER)) + ; + $this->_envBootstrap->expects($this->once()) + ->method('emulateSession') + ->with($this->identicalTo(isset($_SESSION) ? $_SESSION : null)) + ; + + $memUsageLimit = '100B'; + $memLeakLimit = '60B'; + $settingsMap = [ + ['TESTS_MEM_USAGE_LIMIT', 0, $memUsageLimit], + ['TESTS_MEM_LEAK_LIMIT', 0, $memLeakLimit], + ]; + $this->_settings->expects($this->any()) + ->method('get') + ->will($this->returnValueMap($settingsMap)); + $memoryBootstrap = $this->getMock( + 'Magento\TestFramework\Bootstrap\Memory', + array('activateStatsDisplaying', 'activateLimitValidation'), + array(), + '', + false ); - $this->_object->runBootstrap(); - } + $memoryBootstrap->expects($this->once())->method('activateStatsDisplaying'); + $memoryBootstrap->expects($this->once())->method('activateLimitValidation'); + $this->memoryFactory->expects($this->once()) + ->method('create') + ->with($memUsageLimit, $memLeakLimit) + ->will($this->returnValue($memoryBootstrap)); - public function testRunBootstrapProfilerDisabled() - { - $this->_injectApplicationMock(); - $this->_profilerBootstrap->expects($this->never())->method($this->anything()); - $this->_object->runBootstrap(); - } + $this->_docBlockBootstrap->expects($this->once()) + ->method('registerAnnotations') + ->with($this->isInstanceOf('Magento\TestFramework\Application')) + ; - public function testRunBootstrapProfilerEnabled() - { - $baseDir = $this->_integrationTestsDir; - $this->_injectApplicationMock( - array( - 'TESTS_PROFILER_FILE' => 'profiler.csv', - 'TESTS_BAMBOO_PROFILER_FILE' => 'profiler_bamboo.csv', - 'TESTS_BAMBOO_PROFILER_METRICS_FILE' => 'profiler_metrics.php' - ) - ); - $this->_profilerBootstrap->expects( - $this->once() - )->method( - 'registerFileProfiler' - )->with( - "{$baseDir}/profiler.csv" - ); - $this->_profilerBootstrap->expects( - $this->once() - )->method( - 'registerBambooProfiler' - )->with( - "{$baseDir}/profiler_bamboo.csv", - "{$baseDir}/profiler_metrics.php" - ); - $this->_object->runBootstrap(); - } + $this->_profilerBootstrap->expects($this->never())->method($this->anything()); - public function testRunBootstrapMemoryWatch() - { - $this->_injectApplicationMock(array('TESTS_MEM_USAGE_LIMIT' => 100, 'TESTS_MEM_LEAK_LIMIT' => 60)); - $this->_object->expects( - $this->once() - )->method( - '_createMemoryBootstrap' - )->with( - 100, - 60 - )->will( - $this->returnValue($this->_memoryBootstrap) - ); - $this->_memoryBootstrap->expects($this->once())->method('activateStatsDisplaying'); - $this->_memoryBootstrap->expects($this->once())->method('activateLimitValidation'); $this->_object->runBootstrap(); } - public function testRunBootstrapDocBlockAnnotations() + public function testRunBootstrapProfilerEnabled() { - $this->_injectApplicationMock(); - $this->_docBlockBootstrap->expects( - $this->once() - )->method( - 'registerAnnotations' - )->with( - $this->isInstanceOf('Magento\TestFramework\Application') + $memoryBootstrap = $this->getMock( + 'Magento\TestFramework\Bootstrap\Memory', + array('activateStatsDisplaying', 'activateLimitValidation'), + array(), + '', + false ); - $this->_object->runBootstrap(); - } - - public function testRunBootstrapAppCleanup() - { - $application = $this->_injectApplicationMock(array('TESTS_CLEANUP' => 'enabled')); - $application->expects($this->once())->method('cleanup'); - $this->_object->runBootstrap(); - } - - public function testRunBootstrapAppInitialize() - { - $application = $this->_injectApplicationMock(); - $application->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); - $application->expects($this->once())->method('initialize'); - $application->expects($this->never())->method('install'); - $application->expects($this->never())->method('cleanup'); - $this->_object->runBootstrap(); - } - - public function testRunBootstrapAppInstall() - { - $adminUserName = \Magento\TestFramework\Bootstrap::ADMIN_NAME; - $adminPassword = \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD; - $adminRoleName = \Magento\TestFramework\Bootstrap::ADMIN_ROLE_NAME; - $application = $this->_injectApplicationMock(); - $application->expects($this->once())->method('isInstalled')->will($this->returnValue(false)); - $application->expects($this->once())->method('install')->with($adminUserName, $adminPassword, $adminRoleName); - $application->expects($this->never())->method('initialize'); - $application->expects($this->never())->method('cleanup'); + $memoryBootstrap->expects($this->once())->method('activateStatsDisplaying'); + $memoryBootstrap->expects($this->once())->method('activateLimitValidation'); + $this->memoryFactory->expects($this->once()) + ->method('create') + ->with(0, 0) + ->will($this->returnValue($memoryBootstrap)); + + $settingsMap = [ + ['TESTS_PROFILER_FILE', '', 'profiler.csv'], + ['TESTS_BAMBOO_PROFILER_FILE', '', 'profiler_bamboo.csv'], + ['TESTS_BAMBOO_PROFILER_METRICS_FILE', '', 'profiler_metrics.php'], + ]; + $this->_settings->expects($this->any()) + ->method('getAsFile') + ->will($this->returnValueMap($settingsMap)); + $this->_profilerBootstrap + ->expects($this->once()) + ->method('registerFileProfiler') + ->with("profiler.csv") + ; + $this->_profilerBootstrap + ->expects($this->once()) + ->method('registerBambooProfiler') + ->with("profiler_bamboo.csv", "profiler_metrics.php") + ; $this->_object->runBootstrap(); } } diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php index 9bbbc91222bf4fb0c4c247ed7befee68e82084db..66af635ec73932014f88a7e9e54f884290684a23 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php @@ -63,7 +63,7 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase { $this->_application = $this->getMock( 'Magento\TestFramework\Application', - array('getInstallDir', 'getInitParams', 'reinitialize', 'run'), + array('getTempDir', 'getInitParams', 'reinitialize', 'run'), array(), '', false @@ -162,10 +162,10 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase } } - public function testGetAppInstallDir() + public function testGetAppTempDir() { - $this->_application->expects($this->once())->method('getInstallDir')->will($this->returnValue(__DIR__)); - $this->assertEquals(__DIR__, $this->_object->getAppInstallDir()); + $this->_application->expects($this->once())->method('getTempDir')->will($this->returnValue(__DIR__)); + $this->assertEquals(__DIR__, $this->_object->getAppTempDir()); } public function testGetAppInitParams() @@ -180,12 +180,6 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->_fixtureInitParams, $this->_object->getAppInitParams()); } - public function testGetDbVendorName() - { - $this->_bootstrap->expects($this->once())->method('getDbVendorName')->will($this->returnValue('mysql')); - $this->assertEquals('mysql', $this->_object->getDbVendorName()); - } - public function testReinitialize() { $this->_application->expects($this->once())->method('reinitialize')->with($this->_fixtureInitParams); diff --git a/dev/tests/integration/phpunit.xml.dist b/dev/tests/integration/phpunit.xml.dist index e4604cea0b1d689087c006e3243c7c7358efca07..7ea0558b0a92157090f6ece324630d415a23b2b6 100644 --- a/dev/tests/integration/phpunit.xml.dist +++ b/dev/tests/integration/phpunit.xml.dist @@ -57,7 +57,7 @@ <ini name="date.timezone" value="America/Los_Angeles"/> <ini name="xdebug.max_nesting_level" value="200"/> <!-- Local XML configuration file ('.dist' extension will be added, if the specified file doesn't exist) --> - <const name="TESTS_LOCAL_CONFIG_FILE" value="etc/local-mysql.xml"/> + <const name="TESTS_INSTALL_CONFIG_FILE" value="etc/install-config-mysql.php"/> <!-- Semicolon-separated 'glob' patterns, that match global XML configuration files --> <const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/> <!-- Semicolon-separated 'glob' patterns, that match module declaration XML configuration files --> @@ -67,6 +67,8 @@ <!-- Memory usage and estimated leaks thresholds --> <!--<const name="TESTS_MEM_USAGE_LIMIT" value="1024M"/>--> <const name="TESTS_MEM_LEAK_LIMIT" value=""/> + <!-- Whether to output all CLI commands executed by the bootstrap and tests --> + <!--<const name="TESTS_EXTRA_VERBOSE_LOG" value="1"/>--> <!-- Path to Percona Toolkit bin directory --> <!--<const name="PERCONA_TOOLKIT_BIN_DIR" value=""/>--> <!-- CSV Profiler Output file --> diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php index a788b07f4158d08e8c1a95d12aefb9f3b9cd14b0..44268da011915e6b8ba09d5ad1c1f4526aa36b61 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php @@ -32,11 +32,6 @@ namespace Magento\Catalog\Model; */ class CategoryTest extends \PHPUnit_Framework_TestCase { - /** - * @var \Magento\TestFramework\ObjectManager - */ - protected static $_objectManager; - /** * @var \Magento\Store\Model\Store */ @@ -47,26 +42,13 @@ class CategoryTest extends \PHPUnit_Framework_TestCase */ protected $_model; - public static function setUpBeforeClass() - { - self::$_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - - if (\Magento\TestFramework\Helper\Bootstrap::getInstance()->getDbVendorName() != 'mysql') { - self::markTestIncomplete('Bug MAGETWO-8513'); - } - } - - public static function tearDownAfterClass() - { - self::$_objectManager = null; - } - protected function setUp() { + $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $storeManager \Magento\Framework\StoreManagerInterface */ - $storeManager = self::$_objectManager->get('Magento\Framework\StoreManagerInterface'); + $storeManager = $objectManager->get('Magento\Framework\StoreManagerInterface'); $this->_store = $storeManager->getStore(); - $this->_model = self::$_objectManager->create('Magento\Catalog\Model\Category'); + $this->_model = $objectManager->create('Magento\Catalog\Model\Category'); } public function testGetUrlInstance() diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Category/MetadataServiceTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Category/MetadataServiceTest.php index 5e92632195844b0c7c3f0e829040ae908c6e27cd..03ba66fd324533d542b025bda17a910af92191aa 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Category/MetadataServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Category/MetadataServiceTest.php @@ -34,7 +34,7 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->configure( [ - 'Magento\Framework\Service\Config\Reader' => [ + 'Magento\Framework\Api\Config\Reader' => [ 'arguments' => [ 'fileResolver' => ['instance' => 'Magento\Customer\Service\V1\FileResolverStub'] ] diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php index 5c6bbf01133d0db8c917d4f6a158d27e92a55b4c..ad388cfaf769370483f714474dc21d1a9cda192b 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php @@ -34,7 +34,7 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->configure( [ - 'Magento\Framework\Service\Config\Reader' => [ + 'Magento\Framework\Api\Config\Reader' => [ 'arguments' => [ 'fileResolver' => ['instance' => 'Magento\Customer\Service\V1\FileResolverStub'] ] diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/etc/data_object.xml b/dev/tests/integration/testsuite/Magento/Catalog/_files/etc/data_object.xml index a2069f0d8a4264efa3d63e104e8159c7efa58264..f81aee0eb07d41df75fb8031b3ecd2ffed9239a7 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/etc/data_object.xml +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/etc/data_object.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Service/etc/data_object.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Api/etc/data_object.xsd"> <custom_attributes for="Magento\Tax\Service\V1\Data\TaxRate"> </custom_attributes> <custom_attributes for="Magento\Catalog\Service\V1\Data\Product"> diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php index 943cc8210354605c34d501f8a1dc4b07b32b9d45..f1baa69f152dbe95cfa470ac471f3211091a9597 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php @@ -108,11 +108,10 @@ class CollectionTest extends \PHPUnit_Framework_TestCase } /** - * Test is theme present in file system + * Test if theme present in file system * * @magentoAppIsolation enabled * @covers \Magento\Core\Model\Theme\Collection::hasTheme - * @magentoAppArea install */ public function testHasThemeInCollection() { @@ -133,7 +132,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase ) ); - $this->_model->addDefaultPattern('*'); + $this->_model->addDefaultPattern(); $this->assertFalse($this->_model->hasTheme($themeModel)); } } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php index 20ab2c48ae08321e39882b84173201a8b68fab36..b7cb33555c49bc2288d5415bc25baa52fc507fe2 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php @@ -127,7 +127,7 @@ class DesignTest extends \PHPUnit_Framework_TestCase { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $themes = array('frontend' => 'test_f', 'adminhtml' => 'test_a', 'install' => 'test_i'); + $themes = array('frontend' => 'test_f', 'adminhtml' => 'test_a'); $design = $objectManager->create('Magento\Core\Model\View\Design', array('themes' => $themes)); $objectManager->addSharedInstance($design, 'Magento\Core\Model\View\Design'); @@ -137,8 +137,6 @@ class DesignTest extends \PHPUnit_Framework_TestCase $this->assertEquals('test_f', $model->getConfigurationDesignTheme('frontend')); $this->assertEquals('test_f', $model->getConfigurationDesignTheme('frontend', array('store' => 0))); $this->assertEquals('test_f', $model->getConfigurationDesignTheme('frontend', array('store' => null))); - $this->assertEquals('test_i', $model->getConfigurationDesignTheme('install')); - $this->assertEquals('test_i', $model->getConfigurationDesignTheme('install', array('store' => uniqid()))); $this->assertEquals('test_a', $model->getConfigurationDesignTheme('adminhtml')); $this->assertEquals('test_a', $model->getConfigurationDesignTheme('adminhtml', array('store' => uniqid()))); } diff --git a/dev/tests/integration/testsuite/Magento/CurrencySymbol/Model/System/CurrencysymbolTest.php b/dev/tests/integration/testsuite/Magento/CurrencySymbol/Model/System/CurrencysymbolTest.php index 670ec5aa2cca2c7e49633ecc007a7d5c3708e3c1..bb770ba587c62c66d68f65c9322eab17b97c1ef0 100644 --- a/dev/tests/integration/testsuite/Magento/CurrencySymbol/Model/System/CurrencysymbolTest.php +++ b/dev/tests/integration/testsuite/Magento/CurrencySymbol/Model/System/CurrencysymbolTest.php @@ -59,6 +59,9 @@ class CurrencysymbolTest extends \PHPUnit_Framework_TestCase $this->assertArrayHasKey('EUR', $currencySymbolsData, 'Default currency option for EUR is missing.'); } + /** + * @magentoDbIsolation enabled + */ public function testSetEmptyCurrencySymbolsData() { $currencySymbolsDataBefore = $this->currencySymbolModel->getCurrencySymbolsData(); @@ -71,6 +74,9 @@ class CurrencysymbolTest extends \PHPUnit_Framework_TestCase $this->assertEquals($currencySymbolsDataBefore, $currencySymbolsDataAfter); } + /** + * @magentoDbIsolation enabled + */ public function testSetCurrencySymbolsData() { $currencySymbolsData = $this->currencySymbolModel->getCurrencySymbolsData(); @@ -92,15 +98,6 @@ class CurrencysymbolTest extends \PHPUnit_Framework_TestCase $this->assertEquals('@', $this->currencySymbolModel->getCurrencySymbol('EUR'), 'Symbol not set correctly.'); } - /** - * @depends testSetCurrencySymbolsData - */ - public function testGetCurrencySymbol() - { - //dependency is added for now since tear down (or app isolation) is not helping clear the configuration data - $this->assertEquals('@', $this->currencySymbolModel->getCurrencySymbol('EUR')); - } - public function testGetCurrencySymbolNonExistent() { $this->assertFalse($this->currencySymbolModel->getCurrencySymbol('AUD')); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Api/AddressRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Api/AddressRepositoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..60bb396053da63f9e9737c53ba42bae1bad98d78 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Api/AddressRepositoryTest.php @@ -0,0 +1,431 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Api; + +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; + +/** + * Integration test for service layer \Magento\Customer\Model\Resource\AddressRepository + * + * @SuppressWarnings(PHPMD.TooManyMethods) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + */ +class AddressRepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** @var AddressRepositoryInterface */ + private $repository; + + /** @var \Magento\Framework\ObjectManager */ + private $_objectManager; + + /** @var \Magento\Customer\Model\Data\Address[] */ + private $_expectedAddresses; + + /** @var \Magento\Customer\Api\Data\AddressDataBuilder */ + private $_addressBuilder; + + protected function setUp() + { + $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->repository = $this->_objectManager->create('Magento\Customer\Api\AddressRepositoryInterface'); + $this->_addressBuilder = $this->_objectManager->create('Magento\Customer\Api\Data\AddressDataBuilder'); + + $builder = $this->_objectManager->create('\Magento\Customer\Api\Data\RegionDataBuilder'); + $region = $builder + ->setRegionCode('AL') + ->setRegion('Alabama') + ->setRegionId(1) + ->create(); + $this->_addressBuilder + ->setId(1) + ->setCountryId('US') + ->setCustomerId(1) + ->setPostcode('75477') + ->setRegion($region) + ->setStreet('Green str, 67') + ->setTelephone('3468676') + ->setCity('CityM') + ->setFirstname('John') + ->setLastname('Smith') + ->setCompany('CompanyName'); + $address = $this->_addressBuilder->create(); + + /* XXX: would it be better to have a clear method for this? */ + $this->_addressBuilder + ->setId(2) + ->setCountryId('US') + ->setCustomerId(1) + ->setPostcode('47676') + ->setRegion($region) + ->setStreet('Black str, 48') + ->setCity('CityX') + ->setTelephone('3234676') + ->setFirstname('John') + ->setLastname('Smith'); + $address2 = $this->_addressBuilder->create(); + + $this->_expectedAddresses = array($address, $address2); + } + + protected function tearDown() + { + $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + /** @var \Magento\Customer\Model\CustomerRegistry $customerRegistry */ + $customerRegistry = $objectManager->get('Magento\Customer\Model\CustomerRegistry'); + $customerRegistry->remove(1); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php + * @magentoAppIsolation enabled + */ + public function testSaveAddressChanges() + { + $address = $this->repository->get(2); + + $proposedAddressBuilder = $this->_addressBuilder->populate($address); + $proposedAddressBuilder->setRegion($address->getRegion()); + // change phone # + $proposedAddressBuilder->setTelephone('555' . $address->getTelephone()); + $proposedAddressObject = $proposedAddressBuilder->create(); + $proposedAddress = $this->repository->save($proposedAddressObject); + $this->assertEquals(2, $proposedAddress->getId()); + + $savedAddress = $this->repository->get(2); + $this->assertNotEquals($this->_expectedAddresses[1]->getTelephone(), $savedAddress->getTelephone()); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php + * @magentoAppIsolation enabled + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @expectedExceptionMessage No such entity with addressId = 4200 + */ + public function testSaveAddressesIdSetButNotAlreadyExisting() + { + $proposedAddressBuilder = $this->_createSecondAddressBuilder()->setId(4200); + $proposedAddress = $proposedAddressBuilder->create(); + $this->repository->save($proposedAddress); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php + * @magentoAppIsolation enabled + */ + public function testGetAddressById() + { + $addressId = 2; + $address = $this->repository->get($addressId); + $this->assertEquals($this->_expectedAddresses[1], $address); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @expectedExceptionMessage No such entity with addressId = 12345 + */ + public function testGetAddressByIdBadAddressId() + { + $this->repository->get(12345); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoAppIsolation enabled + */ + public function testSaveNewAddress() + { + $proposedAddress = $this->_createSecondAddressBuilder()->setCustomerId(1)->create(); + + $returnedAddress = $this->repository->save($proposedAddress); + $this->assertNotNull($returnedAddress->getId()); + + $savedAddress = $this->repository->get($returnedAddress->getId()); + + $expectedNewAddressBuilder = $this->_addressBuilder->populate($this->_expectedAddresses[1]); + $expectedNewAddressBuilder->setId($savedAddress->getId()); + $expectedNewAddressBuilder->setRegion($this->_expectedAddresses[1]->getRegion()); + $expectedNewAddress = $expectedNewAddressBuilder->create(); + $this->assertEquals($expectedNewAddress, $savedAddress); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoAppIsolation enabled + */ + public function testSaveNewAddressWithAttributes() + { + $addressBuilder = $this->_createFirstAddressBuilder() + ->setCustomAttribute('firstname', 'Jane') + ->setCustomAttribute('id', 4200) + ->setCustomAttribute('weird', 'something_strange_with_hair') + ->setId(null) + ->setCustomerId(1); + $proposedAddress = $addressBuilder->create(); + + $returnedAddress = $this->repository->save($proposedAddress); + + $savedAddress = $this->repository->get($returnedAddress->getId()); + $this->assertNotEquals($proposedAddress, $savedAddress); + $this->assertArrayNotHasKey( + 'weird', + $savedAddress->getCustomAttributes(), + 'Only valid attributes should be available.' + ); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoAppIsolation enabled + */ + public function testSaveNewInvalidAddress() + { + $addressBuilder = $this->_createFirstAddressBuilder() + ->setCustomAttribute('firstname', null) + ->setId(null) + ->setFirstname(null) + ->setLastname(null) + ->setCustomerId(1); + $address = $addressBuilder->create(); + try { + $this->repository->save($address); + } catch (InputException $exception) { + $this->assertEquals(InputException::DEFAULT_MESSAGE, $exception->getMessage()); + $errors = $exception->getErrors(); + $this->assertCount(2, $errors); + $this->assertEquals('firstname is a required field.', $errors[0]->getLogMessage()); + $this->assertEquals('lastname is a required field.', $errors[1]->getLogMessage()); + } + } + + public function testSaveAddressesCustomerIdNotExist() + { + $proposedAddress = $this->_createSecondAddressBuilder()->setCustomerId(4200)->create(); + try { + $this->repository->save($proposedAddress); + $this->fail('Expected exception not thrown'); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = 4200', $nsee->getMessage()); + } + } + + public function testSaveAddressesCustomerIdInvalid() + { + $proposedAddress = $this->_createSecondAddressBuilder()->setCustomerId('this_is_not_a_valid_id')->create(); + try { + $this->repository->save($proposedAddress); + $this->fail('Expected exception not thrown'); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = this_is_not_a_valid_id', $nsee->getMessage()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + */ + public function testDeleteAddress() + { + $addressId = 1; + // See that customer already has an address with expected addressId + $addressDataObject = $this->repository->get($addressId); + $this->assertEquals($addressDataObject->getId(), $addressId); + + // Delete the address from the customer + $this->repository->delete($addressDataObject); + + // See that address is deleted + try { + $addressDataObject = $this->repository->get($addressId); + $this->fail("Expected NoSuchEntityException not caught"); + } catch (NoSuchEntityException $exception) { + $this->assertEquals('No such entity with addressId = 1', $exception->getMessage()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + */ + public function testDeleteAddressById() + { + $addressId = 1; + // See that customer already has an address with expected addressId + $addressDataObject = $this->repository->get($addressId); + $this->assertEquals($addressDataObject->getId(), $addressId); + + // Delete the address from the customer + $this->repository->deleteById($addressId); + + // See that address is deleted + try { + $addressDataObject = $this->repository->get($addressId); + $this->fail("Expected NoSuchEntityException not caught"); + } catch (NoSuchEntityException $exception) { + $this->assertEquals('No such entity with addressId = 1', $exception->getMessage()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testDeleteAddressFromCustomerBadAddressId() + { + try { + $this->repository->deleteById(12345); + $this->fail("Expected NoSuchEntityException not caught"); + } catch (NoSuchEntityException $exception) { + $this->assertEquals('No such entity with addressId = 12345', $exception->getMessage()); + } + } + + /** + * @param \Magento\Framework\Api\Filter[] $filters + * @param \Magento\Framework\Api\Filter[] $filterGroup + * @param array $expectedResult array of expected results indexed by ID + * + * @dataProvider searchAddressDataProvider + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php + * @magentoAppIsolation enabled + */ + public function testSearchAddresses($filters, $filterGroup, $expectedResult) + { + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ + $searchBuilder = $this->_objectManager->create('Magento\Framework\Api\SearchCriteriaBuilder'); + foreach ($filters as $filter) { + $searchBuilder->addFilter([$filter]); + } + if (!is_null($filterGroup)) { + $searchBuilder->addFilter($filterGroup); + } + + $searchResults = $this->repository->getList($searchBuilder->create()); + + $this->assertEquals(count($expectedResult), $searchResults->getTotalCount()); + + /** @var \Magento\Customer\Api\Data\AddressInterface $item*/ + foreach ($searchResults->getItems() as $item) { + $this->assertEquals( + $expectedResult[$item->getId()]['city'], + $item->getCity() + ); + $this->assertEquals( + $expectedResult[$item->getId()]['postcode'], + $item->getPostcode() + ); + $this->assertEquals( + $expectedResult[$item->getId()]['firstname'], + $item->getFirstname() + ); + unset($expectedResult[$item->getId()]); + } + } + + public function searchAddressDataProvider() + { + /** + * @var \Magento\Framework\Api\FilterBuilder $filterBuilder + */ + $filterBuilder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Api\FilterBuilder'); + return [ + 'Address with postcode 75477' => [ + [$filterBuilder->setField('postcode')->setValue('75477')->create()], + null, + [1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John']] + ], + 'Address with city CityM' => [ + [$filterBuilder->setField('city')->setValue('CityM')->create()], + null, + [1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John']] + ], + 'Addresses with firstname John' => [ + [$filterBuilder->setField('firstname')->setValue('John')->create()], + null, + [ + 1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'], + 2 => ['city' => 'CityX', 'postcode' => 47676, 'firstname' => 'John'] + ] + ], + 'Addresses with postcode of either 75477 or 47676' => [ + [], + [ + $filterBuilder->setField('postcode')->setValue('75477')->create(), + $filterBuilder->setField('postcode')->setValue('47676')->create() + ], + [ + 1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'], + 2 => ['city' => 'CityX', 'postcode' => 47676, 'firstname' => 'John'] + ] + ], + 'Addresses with postcode greater than 0' => [ + [$filterBuilder->setField('postcode')->setValue('0')->setConditionType('gt')->create()], + null, + [ + 1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'], + 2 => ['city' => 'CityX', 'postcode' => 47676, 'firstname' => 'John'] + ] + ] + ]; + } + + /** + * Helper function that returns an Address Data Object that matches the data from customer_address fixture + * + * @return \Magento\Customer\Api\Data\AddressDataBuilder + */ + private function _createFirstAddressBuilder() + { + $addressBuilder = $this->_addressBuilder->populate($this->_expectedAddresses[0]); + $addressBuilder->setId(null); + $addressBuilder->setRegion($this->_expectedAddresses[0]->getRegion()); + return $addressBuilder; + } + + /** + * Helper function that returns an Address Data Object that matches the data from customer_two_address fixture + * + * @return \Magento\Customer\Api\Data\AddressDataBuilder + */ + private function _createSecondAddressBuilder() + { + $addressBuilder = $this->_addressBuilder->populate($this->_expectedAddresses[1]); + $addressBuilder->setId(null); + $addressBuilder->setRegion($this->_expectedAddresses[1]->getRegion()); + return $addressBuilder; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php index 10e2326518cb7b4448bc2a8466fab6cec42c24a7..e90feae3e00d1b9b795d23b385a17aa631281725 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php @@ -167,7 +167,7 @@ class AddressesTest extends \PHPUnit_Framework_TestCase $customer = $this->_customerAccountService->getCustomer(1); $this->_customerData = array( 'customer_id' => $customer->getId(), - 'account' => \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer) + 'account' => \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer) ); $this->_customerData['account']['id'] = $customer->getId(); /** @var Address[] $addresses */ diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php index 6284845a4b6b9aa4f34d20507971bb7eac2f0aef..ce39d6ef88f3d22d8461e2cb404b85835b5406a9 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php @@ -194,6 +194,7 @@ class PersonalInfoTest extends \PHPUnit_Framework_TestCase */ public function testIsConfirmedStatusConfirmationIsNotRequired() { + $password = 'password'; /** @var Customer $customer */ $customer = $this->_customerBuilder->setConfirmation( true @@ -208,7 +209,7 @@ class PersonalInfoTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder */ $customerDetailsBuilder = $objectManager->create('Magento\Customer\Service\V1\Data\CustomerDetailsBuilder'); $customerDetails = $customerDetailsBuilder->setCustomer($customer)->create(); - $customer = $this->_customerAccountService->createCustomer($customerDetails); + $customer = $this->_customerAccountService->createCustomer($customerDetails, $password); $this->_coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, $customer->getId()); $this->assertEquals('Confirmation Not Required', $this->_block->getIsConfirmedStatus()); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php index e0cb2e0215eea91613cd685b0a7dded20fe17933..e3cf7d13eeb91dba17f05de4e3dc693f54e4636b 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php @@ -107,10 +107,10 @@ class FormTest extends \PHPUnit_Framework_TestCase */ public function testGetFormExistInCustomGroup() { - $builder = Bootstrap::getObjectManager()->create('Magento\Framework\Service\V1\Data\FilterBuilder'); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteria */ + $builder = Bootstrap::getObjectManager()->create('Magento\Framework\Api\FilterBuilder'); + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteria */ $searchCriteria = Bootstrap::getObjectManager() - ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder') + ->create('Magento\Framework\Api\SearchCriteriaBuilder') ->addFilter([$builder->setField('code')->setValue('custom_group')->create()])->create(); /** @var CustomerGroup $customerGroup */ $customerGroup = $this->customerGroupService->searchGroups($searchCriteria)->getItems()[0]; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php index f8a0492c937d879fe44f297b937c2f32479e628b..a9871bb07ea628d5db5f9956cfe796330408fa21 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php @@ -27,8 +27,8 @@ namespace Magento\Customer\Block\Adminhtml\Group; use Magento\Backend\App\Area\FrontNameResolver; use Magento\Customer\Controller\RegistryConstants; use Magento\Customer\Service\V1\Data\CustomerGroup; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\AbstractController; @@ -98,10 +98,10 @@ class EditTest extends AbstractController */ public function testDeleteButtonExistInCustomGroup() { - $builder = Bootstrap::getObjectManager()->create('\Magento\Framework\Service\V1\Data\FilterBuilder'); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteria */ + $builder = Bootstrap::getObjectManager()->create('\Magento\Framework\Api\FilterBuilder'); + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteria */ $searchCriteria = Bootstrap::getObjectManager() - ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder') + ->create('Magento\Framework\Api\SearchCriteriaBuilder') ->addFilter([$builder->setField('code')->setValue('custom_group')->create()])->create(); /** @var CustomerGroup $customerGroup */ $customerGroup = $this->customerGroupService->searchGroups($searchCriteria)->getItems()[0]; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php index 039fecd5e4f81a2881f725c0d8b56deb565526df..5cccb17a7dbdfe59947dc2d83e08531c6159fdd9 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php @@ -65,7 +65,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController $this->assertContains('<input type="email" name="email" id="email_address"', $body); $this->assertContains('<input type="checkbox" name="is_subscribed"', $body); $this->assertContains('<input type="password" name="password" id="password"', $body); - $this->assertContains('<input type="password" name="confirmation" title="Confirm Password"', $body); + $this->assertContains('<input type="password" name="password_confirmation" title="Confirm Password"', $body); } /** @@ -154,7 +154,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController ->setParam('company', '') ->setParam('email', 'test1@email.com') ->setParam('password', 'password') - ->setParam('confirmation', 'password') + ->setParam('password_confirmation', 'password') ->setParam('telephone', '5123334444') ->setParam('street', array('1234 fake street', '')) ->setParam('city', 'Austin') @@ -191,7 +191,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController ->setParam('company', '') ->setParam('email', $email) ->setParam('password', 'password') - ->setParam('confirmation', 'password') + ->setParam('password_confirmation', 'password') ->setParam('telephone', '5123334444') ->setParam('street', array('1234 fake street', '')) ->setParam('city', 'Austin') @@ -230,7 +230,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController ->setParam('company', '') ->setParam('email', 'customer@example.com') ->setParam('password', 'password') - ->setParam('confirmation', 'password') + ->setParam('password_confirmation', 'password') ->setParam('telephone', '5123334444') ->setParam('street', array('1234 fake street', '')) ->setParam('city', 'Austin') @@ -365,7 +365,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController ->setParam('token', '8ed8677e6c79e68b94e61658bd756ea5') ->setPost([ 'password' => 'new-password', - 'confirmation' => 'new-password' + 'password_confirmation' => 'new-password' ]); $this->dispatch('customer/account/resetPasswordPost'); @@ -387,7 +387,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController ->setQuery('token', '8ed8677e6c79e68b94e61658bd756ea5') ->setPost([ 'password' => 'new-password', - 'confirmation' => 'new-password' + 'password_confirmation' => 'new-password' ]); $this->dispatch('customer/account/resetPasswordPost'); @@ -498,7 +498,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController 'change_password' => 1, 'current_password' => 'password', 'password' => 'new-password', - 'confirmation' => 'new-password' + 'password_confirmation' => 'new-password' ]); $this->dispatch('customer/account/editPost'); @@ -555,7 +555,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController 'change_password' => 1, 'current_password' => 'wrong-password', 'password' => 'new-password', - 'confirmation' => 'new-password' + 'password_confirmation' => 'new-password' ]); $this->dispatch('customer/account/editPost'); @@ -583,7 +583,7 @@ class AccountTest extends \Magento\TestFramework\TestCase\AbstractController 'change_password' => 1, 'current_password' => 'password', 'password' => 'new-password', - 'confirmation' => 'new-password-no-match' + 'password_confirmation' => 'new-password-no-match' ]); $this->dispatch('customer/account/editPost'); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php index 141b2b8bdd03937a2e8841b9e57177872e6d91c4..6e36ca99d414090bbdf1cb7015429afd1b2d2ed7 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php @@ -154,7 +154,7 @@ class GroupTest extends \Magento\Backend\Utility\Controller /** @var \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService */ $groupService = Bootstrap::getObjectManager() ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $customerGroupData = \Magento\Framework\Service\SimpleDataObjectConverter::toFlatArray( + $customerGroupData = \Magento\Framework\Api\SimpleDataObjectConverter::toFlatArray( $groupService->getGroup($groupId) ); ksort($customerGroupData); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php index 3f4602d96a200ad63ca5b2fccc661ed0d611c54c..3ad5d248b0548c8b4e9b98a307a2d9e510dfd89c 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php @@ -160,7 +160,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller 'lastname' => 'test lastname', 'email' => 'example@domain.com', 'default_billing' => '_item1', - 'password' => 'auto' + 'password' => 'password', ), 'address' => array( '_item1' => array( @@ -374,7 +374,7 @@ class IndexTest extends \Magento\Backend\Utility\Controller 'firstname' => 'test firstname', 'lastname' => 'test lastname', 'email' => 'customer@example.com', - 'password' => 'auto' + 'password' => 'password', ) ); $this->getRequest()->setPost($post); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Helper/AddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Helper/AddressTest.php index e0e43b3e78f8bb43cdd310295f0be5d767ae068b..9cc53fbb24fe919aeaec09cbd933457f244c49a1 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Helper/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Helper/AddressTest.php @@ -55,7 +55,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase array('firstname', 'required-entry'), array('lastname', 'required-entry'), array('middlename', ''), - array('postcode', ' required-entry') + array('postcode', '') ); } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php new file mode 100755 index 0000000000000000000000000000000000000000..46ca6c183565f7fb7af944dde22ea4e3a0378007 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php @@ -0,0 +1,846 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model; + +use Magento\Customer\Api\AccountManagementInterface; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Service\V1; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Exception\State\ExpiredException; +use Magento\TestFramework\Helper\Bootstrap; + +/** + * Integration test for service layer \Magento\Customer\Model\AccountManagementTest + * + * @SuppressWarnings(PHPMD.TooManyMethods) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @magentoAppArea frontend + */ +class AccountManagementTest extends \PHPUnit_Framework_TestCase +{ + /** @var AccountManagementInterface */ + private $accountManagement; + + /** @var CustomerRepositoryInterface */ + private $customerRepository; + + /** @var CustomerAddressServiceInterface needed to setup tests */ + private $_customerAddressService; + + /** @var \Magento\Framework\ObjectManager */ + private $objectManager; + + /** @var \Magento\Customer\Service\V1\Data\Address[] */ + private $_expectedAddresses; + + /** @var \Magento\Customer\Api\Data\AddressDataBuilder */ + private $addressBuilder; + + /** @var \Magento\Customer\Api\Data\CustomerDataBuilder */ + private $customerBuilder; + + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->accountManagement = $this->objectManager + ->create('Magento\Customer\Api\AccountManagementInterface'); + $this->customerRepository = $this->objectManager + ->create('Magento\Customer\Api\CustomerRepositoryInterface'); + $this->_customerAddressService = + $this->objectManager->create('Magento\Customer\Service\V1\CustomerAddressServiceInterface'); + + $this->addressBuilder = $this->objectManager->create('Magento\Customer\Api\Data\AddressDataBuilder'); + $this->customerBuilder = $this->objectManager->create('Magento\Customer\Api\Data\CustomerDataBuilder'); + + $regionBuilder = $this->objectManager->create('Magento\Customer\Api\Data\RegionDataBuilder'); + $this->addressBuilder->setId(1) + ->setCountryId('US') + ->setCustomerId(1) + ->setPostcode('75477') + ->setRegion( + $regionBuilder->setRegionCode('AL')->setRegion('Alabama')->setRegionId(1)->create() + ) + ->setStreet(['Green str, 67']) + ->setTelephone('3468676') + ->setCity('CityM') + ->setFirstname('John') + ->setLastname('Smith'); + $address = $this->addressBuilder->create(); + + $this->addressBuilder->setId(2) + ->setCountryId('US') + ->setCustomerId(1) + ->setPostcode('47676') + ->setRegion( + $regionBuilder->setRegionCode('AL')->setRegion('Alabama')->setRegionId(1)->create() + ) + ->setStreet(['Black str, 48']) + ->setCity('CityX') + ->setTelephone('3234676') + ->setFirstname('John') + ->setLastname('Smith'); + $address2 = $this->addressBuilder->create(); + + $this->_expectedAddresses = [$address, $address2]; + } + + /** + * Clean up shared dependencies + */ + protected function tearDown() + { + /** @var \Magento\Customer\Model\CustomerRegistry $customerRegistry */ + $customerRegistry = $this->objectManager->get('Magento\Customer\Model\CustomerRegistry'); + //Cleanup customer from registry + $customerRegistry->remove(1); + } + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testLogin() + { + // Customer e-mail and password are pulled from the fixture customer.php + $customer = $this->accountManagement->authenticate('customer@example.com', 'password', true); + + $this->assertSame('customer@example.com', $customer->getEmail()); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * + * @expectedException \Magento\Framework\Exception\InvalidEmailOrPasswordException + * @expectedExceptionMessage Invalid login or password. + */ + public function testLoginWrongPassword() + { + // Customer e-mail and password are pulled from the fixture customer.php + $this->accountManagement->authenticate('customer@example.com', 'wrongPassword', true); + } + + /** + * @expectedException \Magento\Framework\Exception\InvalidEmailOrPasswordException + * @expectedExceptionMessage Invalid login or password. + */ + public function testLoginWrongUsername() + { + // Customer e-mail and password are pulled from the fixture customer.php + $this->accountManagement->authenticate('non_existing_user', 'password', true); + } + + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testChangePassword() + { + $this->accountManagement->changePassword('customer@example.com', 'password', 'new_password'); + + $this->accountManagement->authenticate('customer@example.com', 'new_password'); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * + * @expectedException \Magento\Framework\Exception\InvalidEmailOrPasswordException + * @expectedExceptionMessage Password doesn't match for this account + */ + public function testChangePasswordWrongPassword() + { + $this->accountManagement->changePassword(1, 'wrongPassword', 'new_password'); + } + + /** + * @expectedException \Magento\Framework\Exception\InvalidEmailOrPasswordException + * @expectedExceptionMessage Password doesn't match for this account + */ + public function testChangePasswordWrongUser() + { + $this->accountManagement->changePassword(4200, 'password', 'new_password'); + } + + /** + * @magentoDataFixture Magento/Customer/_files/inactive_customer.php + * @magentoAppArea frontend + */ + public function testActivateAccount() + { + /** @var \Magento\Customer\Model\Customer $customerModel */ + $customerModel = $this->objectManager->create('Magento\Customer\Model\Customer'); + $customerModel->load(1); + // Assert in just one test that the fixture is working + $this->assertNotNull($customerModel->getConfirmation(), 'New customer needs to be confirmed'); + + $this->accountManagement->activate($customerModel->getEmail(), $customerModel->getConfirmation()); + + $customerModel = $this->objectManager->create('Magento\Customer\Model\Customer'); + $customerModel->load(1); + $this->assertNull($customerModel->getConfirmation(), 'Customer should be considered confirmed now'); + } + + /** + * @magentoDataFixture Magento/Customer/_files/inactive_customer.php + * @expectedException \Magento\Framework\Exception\State\InputMismatchException + */ + public function testActivateCustomerConfirmationKeyWrongKey() + { + /** @var \Magento\Customer\Model\Customer $customerModel */ + $customerModel = $this->objectManager->create('Magento\Customer\Model\Customer'); + $customerModel->load(1); + $key = $customerModel->getConfirmation(); + + try { + $this->accountManagement->activate($customerModel->getEmail(), $key . $key); + $this->fail('Expected exception was not thrown'); + } catch (InputException $ie) { + $this->assertEquals('', $ie->getMessage()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/inactive_customer.php + */ + public function testActivateCustomerWrongAccount() + { + /** @var \Magento\Customer\Model\Customer $customerModel */ + $customerModel = $this->objectManager->create('Magento\Customer\Model\Customer'); + $customerModel->load(1); + $key = $customerModel->getConfirmation(); + try { + $this->accountManagement->activate('1234' . $customerModel->getEmail(), $key); + $this->fail('Expected exception not thrown.'); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals( + 'No such entity with email = 1234customer@needAconfirmation.com, websiteId = 1', + $nsee->getMessage() + ); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/inactive_customer.php + * @magentoAppArea frontend + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + */ + public function testActivateCustomerAlreadyActive() + { + /** @var \Magento\Customer\Model\Customer $customerModel */ + $customerModel = $this->objectManager->create('Magento\Customer\Model\Customer'); + $customerModel->load(1); + $key = $customerModel->getConfirmation(); + $this->accountManagement->activate($customerModel->getEmail(), $key); + // activate it one more time to produce an exception + $this->accountManagement->activate($customerModel->getEmail(), $key); + } + + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testValidateResetPasswordLinkToken() + { + $this->setResetPasswordData('token', 'Y-m-d'); + $this->accountManagement->validateResetPasswordLinkToken(1, 'token'); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @expectedException \Magento\Framework\Exception\State\ExpiredException + */ + public function testValidateResetPasswordLinkTokenExpired() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + $this->setResetPasswordData($resetToken, '1970-01-01'); + $this->accountManagement->validateResetPasswordLinkToken(1, $resetToken); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testValidateResetPasswordLinkTokenInvalid() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + $invalidToken = 0; + $this->setResetPasswordData($resetToken, 'Y-m-d'); + try { + $this->accountManagement->validateResetPasswordLinkToken(1, $invalidToken); + $this->fail('Expected exception not thrown.'); + } catch (InputException $ie) { + $this->assertEquals(InputException::REQUIRED_FIELD, $ie->getRawMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getLogMessage()); + $this->assertEmpty($ie->getErrors()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * + */ + public function testValidateResetPasswordLinkTokenWrongUser() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + + try { + $this->accountManagement->validateResetPasswordLinkToken(4200, $resetToken); + $this->fail('Expected exception not thrown.'); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = 4200', $nsee->getMessage()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * + */ + public function testValidateResetPasswordLinkTokenNull() + { + try { + $this->accountManagement->validateResetPasswordLinkToken(1, null); + $this->fail('Expected exception not thrown.'); + } catch (InputException $ie) { + $this->assertEquals(InputException::REQUIRED_FIELD, $ie->getRawMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getLogMessage()); + $this->assertEmpty($ie->getErrors()); + } + } + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testSendPasswordResetLink() + { + $email = 'customer@example.com'; + + $this->accountManagement->initiatePasswordReset($email, AccountManagement::EMAIL_RESET, 1); + } + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testSendPasswordResetLinkDefaultWebsite() + { + $email = 'customer@example.com'; + + $this->accountManagement->initiatePasswordReset($email, AccountManagement::EMAIL_RESET); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * + */ + public function testSendPasswordResetLinkBadEmailOrWebsite() + { + $email = 'foo@example.com'; + + try { + $this->accountManagement->initiatePasswordReset( + $email, + AccountManagement::EMAIL_RESET, + 0 + ); + $this->fail('Expected exception not thrown.'); + } catch (NoSuchEntityException $e) { + $expectedParams = [ + 'fieldName' => 'email', + 'fieldValue' => $email, + 'field2Name' => 'websiteId', + 'field2Value' => 0, + ]; + $this->assertEquals($expectedParams, $e->getParameters()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testSendPasswordResetLinkBadEmailDefaultWebsite() + { + $email = 'foo@example.com'; + + try { + $this->accountManagement->initiatePasswordReset( + $email, + AccountManagement::EMAIL_RESET + ); + $this->fail('Expected exception not thrown.'); + } catch (NoSuchEntityException $nsee) { + // App area is frontend, so we expect websiteId of 1. + $this->assertEquals('No such entity with email = foo@example.com, websiteId = 1', $nsee->getMessage()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testResetPassword() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + $password = 'new_password'; + + $this->setResetPasswordData($resetToken, 'Y-m-d'); + $this->assertTrue($this->accountManagement->resetPassword('customer@example.com', $resetToken, $password)); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testResetPasswordTokenExpired() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + $password = 'new_password'; + + $this->setResetPasswordData($resetToken, '1970-01-01'); + try { + $this->accountManagement->resetPassword('customer@example.com', $resetToken, $password); + $this->fail('Expected exception not thrown.'); + } catch (ExpiredException $e) { + $this->assertEquals('Reset password token expired.', $e->getMessage()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * + */ + public function testResetPasswordTokenInvalid() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + $invalidToken = 0; + $password = 'new_password'; + + $this->setResetPasswordData($resetToken, 'Y-m-d'); + try { + $this->accountManagement->resetPassword('customer@example.com', $invalidToken, $password); + $this->fail('Expected exception not thrown.'); + } catch (InputException $ie) { + $this->assertEquals(InputException::REQUIRED_FIELD, $ie->getRawMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getLogMessage()); + $this->assertEmpty($ie->getErrors()); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testResetPasswordTokenWrongUser() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + $password = 'new_password'; + $this->setResetPasswordData($resetToken, 'Y-m-d'); + try { + $this->accountManagement->resetPassword('invalid-customer@example.com', $resetToken, $password); + $this->fail('Expected exception not thrown.'); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals( + 'No such entity with email = invalid-customer@example.com, websiteId = 1', + $nsee->getMessage() + ); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testResetPasswordTokenInvalidUserEmail() + { + $resetToken = 'lsdj579slkj5987slkj595lkj'; + $password = 'new_password'; + + $this->setResetPasswordData($resetToken, 'Y-m-d'); + + try { + $this->accountManagement->resetPassword('invalid', $resetToken, $password); + $this->fail('Expected exception not thrown.'); + } catch (NoSuchEntityException $e) { + $this->assertEquals('No such entity with email = invalid, websiteId = 1', $e->getMessage()); + } + + } + + /** + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoDataFixture Magento/Customer/_files/inactive_customer.php + */ + public function testResendConfirmation() + { + $this->accountManagement->resendConfirmation('customer@needAconfirmation.com', 1); + //TODO assert + } + + /** + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoDataFixture Magento/Customer/_files/inactive_customer.php + */ + public function testResendConfirmationBadWebsiteId() + { + try { + $this->accountManagement->resendConfirmation('customer@needAconfirmation.com', 'notAWebsiteId'); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals( + 'No such entity with email = customer@needAconfirmation.com, websiteId = notAWebsiteId', + $nsee->getMessage() + ); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testResendConfirmationNoEmail() + { + try { + $this->accountManagement->resendConfirmation('wrongemail@example.com', 1); + $this->fail('Expected exception not thrown.'); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals( + 'No such entity with email = wrongemail@example.com, websiteId = 1', + $nsee->getMessage() + ); + } + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException + */ + public function testResendConfirmationNotNeeded() + { + $this->accountManagement->resendConfirmation('customer@example.com', 1); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateCustomerException() + { + $customerEntity = $this->customerBuilder->create(); + + try { + $this->accountManagement->createAccount($customerEntity); + $this->fail('Expected exception not thrown'); + } catch (InputException $ie) { + $this->assertEquals(InputException::DEFAULT_MESSAGE, $ie->getMessage()); + $errors = $ie->getErrors(); + $this->assertCount(3, $errors); + $this->assertEquals('firstname is a required field.', $errors[0]->getLogMessage()); + $this->assertEquals('lastname is a required field.', $errors[1]->getLogMessage()); + $this->assertEquals('Invalid value of "" provided for the email field.', $errors[2]->getLogMessage()); + } + } + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDbIsolation enabled + */ + public function testCreateNonexistingCustomer() + { + $existingCustId = 1; + $existingCustomer = $this->customerRepository->getById($existingCustId); + + $email = 'savecustomer@example.com'; + $firstName = 'Firstsave'; + $lastName = 'Lastsave'; + $customerData = array_merge( + $existingCustomer->__toArray(), + [ + 'email' => $email, + 'firstname' => $firstName, + 'lastname' => $lastName, + 'created_in' => 'Admin', + 'id' => null + ] + ); + $this->customerBuilder->populateWithArray($customerData); + $customerEntity = $this->customerBuilder->create(); + + $customerAfter = $this->accountManagement->createAccount($customerEntity, 'aPassword'); + $this->assertGreaterThan(0, $customerAfter->getId()); + $this->assertEquals($email, $customerAfter->getEmail()); + $this->assertEquals($firstName, $customerAfter->getFirstname()); + $this->assertEquals($lastName, $customerAfter->getLastname()); + $this->assertEquals('Admin', $customerAfter->getCreatedIn()); + $this->accountManagement->authenticate( + $customerAfter->getEmail(), + 'aPassword', + true + ); + $attributesBefore = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($existingCustomer); + $attributesAfter = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerAfter); + // ignore 'updated_at' + unset($attributesBefore['updated_at']); + unset($attributesAfter['updated_at']); + $inBeforeOnly = array_diff_assoc($attributesBefore, $attributesAfter); + $inAfterOnly = array_diff_assoc($attributesAfter, $attributesBefore); + $expectedInBefore = [ + 'email', + 'firstname', + 'id', + 'lastname' + ]; + sort($expectedInBefore); + $actualInBeforeOnly = array_keys($inBeforeOnly); + sort($actualInBeforeOnly); + $this->assertEquals($expectedInBefore, $actualInBeforeOnly); + $expectedInAfter = [ + 'created_in', + 'email', + 'firstname', + 'id', + 'lastname', + 'confirmation' + ]; + sort($expectedInAfter); + $actualInAfterOnly = array_keys($inAfterOnly); + sort($actualInAfterOnly); + $this->assertEquals($expectedInAfter, $actualInAfterOnly); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateCustomerInServiceVsInModel() + { + $email = 'email@example.com'; + $email2 = 'email2@example.com'; + $firstname = 'Tester'; + $lastname = 'McTest'; + $groupId = 1; + $password = 'aPassword'; + + /** @var \Magento\Customer\Model\Customer $customerModel */ + $customerModel = $this->objectManager->create('Magento\Customer\Model\CustomerFactory')->create(); + $customerModel->setEmail($email) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId) + ->setPassword($password); + $customerModel->save(); + /** @var \Magento\Customer\Model\Customer $customerModel */ + $savedModel = $this->objectManager + ->create('Magento\Customer\Model\CustomerFactory') + ->create() + ->load($customerModel->getId()); + $dataInModel = $savedModel->getData(); + + $this->customerBuilder + ->setEmail($email2) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId); + $newCustomerEntity = $this->customerBuilder->create(); + $customerData = $this->accountManagement->createAccount($newCustomerEntity, $password); + $this->assertNotNull($customerData->getId()); + $savedCustomer = $this->customerRepository->getById($customerData->getId()); + $dataInService = \Magento\Framework\Api\SimpleDataObjectConverter::toFlatArray($savedCustomer); + $expectedDifferences = [ + 'created_at', + 'updated_at', + 'email', + 'is_active', + 'entity_id', + 'entity_type_id', + 'password_hash', + 'attribute_set_id', + 'disable_auto_group_change', + 'confirmation', + 'reward_update_notification', + 'reward_warning_notification' + ]; + foreach ($dataInModel as $key => $value) { + if (!in_array($key, $expectedDifferences)) { + if (is_null($value)) { + $this->assertArrayNotHasKey($key, $dataInService); + } else { + $this->assertEquals($value, $dataInService[$key], 'Failed asserting value for ' . $key); + } + } + } + $this->assertEquals($email2, $dataInService['email']); + $this->assertArrayNotHasKey('is_active', $dataInService); + $this->assertArrayNotHasKey('updated_at', $dataInService); + $this->assertArrayNotHasKey('password_hash', $dataInService); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateNewCustomer() + { + $email = 'email@example.com'; + $storeId = 1; + $firstname = 'Tester'; + $lastname = 'McTest'; + $groupId = 1; + + $this->customerBuilder + ->setStoreId($storeId) + ->setEmail($email) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId); + $newCustomerEntity = $this->customerBuilder->create(); + $savedCustomer = $this->accountManagement->createAccount($newCustomerEntity, 'aPassword'); + $this->assertNotNull($savedCustomer->getId()); + $this->assertEquals($email, $savedCustomer->getEmail()); + $this->assertEquals($storeId, $savedCustomer->getStoreId()); + $this->assertEquals($firstname, $savedCustomer->getFirstname()); + $this->assertEquals($lastname, $savedCustomer->getLastname()); + $this->assertEquals($groupId, $savedCustomer->getGroupId()); + $this->assertTrue(!$savedCustomer->getSuffix()); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateNewCustomerWithPasswordHash() + { + $email = 'email@example.com'; + $storeId = 1; + $firstname = 'Tester'; + $lastname = 'McTest'; + $groupId = 1; + + $this->customerBuilder->setStoreId($storeId) + ->setEmail($email) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId); + $newCustomerEntity = $this->customerBuilder->create(); + /** @var \Magento\Framework\Math\Random $mathRandom */ + $password = $this->objectManager->get('Magento\Framework\Math\Random')->getRandomString( + AccountManagement::MIN_PASSWORD_LENGTH + ); + /** @var \Magento\Framework\Encryption\EncryptorInterface $encryptor */ + $encryptor = $this->objectManager->get('Magento\Framework\Encryption\EncryptorInterface'); + $passwordHash = $encryptor->getHash($password); + $savedCustomer = $this->accountManagement->createAccountWithPasswordHash( + $newCustomerEntity, + $passwordHash + ); + $this->assertNotNull($savedCustomer->getId()); + $this->assertEquals($email, $savedCustomer->getEmail()); + $this->assertEquals($storeId, $savedCustomer->getStoreId()); + $this->assertEquals($firstname, $savedCustomer->getFirstname()); + $this->assertEquals($lastname, $savedCustomer->getLastname()); + $this->assertEquals($groupId, $savedCustomer->getGroupId()); + $this->assertTrue(!$savedCustomer->getSuffix()); + $this->assertEquals( + $savedCustomer->getId(), + $this->accountManagement->authenticate($email, $password)->getId() + ); + } + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testCreateNewCustomerFromClone() + { + $email = 'savecustomer@example.com'; + $firstName = 'Firstsave'; + $lastname = 'Lastsave'; + + $existingCustId = 1; + $existingCustomer = $this->customerRepository->getById($existingCustId); + $this->customerBuilder + ->populate($existingCustomer) + ->setEmail($email) + ->setFirstname($firstName) + ->setLastname($lastname) + ->setCreatedIn('Admin') + ->setId(null); + $customerEntity = $this->customerBuilder->create(); + + $customer = $this->accountManagement->createAccount($customerEntity, 'aPassword'); + $this->assertNotEmpty($customer->getId()); + $this->assertEquals($email, $customer->getEmail()); + $this->assertEquals($firstName, $customer->getFirstname()); + $this->assertEquals($lastname, $customer->getLastname()); + $this->assertEquals('Admin', $customer->getCreatedIn()); + $this->accountManagement->authenticate( + $customer->getEmail(), + 'aPassword', + true + ); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testIsEmailAvailable() + { + $this->assertFalse($this->accountManagement->isEmailAvailable('customer@example.com', 1)); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testIsEmailAvailableNoWebsiteSpecified() + { + $this->assertFalse($this->accountManagement->isEmailAvailable('customer@example.com')); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testIsEmailAvailableNoWebsiteSpecifiedNonExistent() + { + $this->assertTrue($this->accountManagement->isEmailAvailable('nonexistent@example.com')); + } + + public function testIsEmailAvailableNonExistentEmail() + { + $this->assertTrue($this->accountManagement->isEmailAvailable('nonexistent@example.com', 1)); + } + + /** + * Set Rp data to Customer in fixture + * + * @param $resetToken + * @param $date + */ + protected function setResetPasswordData($resetToken, $date) + { + $customerIdFromFixture = 1; + /** @var \Magento\Customer\Model\Customer $customerModel */ + $customerModel = $this->objectManager->create('Magento\Customer\Model\Customer'); + $customerModel->load($customerIdFromFixture); + $customerModel->setRpToken($resetToken); + $customerModel->setRpTokenCreatedAt(date($date)); + $customerModel->save(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AddressTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c9b7c690083f8cbae490b5c04e517e0d287b900a --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AddressTest.php @@ -0,0 +1,91 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model; + +class AddressTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Customer\Model\Address + */ + protected $addressModel; + + /** + * @var \Magento\Customer\Api\Data\AddressDataBuilder + */ + protected $addressBuilder; + + protected function setUp() + { + $this->addressModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Model\Address' + ); + $this->addressBuilder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Api\Data\AddressDataBuilder' + ); + } + + public function testUpdateDataSetDataOnEmptyModel() + { + /** @var \Magento\Customer\Model\Data\Address $addressData */ + $addressData = $this->addressBuilder + ->setId(1) + ->setCity('CityX') + ->setCompany('CompanyX') + ->setPostcode('77777') + ->create(); + $addressData = $this->addressModel->updateData($addressData)->getDataModel(); + + $this->assertEquals(1, $addressData->getId()); + $this->assertEquals('CityX', $addressData->getCity()); + $this->assertEquals('CompanyX', $addressData->getCompany()); + $this->assertEquals('77777', $addressData->getPostcode()); + } + + public function testUpdateDataOverrideExistingData() + { + /** @var \Magento\Customer\Model\Data\Address $addressData */ + $addressData = $this->addressBuilder + ->setId(2) + ->setCity('CityY') + ->setCompany('CompanyY') + ->setPostcode('88888') + ->create(); + $this->addressModel->updateData($addressData); + + /** @var \Magento\Customer\Model\Data\Address $addressData */ + $updatedAddressData = $this->addressBuilder + ->setId(3) + ->setCity('CityZ') + ->setCompany('CompanyZ') + ->setPostcode('99999') + ->create(); + $updatedAddressData = $this->addressModel->updateData($updatedAddressData)->getDataModel(); + + $this->assertEquals(3, $updatedAddressData->getId()); + $this->assertEquals('CityZ', $updatedAddressData->getCity()); + $this->assertEquals('CompanyZ', $updatedAddressData->getCompany()); + $this->assertEquals('99999', $updatedAddressData->getPostcode()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ca84d9e8f95d6b24f0aa6150c1e627312a0a6280 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerTest.php @@ -0,0 +1,91 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model; + +class CustomerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Customer\Model\Customer + */ + protected $customerModel; + + /** + * @var \Magento\Customer\Model\Data\CustomerBuilder + */ + protected $customerBuilder; + + protected function setUp() + { + $this->customerModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Model\Customer' + ); + $this->customerBuilder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Model\Data\CustomerBuilder' + ); + } + + public function testUpdateDataSetDataOnEmptyModel() + { + /** @var \Magento\Customer\Model\Data\Customer $customerData */ + $customerData = $this->customerBuilder + ->setId(1) + ->setFirstname('John') + ->setLastname('Doe') + ->setDefaultBilling(1) + ->create(); + $customerData = $this->customerModel->updateData($customerData)->getDataModel(); + + $this->assertEquals(1, $customerData->getId()); + $this->assertEquals('John', $customerData->getFirstname()); + $this->assertEquals('Doe', $customerData->getLastname()); + $this->assertEquals(1, $customerData->getDefaultBilling()); + } + + public function testUpdateDataOverrideExistingData() + { + /** @var \Magento\Customer\Model\Data\Customer $customerData */ + $customerData = $this->customerBuilder + ->setId(2) + ->setFirstname('John') + ->setLastname('Doe') + ->setDefaultBilling(1) + ->create(); + $this->customerModel->updateData($customerData); + + /** @var \Magento\Customer\Model\Data\Customer $customerData */ + $updatedCustomerData = $this->customerBuilder + ->setId(3) + ->setFirstname('Jane') + ->setLastname('Smith') + ->setDefaultBilling(0) + ->create(); + $updatedCustomerData = $this->customerModel->updateData($updatedCustomerData)->getDataModel(); + + $this->assertEquals(3, $updatedCustomerData->getId()); + $this->assertEquals('Jane', $updatedCustomerData->getFirstname()); + $this->assertEquals('Smith', $updatedCustomerData->getLastname()); + $this->assertEquals(0, $updatedCustomerData->getDefaultBilling()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/GroupManagementTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/GroupManagementTest.php new file mode 100644 index 0000000000000000000000000000000000000000..09a0277d7a0169272dcd40099a4028b2f89543ad --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/GroupManagementTest.php @@ -0,0 +1,138 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model; + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Store\Model\ScopeInterface; + +/** + * Test for Magento\Customer\Model\GroupManagement + */ +class GroupManagementTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Framework\ObjectManager + */ + protected $objectManager; + + /** + * @var \Magento\Customer\Api\GroupManagementInterface + */ + protected $groupManagement; + + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->groupManagement = $this->objectManager->get('Magento\Customer\Api\GroupManagementInterface'); + } + + /** + * @param $testGroup + * @param $storeId + * + * @dataProvider getDefaultGroupDataProvider + */ + public function testGetDefaultGroupWithStoreId($testGroup, $storeId) + { + $this->assertDefaultGroupMatches($testGroup, $storeId); + } + + /** + * @magentoDataFixture Magento/Core/_files/second_third_store.php + */ + public function testGetDefaultGroupWithNonDefaultStoreId() + { /** @var \Magento\Framework\StoreManagerInterface $storeManager */ + $storeManager = Bootstrap::getObjectManager()->get('Magento\Framework\StoreManagerInterface'); + $nonDefaultStore = $storeManager->getStore('secondstore'); + $nonDefaultStoreId = $nonDefaultStore->getId(); + /** @var \Magento\Framework\App\MutableScopeConfig $scopeConfig */ + $scopeConfig = $this->objectManager->get('Magento\Framework\App\MutableScopeConfig'); + $scopeConfig->setValue( + \Magento\Customer\Model\GroupManagement::XML_PATH_DEFAULT_ID, + 2, + ScopeInterface::SCOPE_STORE, + 'secondstore' + ); + $testGroup = ['id' => 2, 'code' => 'Wholesale', 'tax_class_id' => 3, 'tax_class_name' => 'Retail Customer']; + $this->assertDefaultGroupMatches($testGroup, $nonDefaultStoreId); + } + + /** + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + */ + public function testGetDefaultGroupWithInvalidStoreId() + { + $storeId = 1234567; + $this->groupManagement->getDefaultGroup($storeId); + } + + public function testIsReadonlyWithGroupId() + { + $testGroup = ['id' => 3, 'code' => 'General', 'tax_class_id' => 3, 'tax_class_name' => 'Retail Customer']; + $this->assertEquals(true, $this->groupManagement->isReadonly($testGroup['id'])); + } + + /** + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + */ + public function testIsReadonlyWithInvalidGroupId() + { + $testGroup = ['id' => 4, 'code' => 'General', 'tax_class_id' => 3, 'tax_class_name' => 'Retail Customer']; + $this->groupManagement->isReadonly($testGroup['id']); + } + + /** + * @return array + */ + public function getDefaultGroupDataProvider() + { + /** @var \Magento\Framework\StoreManagerInterface $storeManager */ + $storeManager = Bootstrap::getObjectManager()->get('Magento\Framework\StoreManagerInterface'); + $defaultStoreId = $storeManager->getStore()->getId(); + return [ + 'no store id' => [ + ['id' => 1, 'code' => 'General', 'tax_class_id' => 3, 'tax_class_name' => 'Retail Customer'], + null + ], + 'default store id' => [ + ['id' => 1, 'code' => 'General', 'tax_class_id' => 3, 'tax_class_name' => 'Retail Customer'], + $defaultStoreId + ], + ]; + } + + /** + * @param $testGroup + * @param $storeId + */ + private function assertDefaultGroupMatches($testGroup, $storeId) + { + $group = $this->groupManagement->getDefaultGroup($storeId); + $this->assertEquals($testGroup['id'], $group->getId()); + $this->assertEquals($testGroup['code'], $group->getCode()); + $this->assertEquals($testGroup['tax_class_id'], $group->getTaxClassId()); + $this->assertEquals($testGroup['tax_class_name'], $group->getTaxClassName()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/GroupTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/GroupTest.php index 696fff26e4ee48d761452ad76b14d788a2203f64..3ffafc0f8b241f243f85f7f2ce036ecfedb174fb 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/GroupTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/GroupTest.php @@ -21,6 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + namespace Magento\Customer\Model; class GroupTest extends \PHPUnit_Framework_TestCase @@ -28,19 +29,27 @@ class GroupTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\Customer\Model\Group */ - protected $_model; + protected $groupModel; + + /** + * @var \Magento\Customer\Api\Data\GroupDataBuilder + */ + protected $groupBuilder; protected function setUp() { - $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + $this->groupModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Customer\Model\Group' ); + $this->groupBuilder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Api\Data\GroupDataBuilder' + ); } public function testCRUD() { - $this->_model->setCode('test'); - $crud = new \Magento\TestFramework\Entity($this->_model, array('customer_group_code' => uniqid())); + $this->groupModel->setCode('test'); + $crud = new \Magento\TestFramework\Entity($this->groupModel, array('customer_group_code' => uniqid())); $crud->testCrud(); } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/AddressRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/AddressRepositoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dc1a2d609e2131debfff48af4342ceec173db5eb --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/AddressRepositoryTest.php @@ -0,0 +1,238 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Resource; + +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Customer\Service\V1\Data\AddressConverter; +use Magento\TestFramework\Helper\Bootstrap; + +/** + * Integration test for service layer \Magento\Customer\Service\V1\CustomerAddressService + * + * @SuppressWarnings(PHPMD.TooManyMethods) + * @SuppressWarnings(PHPMD.ExcessivePublicCount) + */ +class AddressRepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Customer\Api\AddressRepositoryInterface */ + private $_service; + + /** @var \Magento\Framework\ObjectManager */ + private $_objectManager; + + /** @var \Magento\Customer\Service\V1\Data\Address[] */ + private $_expectedAddresses; + + /** @var \Magento\Customer\Service\V1\Data\AddressBuilder */ + private $_addressBuilder; + + protected function setUp() + { + $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->_service = $this->_objectManager->create('Magento\Customer\Api\AddressRepositoryInterface'); + + $this->_addressBuilder = $this->_objectManager->create('Magento\Customer\Model\Data\AddressBuilder'); + + $builder = $this->_objectManager->create('Magento\Customer\Model\Data\RegionBuilder'); + $region = $builder->setRegionCode('AL') + ->setRegion('Alabama') + ->setRegionId(1) + ->create(); + + $this->_addressBuilder + ->setId(1) + ->setCountryId('US') + ->setCustomerId(1) + ->setPostcode('75477') + ->setRegion($region) + ->setStreet(array('Green str, 67')) + ->setTelephone('3468676') + ->setCity('CityM') + ->setFirstname('John') + ->setLastname('Smith') + ->setCompany('CompanyName'); + $address = $this->_addressBuilder->create(); + + $this->_addressBuilder + ->setId(2) + ->setCustomerId(2) + ->setCountryId('US') + ->setCustomerId(1) + ->setPostcode('47676') + ->setRegion($region) + ->setStreet(array('Black str, 48')) + ->setCity('CityX') + ->setTelephone('3234676') + ->setFirstname('John') + ->setLastname('Smith'); + + $address2 = $this->_addressBuilder->create(); + + $this->_expectedAddresses = array($address, $address2); + } + + protected function tearDown() + { + $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + /** @var \Magento\Customer\Model\AddressRegistry $addressRegistry */ + $customerRegistry = $objectManager->get('Magento\Customer\Model\CustomerRegistry'); + $customerRegistry->remove(1); + } + + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoAppIsolation enabled + */ + public function testSaveNewAddress() + { + $this->markTestSkipped('Should be fixed in scope of MAGETWO-29651'); + $this->_addressBuilder->populate($this->_expectedAddresses[1])->setId(null); + $proposedAddress = $this->_addressBuilder->create(); + $customerId = 1; + $createdAddress = $this->_service->save($proposedAddress); + $addresses = $this->_service->get($customerId); + $this->assertEquals($this->_expectedAddresses[0], $addresses[0]); + $expectedNewAddressBuilder = $this->_addressBuilder->populate($this->_expectedAddresses[1]); + $expectedNewAddressBuilder->setId($addresses[1]->getId()); + $expectedNewAddress = $expectedNewAddressBuilder->create(); + $this->assertEquals( + AddressConverter::toFlatArray($expectedNewAddress), + AddressConverter::toFlatArray($addresses[1]) + ); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_address.php + * @magentoAppIsolation enabled + */ + public function testGetAddress() + { + $this->markTestSkipped('Should be fixed in scope of MAGETWO-29651'); + //$address = $this->_service->get(1); + //$addresses = $this->_service->get($customerId); + //$this->assertEquals($this->_expectedAddresses[0], $addresses[0]); + //$expectedNewAddressBuilder = $this->_addressBuilder->populate($this->_expectedAddresses[1]); + //$expectedNewAddressBuilder->setId($addresses[1]->getId()); + //$expectedNewAddress = $expectedNewAddressBuilder->create(); + //$this->assertEquals( + // AddressConverter::toFlatArray($expectedNewAddress), + // AddressConverter::toFlatArray($addresses[1]) + //); + } + + /** + * @param \Magento\Framework\Api\Filter[] $filters + * @param \Magento\Framework\Api\Filter[] $filterGroup + * @param array $expectedResult array of expected results indexed by ID + * + * @dataProvider searchAddressDataProvider + * + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php + * @magentoAppIsolation enabled + */ + public function testSearchAddresses($filters, $filterGroup, $expectedResult) + { + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ + $searchBuilder = Bootstrap::getObjectManager()->create( + 'Magento\Framework\Api\SearchCriteriaBuilder' + ); + foreach ($filters as $filter) { + $searchBuilder->addFilter([$filter]); + } + if (!is_null($filterGroup)) { + $searchBuilder->addFilter($filterGroup); + } + + $searchResults = $this->_service->getList($searchBuilder->create()); + + $this->assertEquals(count($expectedResult), $searchResults->getTotalCount()); + + /** @var $item Data\CustomerDetails */ + foreach ($searchResults->getItems() as $item) { + $this->assertEquals( + $expectedResult[$item->getId()]['city'], + $item->getCity() + ); + $this->assertEquals( + $expectedResult[$item->getId()]['postcode'], + $item->getPostcode() + ); + $this->assertEquals( + $expectedResult[$item->getId()]['firstname'], + $item->getFirstname() + ); + unset($expectedResult[$item->getId()]); + } + } + + public function searchAddressDataProvider() + { + $builder = Bootstrap::getObjectManager()->create('Magento\Framework\Api\FilterBuilder'); + return [ + 'Address with postcode 75477' => [ + [$builder->setField('postcode')->setValue('75477')->create()], + null, + [1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John']] + ], + 'Address with city CityM' => [ + [$builder->setField('city')->setValue('CityM')->create()], + null, + [1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John']] + ], + 'Addresses with firstname John' => [ + [$builder->setField('firstname')->setValue('John')->create()], + null, + [ + 1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'], + 2 => ['city' => 'CityX', 'postcode' => 47676, 'firstname' => 'John'] + ] + ], + 'Addresses with postcode of either 75477 or 47676' => [ + [], + [ + $builder->setField('postcode')->setValue('75477')->create(), + $builder->setField('postcode')->setValue('47676')->create() + ], + [ + 1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'], + 2 => ['city' => 'CityX', 'postcode' => 47676, 'firstname' => 'John'] + ] + ], + 'Addresses with postcode greater than 0' => [ + [$builder->setField('postcode')->setValue('0')->setConditionType('gt')->create()], + null, + [ + 1 => ['city' => 'CityM', 'postcode' => 75477, 'firstname' => 'John'], + 2 => ['city' => 'CityX', 'postcode' => 47676, 'firstname' => 'John'] + ] + ] + ]; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/CustomerRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/CustomerRepositoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ffda1219437fb63d5e15608cd839bc45417a75fd --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/CustomerRepositoryTest.php @@ -0,0 +1,260 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Resource; + +use Magento\TestFramework\Helper\Bootstrap; +use Magento\Framework\Api\SearchCriteriaInterface; + +class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Customer\Api\CustomerRepositoryInterface */ + private $service; + + /** @var \Magento\Framework\ObjectManager */ + private $objectManager; + + /** @var \Magento\Customer\Api\Data\CustomerDataBuilder */ + private $customerBuilder; + + protected function setUp() + { + $this->objectManager = Bootstrap::getObjectManager(); + $this->service = $this->objectManager->create('Magento\Customer\Api\CustomerRepositoryInterface'); + $this->customerBuilder = $this->objectManager->create('Magento\Customer\Api\Data\CustomerDataBuilder'); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateCustomerNewThenUpdateFirstName() + { + /** Create a new customer */ + $email = 'first_last@example.com'; + $storeId = 1; + $firstname = 'Tester'; + $lastname = 'McTest'; + $groupId = 1; + $this->customerBuilder + ->setStoreId($storeId) + ->setEmail($email) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId); + $newCustomerEntity = $this->customerBuilder->create(); + $customer = $this->service->save($newCustomerEntity); + + /** Update customer */ + $this->customerBuilder->populate($customer); + $newCustomerFirstname = 'Tested'; + $this->customerBuilder->setFirstname($newCustomerFirstname); + $updatedCustomer = $this->customerBuilder->create(); + $this->service->save($updatedCustomer); + + /** Check if update was successful */ + $customer = $this->service->get($customer->getEmail()); + $this->assertEquals($newCustomerFirstname, $customer->getFirstname()); + $this->assertEquals($lastname, $customer->getLastname()); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateNewCustomer() + { + $email = 'email@example.com'; + $storeId = 1; + $firstname = 'Tester'; + $lastname = 'McTest'; + $groupId = 1; + + $this->customerBuilder + ->setStoreId($storeId) + ->setEmail($email) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId); + $newCustomerEntity = $this->customerBuilder->create(); + $savedCustomer = $this->service->save($newCustomerEntity); + $this->assertNotNull($savedCustomer->getId()); + $this->assertEquals($email, $savedCustomer->getEmail()); + $this->assertEquals($storeId, $savedCustomer->getStoreId()); + $this->assertEquals($firstname, $savedCustomer->getFirstname()); + $this->assertEquals($lastname, $savedCustomer->getLastname()); + $this->assertEquals($groupId, $savedCustomer->getGroupId()); + $this->assertTrue(!$savedCustomer->getSuffix()); + } + + /** + * @param \Magento\Framework\Api\Filter[] $filters + * @param \Magento\Framework\Api\Filter[] $filterGroup + * @param array $expectedResult array of expected results indexed by ID + * + * @dataProvider searchCustomersDataProvider + * + * @magentoDataFixture Magento/Customer/_files/three_customers.php + * @magentoDbIsolation enabled + */ + public function testSearchCustomers($filters, $filterGroup, $expectedResult) + { + /** @var \Magento\Framework\Api\SearchCriteriaDataBuilder $searchBuilder */ + $searchBuilder = Bootstrap::getObjectManager() + ->create('Magento\Framework\Api\SearchCriteriaDataBuilder'); + foreach ($filters as $filter) { + $searchBuilder->addFilter([$filter]); + } + if (!is_null($filterGroup)) { + $searchBuilder->addFilter($filterGroup); + } + + $searchResults = $this->service->getList($searchBuilder->create()); + + $this->assertEquals(count($expectedResult), $searchResults->getTotalCount()); + + foreach ($searchResults->getItems() as $item) { + $this->assertEquals($expectedResult[$item->getId()]['email'], $item->getEmail()); + $this->assertEquals($expectedResult[$item->getId()]['firstname'], $item->getFirstname()); + unset($expectedResult[$item->getId()]); + } + } + + public function searchCustomersDataProvider() + { + $builder = Bootstrap::getObjectManager()->create('\Magento\Framework\Api\FilterBuilder'); + return [ + 'Customer with specific email' => [ + [$builder->setField('email')->setValue('customer@search.example.com')->create()], + null, + [1 => ['email' => 'customer@search.example.com', 'firstname' => 'Firstname']] + ], + 'Customer with specific first name' => [ + [$builder->setField('firstname')->setValue('Firstname2')->create()], + null, + [2 => ['email' => 'customer2@search.example.com', 'firstname' => 'Firstname2']] + ], + 'Customers with either email' => [ + [], + [ + $builder->setField('firstname')->setValue('Firstname')->create(), + $builder->setField('firstname')->setValue('Firstname2')->create() + ], + [ + 1 => ['email' => 'customer@search.example.com', 'firstname' => 'Firstname'], + 2 => ['email' => 'customer2@search.example.com', 'firstname' => 'Firstname2'] + ] + ], + 'Customers created since' => [ + [ + $builder->setField('created_at')->setValue('2011-02-28 15:52:26') + ->setConditionType('gt')->create() + ], + [], + [ + 1 => ['email' => 'customer@search.example.com', 'firstname' => 'Firstname'], + 3 => ['email' => 'customer3@search.example.com', 'firstname' => 'Firstname3'] + ] + ] + ]; + } + + /** + * Test ordering + * + * @magentoDataFixture Magento/Customer/_files/three_customers.php + * @magentoDbIsolation enabled + */ + public function testSearchCustomersOrder() + { + /** @var \Magento\Framework\Api\SearchCriteriaDataBuilder $searchBuilder */ + $objectManager = Bootstrap::getObjectManager(); + $searchBuilder = $objectManager->create('Magento\Framework\Api\SearchCriteriaDataBuilder'); + + // Filter for 'firstname' like 'First' + $filterBuilder = $objectManager->create('\Magento\Framework\Api\FilterBuilder'); + $firstnameFilter = $filterBuilder->setField('firstname') + ->setConditionType('like') + ->setValue('First%') + ->create(); + $searchBuilder->addFilter([$firstnameFilter]); + // Search ascending order + $sortOrderBuilder = $objectManager->create('\Magento\Framework\Api\SortOrderBuilder'); + $sortOrder = $sortOrderBuilder + ->setField('lastname') + ->setDirection(SearchCriteriaInterface::SORT_ASC) + ->create(); + $searchBuilder->addSortOrder($sortOrder); + $searchResults = $this->service->getList($searchBuilder->create()); + $this->assertEquals(3, $searchResults->getTotalCount()); + $this->assertEquals('Lastname', $searchResults->getItems()[0]->getLastname()); + $this->assertEquals('Lastname2', $searchResults->getItems()[1]->getLastname()); + $this->assertEquals('Lastname3', $searchResults->getItems()[2]->getLastname()); + + // Search descending order + $sortOrder = $sortOrderBuilder + ->setField('lastname') + ->setDirection(SearchCriteriaInterface::SORT_DESC) + ->create(); + $searchBuilder->addSortOrder($sortOrder); + $searchResults = $this->service->getList($searchBuilder->create()); + $this->assertEquals('Lastname3', $searchResults->getItems()[0]->getLastname()); + $this->assertEquals('Lastname2', $searchResults->getItems()[1]->getLastname()); + $this->assertEquals('Lastname', $searchResults->getItems()[2]->getLastname()); + } + + /** + * @magentoAppArea adminhtml + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoAppIsolation enabled + */ + public function testDelete() + { + $fixtureCustomerEmail = 'customer@example.com'; + $customer = $this->service->get($fixtureCustomerEmail); + $this->service->delete($customer); + /** Ensure that customer was deleted */ + $this->setExpectedException( + 'Magento\Framework\Exception\NoSuchEntityException', + 'No such entity with email = customer@example.com, websiteId = 1' + ); + $this->service->get($fixtureCustomerEmail); + } + + /** + * @magentoAppArea adminhtml + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoAppIsolation enabled + */ + public function testDeleteById() + { + $fixtureCustomerEmail = 'customer@example.com'; + $fixtureCustomerId = 1; + $this->service->deleteById($fixtureCustomerId); + /** Ensure that customer was deleted */ + $this->setExpectedException( + 'Magento\Framework\Exception\NoSuchEntityException', + 'No such entity with email = customer@example.com, websiteId = 1' + ); + $this->service->get($fixtureCustomerEmail); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/GroupRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/GroupRepositoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e74849aa59940cca8974dded893c16322c3a98f1 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/GroupRepositoryTest.php @@ -0,0 +1,264 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Resource; + +use Magento\Customer\Api\Data\GroupInterface; + +/** + * Integration test for \Magento\Customer\Model\Resource\GroupRepository + */ +class GroupRepositoryTest extends \PHPUnit_Framework_TestCase +{ + /** The group id of the "NOT LOGGED IN" group */ + const NOT_LOGGED_IN_GROUP_ID = 0; + + /** @var \Magento\Customer\Api\GroupRepositoryInterface */ + private $groupRepository; + + /** @var \Magento\Framework\ObjectManager */ + private $objectManager; + + /** @var \Magento\Customer\Model\Data\GroupBuilder */ + private $groupBuilder; + + /** @var \Magento\Framework\Api\SearchCriteriaDataBuilder */ + private $searchCriteriaBuilder; + + protected function setUp() + { + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->groupRepository = $this->objectManager->create('Magento\Customer\Api\GroupRepositoryInterface'); + $this->groupBuilder = $this->objectManager->create('Magento\Customer\Api\Data\GroupDataBuilder'); + $this->searchCriteriaBuilder = $this->objectManager->create('Magento\Framework\Api\SearchCriteriaDataBuilder'); + } + + /** + * @param array $testGroup + * @dataProvider getGroupsDataProvider + */ + public function testGetGroup($testGroup) + { + $group = $this->groupRepository->get($testGroup[GroupInterface::ID]); + $this->assertEquals($testGroup[GroupInterface::ID], $group->getId()); + $this->assertEquals($testGroup[GroupInterface::CODE], $group->getCode()); + $this->assertEquals($testGroup[GroupInterface::TAX_CLASS_ID], $group->getTaxClassId()); + } + + /** + * @return array + */ + public function getGroupsDataProvider() + { + return [ + [[GroupInterface::ID => 0, GroupInterface::CODE => 'NOT LOGGED IN', GroupInterface::TAX_CLASS_ID => 3]], + [[GroupInterface::ID => 1, GroupInterface::CODE => 'General', GroupInterface::TAX_CLASS_ID => 3]], + [[GroupInterface::ID => 2, GroupInterface::CODE => 'Wholesale', GroupInterface::TAX_CLASS_ID => 3]], + [[GroupInterface::ID => 3, GroupInterface::CODE => 'Retailer', GroupInterface::TAX_CLASS_ID => 3]], + ]; + } + + /** + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @expectedExceptionMessage No such entity with id = 9999 + */ + public function testGetGroupException() + { + $this->groupRepository->get(9999); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateGroup() + { + $group = $this->groupBuilder->setId(null)->setCode('Create Group')->setTaxClassId(3)->create(); + $groupId = $this->groupRepository->save($group)->getId(); + $this->assertNotNull($groupId); + + $newGroup = $this->groupRepository->get($groupId); + $this->assertEquals($groupId, $newGroup->getId()); + $this->assertEquals($group->getCode(), $newGroup->getCode()); + $this->assertEquals($group->getTaxClassId(), $newGroup->getTaxClassId()); + } + + /** + * @magentoDbIsolation enabled + */ + public function testCreateGroupDefaultTaxClass() + { + $group = $this->groupBuilder->setId(null)->setCode('Create Group')->setTaxClassId(null)->create(); + $groupId = $this->groupRepository->save($group)->getId(); + $this->assertNotNull($groupId); + + $newGroup = $this->groupRepository->get($groupId); + $this->assertEquals($groupId, $newGroup->getId()); + $this->assertEquals($group->getCode(), $newGroup->getCode()); + $this->assertEquals(GroupRepository::DEFAULT_TAX_CLASS_ID, $newGroup->getTaxClassId()); + } + + /** + * @magentoDbIsolation enabled + */ + public function testUpdateGroup() + { + $group = $this->groupBuilder->setId(null)->setCode('New Group')->setTaxClassId(3)->create(); + $groupId = $this->groupRepository->save($group)->getId(); + $this->assertNotNull($groupId); + + $newGroup = $this->groupRepository->get($groupId); + $this->assertEquals($groupId, $newGroup->getId()); + $this->assertEquals($group->getCode(), $newGroup->getCode()); + $this->assertEquals($group->getTaxClassId(), $newGroup->getTaxClassId()); + + $updates = $this->groupBuilder->setId($groupId)->setCode('Updated Group')->setTaxClassId(3)->create(); + $this->assertNotNull($this->groupRepository->save($updates)); + $updatedGroup = $this->groupRepository->get($groupId); + $this->assertEquals($updates->getCode(), $updatedGroup->getCode(), 'Code not updated.'); + $this->assertEquals($updates->getTaxClassId(), $updatedGroup->getTaxClassId(), 'Tax Class should not change.'); + } + + /** + * @magentoDbIsolation enabled + * @expectedException \Magento\Framework\Exception\InputException + * @expectedExceptionMessage Invalid value of "9999" provided for the taxClassId field. + */ + public function testUpdateGroupException() + { + $group = $this->groupBuilder->setId(null)->setCode('New Group')->setTaxClassId(3)->create(); + $groupId = $this->groupRepository->save($group)->getId(); + $this->assertNotNull($groupId); + + $newGroup = $this->groupRepository->get($groupId); + $this->assertEquals($groupId, $newGroup->getId()); + $this->assertEquals($group->getCode(), $newGroup->getCode()); + $this->assertEquals($group->getTaxClassId(), $newGroup->getTaxClassId()); + + $updates = $this->groupBuilder->setId($groupId)->setCode('Updated Group')->setTaxClassId(9999)->create(); + $this->groupRepository->save($updates); + $updatedGroup = $this->groupRepository->get($groupId); + $this->assertEquals($updates->getCode(), $updatedGroup->getCode()); + $this->assertEquals($updates->getTaxClassId(), $updatedGroup->getTaxClassId()); + } + + /** + * @magentoDbIsolation enabled + */ + public function testDelete() + { + $group = $this->groupBuilder->setId(null)->setCode('New Group')->setTaxClassId(3)->create(); + $groupId = $this->groupRepository->save($group)->getId(); + $newGroup = $this->groupRepository->get($groupId); + $this->assertTrue($this->groupRepository->delete($newGroup)); + } + + /** + * @magentoDbIsolation enabled + */ + public function testDeleteById() + { + $group = $this->groupBuilder->setId(null)->setCode('New Group')->setTaxClassId(3)->create(); + $groupId = $this->groupRepository->save($group)->getId(); + $this->assertTrue($this->groupRepository->deleteById($groupId)); + } + + /** + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @expectedExceptionMessage No such entity with id = 9999 + */ + public function testDeleteDoesNotExist() + { + $this->assertFalse($this->groupRepository->deleteById(9999)); + } + + /** + * @param array $filters + * @param array $filterGroup + * @param array $expectedResult array of expected results indexed by ID + * + * @dataProvider searchGroupsDataProvider + */ + public function testGetList($filters, $filterGroup, $expectedResult) + { + foreach ($filters as $filter) { + $this->searchCriteriaBuilder->addFilter([$filter]); + } + if (!is_null($filterGroup)) { + $this->searchCriteriaBuilder->addFilter($filterGroup); + } + + $searchResults = $this->groupRepository->getList($this->searchCriteriaBuilder->create()); + + /** @var $item GroupInterface */ + foreach ($searchResults->getItems() as $item) { + $this->assertEquals($expectedResult[$item->getId()][GroupInterface::CODE], $item->getCode()); + $this->assertEquals($expectedResult[$item->getId()][GroupInterface::TAX_CLASS_ID], $item->getTaxClassId()); + unset($expectedResult[$item->getId()]); + } + } + + public function searchGroupsDataProvider() + { + $builder = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Api\FilterBuilder'); + return [ + 'eq' => [ + [$builder->setField(GroupInterface::CODE)->setValue('General')->create()], + null, + [1 => [GroupInterface::CODE => 'General', GroupInterface::TAX_CLASS_ID => 3]] + ], + 'and' => [ + [ + $builder->setField(GroupInterface::CODE)->setValue('General')->create(), + $builder->setField(GroupInterface::TAX_CLASS_ID)->setValue('3')->create(), + $builder->setField(GroupInterface::ID)->setValue('1')->create(), + ], + [], + [1 => [GroupInterface::CODE => 'General', GroupInterface::TAX_CLASS_ID => 3]] + ], + 'or' => [ + [], + [ + $builder->setField(GroupInterface::CODE)->setValue('General')->create(), + $builder->setField(GroupInterface::CODE)->setValue('Wholesale')->create(), + ], + [ + 1 => [GroupInterface::CODE => 'General', GroupInterface::TAX_CLASS_ID => 3], + 2 => [GroupInterface::CODE => 'Wholesale', GroupInterface::TAX_CLASS_ID => 3] + ] + ], + 'like' => [ + [ + $builder->setField(GroupInterface::CODE)->setValue('er')->setConditionType('like') + ->create() + ], + [], + [ + 1 => [GroupInterface::CODE => 'General', GroupInterface::TAX_CLASS_ID => 3], + 3 => [GroupInterface::CODE => 'Retailer', GroupInterface::TAX_CLASS_ID => 3] + ] + ], + ]; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/VisitorTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/VisitorTest.php index f7ec83eb8bd87c6c03aaba2d7974e8e93f96b7f7..0e248e1f8e4b50bbade541d53aec3eb90f48f4fa 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/VisitorTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/VisitorTest.php @@ -76,6 +76,40 @@ class VisitorTest extends \PHPUnit_Framework_TestCase $this->assertNull($visitor->getDoCustomerLogout()); } + /** + * @magentoAppArea frontend + */ + public function testClean() + { + $lastVisitNow = date('Y-m-d H:i:s', time()); + $sessionIdNow = 'asaswljxvgklasdflkjasieasd'; + $lastVisitPast = date('Y-m-d H:i:s', time() - 172800); + $sessionIdPast = 'kui0aa57nqddl8vk7k6ohgi352'; + + /** @var \Magento\Customer\Model\Visitor $visitor */ + $visitor = Bootstrap::getObjectManager()->get('Magento\Customer\Model\Visitor'); + $visitor->setSessionId($sessionIdPast); + $visitor->setLastVisitAt($lastVisitPast); + $visitor->save(); + $visitorIdPast = $visitor->getId(); + $visitor->unsetData(); + $visitor->setSessionId($sessionIdNow); + $visitor->setLastVisitAt($lastVisitNow); + $visitor->save(); + $visitorIdNow = $visitor->getId(); + $visitor->unsetData(); + + $visitor->clean(); + $visitor->load($visitorIdPast); + $this->assertEquals([], $visitor->getData()); + $visitor->unsetData(); + $visitor->load($visitorIdNow); + $this->assertEquals( + ['visitor_id' => $visitorIdNow, 'session_id' => $sessionIdNow, 'last_visit_at' => $lastVisitNow], + $visitor->getData() + ); + } + /** * Authenticate customer and return its DTO * @param string $username diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/AddressMetadataServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/AddressMetadataServiceTest.php index 2f92b21558b3e3901ef4c107834a2d3f7c3defec..3b934e12a4e70ea12f0ec24d85326dcb0df00751 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/AddressMetadataServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/AddressMetadataServiceTest.php @@ -38,7 +38,7 @@ class AddressMetadataServiceTest extends \PHPUnit_Framework_TestCase $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->configure( [ - 'Magento\Framework\Service\Config\Reader' => [ + 'Magento\Framework\Api\Config\Reader' => [ 'arguments' => [ 'fileResolver' => ['instance' => 'Magento\Customer\Service\V1\FileResolverStub'] ] diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php index 3ae21e32bfddcaff17355e29a19468efce043540..b6c099e06bdf9448475c619bca1bfd5e98e938ec 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php @@ -28,7 +28,7 @@ namespace Magento\Customer\Service\V1; use Magento\Customer\Service\V1; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; use Magento\Framework\Exception\State\ExpiredException; use Magento\TestFramework\Helper\Bootstrap; @@ -672,8 +672,8 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Admin', $customerAfter->getCreatedIn()); $passwordFromFixture = 'password'; $this->_customerAccountService->authenticate($customerAfter->getEmail(), $passwordFromFixture); - $attributesBefore = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerBefore); - $attributesAfter = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerBefore); + $attributesAfter = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); @@ -732,8 +732,8 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase 'password', true ); - $attributesBefore = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerBefore); - $attributesAfter = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerBefore); + $attributesAfter = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); @@ -798,8 +798,8 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase 'password', true ); - $attributesBefore = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerBefore); - $attributesAfter = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerBefore); + $attributesAfter = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); @@ -860,6 +860,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $email = 'savecustomer@example.com'; $firstName = 'Firstsave'; $lastName = 'Lastsave'; + $password = 'aPassword'; $customerData = array_merge( $existingCustomer->__toArray(), [ @@ -874,7 +875,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $customerEntity = $this->_customerBuilder->create(); $customerDetails = $this->_customerDetailsBuilder->setCustomer($customerEntity)->create(); - $customerAfter = $this->_customerAccountService->createCustomer($customerDetails, 'aPassword'); + $customerAfter = $this->_customerAccountService->createCustomer($customerDetails, $password); $this->assertGreaterThan(0, $customerAfter->getId()); $this->assertEquals($email, $customerAfter->getEmail()); $this->assertEquals($firstName, $customerAfter->getFirstname()); @@ -885,8 +886,8 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase 'aPassword', true ); - $attributesBefore = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($existingCustomer); - $attributesAfter = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($existingCustomer); + $attributesAfter = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); @@ -952,7 +953,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $customerData = $this->_customerAccountService->createCustomer($customerDetails, $password); $this->assertNotNull($customerData->getId()); $savedCustomer = $this->_customerAccountService->getCustomer($customerData->getId()); - $dataInService = \Magento\Framework\Service\SimpleDataObjectConverter::toFlatArray($savedCustomer); + $dataInService = \Magento\Framework\Api\SimpleDataObjectConverter::toFlatArray($savedCustomer); $expectedDifferences = [ 'created_at', 'updated_at', @@ -992,6 +993,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $firstname = 'Tester'; $lastname = 'McTest'; $groupId = 1; + $password = 'aPassword'; $this->_customerBuilder ->setStoreId($storeId) @@ -1001,7 +1003,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase ->setGroupId($groupId); $newCustomerEntity = $this->_customerBuilder->create(); $customerDetails = $this->_customerDetailsBuilder->setCustomer($newCustomerEntity)->create(); - $savedCustomer = $this->_customerAccountService->createCustomer($customerDetails, 'aPassword'); + $savedCustomer = $this->_customerAccountService->createCustomer($customerDetails, $password); $this->assertNotNull($savedCustomer->getId()); $this->assertEquals($email, $savedCustomer->getEmail()); $this->assertEquals($storeId, $savedCustomer->getStoreId()); @@ -1062,6 +1064,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $email = 'savecustomer@example.com'; $firstName = 'Firstsave'; $lastname = 'Lastsave'; + $password = 'aPassword'; $existingCustId = 1; $existingCustomer = $this->_customerAccountService->getCustomer($existingCustId); @@ -1079,7 +1082,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $customerEntity = $this->_customerBuilder->create(); $customerDetails = $this->_customerDetailsBuilder->setCustomer($customerEntity)->create(); - $customer = $this->_customerAccountService->createCustomer($customerDetails, 'aPassword'); + $customer = $this->_customerAccountService->createCustomer($customerDetails, $password); $this->assertNotEmpty($customer->getId()); $this->assertEquals($email, $customer->getEmail()); $this->assertEquals($firstName, $customer->getFirstname()); @@ -1102,6 +1105,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $firstname = 'Tester'; $lastname = 'McTest'; $groupId = 1; + $password = 'aPassword'; $this->_customerBuilder ->setStoreId($storeId) @@ -1112,7 +1116,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $newCustomerEntity = $this->_customerBuilder->create(); $customerDetails = $this->_customerDetailsBuilder->setCustomer($newCustomerEntity)->create(); - $customer = $this->_customerAccountService->createCustomer($customerDetails, 'aPassword'); + $customer = $this->_customerAccountService->createCustomer($customerDetails, $password); $this->_customerBuilder->populate($customer); $this->_customerBuilder->setFirstname('Tested'); @@ -1177,8 +1181,8 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase } /** - * @param \Magento\Framework\Service\V1\Data\Filter[] $filters - * @param \Magento\Framework\Service\V1\Data\Filter[] $filterGroup + * @param \Magento\Framework\Api\Filter[] $filters + * @param \Magento\Framework\Api\Filter[] $filterGroup * @param array $expectedResult array of expected results indexed by ID * * @dataProvider searchCustomersDataProvider @@ -1188,9 +1192,9 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase */ public function testSearchCustomers($filters, $filterGroup, $expectedResult) { - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager()->create( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder' + 'Magento\Framework\Api\SearchCriteriaBuilder' ); foreach ($filters as $filter) { $searchBuilder->addFilter([$filter]); @@ -1219,7 +1223,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase public function searchCustomersDataProvider() { - $builder = Bootstrap::getObjectManager()->create('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $builder = Bootstrap::getObjectManager()->create('\Magento\Framework\Api\FilterBuilder'); return [ 'Customer with specific email' => [ [$builder->setField('email')->setValue('customer@search.example.com')->create()], @@ -1264,19 +1268,19 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase */ public function testSearchCustomersOrder() { - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager() - ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder'); + ->create('Magento\Framework\Api\SearchCriteriaBuilder'); // Filter for 'firstname' like 'First' - $filterBuilder = $this->_objectManager->create('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = $this->_objectManager->create('\Magento\Framework\Api\FilterBuilder'); $firstnameFilter = $filterBuilder->setField('firstname') ->setConditionType('like') ->setValue('First%') ->create(); $searchBuilder->addFilter([$firstnameFilter]); // Search ascending order - $sortOrderBuilder = $this->_objectManager->create('\Magento\Framework\Service\V1\Data\SortOrderBuilder'); + $sortOrderBuilder = $this->_objectManager->create('\Magento\Framework\Api\SortOrderBuilder'); $sortOrder = $sortOrderBuilder ->setField('lastname') ->setDirection(SearchCriteria::SORT_ASC) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php index a5466709f4be24954a10be72f05ccea82fc299bc..5d83afa0a58f321708a5d9e6d7aa79b8b43b12c6 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php @@ -26,10 +26,10 @@ namespace Magento\Customer\Service\V1; use Magento\Customer\Service\V1\Data\CustomerGroup; -use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Api\FilterBuilder; use Magento\Store\Model\ScopeInterface; use Magento\TestFramework\Helper\Bootstrap; -use Magento\Framework\Service\V1\Data\Filter; +use Magento\Framework\Api\Filter; use Magento\Customer\Model\Group; class CustomerGroupServiceTest extends \PHPUnit_Framework_TestCase @@ -252,9 +252,9 @@ class CustomerGroupServiceTest extends \PHPUnit_Framework_TestCase */ public function testSearchGroups($filters, $filterGroup, $expectedResult) { - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager() - ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder'); + ->create('Magento\Framework\Api\SearchCriteriaBuilder'); foreach ($filters as $filter) { $searchBuilder->addFilter([$filter]); } @@ -274,7 +274,7 @@ class CustomerGroupServiceTest extends \PHPUnit_Framework_TestCase public function searchGroupsDataProvider() { - $builder = Bootstrap::getObjectManager()->create('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $builder = Bootstrap::getObjectManager()->create('\Magento\Framework\Api\FilterBuilder'); return [ 'eq' => [ [$builder->setField(CustomerGroup::CODE)->setValue('General')->create()], diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php index f0806fb5736dca2b8a17701c6e7a6b78e639689a..71a3592b77b050ee6bd39b284ffa05a4d7559669 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php @@ -39,7 +39,7 @@ class CustomerMetadataServiceTest extends \PHPUnit_Framework_TestCase $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->configure( [ - 'Magento\Framework\Service\Config\Reader' => [ + 'Magento\Framework\Api\Config\Reader' => [ 'arguments' => [ 'fileResolver' => ['instance' => 'Magento\Customer\Service\V1\FileResolverStub'] ] @@ -140,7 +140,7 @@ class CustomerMetadataServiceTest extends \PHPUnit_Framework_TestCase $customer = $this->_customerAccountService->getCustomer(1); $this->assertNotNull($customer); - $attributes = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer); + $attributes = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer); $this->assertNotEmpty($attributes); foreach ($attributes as $attributeCode => $attributeValue) { diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/etc/data_object.xml b/dev/tests/integration/testsuite/Magento/Customer/_files/etc/data_object.xml index a2069f0d8a4264efa3d63e104e8159c7efa58264..21a91ffe582219c28cf37f8f9abfb511656f416f 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/_files/etc/data_object.xml +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/etc/data_object.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Service/etc/data_object.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../lib/internal/Magento/Framework/Api/etc/data_object.xsd"> <custom_attributes for="Magento\Tax\Service\V1\Data\TaxRate"> </custom_attributes> <custom_attributes for="Magento\Catalog\Service\V1\Data\Product"> @@ -33,11 +33,11 @@ <attribute code="category_attribute_1" type="Magento\Catalog\Service\V1\Data\CategoryAttributeType1" /> <attribute code="category_attribute_2" type="Magento\Catalog\Service\V1\Data\CategoryAttributeType2" /> </custom_attributes> - <custom_attributes for="Magento\Customer\Service\V1\Data\Customer"> + <custom_attributes for="Magento\Customer\Api\Data\CustomerInterface"> <attribute code="customer_attribute_1" type="Magento\Customer\Service\V1\Data\CustomerAttributeType1" /> <attribute code="customer_attribute_2" type="Magento\Customer\Service\V1\Data\CustomerAttributeType2" /> </custom_attributes> - <custom_attributes for="Magento\Customer\Service\V1\Data\Address"> + <custom_attributes for="Magento\Customer\Api\Data\AddressInterface"> <attribute code="address_attribute_1" type="Magento\Customer\Service\V1\Data\AddressAttributeType1" /> <attribute code="address_attribute_2" type="Magento\Customer\Service\V1\Data\AddressAttributeType2" /> </custom_attributes> diff --git a/dev/tests/integration/testsuite/Magento/DatabaseTest.php b/dev/tests/integration/testsuite/Magento/DatabaseTest.php index edbefd3aeae0d8aec196c2fcb2569ec266fb7162..ad2d212b8c43efad481057a25274d21935ee6467 100644 --- a/dev/tests/integration/testsuite/Magento/DatabaseTest.php +++ b/dev/tests/integration/testsuite/Magento/DatabaseTest.php @@ -37,9 +37,9 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase } $checkerPath = PERCONA_TOOLKIT_BIN_DIR . '/pt-duplicate-key-checker'; - $dbConfig = Bootstrap::getInstance()->getBootstrap()->getDbConfig(); - $command = $checkerPath . ' -d ' . $dbConfig->dbName - . ' h=' . $dbConfig->host . ',u=' . $dbConfig->username . ',p=' . $dbConfig->password; + $db = Bootstrap::getInstance()->getBootstrap()->getApplication()->getDbInstance(); + $command = $checkerPath . ' -d ' . $db->getSchema() + . ' h=' . $db->getHost()['db_host'] . ',u=' . $db->getUser() . ',p=' . $db->getPassword(); exec($command, $output, $exitCode); $this->assertEquals(0, $exitCode); diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php b/dev/tests/integration/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c9a63d381949233ca3ee17d64a3f4315dc1247b6 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php @@ -0,0 +1,101 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Framework\Api\Code\Generator; + +use Magento\Wonderland\Api\Data\FakeAddressInterface; +use Magento\Wonderland\Api\Data\FakeRegionInterface; + +class DataBuilderTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Framework\ObjectManager */ + private $_objectManager; + + protected function setUp() + { + $includePath = new \Magento\Framework\Autoload\IncludePath(); + $includePath->addIncludePath([__DIR__ . '/../../_files']); + spl_autoload_register([$includePath, 'load']); + $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->_objectManager->configure( + [ + 'preferences' => [ + 'Magento\Wonderland\Api\Data\FakeAddressInterface' => 'Magento\Wonderland\Model\FakeAddress', + 'Magento\Wonderland\Api\Data\FakeRegionInterface' => 'Magento\Wonderland\Model\FakeRegion' + ] + ] + ); + } + + public function testPopulateWithArray() + { + /** @var \Magento\Wonderland\Api\Data\FakeAddressDataBuilder $addressBuilder */ + $addressBuilder = $this->_objectManager->create('Magento\Wonderland\Api\Data\FakeAddressDataBuilder'); + + $data = [ + FakeAddressInterface::ID => 1, + FakeAddressInterface::CITY => 'Kiev', + FakeAddressInterface::REGION => [ + FakeRegionInterface::REGION => 'US', + FakeRegionInterface::REGION_CODE => 'TX', + FakeRegionInterface::REGION_ID => '1', + ], + FakeAddressInterface::REGIONS => [ + [ + FakeRegionInterface::REGION => 'US', + FakeRegionInterface::REGION_CODE => 'TX', + FakeRegionInterface::REGION_ID => '1', + ], [ + FakeRegionInterface::REGION => 'US', + FakeRegionInterface::REGION_CODE => 'TX', + FakeRegionInterface::REGION_ID => '2', + ] + ], + FakeAddressInterface::COMPANY => 'Magento', + FakeAddressInterface::COUNTRY_ID => 'US', + FakeAddressInterface::CUSTOMER_ID => '1', + FakeAddressInterface::FAX => '222', + FakeAddressInterface::FIRSTNAME => 'John', + FakeAddressInterface::MIDDLENAME => 'Dow', + FakeAddressInterface::LASTNAME => 'Johnes', + FakeAddressInterface::SUFFIX => 'Jr.', + FakeAddressInterface::POSTCODE => '78757', + FakeAddressInterface::PREFIX => 'Mr.', + FakeAddressInterface::STREET => 'Oak rd.', + FakeAddressInterface::TELEPHONE => '1234567', + FakeAddressInterface::VAT_ID => '1', + 'test' => 'xxx' + ]; + + /** @var \Magento\Wonderland\Api\Data\FakeAddressInterface $address */ + $address = $addressBuilder->populateWithArray($data) + ->create(); + $this->assertInstanceOf('\Magento\Wonderland\Api\Data\FakeAddressInterface', $address); + $this->assertEquals('Johnes', $address->getLastname()); + $this->assertNull($address->getCustomAttribute('test')); + $this->assertInstanceOf('\Magento\Wonderland\Api\Data\FakeRegionInterface', $address->getRegion()); + $this->assertInstanceOf('\Magento\Wonderland\Api\Data\FakeRegionInterface', $address->getRegions()[0]); + $this->assertInstanceOf('\Magento\Wonderland\Api\Data\FakeRegionInterface', $address->getRegions()[1]); + } + +} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Service/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/Api/Config/ReaderTest.php similarity index 85% rename from dev/tests/integration/testsuite/Magento/Framework/Service/Config/ReaderTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Api/Config/ReaderTest.php index 42c11f0b0877833491aa952df334e38e023bfaba..08277d8298d133474848bf4466ca6390cf5f3173 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Service/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Config/ReaderTest.php @@ -21,15 +21,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; /** - * Tests for \Magento\Framework\Service\Config\Reader + * Tests for \Magento\Framework\Api\Config\Reader */ class ReaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\Service\Config\Reader + * @var \Magento\Framework\Api\Config\Reader */ protected $_model; @@ -49,12 +49,12 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_validationState; /** - * @var \Magento\Framework\Service\Config\SchemaLocator + * @var \Magento\Framework\Api\Config\SchemaLocator */ protected $_schemaLocator; /** - * @var \Magento\Framework\Service\Config\Converter + * @var \Magento\Framework\Api\Config\Converter */ protected $_converter; @@ -74,17 +74,17 @@ class ReaderTest extends \PHPUnit_Framework_TestCase ->method('get') ->will($this->returnValue($this->_fileList)); - $this->_converter = new \Magento\Framework\Service\Config\Converter(); + $this->_converter = new \Magento\Framework\Api\Config\Converter(); $this->_validationState = new \Magento\Framework\App\Arguments\ValidationState( \Magento\Framework\App\State::MODE_DEFAULT ); - $this->_schemaLocator = new \Magento\Framework\Service\Config\SchemaLocator(); + $this->_schemaLocator = new \Magento\Framework\Api\Config\SchemaLocator(); } public function testMerge() { - $model = new \Magento\Framework\Service\Config\Reader( + $model = new \Magento\Framework\Api\Config\Reader( $this->_fileResolverMock, $this->_converter, $this->_schemaLocator, diff --git a/dev/tests/integration/testsuite/Magento/Framework/Service/Config/_files/config_one.xml b/dev/tests/integration/testsuite/Magento/Framework/Api/Config/_files/config_one.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/Framework/Service/Config/_files/config_one.xml rename to dev/tests/integration/testsuite/Magento/Framework/Api/Config/_files/config_one.xml index 47ce633618dbd583e4a2438b7c04f0fa35a7c0e3..c109f8a46c9fa8fdc704bd323f4f8225105ebf4a 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Service/Config/_files/config_one.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Config/_files/config_one.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Service/etc/data_object.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Api/etc/data_object.xsd"> <custom_attributes for="Magento\Tax\Service\V1\Data\TaxRate"> </custom_attributes> <custom_attributes for="Magento\Catalog\Service\Data\V1\Product"> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Service/Config/_files/config_two.xml b/dev/tests/integration/testsuite/Magento/Framework/Api/Config/_files/config_two.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/Framework/Service/Config/_files/config_two.xml rename to dev/tests/integration/testsuite/Magento/Framework/Api/Config/_files/config_two.xml index 631537acba3306efe2265163ce24c6f7b1f7bceb..997433f45519c42f4bf56a1401cfc5fb08925161 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Service/Config/_files/config_two.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/Config/_files/config_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Service/etc/data_object.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Api/etc/data_object.xsd"> <custom_attributes for="Magento\Customer\Service\V1\Data\Customer"> <attribute code="custom_2" type="Magento\CustomerExtra\Service\V1\Data\CustomerCustom22" /> <attribute code="custom_3" type="Magento\Customer\Service\V1\Data\CustomerCustom3" /> diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeAddressInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeAddressInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a717126d57208c15bf617eb23ca07bc649812279 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeAddressInterface.php @@ -0,0 +1,175 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Wonderland\Api\Data; + +use Magento\Framework\Api\ExtensibleDataInterface; + +/** + * Customer address interface. + */ +interface FakeAddressInterface extends ExtensibleDataInterface +{ + /**#@+ + * Constants for keys of data array + */ + const ID = 'id'; + const CUSTOMER_ID = 'customer_id'; + const REGION = 'region'; + const REGIONS = 'regions'; + const COUNTRY_ID = 'country_id'; + const STREET = 'street'; + const COMPANY = 'company'; + const TELEPHONE = 'telephone'; + const FAX = 'fax'; + const POSTCODE = 'postcode'; + const CITY = 'city'; + const FIRSTNAME = 'firstname'; + const LASTNAME = 'lastname'; + const MIDDLENAME = 'middlename'; + const PREFIX = 'prefix'; + const SUFFIX = 'suffix'; + const VAT_ID = 'vat_id'; + /**#@-*/ + + /** + * Get ID + * + * @return int|null + */ + public function getId(); + + /** + * Get customer ID + * + * @return int|null + */ + public function getCustomerId(); + + /** + * Get region + * + * @return \Magento\Wonderland\Api\Data\FakeRegionInterface|null + */ + public function getRegion(); + + /** + * Get region + * + * @return \Magento\Wonderland\Api\Data\FakeRegionInterface[]|null + */ + public function getRegions(); + + /** + * Two-letter country code in ISO_3166-2 format + * + * @return string|null + */ + public function getCountryId(); + + /** + * Get street + * + * @return string[]|null + */ + public function getStreet(); + + /** + * Get company + * + * @return string|null + */ + public function getCompany(); + + /** + * Get telephone number + * + * @return string|null + */ + public function getTelephone(); + + /** + * Get fax number + * + * @return string|null + */ + public function getFax(); + + /** + * Get postcode + * + * @return string|null + */ + public function getPostcode(); + + /** + * Get city name + * + * @return string|null + */ + public function getCity(); + + /** + * Get first name + * + * @return string|null + */ + public function getFirstname(); + + /** + * Get last name + * + * @return string|null + */ + public function getLastname(); + + /** + * Get middle name + * + * @return string|null + */ + public function getMiddlename(); + + /** + * Get prefix + * + * @return string|null + */ + public function getPrefix(); + + /** + * Get suffix + * + * @return string|null + */ + public function getSuffix(); + + /** + * Get Vat id + * + * @return string|null + */ + public function getVatId(); +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeRegionInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeRegionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..385629fc626735ecd5191c669dc1f7a3bcf694d9 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeRegionInterface.php @@ -0,0 +1,62 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Wonderland\Api\Data; + +use Magento\Framework\Api\ExtensibleDataInterface; + +/** + * Customer address region interface. + */ +interface FakeRegionInterface extends ExtensibleDataInterface +{ + /**#@+ + * Constants for keys of data array + */ + const REGION_CODE = 'region_code'; + const REGION = 'region'; + const REGION_ID = 'region_id'; + /**#@-*/ + + /** + * Get region code + * + * @return string + */ + public function getRegionCode(); + + /** + * Get region + * + * @return string + */ + public function getRegion(); + + /** + * Get region id + * + * @return int + */ + public function getRegionId(); +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeAddress.php b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeAddress.php new file mode 100644 index 0000000000000000000000000000000000000000..d6f31fabd2209d76f53c01ef3e8397ac47c047fe --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeAddress.php @@ -0,0 +1,201 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Wonderland\Model; + +use Magento\Wonderland\Api\Data\FakeAddressInterface; +use Magento\Framework\Model\AbstractExtensibleModel; + +class FakeAddress extends AbstractExtensibleModel implements FakeAddressInterface +{ + /** + * Get ID + * + * @return int|null + */ + public function getId() + { + return $this->getData(self::ID); + } + + /** + * Get customer ID + * + * @return int|null + */ + public function getCustomerId() + { + return $this->getData(self::CUSTOMER_ID); + } + + /** + * Get region + * + * @return \Magento\Wonderland\Api\Data\FakeRegionInterface|null + */ + public function getRegion() + { + return $this->getData(self::REGION); + } + + /** + * Get region + * + * @return \Magento\Wonderland\Api\Data\FakeRegionInterface|null + */ + public function getRegions() + { + return $this->getData(self::REGIONS); + } + + /** + * Two-letter country code in ISO_3166-2 format + * + * @return string|null + */ + public function getCountryId() + { + return $this->getData(self::COUNTRY_ID); + } + + /** + * Get street + * + * @return string[]|null + */ + public function getStreet() + { + return $this->getData(self::STREET); + } + + /** + * Get company + * + * @return string|null + */ + public function getCompany() + { + return $this->getData(self::COMPANY); + } + + /** + * Get telephone number + * + * @return string|null + */ + public function getTelephone() + { + return $this->getData(self::TELEPHONE); + } + + /** + * Get fax number + * + * @return string|null + */ + public function getFax() + { + return $this->getData(self::FAX); + } + + /** + * Get postcode + * + * @return string|null + */ + public function getPostcode() + { + return $this->getData(self::POSTCODE); + } + + /** + * Get city name + * + * @return string|null + */ + public function getCity() + { + return $this->getData(self::CITY); + } + + /** + * Get first name + * + * @return string|null + */ + public function getFirstname() + { + return $this->getData(self::FIRSTNAME); + } + + /** + * Get last name + * + * @return string|null + */ + public function getLastname() + { + return $this->getData(self::LASTNAME); + } + + /** + * Get middle name + * + * @return string|null + */ + public function getMiddlename() + { + return $this->getData(self::MIDDLENAME); + } + + /** + * Get prefix + * + * @return string|null + */ + public function getPrefix() + { + return $this->getData(self::PREFIX); + } + + /** + * Get suffix + * + * @return string|null + */ + public function getSuffix() + { + return $this->getData(self::SUFFIX); + } + + /** + * Get Vat id + * + * @return string|null + */ + public function getVatId() + { + return $this->getData(self::VAT_ID); + } +} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeRegion.php b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeRegion.php new file mode 100644 index 0000000000000000000000000000000000000000..91e122808e042f8ce4d42379c1c9eba8aeab1e1d --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeRegion.php @@ -0,0 +1,62 @@ +<?php +/** + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Wonderland\Model; + +use Magento\Wonderland\Api\Data\FakeRegionInterface; +use Magento\Framework\Model\AbstractExtensibleModel; + +class FakeRegion extends AbstractExtensibleModel implements FakeRegionInterface +{ + + /** + * Get region + * + * @return string + */ + public function getRegion() + { + return $this->getData(self::REGION); + } + + /** + * Get region code + * + * @return string + */ + public function getRegionCode() + { + return $this->getData(self::REGION_CODE); + } + + /** + * Get region id + * + * @return int + */ + public function getRegionId() + { + return $this->getData(self::REGION_ID); + } +} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/AreaTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/AreaTest.php index 738065c1a24113660bbf8eb97035373946bac145..d2127af8c66a82f4bdb2a31806019f8e5c270000 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/AreaTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/AreaTest.php @@ -126,7 +126,7 @@ class AreaTest extends \PHPUnit_Framework_TestCase public function testDetectDesignNonFrontend() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $model = $objectManager->create('Magento\Framework\App\Area', array('areaCode' => 'install')); + $model = $objectManager->create('Magento\Framework\App\Area', array('areaCode' => 'adminhtml')); /** @var $request \Magento\TestFramework\Request */ $request = $objectManager->create('Magento\TestFramework\Request'); $request->setServer(array('HTTP_USER_AGENT' => 'Mozilla Firefox')); diff --git a/dev/tests/integration/testsuite/Magento/Framework/Code/Generator/FileResolverTest.php b/dev/tests/integration/testsuite/Magento/Framework/Code/Generator/FileResolverTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b6693448211e332cd2b62c0d66ec5e8baf99d1f6 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/Generator/FileResolverTest.php @@ -0,0 +1,97 @@ +<?php +/** + * Integration test for \Magento\Framework\Code\Generator\FileResolver + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Framework\Code\Generator; + +use Magento\TestFramework\Helper\Bootstrap; + +class FileResolverTest extends \PHPUnit_Framework_TestCase +{ + + /** + * Path to add to include path + */ + const FIRST_PATH = '/path/to/code/1/'; + + /** + * Path to add to include path + */ + const SECOND_PATH = '/path/to/code/2/'; + + /** + * @var \Magento\Framework\Code\Generator\FileResolver + */ + protected $model; + + /** + * @var string original include-path variable + */ + protected $originalPath; + + public function setUp() + { + $this->model = Bootstrap::getObjectManager()->create('Magento\Framework\Code\Generator\FileResolver'); + $this->originalPath = get_include_path(); + set_include_path('/pre/existing/paths/'); + } + + public function tearDown() + { + set_include_path($this->originalPath); + } + + public function testAddIncludePathPrepend() + { + $this->model->addIncludePath(self::FIRST_PATH); + $this->model->addIncludePath(self::SECOND_PATH); + + $postIncludePath = get_include_path(); + $this->assertStringStartsWith( + self::SECOND_PATH, + $postIncludePath + ); + } + + public function testAddIncludePathAppend() + { + $this->model->addIncludePath(self::FIRST_PATH, false); + $this->model->addIncludePath(self::SECOND_PATH, false); + + $postIncludePath = get_include_path(); + $this->assertStringEndsWith( + self::SECOND_PATH, + $postIncludePath + ); + } + + public function testGetFile() + { + $includePath = realpath(__DIR__ . '/../_files/'); + $className = '\ClassToFind'; + + $this->model->addIncludePath($includePath); + $this->assertFileExists($this->model->getFile($className)); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php index 60ca4058facd557e69df85c2874c2ed931c6da93..bfab2a33a5e895aa502b8b0876e5d826700bd724 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php @@ -75,7 +75,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase $this->_ioObject = new \Magento\Framework\Code\Generator\Io( new \Magento\Framework\Filesystem\Driver\File(), - new \Magento\Framework\Autoload\IncludePath(), + new \Magento\Framework\Code\Generator\FileResolver(), $generationDirectory ); $this->_generator = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/dev/shell/uninstall.php b/dev/tests/integration/testsuite/Magento/Framework/Code/_files/ClassToFind.php similarity index 73% rename from dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/dev/shell/uninstall.php rename to dev/tests/integration/testsuite/Magento/Framework/Code/_files/ClassToFind.php index 5956af5ae0dbbcf7f23d4272dbf9f3720d9cc4bf..a760065840757efc0ace624db1e18ed5c2fec802 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/dev/shell/uninstall.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/_files/ClassToFind.php @@ -18,8 +18,10 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * + * Exists for testing FileResolver. + * + * \Magento\Framework\Code\Generator\FileResolverTest */ - -/* Magento console uninstaller stub */ diff --git a/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php index a6daa08cbfefcd4f85b2f4dbf7e08267ab5b5d18..a572d105bbc137529851e35333c5fd1cb018565e 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php @@ -243,7 +243,7 @@ class InterfaceTest extends \PHPUnit_Framework_TestCase public function saveDataProvider() { - $dir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir() . '/'; + $dir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppTempDir() . '/'; return $this->_prepareData( array( array($this->_getFixture('image_adapters_test.png'), array($dir . uniqid('test_image_adapter'))), diff --git a/dev/tests/integration/testsuite/Magento/Framework/Module/SetupTest.php b/dev/tests/integration/testsuite/Magento/Framework/Module/SetupTest.php index 806c015c68ba8e971f49e4255a575bf0c508e4bf..89d831e603fb41c8d4ab5fb7c6a5e478de652c7b 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Module/SetupTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Module/SetupTest.php @@ -46,26 +46,19 @@ class SetupTest extends \PHPUnit_Framework_TestCase public function testApplyAllDataUpdates() { - /*reset versions*/ - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - '\Magento\Framework\Module\ResourceInterface' - )->setDbVersion( - 'adminnotification_setup', - false - ); + /* reset data version */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( '\Magento\Framework\Module\ResourceInterface' )->setDataVersion( 'adminnotification_setup', false ); - $this->_model->deleteTableRow('core_resource', 'code', 'adminnotification_setup'); - $this->_model->getConnection()->dropTable($this->_model->getTable('adminnotification_inbox')); - $this->_model->getConnection()->dropTable($this->_model->getTable('admin_system_messages')); + /* clear table */ + $this->_model->getConnection()->delete($this->_model->getTable('adminnotification_inbox'), 'true'); + $this->_model->getConnection()->delete($this->_model->getTable('admin_system_messages'), 'true'); /** @var $updater \Magento\Framework\Module\Updater */ $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\Module\Updater'); try { - $updater->updateScheme(); $updater->updateData(); } catch (\Exception $e) { $this->fail("Impossible to continue other tests, because database is broken: {$e}"); diff --git a/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php b/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php deleted file mode 100644 index 9447fdccc783e7e1702e524ee92b694e190a5e23..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Block; - -class AdminTest extends \PHPUnit_Framework_TestCase -{ - public function testToHtml() - { - $preserve = array( - 'username' => 'admin', - 'email' => 'admin@example.com', - 'firstname' => 'First', - 'lastname' => 'Last' - ); - $omit = array('password' => 'password_with_1_number', 'password_confirmation' => 'password_with_1_number'); - - /** @var $session \Magento\Framework\Session\Generic */ - $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Install\Model\Session'); - $session->setAdminData(array_merge($preserve, $omit)); - - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') - ->setAreaCode('install'); - - /** @var $layout \Magento\Framework\View\LayoutInterface */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Framework\View\Layout'); - /** @var $block \Magento\Install\Block\Admin */ - $block = $layout->createBlock('Magento\Install\Block\Admin'); - $output = $block->toHtml(); - - $this->assertEmpty($session->getAdminData()); - // form elements must be present with values - foreach ($preserve as $key => $value) { - $this->assertSelectCount(sprintf('input[name=admin[%s]][value=%s]', $key, $value), 1, $output); - } - // form elements must be present without values - foreach ($omit as $key => $value) { - $this->assertSelectCount(sprintf('input[name=admin[%s]]', $key), 1, $output); - $this->assertSelectCount(sprintf('input[name=admin[%s]][value=%s]', $key, $value), 0, $output); - } - } -} diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php deleted file mode 100644 index 8627021412d919018925bda8bd52f8fd3a4bf964..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php +++ /dev/null @@ -1,227 +0,0 @@ -<?php -/** - * \Magento\Install\Model\Config - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Install\Model; - -use Magento\Framework\App\Filesystem\DirectoryList; - -class ConfigTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Install\Model\Config - */ - private $_object; - - /** - * @var \Magento\Framework\ObjectManager - */ - private $_objectManager; - - public function setUp() - { - $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $cacheTypeList \Magento\Framework\App\Cache\TypeListInterface */ - $cacheTypeList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Framework\App\Cache\TypeListInterface' - ); - $types = array_keys($cacheTypeList->getTypes()); - - /** @var $cacheState \Magento\Framework\App\Cache\StateInterface */ - $cacheState = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Framework\App\Cache\StateInterface' - ); - foreach ($types as $type) { - $cacheState->setEnabled($type, false); - } - $cacheState->persist(); - - /** @var \Magento\Framework\Filesystem $filesystem */ - $filesystem = $this->_objectManager->create( - 'Magento\Framework\Filesystem', - array( - 'directoryList' => $this->_objectManager->create( - 'Magento\Framework\App\Filesystem\DirectoryList', - array( - 'root' => BP, - 'config' => array( - DirectoryList::MODULES => array(DirectoryList::PATH => __DIR__ . '/_files'), - DirectoryList::CONFIG => array(DirectoryList::PATH => __DIR__ . '/_files') - ) - ) - ) - ) - ); - - /** @var \Magento\Framework\Module\Declaration\FileResolver $modulesDeclarations */ - $modulesDeclarations = $this->_objectManager->create( - 'Magento\Framework\Module\Declaration\FileResolver', - array('filesystem' => $filesystem) - ); - - - /** @var \Magento\Framework\Module\Declaration\Reader\Filesystem $filesystemReader */ - $filesystemReader = $this->_objectManager->create( - 'Magento\Framework\Module\Declaration\Reader\Filesystem', - array('fileResolver' => $modulesDeclarations) - ); - - /** @var \Magento\Framework\Module\ModuleList $modulesList */ - $modulesList = $this->_objectManager->create( - 'Magento\Framework\Module\ModuleList', - array('reader' => $filesystemReader) - ); - - /** @var \Magento\Framework\Module\Dir\Reader $moduleReader */ - $moduleReader = $this->_objectManager->create( - 'Magento\Framework\Module\Dir\Reader', - array('moduleList' => $modulesList, 'filesystem' => $filesystem) - ); - $moduleReader->setModuleDir('Magento_Test', 'etc', __DIR__ . '/_files/Magento/Test/etc'); - - /** @var \Magento\Framework\App\Config\FileResolver $fileResolver */ - $fileResolver = $this->_objectManager->create( - 'Magento\Framework\App\Config\FileResolver', - array('moduleReader' => $moduleReader) - ); - - /** @var \Magento\Install\Model\Config\Reader $configReader */ - $configReader = $this->_objectManager->create( - 'Magento\Install\Model\Config\Reader', - array('fileResolver' => $fileResolver) - ); - - $configData = $this->_objectManager->create( - 'Magento\Install\Model\Config\Data', - array('reader' => $configReader) - ); - - $this->_object = $this->_objectManager->create( - 'Magento\Install\Model\Config', - array('dataStorage' => $configData) - ); - } - - public function testGetWizardSteps() - { - $steps = $this->_object->getWizardSteps(); - $this->assertEquals(2, count($steps)); - $this->assertCount(2, $steps); - $this->assertEquals(array('begin', 'locale'), array($steps[0]->getName(), $steps[1]->getName())); - } - - public function testGetWritableFullPathsForCheck() - { - $directories = $this->_object->getWritableFullPathsForCheck(); - $this->assertEquals(2, count($directories)); - $this->assertCount(2, $directories); - $this->assertEquals('1', $directories['etc']['existence']); - $this->assertEquals('0', $directories['etc']['recursive']); - $this->assertTrue(array_key_exists('path', $directories['etc'])); - $this->assertEquals('1', $directories['var']['existence']); - $this->assertEquals('1', $directories['var']['recursive']); - $this->assertTrue(array_key_exists('path', $directories['var'])); - } - - public function testGetPathForCheck() - { - $directories = $this->_object->getPathForCheck(); - $this->assertEquals(2, count($directories['writeable'])); - $this->assertCount(2, $directories['writeable']); - $expected = array( - array('existence' => '1', 'recursive' => '0'), - array('existence' => '1', 'recursive' => '1') - ); - $this->assertEquals($expected, $directories['writeable']); - } - - public function testMergeCompleteAndPartial() - { - $fileList = array( - file_get_contents(__DIR__ . '/_files/install_wizard_complete.xml'), - file_get_contents(__DIR__ . '/_files/install_wizard_partial.xml') - ); - $fileResolverMock = $this->getMockBuilder( - 'Magento\Framework\Config\FileResolverInterface' - )->setMethods( - array('get') - )->disableOriginalConstructor()->getMock(); - $fileResolverMock->expects( - $this->once() - )->method( - 'get' - )->with( - $this->equalTo('install_wizard.xml') - )->will( - $this->returnValue($fileList) - ); - - $configReader = $this->_objectManager->create( - 'Magento\Install\Model\Config\Reader', - array('fileResolver' => $fileResolverMock) - ); - - $configData = $this->_objectManager->create( - 'Magento\Install\Model\Config\Data', - array('reader' => $configReader) - ); - - /** @var \Magento\Install\Model\Config $model */ - $model = $this->_objectManager->create('Magento\Install\Model\Config', array('dataStorage' => $configData)); - - $expectedSteps = array( - array( - 'name' => "begin", - 'controller' => 'wizard_custom', - 'action' => 'begin', - 'code' => 'License Agreement Updated' - ), - array( - 'name' => "after_end", - 'controller' => 'wizard_custom', - 'action' => 'after_end', - 'code' => 'One more thing..' - ) - ); - - $steps = $model->getWizardSteps(); - - $counter = 0; - foreach ($steps as $step) { - if (isset($expectedSteps[$counter])) { - $this->assertEquals($expectedSteps[$counter], $step->getData()); - $counter++; - } else { - $this->fail('It is more Install steps than expected'); - } - } - if (count($expectedSteps) > $counter + 1) { - $this->fail('Some expected steps are missing'); - } - $pathsForCheck = $model->getWritableFullPathsForCheck(); - $this->assertArrayHasKey('etc', $pathsForCheck); - $this->assertArrayHasKey('media', $pathsForCheck); - $this->assertEquals('1', $pathsForCheck['etc']['recursive']); - } -} diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/install_wizard.xml b/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/install_wizard.xml deleted file mode 100644 index f93d58889dc4759cafe116ec1d500fa2be4cac02..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/install_wizard.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./install_wizard.xsd"> - <steps> - <step id="begin" controller="wizard" action="begin"> - <label translate="true">License Agreement</label> - </step> - <step id="locale" controller="wizard" action="locale"> - <label translate="true">Localization</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" recursive="false" existence="true" writable="true" /> - <directory alias="var" recursive="true" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml deleted file mode 100644 index 322f774f564973787d10be162ab979d9cf88c3b4..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> - <module name="Magento_Test" schema_version="1.11.0.1" active="true" /> -</config> diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_complete.xml b/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_complete.xml deleted file mode 100644 index 512fb0ece03c77168f3311e8ca6e6e9739636c6d..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_complete.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../app/code/Magento/Install/etc/install_wizard.xsd"> - <steps> - <step id="begin" controller="wizard" action="begin"> - <label translate="true">License Agreement</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" recursive="false" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_partial.xml b/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_partial.xml deleted file mode 100644 index ae2fca3a49252838e2580b09c8aa72604138bf60..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Magento/Install/Model/_files/install_wizard_partial.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="../../../../../../../../app/code/Magento/Install/etc/install_wizard_file.xsd"> - <steps> - <step id="begin" controller="wizard_custom"> - <label translate="true">License Agreement Updated</label> - </step> - <step id="after_end" controller="wizard_custom" action="after_end"> - <label translate="true">One more thing..</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" recursive="true" /> - <directory alias="media" recursive="false" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php index ead14bd9cfbaedc3084247e95380163b01236d04..d2d10e7390f6a1b8824ad3c267280be3812d0606 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/Plugin/PluginTest.php @@ -74,7 +74,8 @@ class PluginTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder */ $customerDetailsBuilder = $objectManager->get('Magento\Customer\Service\V1\Data\CustomerDetailsBuilder'); $customerDetailsBuilder->setCustomer($customerBuilder->create()); - $createdCustomer = $this->accountService->createCustomer($customerDetailsBuilder->create()); + $createdCustomer = $this->accountService + ->createCustomer($customerDetailsBuilder->create(), 'password'); $subscriber->loadByEmail('customer_two@example.com'); $this->assertTrue($subscriber->isSubscribed()); diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/TemplateTest.php index 92e89ced0f9f3fd021f84f17b42099a0b3e3dd63..73d4798a1b6bf4ca327d8fa2f7f7b00770a4d589 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/TemplateTest.php @@ -87,7 +87,6 @@ class TemplateTest extends \PHPUnit_Framework_TestCase /** * This test expects next themes for areas: - * install/design/theme/full_name Magento/basic * adminhtml/design/theme/full_name Magento/backend * * @magentoAppIsolation enabled @@ -116,7 +115,6 @@ class TemplateTest extends \PHPUnit_Framework_TestCase 'Magento\Core\Model\View\Design' ); return array( - 'install' => array('install', $design->getConfigurationDesignTheme('install')), 'backend' => array('adminhtml', 'Magento/backend') ); } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php index 5088d69e99e2cb8950bbce670725acc9a9dc4d8d..daaa6254f74230443bbc744272f6f909721626d8 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php @@ -28,8 +28,8 @@ namespace Magento\Sales\Block\Adminhtml\Order\Create\Form; use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder; -use Magento\Customer\Service\V1\Data\Eav\OptionBuilder; -use Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder; +use Magento\Customer\Api\Data\OptionDataBuilder; +use Magento\Customer\Api\Data\ValidationRuleDataBuilder; class AbstractTest extends \PHPUnit_Framework_TestCase { @@ -71,9 +71,9 @@ class AbstractTest extends \PHPUnit_Framework_TestCase $attributeBuilder = $objectManager->create( '\Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder', [ - 'optionBuilder' => $objectManager->create('\Magento\Customer\Service\V1\Data\Eav\OptionBuilder'), + 'optionBuilder' => $objectManager->create('Magento\Customer\Service\V1\Data\Eav\OptionBuilder'), 'validationRuleBuilder' => $objectManager->create( - '\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder' + 'Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder' ), ] ); diff --git a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilderTest.php b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilderTest.php index c8b4abb9f88d226379a6dc3b8e866698f7b66806..d9f00a2d47375770d36217b31a6db1deb8617d15 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRateSearchResultsBuilderTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Integration test for \Magento\Tax\Service\V1\Data\TaxRateSearchResultsBuilder diff --git a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilderTest.php b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilderTest.php index 5d21048ce56e5717ae5d17cc62ee4db963a7bdeb..e436e650b949649258c462c1e6ed734a5a6491e8 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/Data/TaxRuleSearchResultsBuilderTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Tax\Service\V1\Data; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Integration test for \Magento\Tax\Service\V1\Data\TaxRuleSearchResultsBuilder @@ -63,7 +63,7 @@ class TaxRuleSearchResultsBuilderTest extends \PHPUnit_Framework_TestCase $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->builder = $this->objectManager->create('Magento\Tax\Service\V1\Data\TaxRuleSearchResultsBuilder'); $this->searchCriteriaBuilder = $this->objectManager->create( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder' + 'Magento\Framework\Api\SearchCriteriaBuilder' ); $this->taxRuleBuilder = $this->objectManager->create('Magento\Tax\Service\V1\Data\TaxRuleBuilder'); } diff --git a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php index 7e06b90f575d339469f0939e94ce14a9dd1bd4e3..5e1c2f2a1396c280a75cc37ae2d67f2c7f9f5b83 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php @@ -501,8 +501,8 @@ class TaxRateServiceTest extends \PHPUnit_Framework_TestCase /** * - * @param \Magento\Framework\Service\V1\Data\Filter[] $filters - * @param \Magento\Framework\Service\V1\Data\Filter[] $filterGroup + * @param \Magento\Framework\Api\Filter[] $filters + * @param \Magento\Framework\Api\Filter[] $filterGroup * @param $expectedRateCodes * * @magentoDbIsolation enabled @@ -519,9 +519,9 @@ class TaxRateServiceTest extends \PHPUnit_Framework_TestCase ] ); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager() - ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder'); + ->create('Magento\Framework\Api\SearchCriteriaBuilder'); foreach ($filters as $filter) { $searchBuilder->addFilter([$filter]); } @@ -550,7 +550,7 @@ class TaxRateServiceTest extends \PHPUnit_Framework_TestCase public function searchTaxRatesDataProvider() { - $filterBuilder = Bootstrap::getObjectManager()->create('Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = Bootstrap::getObjectManager()->create('Magento\Framework\Api\FilterBuilder'); return [ 'eq' => [ diff --git a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php index 5b6b780af82b1ff45661da12ef37cce827027b03..bda2161bd2b8f59a7879b600de1c9b0e9f6ce98d 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php @@ -381,9 +381,9 @@ class TaxRuleServiceTest extends \PHPUnit_Framework_TestCase { $this->setUpDefaultRules(); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager() - ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder'); + ->create('Magento\Framework\Api\SearchCriteriaBuilder'); foreach ($filters as $filter) { $searchBuilder->addFilter([$filter]); } @@ -433,7 +433,7 @@ class TaxRuleServiceTest extends \PHPUnit_Framework_TestCase public function searchTaxRulesDataProvider() { - $filterBuilder = Bootstrap::getObjectManager()->create('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = Bootstrap::getObjectManager()->create('\Magento\Framework\Api\FilterBuilder'); return [ 'code eq "Default Rule"' => [ diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php index e16b02017dedf4c683a0d363b39d39971dd5e0df..4290650afd8637d7107bc9bfb169014c964efd8b 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php @@ -127,9 +127,7 @@ class BlockInstantiationTest extends \Magento\TestFramework\TestCase\AbstractInt private function _addBlock($module, $blockClass, $class, $templateBlocks) { $area = 'frontend'; - if ($module == 'Magento_Install') { - $area = 'install'; - } elseif ($module == 'Magento_Adminhtml' || strpos( + if ($module == 'Magento_Adminhtml' || strpos( $blockClass, '\\Adminhtml\\' ) || strpos( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php index f45b1e4ff217c6cda156c8b677fe60664e964e38..3fdbc5da7203d88aa8c410583223be5f4b10d703 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php @@ -75,7 +75,7 @@ class LayoutFilesTest extends \PHPUnit_Framework_TestCase */ public function layoutArgumentsDataProvider() { - $areas = ['adminhtml', 'frontend', 'install', 'email']; + $areas = ['adminhtml', 'frontend', 'email']; $data = []; foreach ($areas as $area) { $layoutFiles = \Magento\TestFramework\Utility\Files::init()->getLayoutFiles(['area' => $area], false); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php index bde42490d285939a380e11547ce37e40165ebcb8..4ae751f323440a3fd21efb865e87e782fa1e97a7 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php @@ -52,18 +52,15 @@ class RouteConfigFilesTest extends \PHPUnit_Framework_TestCase protected function setUp() { - global $magentoBaseDir; - - $this->_schemaFile = $magentoBaseDir . '/lib/internal/Magento/Framework/App/etc/routes.xsd'; - $this->_mergedSchemaFile = $magentoBaseDir . '/lib/internal/Magento/Framework/App/etc/routes_merged.xsd'; + $this->_schemaFile = BP . '/lib/internal/Magento/Framework/App/etc/routes.xsd'; + $this->_mergedSchemaFile = BP . '/lib/internal/Magento/Framework/App/etc/routes_merged.xsd'; } public function testRouteConfigsValidation() { - global $magentoBaseDir; $invalidFiles = array(); - $mask = $magentoBaseDir . '/app/code/*/*/etc/*/routes.xml'; + $mask = BP . '/app/code/*/*/etc/*/routes.xml'; $files = glob($mask); $mergedConfig = new \Magento\Framework\Config\Dom('<config></config>', $this->_idAttributes); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php index 4e05b7687a3c17fcd7c269a34465305a268503b1..0c2457f83581dcf635c208716ec32e6f3cdeae05 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php @@ -83,9 +83,7 @@ class TemplateFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrit } $area = 'frontend'; - if ($module == 'Magento_Install') { - $area = 'install'; - } elseif ($module == 'Magento_Adminhtml' || strpos( + if ($module == 'Magento_Adminhtml' || strpos( $blockClass, '\\Adminhtml\\' ) || strpos( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/StaticFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/StaticFilesTest.php index e138ef625e15ce9e15ee961e5fd0fdb29c098ec9..b0b901d2bd93a78337b37319576ff56d15010420 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/StaticFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/StaticFilesTest.php @@ -125,8 +125,6 @@ class StaticFilesTest extends \PHPUnit_Framework_TestCase return $this->design->getConfigurationDesignTheme($area); case 'adminhtml': return 'Magento/backend'; - case 'install': - return 'Magento/basic'; case 'doc': return 'Magento/blank'; default: diff --git a/dev/tests/integration/testsuite/Magento/ToolkitFramework/ApplicationTest.php b/dev/tests/integration/testsuite/Magento/ToolkitFramework/ApplicationTest.php index 1fb26a5f217b435505910308363812c09e340089..d19c1b1c8542cb9c434b12716466b5289057bf3d 100644 --- a/dev/tests/integration/testsuite/Magento/ToolkitFramework/ApplicationTest.php +++ b/dev/tests/integration/testsuite/Magento/ToolkitFramework/ApplicationTest.php @@ -52,9 +52,6 @@ class ApplicationTest extends \Magento\TestFramework\Indexer\TestCase parent::setUpBeforeClass(); } - /** - * @magentoAppArea install - */ public function testTest() { $fixturesArray = \Magento\ToolkitFramework\FixtureSet::getInstance()->getFixtures(); diff --git a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php index dc4c4edde26d0ddfd2edd2656cf6f094aa1336c1..0e62f49159bb338fce26319a47cc8b3c16400559 100644 --- a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php @@ -104,7 +104,7 @@ class UserTest extends \PHPUnit_Framework_TestCase public function testUpdateRoleOnSave() { $this->_model->loadByUsername(\Magento\TestFramework\Bootstrap::ADMIN_NAME); - $this->assertEquals('Administrators', $this->_model->getRole()->getRoleName()); + $this->assertEquals(\Magento\TestFramework\Bootstrap::ADMIN_ROLE_NAME, $this->_model->getRole()->getRoleName()); $this->_model->setRoleId(self::$_newRole->getId())->save(); $this->assertEquals('admin_role', $this->_model->getRole()->getRoleName()); } @@ -187,9 +187,11 @@ class UserTest extends \PHPUnit_Framework_TestCase public function testGetName() { + $firstname = \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME; + $lastname = \Magento\TestFramework\Bootstrap::ADMIN_LASTNAME; $this->_model->loadByUsername(\Magento\TestFramework\Bootstrap::ADMIN_NAME); - $this->assertEquals('firstname lastname', $this->_model->getName()); - $this->assertEquals('firstname///lastname', $this->_model->getName('///')); + $this->assertEquals("$firstname $lastname", $this->_model->getName()); + $this->assertEquals("$firstname///$lastname", $this->_model->getName('///')); } public function testGetUninitializedAclRole() @@ -291,7 +293,7 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->_model->setFirstname('NewFirstName'); $this->assertEquals('NewFirstName', $this->_model->getFirstname()); $this->_model->reload(); - $this->assertEquals('firstname', $this->_model->getFirstname()); + $this->assertEquals(\Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME, $this->_model->getFirstname()); } /** @@ -335,7 +337,7 @@ class UserTest extends \PHPUnit_Framework_TestCase )->setLastname( 'Doe' )->setEmail( - 'jdoe@gmail.com' + 'jdoe@example.com' )->setPassword( '123123q' ); @@ -421,7 +423,7 @@ class UserTest extends \PHPUnit_Framework_TestCase )->setLastname( 'Doe' )->setEmail( - 'jdoe@gmail.com' + 'jdoe@example.com' )->setPassword( '1234abc' )->setPasswordConfirmation( diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php index 40b7c49e07e7764601d850abcc86ae403e9cc01b..82c96905339861edf6c48b66f02e20a4aef1dfb3 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php @@ -52,7 +52,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Webapi\Model\Soap\Server\Factory */ protected $_soapServerFactory; - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */ + /** @var \Magento\Framework\Reflection\TypeProcessor */ protected $_typeProcessor; /** @var \Magento\Store\Model\Store|\PHPUnit_Framework_MockObject_MockObject */ @@ -86,7 +86,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase 'Magento\Webapi\Model\Soap\Server\Factory' )->disableOriginalConstructor()->getMock(); $this->_typeProcessor = $this->getMock( - 'Magento\Webapi\Model\Config\ClassReflector\TypeProcessor', + 'Magento\Framework\Reflection\TypeProcessor', array(), array(), '', diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayBuilder.php similarity index 86% rename from dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataObjectBuilder.php rename to dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayBuilder.php index 75994a4b99181578fa596fa4c93287800ae9cfe4..a02cb88fa6c8ad84d5f17512874c2b0c24d447bc 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayBuilder.php @@ -23,13 +23,13 @@ */ namespace Magento\Webapi\Service\Entity; -class AssociativeArrayDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class AssociativeArrayBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param string[] $associativeArray */ public function setAssociativeArray(array $associativeArray) { - $this->_data['associativeArray'] = $associativeArray; + $this->data['associativeArray'] = $associativeArray; } } diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayBuilder.php similarity index 87% rename from dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayDataObjectBuilder.php rename to dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayBuilder.php index a8fa6be0faab65063b62d0df7b7f3056bcf68f78..144b187829b4af101dfc65339d73ab65403d9920 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayBuilder.php @@ -23,13 +23,13 @@ */ namespace Magento\Webapi\Service\Entity; -class DataObjectArrayDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class DataObjectArrayBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param \Magento\Webapi\Service\Entity\SimpleDataObject[] $items */ public function setItems(array $items) { - $this->_data['items'] = $items; + $this->data['items'] = $items; } } diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedBuilder.php similarity index 88% rename from dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedDataObjectBuilder.php rename to dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedBuilder.php index 286eac2eed2daae698f757e266f81fb95a370ffb..576ea4fdc8a9871934f773f0ef6351788b8b7425 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedBuilder.php @@ -23,13 +23,13 @@ */ namespace Magento\Webapi\Service\Entity; -class NestedDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class NestedBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param \Magento\Webapi\Service\Entity\SimpleDataObject $details */ public function setDetails($details) { - $this->_data['details'] = $details; + $this->data['details'] = $details; } } diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayBuilder.php similarity index 88% rename from dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataObjectBuilder.php rename to dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayBuilder.php index 7503191528c23f7bbcd99537ac0ff1051f43e423..f1a0638edb39b23b02b6fa9c43accb3cd7705030 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayBuilder.php @@ -23,13 +23,13 @@ */ namespace Magento\Webapi\Service\Entity; -class SimpleArrayDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class SimpleArrayBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param int[] $ids */ public function setIds(array $ids) { - $this->_data['ids'] = $ids; + $this->data['ids'] = $ids; } } diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleBuilder.php similarity index 86% rename from dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleDataObjectBuilder.php rename to dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleBuilder.php index 4287a8c5b578f8090e9e04da39152e6116449ab7..f02254518e7a93fa87f391285f4e35eb25f32d9c 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleBuilder.php @@ -23,14 +23,14 @@ */ namespace Magento\Webapi\Service\Entity; -class SimpleDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class SimpleBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * @param int $entityId */ public function setEntityId($entityId) { - $this->_data['entityId'] = $entityId; + $this->data['entityId'] = $entityId; } /** @@ -38,6 +38,6 @@ class SimpleDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractEx */ public function setName($name) { - $this->_data['name'] = $name; + $this->data['name'] = $name; } } diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/TestService.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/TestService.php index bf6edddcb52ea7b915f97fde33cda3ad03d1f3c5..23e531e8d8e37eda98a5413ead2a6b0e138b9cc0 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/TestService.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/TestService.php @@ -36,10 +36,10 @@ class TestService } /** - * @param \Magento\Webapi\Service\Entity\NestedData $nested - * @return \Magento\Webapi\Service\Entity\NestedData + * @param \Magento\Webapi\Service\Entity\Nested $nested + * @return \Magento\Webapi\Service\Entity\Nested */ - public function nestedData(NestedData $nested) + public function nestedData(Nested $nested) { return $nested; } @@ -63,8 +63,8 @@ class TestService } /** - * @param \Magento\Webapi\Service\Entity\SimpleData[] $dataObjects - * @return \Magento\Webapi\Service\Entity\SimpleData[] + * @param \Magento\Webapi\Service\Entity\Simple[] $dataObjects + * @return \Magento\Webapi\Service\Entity\Simple[] */ public function dataArray(array $dataObjects) { @@ -72,28 +72,28 @@ class TestService } /** - * @param \Magento\Webapi\Service\Entity\SimpleArrayData $arrayData - * @return \Magento\Webapi\Service\Entity\SimpleArrayData + * @param \Magento\Webapi\Service\Entity\SimpleArray $arrayData + * @return \Magento\Webapi\Service\Entity\SimpleArray */ - public function nestedSimpleArray(SimpleArrayData $arrayData) + public function nestedSimpleArray(SimpleArray $arrayData) { return $arrayData; } /** - * @param \Magento\Webapi\Service\Entity\AssociativeArrayData $associativeArrayData - * @return \Magento\Webapi\Service\Entity\AssociativeArrayData + * @param \Magento\Webapi\Service\Entity\AssociativeArray $associativeArrayData + * @return \Magento\Webapi\Service\Entity\AssociativeArray */ - public function nestedAssociativeArray(AssociativeArrayData $associativeArrayData) + public function nestedAssociativeArray(AssociativeArray $associativeArrayData) { return $associativeArrayData; } /** - * @param \Magento\Webapi\Service\Entity\DataArrayData $dataObjects - * @return \Magento\Webapi\Service\Entity\DataArrayData + * @param \Magento\Webapi\Service\Entity\DataArray $dataObjects + * @return \Magento\Webapi\Service\Entity\DataArray */ - public function nestedDataArray(DataArrayData $dataObjects) + public function nestedDataArray(DataArray $dataObjects) { return $dataObjects; } diff --git a/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php b/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php index 64cb2bf4934bf909801ad3738916a0f9c7099d41..8774f32243e990d66306e44a1c88ae2ae16f3e51 100644 --- a/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php +++ b/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php @@ -66,7 +66,7 @@ class TaxTest extends \PHPUnit_Framework_TestCase 'Magento\Customer\Service\V1\Data\CustomerBuilder', ['metadataService' => $customerMetadataService] ); - $expected = \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray( + $expected = \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray( $customerAccountService->getCustomer(1) ); $customerBuilder->populateWithArray($expected); diff --git a/dev/tests/js/run_js_tests.php b/dev/tests/js/run_js_tests.php index e79ee6ce04b0635bd2b7aa7ca36628ef453c5d87..0523bd0e084739f17bfcbe9fe83778f2e022cc1f 100644 --- a/dev/tests/js/run_js_tests.php +++ b/dev/tests/js/run_js_tests.php @@ -26,7 +26,6 @@ define('RELATIVE_APP_ROOT', '../../..'); require __DIR__ . '/../../../app/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(realpath(RELATIVE_APP_ROOT . '/lib/internal')); $userConfig = normalize('jsTestDriver.php'); $defaultConfig = normalize('jsTestDriver.php.dist'); diff --git a/dev/tests/performance/config.php.dist b/dev/tests/performance/config.php.dist index a063ed51bf9e3860f6f8d90e28ee26c16903a345..0977e8c380ea7ce9d3dfcd447035625f0e3caa34 100644 --- a/dev/tests/performance/config.php.dist +++ b/dev/tests/performance/config.php.dist @@ -26,33 +26,28 @@ return array( 'application' => array( 'url_host' => '127.0.0.1', 'url_path' => '/', - 'admin' => array( - 'frontname' => 'backend', - 'username' => 'admin', - 'password' => '123123q', // must be at least of 7 both numeric and alphanumeric chars - ), - /* Optional installation configuration. If omitted, no installation occurs. */ 'installation' => array( - /** - * Console installer options - * @see \Magento\Install\Model\Installer\Console::_installOptions - */ 'options' => array( - 'license_agreement_accepted' => 'yes', - 'locale' => 'en_US', + 'language' => 'en_US', 'timezone' => 'America/Los_Angeles', - 'default_currency' => 'USD', + 'currency' => 'USD', 'db_host' => 'localhost', 'db_name' => 'magento', 'db_user' => 'root', 'db_pass' => '', - 'use_secure' => 'no', - 'use_secure_admin' => 'no', - 'use_rewrites' => 'no', + 'use_secure' => '0', + 'use_secure_admin' => '0', + 'use_rewrites' => '0', 'admin_lastname' => 'Admin', 'admin_firstname' => 'Admin', 'admin_email' => 'admin@example.com', - 'admin_no_form_key' => 'yes', + 'admin_username' => 'admin', + 'admin_password' => '123123q', + 'admin_use_security_key' => '0', + 'backend_frontname' => 'backend', + ), + 'options_no_value' => array( + 'cleanup_database', ), ), ), diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php index 715af60f7452688bb1fcc030b9619dc80603c629..0892bc5c528d43a7120073eb31c605db39ff34d7 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Application.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php @@ -39,18 +39,11 @@ class Application protected $_config; /** - * Path to shell installer script + * Path to shell installer and uninstaller script * * @var string */ - protected $_installScript; - - /** - * Path to shell uninstaller script - * - * @var string - */ - protected $_uninstallScript; + protected $_script; /** * @var \Magento\Framework\Shell @@ -88,10 +81,9 @@ class Application \Magento\Framework\ObjectManager $objectManager, \Magento\Framework\Shell $shell ) { - $shellDir = $config->getApplicationBaseDir() . '/dev/shell'; + $shellDir = $config->getApplicationBaseDir() . '/setup'; $this->_objectManager = $objectManager; - $this->_installScript = $this->_assertPath($shellDir . '/install.php'); - $this->_uninstallScript = $this->_assertPath($shellDir . '/uninstall.php'); + $this->_script = $this->_assertPath($shellDir . '/index.php'); $this->_config = $config; $this->_shell = $shell; } @@ -156,7 +148,7 @@ class Application */ protected function _uninstall() { - $this->_shell->execute('php -f %s', array($this->_uninstallScript)); + $this->_shell->execute('php -f %s uninstall', array($this->_script)); $this->_isInstalled = false; $this->_fixtures = array(); @@ -173,24 +165,23 @@ class Application protected function _install() { $installOptions = $this->_config->getInstallOptions(); + $installOptionsNoValue = $this->_config->getInstallOptionsNoValue(); if (!$installOptions) { throw new \Magento\Framework\Exception('Trying to install Magento, but installation options are not set'); } // Populate install options with global options $baseUrl = 'http://' . $this->_config->getApplicationUrlHost() . $this->_config->getApplicationUrlPath(); - $installOptions = array_merge($installOptions, array('url' => $baseUrl, 'secure_base_url' => $baseUrl)); - $adminOptions = $this->_config->getAdminOptions(); - foreach ($adminOptions as $key => $val) { - $installOptions['admin_' . $key] = $val; - } - - $installCmd = 'php -f %s --'; - $installCmdArgs = array($this->_installScript); + $installOptions = array_merge($installOptions, array('base_url' => $baseUrl, 'base_url_secure' => $baseUrl)); + $installCmd = 'php -f %s install'; + $installCmdArgs = array($this->_script); foreach ($installOptions as $optionName => $optionValue) { - $installCmd .= " --{$optionName} %s"; + $installCmd .= " --{$optionName}=%s"; $installCmdArgs[] = $optionValue; } + foreach ($installOptionsNoValue as $optionName) { + $installCmd .= " --{$optionName}"; + } $this->_shell->execute($installCmd, $installCmdArgs); $this->_isInstalled = true; diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php index 6c8e0f8ec93f3754e7cb7ccde3208f49b942462a..538139f020781b7c0eff0da0deb52008f33dec9c 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php @@ -49,11 +49,6 @@ class Config */ protected $_applicationUrlPath; - /** - * @var array - */ - protected $_adminOptions = array(); - /** * @var string */ @@ -64,6 +59,11 @@ class Config */ protected $_installOptions = array(); + /** + * @var array + */ + protected $_installOptionsNoValue = array(); + /** * @var array */ @@ -92,12 +92,15 @@ class Config $this->_applicationBaseDir = $appBaseDir; $this->_applicationUrlHost = $applicationOptions['url_host']; $this->_applicationUrlPath = $applicationOptions['url_path']; - $this->_adminOptions = $applicationOptions['admin']; if (isset($applicationOptions['installation']['options'])) { $this->_installOptions = $applicationOptions['installation']['options']; } + if (isset($applicationOptions['installation']['options_no_value'])) { + $this->_installOptionsNoValue = $applicationOptions['installation']['options_no_value']; + } + $this->_parseScenarios($configData['scenario']); } @@ -128,10 +131,12 @@ class Config } // Validate admin options data - $requiredAdminKeys = array('frontname', 'username', 'password'); + $requiredAdminKeys = array('admin_username', 'admin_password', 'backend_frontname'); foreach ($requiredAdminKeys as $requiredKeyName) { - if (empty($configData['application']['admin'][$requiredKeyName])) { - throw new \Magento\Framework\Exception("Admin options array must define '{$requiredKeyName}' key."); + if (empty($configData['application']['installation']['options'][$requiredKeyName])) { + throw new \Magento\Framework\Exception( + "Installation options array must define '{$requiredKeyName}' key." + ); } } } @@ -281,14 +286,14 @@ class Config */ protected function _getFixedScenarioArguments() { - $adminOptions = $this->getAdminOptions(); + $options = $this->getInstallOptions(); return array( \Magento\TestFramework\Performance\Scenario::ARG_HOST => $this->getApplicationUrlHost(), \Magento\TestFramework\Performance\Scenario::ARG_PATH => $this->getApplicationUrlPath(), \Magento\TestFramework\Performance\Scenario::ARG_BASEDIR => $this->getApplicationBaseDir(), - \Magento\TestFramework\Performance\Scenario::ARG_BACKEND_FRONTNAME => $adminOptions['frontname'], - \Magento\TestFramework\Performance\Scenario::ARG_ADMIN_USERNAME => $adminOptions['username'], - \Magento\TestFramework\Performance\Scenario::ARG_ADMIN_PASSWORD => $adminOptions['password'], + \Magento\TestFramework\Performance\Scenario::ARG_BACKEND_FRONTNAME => $options['backend_frontname'], + \Magento\TestFramework\Performance\Scenario::ARG_ADMIN_USERNAME => $options['admin_username'], + \Magento\TestFramework\Performance\Scenario::ARG_ADMIN_PASSWORD => $options['admin_password'], 'jmeter.save.saveservice.output_format' => 'xml', ); } @@ -346,23 +351,23 @@ class Config } /** - * Retrieve admin options - backend path and admin user credentials + * Retrieve application installation options * * @return array */ - public function getAdminOptions() + public function getInstallOptions() { - return $this->_adminOptions; + return $this->_installOptions; } /** - * Retrieve application installation options + * Retrieve application installation options that have no value * * @return array */ - public function getInstallOptions() + public function getInstallOptionsNoValue() { - return $this->_installOptions; + return $this->_installOptionsNoValue; } /** diff --git a/dev/tests/performance/framework/bootstrap.php b/dev/tests/performance/framework/bootstrap.php index 77bdec73559dd5626ce906f75366dfa9a0bfb02a..ea2f09adfb6ebc0e13ec560d00742c2ce3f2cf0d 100644 --- a/dev/tests/performance/framework/bootstrap.php +++ b/dev/tests/performance/framework/bootstrap.php @@ -26,8 +26,10 @@ $testsBaseDir = dirname(__DIR__); require __DIR__ . '/../../../../app/bootstrap.php'; +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); $appBootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath($testsBaseDir . '/framework'); +$includePath->addIncludePath($testsBaseDir . '/framework'); $bootstrap = new \Magento\TestFramework\Performance\Bootstrap($appBootstrap, $testsBaseDir); $bootstrap->cleanupReports(); return $bootstrap; diff --git a/dev/tests/performance/framework/tests/unit/framework/bootstrap.php b/dev/tests/performance/framework/tests/unit/framework/bootstrap.php index 144c4a86f22869859df6f488fdaabde4e003be86..da691b6eebb0fe3b4ea10ac7bbd4086ea57167bc 100644 --- a/dev/tests/performance/framework/tests/unit/framework/bootstrap.php +++ b/dev/tests/performance/framework/tests/unit/framework/bootstrap.php @@ -25,4 +25,6 @@ $magentoBaseDir = realpath(__DIR__ . '/../../../../../../../'); require_once "{$magentoBaseDir}/app/bootstrap.php"; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath("{$magentoBaseDir}/dev/tests/performance/framework"); +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); +$includePath->addIncludePath("{$magentoBaseDir}/dev/tests/performance/framework"); diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php index c01af6805d8d8240a3bd1dc1522b213ebb8cd997..ccfc32c58acf25bcc3df828456705c11df7afed5 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php @@ -47,12 +47,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase /** * @var string */ - protected $_installerScript; - - /** - * @var string - */ - protected $_uninstallScript; + protected $_script; /** * @var string @@ -72,8 +67,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase $this->_fixtureDir = __DIR__ . '/Performance/_files'; $this->_fixtureConfigData = require $this->_fixtureDir . '/config_data.php'; - $this->_installerScript = realpath($this->_fixtureDir . '/app_base_dir/dev/shell/install.php'); - $this->_uninstallScript = substr($this->_installerScript, 0, -11) . 'uninstall.php'; + $this->_script = realpath($this->_fixtureDir . '/app_base_dir/setup/index.php'); $this->_config = new \Magento\TestFramework\Performance\Config( $this->_fixtureConfigData, @@ -203,7 +197,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase 'execute' )->with( $this->anything(), - $this->contains($this->_uninstallScript) + $this->contains($this->_script) ); $this->_shell->expects( @@ -212,7 +206,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase 'execute' )->with( $this->anything(), - $this->contains($this->_installerScript) + $this->contains($this->_script) ); $fixture1 = $this->_getFixtureFiles(array('fixture1')); @@ -244,7 +238,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase 'execute' )->with( $this->anything(), - $this->contains($this->_uninstallScript) + $this->contains($this->_script) ); $this->_shell->expects( @@ -253,7 +247,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase 'execute' )->with( $this->anything(), - $this->contains($this->_installerScript) + $this->contains($this->_script) ); $fixtures = $this->_getFixtureFiles(array('fixture1', 'fixture2')); diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php index f69e73bd9b4c1b2515d8a9855f7e1f9e9d5bab37..70b0295130e4060d56e91d18840cefffcd8d8957 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php @@ -157,15 +157,15 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $this->assertEquals('/', $this->_object->getApplicationUrlPath()); } - public function testGetAdminOptions() - { - $expectedOptions = array('frontname' => 'backend', 'username' => 'admin', 'password' => 'password1'); - $this->assertEquals($expectedOptions, $this->_object->getAdminOptions()); - } - public function testGetInstallOptions() { - $expectedOptions = array('option1' => 'value 1', 'option2' => 'value 2'); + $expectedOptions = array( + 'option1' => 'value 1', + 'option2' => 'value 2', + 'backend_frontname' => 'backend', + 'admin_username' => 'admin', + 'admin_password' => 'password1', + ); $this->assertEquals($expectedOptions, $this->_object->getInstallOptions()); } diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/dev/shell/install.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/setup/index.php similarity index 94% rename from dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/dev/shell/install.php rename to dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/setup/index.php index 1d78092f043522f65ff41dc030233eeacd265e1b..bcfe30ff21bfcfc0e7caa466ce3083929aba2ed7 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/dev/shell/install.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/app_base_dir/setup/index.php @@ -22,4 +22,4 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* Magento console installer stub */ +/* Magento console installer and uninstaller stub */ diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_dist/config.php.dist b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_dist/config.php.dist index 90d51edc6aabc5b14eebcfcb346ff4b80469a7dd..e75ff8a62a21b5a715853edb729a8cbd39e0f93f 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_dist/config.php.dist +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_dist/config.php.dist @@ -26,10 +26,12 @@ return array( 'application' => array( 'url_host' => '127.0.0.1', 'url_path' => '/', - 'admin' => array( - 'frontname' => 'backend', - 'username' => 'admin', - 'password' => 'password1', + 'installation' => array( + 'options' => array( + 'backend_frontname' => 'backend', + 'admin_username' => 'admin', + 'admin_password' => 'password1', + ), ), ), 'scenario' => array( diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php index ab4aac9f8f1261838fdb16cbaf6d1cb43bb50047..25979ea27ab339a0cc99c6f29f6186029fb90a2b 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php @@ -26,7 +26,13 @@ return array( 'application' => array( 'url_host' => '192.168.0.1', 'url_path' => '/', - 'admin' => array('frontname' => 'backend', 'username' => 'admin', 'password' => 'password1') + 'installation' => array( + 'options' => array( + 'backend_frontname' => 'backend', + 'admin_username' => 'admin', + 'admin_password' => 'password1', + ), + ), ), 'scenario' => array('scenarios' => array()), 'report_dir' => 'report' diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php.dist b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php.dist index 1aa5e5d4204544ebbe786f42ea0d39b3c32db486..a0fff99f3e4d26d52ab7d0396ec4ee9e151a29b6 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php.dist +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/bootstrap/config_normal/config.php.dist @@ -26,10 +26,12 @@ return array( 'application' => array( 'url_host' => '127.0.0.1', 'url_path' => '/', - 'admin' => array( - 'frontname' => 'backend', - 'username' => 'admin', - 'password' => 'password1', + 'installation' => array( + 'options' => array( + 'backend_frontname' => 'backend', + 'admin_username' => 'admin', + 'admin_password' => 'password1', + ), ), ), 'scenario' => array( diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/config_data.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/config_data.php index 7936874512aa82d453e91d2c7c3d6f101a05dc30..61de1b09a30a9b572d4b39fa1aa40ac0668d345c 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/config_data.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/_files/config_data.php @@ -26,8 +26,15 @@ return array( 'application' => array( 'url_host' => '127.0.0.1', 'url_path' => '/', - 'admin' => array('frontname' => 'backend', 'username' => 'admin', 'password' => 'password1'), - 'installation' => array('options' => array('option1' => 'value 1', 'option2' => 'value 2')) + 'installation' => array( + 'options' => array( + 'option1' => 'value 1', + 'option2' => 'value 2', + 'backend_frontname' => 'backend', + 'admin_username' => 'admin', + 'admin_password' => 'password1', + ), + ), ), 'scenario' => array( 'common_config' => array( diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php index d0766b72bb222e3d7304d011e2c25dbeed352fda..9bb8f852234a6c8b6d4cad83881c7f4ca8d99b27 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php +++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php @@ -33,7 +33,6 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface * @var array */ protected $_defaultModules = array( - 'default' => 'Magento\Install', 'frontend' => 'Magento\Theme', 'adminhtml' => 'Magento\Adminhtml' ); diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php index 8da956f71989c68ed95d321996e95352a9380b1a..c1179671be86e97071ad2d37eb1d3a262b9284c2 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php +++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php @@ -56,7 +56,6 @@ class PhpRule implements \Magento\TestFramework\Dependency\RuleInterface * @var array */ protected $_defaultModules = array( - 'default' => 'Magento\Install', 'frontend' => 'Magento\Theme', 'adminhtml' => 'Magento\Adminhtml' ); diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php index d5c4afe316a60a7d9266464399727a9566f6a9f1..59c9dac6d0687198bbd790c76b53b23d1a945a9b 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php @@ -212,7 +212,7 @@ class Classes foreach (\Magento\TestFramework\Utility\Files::init()->getPhpFiles(true, false, false, false) as $file) { if (preg_match($pattern, $file, $matches)) { $module = "{$matches[1]}_{$matches[2]}"; - $class = "{$module}" . \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR . str_replace( + $class = "{$module}" . '\\' . str_replace( '/', '\\', $matches[3] @@ -292,7 +292,7 @@ class Classes */ public static function isAutogenerated($className) { - if (preg_match('/.*\\\\[a-zA-Z0-9]{1,}(Factory|Proxy|SearchResults)$/', $className) + if (preg_match('/.*\\\\[a-zA-Z0-9]{1,}(Factory|Proxy|SearchResults|DataBuilder)$/', $className) || preg_match('/^Magento\\\\[\w]+\\\\(Test\\\\Page)\\\\/', $className) ) { return true; diff --git a/dev/tests/static/framework/bootstrap.php b/dev/tests/static/framework/bootstrap.php index e67cf580dbb731b8a24553fdec139e5f1defdf50..5ac82785c8b9f1075097aa71100ba6ddb23463d3 100644 --- a/dev/tests/static/framework/bootstrap.php +++ b/dev/tests/static/framework/bootstrap.php @@ -23,7 +23,9 @@ */ require __DIR__ . '/../../../../app/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath( +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); +$includePath->addIncludePath( array(__DIR__, dirname(__DIR__) . '/testsuite', BP . '/lib/internal') ); \Magento\TestFramework\Utility\Files::setInstance(new \Magento\TestFramework\Utility\Files(BP)); diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php index 3b800410c4e18e1e8479cfedf9969fcbac76c28c..5e8d577e6ac50d72216dddd56d111aa738919ede 100644 --- a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php +++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php @@ -135,8 +135,7 @@ class PhpRuleTest extends \PHPUnit_Framework_TestCase $mapLayoutBlocks = array( 'default' => array( 'block.name' => array( - 'Magento\SomeModule' => 'Magento\SomeModule', - 'Magento\Install' => 'Magento\Install' + 'Magento\SomeModule' => 'Magento\SomeModule' ) ) ); @@ -152,7 +151,7 @@ class PhpRuleTest extends \PHPUnit_Framework_TestCase '$this->getLayout()->getBlock(\'block.name\');', array( array( - 'module' => 'Magento\Install', + 'module' => 'Magento\SomeModule', 'type' => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD, 'source' => 'getBlock(\'block.name\')' ) diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php index 843536894a94ae902fc977186723bce5baf88122..005a517f8d1685a8aa132ab43869c667a34b4e16 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php @@ -82,8 +82,12 @@ class CompilerTest extends \PHPUnit_Framework_TestCase $this->_generationDir = $this->_tmpDir . '/generation'; $this->_compilationDir = $this->_tmpDir . '/di'; - (new \Magento\Framework\Autoload\IncludePath())->addIncludePath( - array($basePath . '/app/code', $basePath . '/lib/internal', $this->_generationDir) + \Magento\Framework\Code\Generator\FileResolver::addIncludePath( + [ + $basePath . '/app/code', + $basePath . '/lib/internal', + $this->_generationDir + ] ); $this->_command = 'php ' . $basePath . '/dev/tools/Magento/Tools/Di/compiler.php --generation=%s --di=%s'; @@ -203,10 +207,9 @@ class CompilerTest extends \PHPUnit_Framework_TestCase { $basePath = \Magento\TestFramework\Utility\Files::init()->getPathToSource(); - $basePath = str_replace('/', '\\', $basePath); - $libPath = $basePath . '\\lib\\internal'; - $appPath = $basePath . '\\app\\code'; - $generationPathPath = str_replace('/', '\\', $this->_generationDir); + $libPath = 'lib\\internal'; + $appPath = 'app\\code'; + $generationPathPath = str_replace('/', '\\', str_replace($basePath . '/', '', $this->_generationDir)); $files = \Magento\TestFramework\Utility\Files::init()->getClassFiles( true, @@ -224,14 +227,18 @@ class CompilerTest extends \PHPUnit_Framework_TestCase $replacements = array('', '', ''); /** Convert file names into class name format */ + $blackList = file(__DIR__ . '/_files/blacklist.txt', FILE_IGNORE_NEW_LINES); $classes = array(); foreach ($files as $file) { - $file = str_replace('/', '\\', $file); - $filePath = preg_replace($patterns, $replacements, $file); - $className = substr($filePath, 0, -4); - if (class_exists($className)) { - $file = str_replace('\\', DIRECTORY_SEPARATOR, $file); - $classes[$file] = $className; + $file = str_replace($basePath . '/', '', $file); + if (!in_array($file, $blackList)) { + $file = str_replace('/', '\\', $file); + $filePath = preg_replace($patterns, $replacements, $file); + $className = substr($filePath, 0, -4); + if (class_exists($className)) { + $file = str_replace('\\', DIRECTORY_SEPARATOR, $file); + $classes[$file] = $className; + } } } @@ -316,34 +323,36 @@ class CompilerTest extends \PHPUnit_Framework_TestCase */ public function testConstructorIntegrity() { - $autoloader = new \Magento\Framework\Autoload\IncludePath(); + $fileResolver = new \Magento\Framework\Code\Generator\FileResolver(); $generatorIo = new \Magento\Framework\Code\Generator\Io( new \Magento\Framework\Filesystem\Driver\File(), - $autoloader, + $fileResolver, $this->_generationDir ); $generator = new \Magento\Framework\Code\Generator( - $autoloader, + $fileResolver, $generatorIo, array( - \Magento\Framework\Service\Code\Generator\SearchResultsBuilder::ENTITY_TYPE - => 'Magento\Framework\Service\Code\Generator\SearchResultsBuilder', + \Magento\Framework\Api\Code\Generator\DataBuilder::ENTITY_TYPE + => 'Magento\Framework\Api\Code\Generator\DataBuilder', + \Magento\Framework\Api\Code\Generator\SearchResultsBuilder::ENTITY_TYPE + => 'Magento\Framework\Api\Code\Generator\SearchResultsBuilder', \Magento\Framework\ObjectManager\Code\Generator\Factory::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Factory', \Magento\Framework\ObjectManager\Code\Generator\Repository::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Repository', \Magento\Framework\ObjectManager\Code\Generator\Converter::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Converter', - \Magento\Framework\Service\Code\Generator\Mapper::ENTITY_TYPE - => 'Magento\Framework\Service\Code\Generator\Mapper', - \Magento\Framework\Service\Code\Generator\Builder::ENTITY_TYPE - => 'Magento\Framework\Service\Code\Generator\Builder', - \Magento\Framework\Service\Code\Generator\SearchResults::ENTITY_TYPE - => 'Magento\Framework\Service\Code\Generator\SearchResults' + \Magento\Framework\Api\Code\Generator\Mapper::ENTITY_TYPE + => 'Magento\Framework\Api\Code\Generator\Mapper', + \Magento\Framework\Api\Code\Generator\Builder::ENTITY_TYPE + => 'Magento\Framework\Api\Code\Generator\Builder', + \Magento\Framework\Api\Code\Generator\SearchResults::ENTITY_TYPE + => 'Magento\Framework\Api\Code\Generator\SearchResults' ) ); - $autoloader = new \Magento\Framework\Code\Generator\Autoloader($generator); - spl_autoload_register(array($autoloader, 'load')); + $fileResolver = new \Magento\Framework\Code\Generator\Autoloader($generator, $fileResolver); + spl_autoload_register(array($fileResolver, 'load')); $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( @@ -352,7 +361,7 @@ class CompilerTest extends \PHPUnit_Framework_TestCase }, $this->_phpClassesDataProvider() ); - spl_autoload_unregister(array($autoloader, 'load')); + spl_autoload_unregister(array($fileResolver, 'load')); } /** diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/_files/blacklist.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/_files/blacklist.txt new file mode 100644 index 0000000000000000000000000000000000000000..37da099b25997d9df48248a2ccc61c0febf56ca4 --- /dev/null +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/_files/blacklist.txt @@ -0,0 +1 @@ +app/code/Magento/SalesArchive/sql/salesarchive_setup/recurring.php \ No newline at end of file diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/ConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/ConfigTest.php deleted file mode 100644 index f5582128eb9cbceebfc198772b3c3b1a219553a8..0000000000000000000000000000000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/ConfigTest.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * Find "install_wizard.xml" file and validate - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Test\Integrity\Magento\Install; - -class ConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig -{ - protected function _getXsd() - { - return "/app/code/Magento/Install/etc/install_wizard.xsd"; - } - - protected function _getKnownValidXml() - { - return __DIR__ . '/_files/install_wizard.xml'; - } - - protected function _getKnownInvalidXml() - { - return __DIR__ . '/_files/invalid_install_wizard.xml'; - } - - protected function _getKnownValidPartialXml() - { - return __DIR__ . '/_files/partial_install_wizard.xml'; - } - - protected function _getFileXsd() - { - return "/app/code/Magento/Install/etc/install_wizard_file.xsd"; - } - - protected function _getKnownInvalidPartialXml() - { - return __DIR__ . '/_files/invalid_partial_install_wizard.xml'; - } - - protected function _getXmlName() - { - return 'install_wizard.xml'; - } -} diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/install_wizard.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/install_wizard.xml deleted file mode 100644 index 774a0fadce2825c6e170f265f94ba929b339e7d5..0000000000000000000000000000000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/install_wizard.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="./install_wizard.xsd"> - <steps> - <step id="begin" controller="wizard" action="begin"> - <label translate="true">Begin</label> - </step> - <step id="middle" controller="wizard" action="middle"> - <label translate="true">Middle</label> - </step> - <step id="end" controller="wizard" action="end"> - <label translate="true">End</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" recursive="false" existence="true" writable="true" /> - <directory alias="var" recursive="true" existence="true" writable="true" /> - <directory alias="media" recursive="true" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/invalid_install_wizard.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/invalid_install_wizard.xml deleted file mode 100644 index 6f5a7be99cdcd79590a241f98deaf213bc6d31b2..0000000000000000000000000000000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/invalid_install_wizard.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="./install_wizard.xsd" invalid_attribute="true"> - <steps> - <step id="begin" controller="wizard" action="begin"> - <label translate="true">Begin</label> - </step> - <step id="middle" controller="wizard" action="middle"> - <label translate="true">Middle</label> - </step> - <step id="end" controller="wizard" action="end"> - <label translate="true">End</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" recursive="false" existence="true" writable="true" /> - <directory alias="var" recursive="true" existence="true" writable="true" /> - <directory alias="media" recursive="true" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/invalid_partial_install_wizard.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/invalid_partial_install_wizard.xml deleted file mode 100644 index eb4cceeacce601f5a6ab442a3153b1f424549c28..0000000000000000000000000000000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/invalid_partial_install_wizard.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="./install_wizard_file.xsd"> - <steps> - <step controller="wizard" action="begin"> - <label translate="true">Begin</label> - </step> - </steps> - <filesystem_prerequisites> - <directory recursive="false" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/partial_install_wizard.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/partial_install_wizard.xml deleted file mode 100644 index d1fb3d424be3e633bd46d097faf8c91b6ece91ce..0000000000000000000000000000000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install/_files/partial_install_wizard.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="./install_wizard_file.xsd"> - <steps> - <step id="begin" controller="wizard"> - <label translate="true">Begin</label> - </step> - <step id="middle" action="middle"> - <label translate="true">Middle</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" existence="true" writable="true" /> - <directory alias="var" recursive="true" writable="true" /> - <directory alias="media" recursive="true" existence="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt index ffd698a1a0106f2cc608cc02c5eb6f3a464ed20d..84301c26bb5ded68f30e4886ae63616be6262f9b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt @@ -12,8 +12,8 @@ dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModu dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/Sample.php -dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/Sample.php -dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php +dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/Sample.php +dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSample.php dev/tools/Magento/Tools/I18n/Zend/Exception.php dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php @@ -21,6 +21,10 @@ dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/s dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/app/code/Magento/SecondModule/Model/Model.php dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/not_magento_dir/Model.php dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Dictionary/_files/source/app/code/Magento/FirstModule/Helper/Helper.php +dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeAddressInterface.php +dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Api/Data/FakeRegionInterface.php +dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeAddress.php +dev/tests/integration/testsuite/Magento/Framework/Api/_files/Magento/Wonderland/Model/FakeRegion.php dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/coupling.php dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/cyclomatic_complexity.php dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input/descendant_count.php diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt index 4b71dd41ec0fc4ed92ac439537350b42cfa7314e..02d265b3e8bba4447eaaca1914aeb7e0852aba81 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt @@ -32,4 +32,5 @@ TestSuite DbTest Model1 Model3 +\Magento\Wonderland\Api\Data\FakeRegionInterface \Magento\Framework\Error\Processor diff --git a/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt b/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt index 1ce27bbb8f4da891ca0e8ee24767b6c0fc3ae783..201a54de360cc433dd70ada91b7353d01c1858fe 100644 --- a/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt +++ b/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt @@ -7,7 +7,6 @@ app/code/Magento/Checkout app/code/Magento/Customer app/code/Magento/Downloadable app/code/Magento/GiftMessage -app/code/Magento/Install app/code/Magento/Newsletter app/code/Magento/OfflinePayments app/code/Magento/Payment diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Install/ConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Install/ConfigTest.php deleted file mode 100644 index 88dc5af05a63928da30b968d7d009fe8cedced42..0000000000000000000000000000000000000000 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Install/ConfigTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -/** - * Tests for obsolete nodes in install.xml - * - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Test\Legacy\Magento\Install; - -class ConfigTest extends \PHPUnit_Framework_TestCase -{ - public function testConfigFile() - { - $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); - $invoker( - /** - * @param string $file - */ - function ($file) { - $xml = simplexml_load_file($file); - $path = '/config/check/php/extensions'; - $this->assertEmpty( - $xml->xpath($path), - "Nodes from '{$path}' in install_wizard.xml have been moved to module.xml" - ); - }, - \Magento\TestFramework\Utility\Files::init()->getConfigFiles('install_wizard.xml') - ); - } -} diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index 10fccac1664d52788106ac1a9922e9d96ceb1d4f..13ba81bc77a629c449f31068b4aae066ce75a41f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -816,7 +816,7 @@ return array( array('Magento\Core\Model\Resource\Entity\Table', 'Magento\Framework\Model\Resource\Entity\Table'), array('Magento\Core\Model\Resource\Flag', 'Magento\Framework\Flag\Resource'), array('Magento\Core\Model\Resource\Iterator', 'Magento\Framework\Model\Resource\Iterator'), - array('Magento\Core\Model\Resource\Resource', 'Magento\Install\Model\Resource\Resource'), + array('Magento\Core\Model\Resource\Resource', 'Magento\Framework\Module\Resource'), array('Magento\Core\Model\Resource\Type\AbstractType', 'Magento\Framework\Model\Resource\Type\AbstractType'), array('Magento\Core\Model\Resource\Type\Db', 'Magento\Framework\Model\Resource\Type\Db'), array('Magento\Core\Model\Resource\Type\Db\Pdo\Mysql', 'Magento\Framework\Model\Resource\Type\Db\Pdo\Mysql'), @@ -1259,8 +1259,8 @@ return array( array('Mage_Sales_Model_Order_Creditmemo_Api_V2'), array('Mage_Sales_Model_Order_Creditmemo_Api'), array('Magento\ImportExport\Model\Config'), - array('Magento\Install\Model\EntryPoint\Console', 'Magento\Install\App\Console'), - array('Magento\Install\Model\EntryPoint\Output', 'Magento\Install\App\Output'), + array('Magento\Install\Model\EntryPoint\Console'), + array('Magento\Install\Model\EntryPoint\Output'), array('Magento\Framework\Data\Collection\Factory', 'Magento\Framework\Data\CollectionFactory'), array('Magento\Customer\Block\Adminhtml\System\Config\ValidatevatFactory'), array('Magento\Customer\Model\Attribute\Data'), @@ -2784,8 +2784,8 @@ return array( ['Magento\Framework\Module\UpdaterInterface'], ['Magento\Framework\App\EntryPoint\EntryPoint', 'Magento\Framework\App\Bootstrap'], ['Magento\Framework\App\EntryPointInterface', 'Magento\Framework\App\Bootstrap'], - ['Magento\Install\Model\Installer\AbstractInstaller', 'Magento\Install\Model\Installer\Console'], - ['Magento\Install\App\Action\Plugin\Install', 'Magento\Framework\App\Bootstrap'], + ['Magento\Install\Model\Installer\AbstractInstaller'], + ['Magento\Install\App\Action\Plugin\Install'], ['\Magento\Cron\App\Cron\Plugin\ApplicationInitializer', 'Magento\Framework\App\Bootstrap'], ['Magento\Framework\App\Error\Handler', 'Magento\Framework\App\Http'], ['Magento\Framework\App\State\MaintenanceMode', 'Magento\Framework\App\MaintenanceMode'], @@ -2793,15 +2793,15 @@ return array( ['Magento\Framework\Error\HandlerInterface', 'Magento\Framework\App\ErrorHandler'], ['Magento\Index'], ['Magento\Catalog\Model\Resource\Product\Indexer\Eav'], - ['\Magento\Framework\Service\Data\Eav\AbstractObject', 'Magento\Framework\Service\Data\AbstractExtensibleObject'], - ['\Magento\Framework\Service\Data\AbstractObject', 'Magento\Framework\Service\Data\AbstractSimpleObject'], + ['\Magento\Framework\Api\Eav\AbstractObject', 'Magento\Framework\Api\AbstractExtensibleObject'], + ['\Magento\Framework\Api\AbstractObject', 'Magento\Framework\Api\AbstractSimpleObject'], [ - '\Magento\Framework\Service\Data\Eav\AbstractObjectBuilder', - 'Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder' + '\Magento\Framework\Api\Eav\AbstractObjectBuilder', + 'Magento\Framework\Api\ExtensibleObjectBuilder' ], [ - '\Magento\Framework\Service\Data\AbstractObjectBuilder', - 'Magento\Framework\Service\Data\AbstractSimpleObjectBuilder' + '\Magento\Framework\Api\AbstractObjectBuilder', + 'Magento\Framework\Api\AbstractSimpleObjectBuilder' ], ['Magento\Catalog\Block\Product'], ['\Magento\Sales\Model\Observer'], @@ -2833,6 +2833,7 @@ return array( ['Magento\Wishlist\Block\Rss'], ['Magento\Wishlist\Controller\Index\Rss'], ['Magento\Checkout\Controller\Onepage\Progress'], + ['Magento\Checkout\Controller\Onepage\GetAdditional'], ['Magento\Framework\App\Filesystem', 'Magento\Framework\Filesystem'], ['Magento\TestFramework\App\Filesystem\DirectoryList'], ['Magento\Framework\App\Filesystem\DirectoryList\Configuration'], @@ -2840,4 +2841,6 @@ return array( ['Magento\Framework\Filesystem\DriverFactory', 'Magento\Framework\Filesystem\DriverPool'], ['Magento\Framework\Filesystem\WrapperFactory'], ['Magento\Framework\Filesystem\WrapperInterface'], + ['Magento\Install'], + ['Magento\Install\Model\Resource\Resource', 'Magento\Framework\Module\Resource'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php index cc3cf20cf0f1e83a8356b0f6dad1263447ca6327..e1e04fde50fc1872f7f6d446585fb385acda1712 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php @@ -62,7 +62,7 @@ return [ ['Magento\Shell', 'Magento\Framework\Shell'], ['Magento\Encryption', 'Magento\Framework\Encryption'], ['Magento\Option', 'Magento\Framework\Option'], - ['Magento\Service', 'Magento\Framework\Service'], + ['Magento\Service', 'Magento\Framework\Api'], ['Magento\System', 'Magento\Framework\System'], ['Magento\Url', 'Magento\Framework\Url'], ['Magento\Mview', 'Magento\Framework\Mview'], diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php index 9b23819278f48e0a8028d63cb45333468ff79f17..6a55ecdb7063f3f7cda2dbc18fd68483baad515f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php @@ -176,9 +176,9 @@ return [ ['/lib/Magento/Option', '/lib/Magento/Framework/Option'], ['/dev/tests/unit/testsuite/Magento/Option', '/dev/tests/unit/testsuite/Magento/Framework/Option'], ['/dev/tests/integration/testsuite/Magento/Option', '/dev/tests/integration/testsuite/Magento/Framework/Option'], - ['/lib/Magento/Service', '/lib/Magento/Framework/Service'], - ['/dev/tests/unit/testsuite/Magento/Service', '/dev/tests/unit/testsuite/Magento/Framework/Service'], - ['/dev/tests/integration/testsuite/Magento/Service', '/dev/tests/integration/testsuite/Magento/Framework/Service'], + ['/lib/Magento/Service', '/lib/Magento/Framework/Api'], + ['/dev/tests/unit/testsuite/Magento/Service', '/dev/tests/unit/testsuite/Magento/Framework/Api'], + ['/dev/tests/integration/testsuite/Magento/Service', '/dev/tests/integration/testsuite/Magento/Framework/Api'], ['/lib/Magento/System', '/lib/Magento/Framework/System'], ['/dev/tests/unit/testsuite/Magento/System', '/dev/tests/unit/testsuite/Magento/Framework/System'], ['/dev/tests/integration/testsuite/Magento/System', '/dev/tests/integration/testsuite/Magento/Framework/System'], @@ -240,4 +240,13 @@ return [ ['/dev/tests/unit/testsuite/Magento/Object', '/dev/tests/unit/testsuite/Magento/Framework/Object'], ['/dev/tests/integration/testsuite/Magento/Object', '/dev/tests/integration/testsuite/Magento/Framework/Object'], ['/downloader'], + ['/app/code/Magento/Install'], + ['/dev/tests/integration/testsuite/Magento/Install'], + ['/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Install'], + ['/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/InstallWizardConfigFilesTest.php'], + ['/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Install'], + ['/dev/tests/unit/testsuite/Magento/Install'], + ['/dev/shell/install.php'], + ['/dev/shell/uninstall.php'], + ['/app/design/install'], ]; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php index 57eaad47bc3640b7a7227268373f7c062b405597..de6a39980f662a5ebe30bf2884aab56808eacdc2 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php @@ -360,4 +360,5 @@ return array( ['_formKeyValidator', 'Magento\Customer\Controller\Account\LoginPost', 'Magento\Customer\Controller\Account\LoginPost::formKeyValidator'], ['_openActions', 'Magento\Customer\Controller\Account', 'Magento\Customer\Controller\Account::openActions'], ['_session', 'Magento\Customer\Controller\Account', 'Magento\Customer\Controller\Account::session'], + ['_directoryData', 'Magento\Customer\Model\Attribute\Data\Postcode', 'Magento\Customer\Model\Attribute\Data\Postcode::directoryHelper'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml index 1abee450ecfb7536e56cff90f3b07166aa543f4c..18aa8e3a700d68071f1fed817c527fc5be1884dd 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/words_ce.xml @@ -92,10 +92,6 @@ <path>app/code/Magento/Webapi/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml</path> <word>head.js</word> </item> - <item> - <path>app/code/Magento/Install/view/install/</path> - <word>head.js</word> - </item> <item> <path>app/code/Magento/GiftCard/view/adminhtml/templates/catalog/product/composite/fieldset/giftcard.phtml</path> <word>head.js</word> diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt index dbc8b4305996bc5648794b703736f8c9e6134812..1429d49ecde8427d106cc15e04a0ec83e836baf8 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt @@ -36,7 +36,6 @@ dev/tests/static/testsuite/Magento/Test/Legacy/_files dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files -dev/tools/Magento/Tools/I18n/Zend lib/internal/Magento/Framework/App/Config/Element.php lib/internal/Magento/Framework/Archive lib/internal/Magento/Framework/Backup diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt index 50021cff7bce0ec8ed42a6a2cd40e169cdb45efa..7d6f7bb0d1165ebeda20ede50154601474f97ed8 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt @@ -53,6 +53,7 @@ Magento/Cron/Model/Config/Backend/Product Magento/Customer/Block/Account/Dashboard Magento/Customer/Model/Config/Backend/Show Magento/Customer/Model/Metadata +Magento/Customer/Service/V1 Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code Magento/DesignEditor/Block/Adminhtml/Theme/Selector/Tab Magento/DesignEditor/Model/Url @@ -60,7 +61,6 @@ Magento/Directory/Model Magento/GiftMessage/Block/Adminhtml/Sales/Order Magento/ImportExport/Model Magento/Integration/Controller/Adminhtml -Magento/Install/Block/Db Magento/Newsletter/Block/Adminhtml/Template/Preview Magento/Newsletter/Block/Adminhtml/Queue/Preview Magento/Payment/Block/Form @@ -129,4 +129,4 @@ Magento/Sales/Service/V1 Magento/Shipping/Controller/Adminhtml/Order/Shipment vendor setup/vendor -Magento/CatalogSearch/Model/Resource/Fulltext \ No newline at end of file +Magento/CatalogSearch/Model/Resource/Fulltext diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt index 641a2ad0bf80247e83195a0ff1b852face4f6194..723d3adadcc3ad86c859bd0bcc69eae5842431df 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt @@ -23,8 +23,6 @@ app/code/Magento/Backend/Block/System/Store/Edit.php # Not magento code app/code/Zend # Not magento code -dev/tools/Magento/Tools/I18n/Zend -# Not magento code dev/tools/layout # PSR-1 not applied to dev/tests/js diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 1c128f4d65f8a31d734ac35c8670f0d06f139302..dae3169af14a37b850d675663b84d00b96861799 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -146,7 +146,7 @@ lib/internal/Magento/Framework/Stdlib/DateTime.php lib/internal/Magento/Framework/Object.php lib/internal/Magento/Framework/Data/Argument lib/internal/Magento/Framework/ObjectManager -lib/internal/Magento/Framework/Service +lib/internal/Magento/Framework/Api lib/internal/Magento/Framework/Url/SecurityInfoInterface.php lib/internal/Magento/Framework/View lib/internal/Magento/Framework/Locale/Validator.php diff --git a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php index 1f119e0a1e9f27ec740f4b09b729137df708bf71..51c4520f07b49e938e20de085f833a0402d22891 100644 --- a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php +++ b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php @@ -104,7 +104,7 @@ class ObjectManager protected function _getResourceModelMock() { $resourceMock = $this->_testObject->getMock( - 'Magento\Install\Model\Resource\Resource', + 'Magento\Framework\Module\Resource', array('getIdFieldName', '__sleep', '__wakeup'), array(), '', @@ -170,7 +170,7 @@ class ObjectManager */ public function getObject($className, array $arguments = array()) { - if (is_subclass_of($className, '\Magento\Framework\Service\Data\AbstractSimpleObjectBuilder')) { + if (is_subclass_of($className, '\Magento\Framework\Api\AbstractSimpleObjectBuilder')) { return $this->getBuilder($className, $arguments); } $constructArguments = $this->getConstructArguments($className, $arguments); @@ -187,7 +187,7 @@ class ObjectManager */ protected function getBuilder($className, array $arguments) { - $objectFactory = $this->_testObject->getMock('Magento\Framework\Service\Data\ObjectFactory', [], [], '', false); + $objectFactory = $this->_testObject->getMock('Magento\Framework\Api\ObjectFactory', [], [], '', false); if (!isset($arguments['objectFactory'])) { $arguments['objectFactory'] = $objectFactory; @@ -303,7 +303,7 @@ class ObjectManager */ private function _getMockObject($argClassName, array $arguments) { - if (is_subclass_of($argClassName, '\Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder')) { + if (is_subclass_of($argClassName, '\Magento\Framework\Api\ExtensibleObjectBuilder')) { $object = $this->getBuilder($argClassName, $arguments); return $object; } else { diff --git a/dev/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/bootstrap.php index ece247a7124fd4121b813d1ece68f8d97f048fe8..7d1cb88d0c8798842f7252bc9abc6c0ec929cb73 100755 --- a/dev/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/bootstrap.php @@ -26,8 +26,12 @@ if (!defined('TESTS_TEMP_DIR')) { define('TESTS_TEMP_DIR', dirname(__DIR__) . '/tmp'); } require __DIR__ . '/../../../../app/autoload.php'; + +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); + require BP . '/app/functions.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath( +$includePath->addIncludePath( array( __DIR__, realpath(__DIR__ . '/../testsuite'), @@ -36,6 +40,7 @@ require BP . '/app/functions.php'; realpath(BP . '/lib/internal') ) ); + if (is_dir(TESTS_TEMP_DIR)) { $filesystemAdapter = new \Magento\Framework\Filesystem\Driver\File(); $filesystemAdapter->deleteDirectory(TESTS_TEMP_DIR); diff --git a/dev/tests/unit/framework/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/tests/unit/framework/bootstrap.php index e020e90969b4c573ea808e3dbaae8e1c416eb686..96b12d9c554c32894b10479a0b7638b6ee45e929 100644 --- a/dev/tests/unit/framework/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/tests/unit/framework/bootstrap.php @@ -24,7 +24,9 @@ $rootDir = realpath(__DIR__ . '/../../../../../../..'); require __DIR__ . '/../../../../../../../app/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath( +$includePath = new \Magento\Framework\Autoload\IncludePath(); +spl_autoload_register([$includePath, 'load']); +$includePath->addIncludePath( array( $rootDir . '/lib/internal', $rootDir . '/dev/tests/unit/framework', diff --git a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php index 44079328dfd7fcfb77f77eab01bff0a025bee2e8..52d82cbe00cff6871a0ed5dd61fa845d18f3e5ae 100644 --- a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php +++ b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php @@ -96,7 +96,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase /** @var $resourceMock \Magento\Core\Model\Resource\Resource */ $resourceMock = $this->getMock( - 'Magento\Install\Model\Resource\Resource', + 'Magento\Framework\Module\Resource', array('_getReadAdapter', 'getIdFieldName', '__sleep', '__wakeup'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/FeedTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/FeedTest.php index 0dd602e76415e37f0eeec53d05a08a390435c9db..6ae8be6d281f0dbbc0a1f86100f0e9ae6022d938 100644 --- a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/FeedTest.php +++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/FeedTest.php @@ -55,6 +55,9 @@ class FeedTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject */ protected $appState; + /** @var \Magento\Framework\App\Arguments|\PHPUnit_Framework_MockObject_MockObject */ + protected $args; + protected function setUp() { $this->inboxFactory = $this->getMock('Magento\AdminNotification\Model\InboxFactory', ['create']); @@ -90,6 +93,8 @@ class FeedTest extends \PHPUnit_Framework_TestCase ] ); + $this->args = $this->getMockBuilder('\Magento\Framework\App\Arguments') + ->disableOriginalConstructor()->getMock(); $this->objectManagerHelper = new ObjectManagerHelper($this); $this->feed = $this->objectManagerHelper->getObject( 'Magento\AdminNotification\Model\Feed', @@ -98,7 +103,8 @@ class FeedTest extends \PHPUnit_Framework_TestCase 'cacheManager' => $this->cacheManager, 'inboxFactory' => $this->inboxFactory, 'appState' => $this->appState, - 'curlFactory' => $this->curlFactory + 'curlFactory' => $this->curlFactory, + 'args' => $this->args ] ); } @@ -118,7 +124,8 @@ class FeedTest extends \PHPUnit_Framework_TestCase $this->backendConfig->expects($this->at(1))->method('getValue') ->will($this->returnValue('http://feed.magento.com')); $this->cacheManager->expects($this->once())->method('load')->will(($this->returnValue($lastUpdate))); - $this->appState->expects($this->once())->method('getInstallDate')->will(($this->returnValue($lastUpdate))); + $this->args->expects($this->once())->method('get') + ->with('install_date')->will($this->returnValue('Sat, 6 Sep 2014 16:46:11 UTC')); if ($callInbox) { $this->inboxFactory->expects($this->once())->method('create') ->will(($this->returnValue($this->inboxModel))); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php index 81ef3022fc274f9d46155440bad128e8aa059b0f..fd08115afbf75ee9a3d1038f93caf5b20450375f 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/LifetimeTest.php @@ -33,7 +33,7 @@ class LifetimeTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | CookieLifetimeValidator */ private $validatorMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Install\Model\Resource\Resource */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Module\Resource */ private $resourceMock; /** @var \Magento\Backend\Model\Config\Backend\Cookie\Lifetime */ @@ -45,7 +45,7 @@ class LifetimeTest extends \PHPUnit_Framework_TestCase 'Magento\Framework\Session\Config\Validator\CookieLifetimeValidator' )->disableOriginalConstructor() ->getMock(); - $this->resourceMock = $this->getMockBuilder('Magento\Install\Model\Resource\Resource') + $this->resourceMock = $this->getMockBuilder('Magento\Framework\Module\Resource') ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php index 9bd316ad23c4ecec894400df62b8b5b1a5c533f9..4c859b91422f75ad1dc76321ff737713f2acce95 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/PathTest.php @@ -33,7 +33,7 @@ class PathTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | CookiePathValidator */ private $validatorMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Install\Model\Resource\Resource */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Module\Resource */ private $resourceMock; /** @var \Magento\Backend\Model\Config\Backend\Cookie\Path */ @@ -44,7 +44,7 @@ class PathTest extends \PHPUnit_Framework_TestCase $this->validatorMock = $this->getMockBuilder('Magento\Framework\Session\Config\Validator\CookiePathValidator') ->disableOriginalConstructor() ->getMock(); - $this->resourceMock = $this->getMockBuilder('Magento\Install\Model\Resource\Resource') + $this->resourceMock = $this->getMockBuilder('Magento\Framework\Module\Resource') ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessorTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessorTest.php index bfde3221bccb2995fd82d0e83c01b66b40d849d0..d231da48fafd94cbcef4c5d882e9d5e620576820 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessorTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Service/V1/Product/BundleProductSaveProcessorTest.php @@ -103,7 +103,7 @@ class BundleProductSaveProcessorTest extends \PHPUnit_Framework_TestCase private $productBuilder; /** - * @var \Magento\Framework\Service\Data\Eav\AttributeValue|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\Eav\AttributeValue|\PHPUnit_Framework_MockObject_MockObject */ private $attributeValue; @@ -182,7 +182,7 @@ class BundleProductSaveProcessorTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - $this->attributeValue = $this->getMockBuilder('Magento\Framework\Service\Data\Eav\AttributeValue') + $this->attributeValue = $this->getMockBuilder('Magento\Framework\Api\Eav\AttributeValue') ->setMethods(['getValue']) ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php index bf9a82905cf502c80d47ced21907a8cb3798dd85..8681b6aa6ca0928717a383ad846eacd63fc5b68d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php @@ -128,5 +128,16 @@ class RowTest extends \PHPUnit_Framework_TestCase $this->flatItemWriter->expects($this->once())->method('write')->with('store_id_1', 'product_id_1'); $this->model->execute('product_id_1'); } + + public function testExecuteWithExistingFlatTablesCreatesTables() + { + $this->productIndexerHelper->expects($this->any())->method('getFlatTableName') + ->will($this->returnValue('store_flat_table')); + $this->connection->expects($this->any())->method('isTableExists')->with('store_flat_table') + ->will($this->returnValue(true)); + $this->flatItemEraser->expects($this->once())->method('removeDeletedProducts'); + $this->flatTableBuilder->expects($this->never())->method('build')->with('store_id_1', array('product_id_1')); + $this->model->execute('product_id_1'); + } } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php index 5078b9fd423a7fb490c290d4fd1875f88b3e4685..b598df7c2f35a8f0ce8e2c426cd1deb8105ba595 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php @@ -81,7 +81,7 @@ class TableDataTest extends \PHPUnit_Framework_TestCase )->method( 'renameTablesBatch' )->with( - array('oldName' => 'flat_tmp', 'newName' => 'flat_table') + array(['oldName' => 'flat_tmp', 'newName' => 'flat_table']) ); $this->_resourceMock->expects( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php index 9f0c4ee233a96273e8a72be4a3753697b0cd5d51..47bf9de586a01c8e12f046c59fcadb1b56fc07c1 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php @@ -32,12 +32,83 @@ class RowsTest extends \PHPUnit_Framework_TestCase */ protected $_model; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_storeManager; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_store; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_productIndexerHelper; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_resource; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_connection; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_flatItemWriter; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_flatItemEraser; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_flatTableBuilder; + public function setUp() { $objectManager = new ObjectManager($this); - $this->_model = $objectManager->getObject('Magento\Catalog\Model\Indexer\Product\Flat\Action\Rows'); - } + $this->_connection = $this->getMock('\Magento\Framework\DB\Adapter\AdapterInterface'); + $this->_resource = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false); + $this->_resource->expects($this->any())->method('getConnection') + ->with('default') + ->will($this->returnValue($this->_connection)); + $this->_storeManager = $this->getMock('Magento\Framework\StoreManagerInterface'); + $this->_store = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false); + $this->_store->expects($this->any())->method('getId')->will($this->returnValue('store_id_1')); + $this->_storeManager->expects($this->any())->method('getStores')->will( + $this->returnValue(array($this->_store)) + ); + $this->_productIndexerHelper = $this->getMock( + 'Magento\Catalog\Helper\Product\Flat\Indexer', array(), array(), '', false + ); + $this->_flatItemEraser = $this->getMock( + '\Magento\Catalog\Model\Indexer\Product\Flat\Action\Eraser', array(), array(), '', false + ); + $this->_flatItemWriter = $this->getMock( + '\Magento\Catalog\Model\Indexer\Product\Flat\Action\Indexer', array(), array(), '', false + ); + $this->_flatTableBuilder = $this->getMock( + '\Magento\Catalog\Model\Indexer\Product\Flat\FlatTableBuilder', array(), array(), '', false + ); + + $this->_model = $objectManager->getObject('Magento\Catalog\Model\Indexer\Product\Flat\Action\Rows', array( + 'resource' => $this->_resource, + 'storeManager' => $this->_storeManager, + 'productHelper' => $this->_productIndexerHelper, + 'flatItemEraser' => $this->_flatItemEraser, + 'flatItemWriter' => $this->_flatItemWriter, + 'flatTableBuilder' => $this->_flatTableBuilder + )); + } /** * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Bad value was supplied. @@ -46,4 +117,26 @@ class RowsTest extends \PHPUnit_Framework_TestCase { $this->_model->execute(null); } + + public function testExecuteWithNonExistingFlatTablesCreatesTables() + { + $this->_productIndexerHelper->expects($this->any())->method('getFlatTableName') + ->will($this->returnValue('store_flat_table')); + $this->_connection->expects($this->any())->method('isTableExists')->with('store_flat_table') + ->will($this->returnValue(false)); + $this->_flatItemEraser->expects($this->never())->method('removeDeletedProducts'); + $this->_flatTableBuilder->expects($this->once())->method('build')->with('store_id_1', array(1, 2)); + $this->_model->execute(array(1, 2)); + } + + public function testExecuteWithExistingFlatTablesCreatesTables() + { + $this->_productIndexerHelper->expects($this->any())->method('getFlatTableName') + ->will($this->returnValue('store_flat_table')); + $this->_connection->expects($this->any())->method('isTableExists')->with('store_flat_table') + ->will($this->returnValue(true)); + $this->_flatItemEraser->expects($this->once())->method('removeDeletedProducts'); + $this->_flatTableBuilder->expects($this->once())->method('build')->with('store_id_1', array(1, 2)); + $this->_model->execute(array(1, 2)); + } } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataTest.php index a4cb5f1289ce34787652817361ebb5d59f2bae2a..64fa6cc856632869977194f0be1c9e4995e5e028 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/Eav/AttributeMetadataTest.php @@ -25,7 +25,7 @@ namespace Magento\Catalog\Service\V1\Data\Eav; class AttributeMetadataTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder|\PHPUnit_Framework_TestCase */ + /** @var \Magento\Framework\Api\ExtensibleObjectBuilder|\PHPUnit_Framework_TestCase */ protected $builderMock; /** @var \Magento\Catalog\Service\V1\Data\Eav\ValidationRule[] */ @@ -36,7 +36,7 @@ class AttributeMetadataTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->builderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $this->builderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(array('getData')) ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/ProductBuilderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/ProductBuilderTest.php index 9f5b2dd249ce47be6ee444f272594e4afaeffbd1..6b4218d093f74ff7273444af906846151ce3467d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/ProductBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Data/ProductBuilderTest.php @@ -34,7 +34,7 @@ class ProductBuilderTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Catalog\Service\V1\MetadataService */ private $_productMetadataService; - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder */ private $_valueBuilder; protected function setUp() @@ -57,7 +57,7 @@ class ProductBuilderTest extends \PHPUnit_Framework_TestCase ) ); $this->_valueBuilder = $this->_objectManager->getObject( - 'Magento\Framework\Service\Data\AttributeValueBuilder' + 'Magento\Framework\Api\AttributeValueBuilder' ); $this->_productBuilder = $this->_objectManager->getObject( 'Magento\Catalog\Service\V1\Data\ProductBuilder', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/MetadataServiceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/MetadataServiceTest.php index 51e4fd47c48c4f50eadfdceeb75e19ee483e2321..72a45145498cf4c4904c9489c659eb1249dbca7b 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/MetadataServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/MetadataServiceTest.php @@ -116,7 +116,7 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase $this->eavConfigMock->expects($this->any())->method('getAttribute')->will($this->returnValue($attributeMock)); $dto = $this->service->getAttributeMetadata('entity_type', 'attr_code'); - $this->assertInstanceOf('Magento\Framework\Service\Data\AbstractExtensibleObject', $dto); + $this->assertInstanceOf('Magento\Framework\Api\AbstractExtensibleObject', $dto); $this->assertEquals($attributeMock->getFrontendInput(), $dto->getFrontendInput()); $this->assertEquals(0, $dto->getFrontendLabel()[0]->getStoreId()); @@ -155,7 +155,7 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase ->method('create') ->will($this->returnValue($this->attributeCollection)); - $searchCriteria = $this->getMockBuilder('\Magento\Framework\Service\V1\Data\SearchCriteria') + $searchCriteria = $this->getMockBuilder('\Magento\Framework\Api\SearchCriteria') ->disableOriginalConstructor() ->setMethods(['getFilterGroups']) ->getMock(); @@ -171,7 +171,7 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Catalog\Service\V1\Data\Product\Attribute\SearchResults $searchResult */ $searchResult = $this->service->getAllAttributeMetadata('entity_type', $searchCriteria); $dto = $searchResult->getItems()[0]; - $this->assertInstanceOf('Magento\Framework\Service\Data\AbstractExtensibleObject', $dto); + $this->assertInstanceOf('Magento\Framework\Api\AbstractExtensibleObject', $dto); $this->assertEquals($attributeMock->getFrontendInput(), $dto->getFrontendInput()); $this->assertEquals(0, $dto->getFrontendLabel()[0]->getStoreId()); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceTest.php index be748893dc2938f256d6f05ae65a80d4bd82b532..1a26da9c0178dcb41d3d7125443d7d46af6be711 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/ReadServiceTest.php @@ -24,7 +24,7 @@ namespace Magento\Catalog\Service\V1\Product\Attribute; use Magento\Catalog\Service\V1\Product\MetadataService; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Catalog\Service\V1\Product\MetadataServiceInterface as ProductMetadataServiceInterface; class ReadServiceTest extends \PHPUnit_Framework_TestCase @@ -85,7 +85,7 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase $typeBuilder = $objectManager->getObject( '\Magento\Catalog\Service\V1\Data\Eav\Product\Attribute\TypeBuilder', - ['metadataService' => $objectManager->getObject('Magento\Framework\Service\Config\MetadataConfig')] + ['metadataService' => $objectManager->getObject('Magento\Framework\Api\Config\MetadataConfig')] ); /** @var \Magento\Catalog\Service\V1\Product\Attribute\ReadServiceInterface $service */ diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/DefaultConverterTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/DefaultConverterTest.php index fb0054746b239765de459f2aa0b6652ba44283cb..8e29fbbbdcc59e768bbfe22df8f200883193429e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/DefaultConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/DefaultConverterTest.php @@ -59,7 +59,7 @@ class DefaultConverterTest extends \PHPUnit_Framework_TestCase false ); $this->attributeValueMock = $this->getMock( - '\Magento\Framework\Service\Data\AttributeValue', + '\Magento\Framework\Api\AttributeValue', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/SelectTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/SelectTest.php index 1bb12081a01ac5eee00eae83b352be53ce2584c5..6702ff5f8634b1992e40533dadf869f397b06b85 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/SelectTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/CustomOptions/Data/Option/Metadata/Converter/SelectTest.php @@ -56,7 +56,7 @@ class SelectTest extends \PHPUnit_Framework_TestCase $this->optionMetadataMock = $this->getMock('\Magento\Catalog\Service\V1\Product\CustomOptions\Data\Option\Metadata', [], [], '', false); $this->attributeValueMock = - $this->getMock('\Magento\Framework\Service\Data\AttributeValue', [], [], '', false); + $this->getMock('\Magento\Framework\Api\AttributeValue', [], [], '', false); $this->model = new Select(); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php index 0cd0e88c706d68880ee1176d9754483248616cfa..ecca5475488ae63cf6abb7b46c8c927e192ac74c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/MetadataServiceTest.php @@ -38,32 +38,32 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase private $metadataService; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject */ private $searchCriteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject */ private $filterBuilder; /** - * @var \Magento\Framework\Service\V1\Data\Filter|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\Filter|\PHPUnit_Framework_MockObject_MockObject */ private $filter; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ private $searchCriteria; /** - * @var \Magento\Framework\Service\V1\Data\SearchResults|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchResults|\PHPUnit_Framework_MockObject_MockObject */ private $searchResult; /** - * @var \Magento\Framework\Service\Config\MetadataConfig|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\Config\MetadataConfig|\PHPUnit_Framework_MockObject_MockObject */ private $metadataConfig; @@ -71,7 +71,7 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase { $helper = new ObjectManager($this); - $this->metadataConfig = $this->getMockBuilder('Magento\Framework\Service\Config\MetadataConfig') + $this->metadataConfig = $this->getMockBuilder('Magento\Framework\Api\Config\MetadataConfig') ->setMethods(['getCustomAttributesMetadata']) ->disableOriginalConstructor() ->getMock(); @@ -81,25 +81,25 @@ class MetadataServiceTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - $this->searchCriteriaBuilder = $this->getMockBuilder('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder') + $this->searchCriteriaBuilder = $this->getMockBuilder('Magento\Framework\Api\SearchCriteriaBuilder') ->setMethods(['addFilter', 'create']) ->disableOriginalConstructor() ->getMock(); - $this->filterBuilder = $this->getMockBuilder('Magento\Framework\Service\V1\Data\FilterBuilder') + $this->filterBuilder = $this->getMockBuilder('Magento\Framework\Api\FilterBuilder') ->setMethods(['setField', 'setValue', 'create']) ->disableOriginalConstructor() ->getMock(); - $this->filter = $this->getMockBuilder('Magento\Framework\Service\V1\Data\Filter') + $this->filter = $this->getMockBuilder('Magento\Framework\Api\Filter') ->disableOriginalConstructor() ->getMock(); - $this->searchCriteria = $this->getMockBuilder('Magento\Framework\Service\V1\Data\SearchCriteria') + $this->searchCriteria = $this->getMockBuilder('Magento\Framework\Api\SearchCriteria') ->disableOriginalConstructor() ->getMock(); - $this->searchResult = $this->getMockBuilder('Magento\Framework\Service\V1\Data\SearchResults') + $this->searchResult = $this->getMockBuilder('Magento\Framework\Api\SearchResults') ->setMethods(['getItems']) ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/ProductServiceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/ProductServiceTest.php index f7a41371eb7c0a9aab6b52e280e1e16fae9a83b3..996cdb56c06d14389c2e05d3a1629960f5ddf126 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/ProductServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/ProductServiceTest.php @@ -24,8 +24,8 @@ namespace Magento\Catalog\Service\V1; -use Magento\Framework\Service\V1\Data\SearchCriteria; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchCriteriaBuilder; /** * Test for \Magento\Catalog\Service\V1\ProductService @@ -115,10 +115,10 @@ class ProductServiceTest extends \PHPUnit_Framework_TestCase ->getMock(); $filterGroupBuilder = $this->_objectManager - ->getObject('Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); + ->getObject('Magento\Framework\Api\Search\FilterGroupBuilder'); /** @var SearchCriteriaBuilder $searchBuilder */ $this->_searchBuilder = $this->_objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); } @@ -237,10 +237,10 @@ class ProductServiceTest extends \PHPUnit_Framework_TestCase ); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $filterBuilder = $helper->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = $helper->getObject('\Magento\Framework\Api\FilterBuilder'); $filter = $filterBuilder->setField('price')->setValue('10.000')->setConditionType('eq')->create(); $this->_searchBuilder->addFilter([$filter]); - $sortOrderBuilder = $helper->getObject('\Magento\Framework\Service\V1\Data\SortOrderBuilder'); + $sortOrderBuilder = $helper->getObject('\Magento\Framework\Api\SortOrderBuilder'); $sortOrder = $sortOrderBuilder ->setField('price') ->setDirection(SearchCriteria::SORT_ASC) diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Service/V1/StockStatusServiceTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Service/V1/StockStatusServiceTest.php index 784af4c417b9c2189b8e9abc83d3e9de5bd7b48d..f3fc1803a1072625f367e1a91e2779bcc7aaa300 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Service/V1/StockStatusServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Service/V1/StockStatusServiceTest.php @@ -320,7 +320,7 @@ class StockStatusServiceTest extends \PHPUnit_Framework_TestCase $scope->expects($this->any())->method('getId')->will($this->returnValue($websiteId)); $this->scopeResolver->expects($this->any())->method('getScope')->will($this->returnValue($scope)); - $builder = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $builder = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->disableOriginalConstructor() ->getMock(); $builder->expects($this->any())->method('getData')->will($this->returnValue($criteriaData)); @@ -339,7 +339,7 @@ class StockStatusServiceTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(new \ArrayIterator([$statusItem]))); $this->itemsFactory->expects($this->once())->method('create')->will($this->returnValue($collection)); - /** @var \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder $builder */ + /** @var \Magento\Framework\Api\ExtensibleObjectBuilder $builder */ $lowStockCriteria = new Data\LowStockCriteria($builder); // Expected results diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php index 11351f11b66cc942e6c06722c3460a3a76a69f57..5a79c52c1baca5423b6b06d250a3ef60ebcd5e9e 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Cart/Access/ReadPluginTest.php @@ -86,7 +86,7 @@ class ReadPluginTest extends \PHPUnit_Framework_TestCase $this->userContextMock->expects($this->once())->method('getUserType')->will($this->returnValue($userType)); $this->model->beforeGetCartList( $this->subjectMock, - $this->getMock('\Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false) + $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false) ); } @@ -100,7 +100,7 @@ class ReadPluginTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(\Magento\Authorization\Model\UserContextInterface::USER_TYPE_CUSTOMER)); $this->model->beforeGetCartList( $this->subjectMock, - $this->getMock('\Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false) + $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false) ); } } diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php index 59cb19b9a9e431bc15a5309d300995e7a38b2ed2..23e01bba4de9a04e9ac2453d80b7d433c8743f12 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Address/ConverterTest.php @@ -27,7 +27,7 @@ namespace Magento\Checkout\Service\V1\Address; use \Magento\Checkout\Service\V1\Data\Cart\Address; use \Magento\Checkout\Service\V1\Data\Cart\Address\Region; -use \Magento\Framework\Service\Data\AttributeValue; +use \Magento\Framework\Api\AttributeValue; class ConverterTest extends \PHPUnit_Framework_TestCase { @@ -137,7 +137,7 @@ class ConverterTest extends \PHPUnit_Framework_TestCase $dataObjectMock = $this->getMock('Magento\Checkout\Service\V1\Data\Cart\Address', [], [], '', false); $methods = ['setData', 'setStreet', 'setRegionId', 'setRegion', '__wakeUp']; $addressMock = $this->getMock('Magento\Sales\Model\Quote\Address', $methods, [], '', false); - $attributeValueMock = $this->getMock('\Magento\Framework\Service\Data\AttributeValue', [], [], '', false); + $attributeValueMock = $this->getMock('\Magento\Framework\Api\AttributeValue', [], [], '', false); $attributeValueMock->expects($this->once())->method('getAttributeCode')->will($this->returnValue('value_code')); $attributeValueMock->expects($this->once())->method('getValue')->will($this->returnValue('value')); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php index a38b796cd381b9dffcc43d0bdf56d58dfb50e650..2826c83b4fd32e1a4fe791773f72bacaebbe7645 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Cart/ReadServiceTest.php @@ -24,7 +24,7 @@ namespace Magento\Checkout\Service\V1\Cart; -use \Magento\Framework\Service\V1\Data\SearchCriteria; +use \Magento\Framework\Api\SearchCriteria; /** * @SuppressWarnings(PHPMD.TooManyFields) @@ -122,20 +122,20 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase public function testGetCartListSuccess($direction, $expected) { $searchResult = $this->getMock('\Magento\Checkout\Service\V1\Data\CartSearchResults', [], [], '', false); - $searchCriteriaMock = $this->getMock('\Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false); $cartMock = $this->getMock('Magento\Payment\Model\Cart', [], [], '', false); $this->searchResultsBuilderMock ->expects($this->once()) ->method('setSearchCriteria') ->will($this->returnValue($searchCriteriaMock)); - $filterGroupMock = $this->getMock('\Magento\Framework\Service\V1\Data\Search\FilterGroup', [], [], '', false); + $filterGroupMock = $this->getMock('\Magento\Framework\Api\Search\FilterGroup', [], [], '', false); $searchCriteriaMock ->expects($this->any()) ->method('getFilterGroups') ->will($this->returnValue([$filterGroupMock])); - $filterMock = $this->getMock('\Magento\Framework\Service\V1\Data\Filter', [], [], '', false); + $filterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); $filterGroupMock->expects($this->any())->method('getFilters')->will($this->returnValue([$filterMock])); $filterMock->expects($this->once())->method('getField')->will($this->returnValue('store_id')); $filterMock->expects($this->any())->method('getConditionType')->will($this->returnValue('eq')); @@ -147,7 +147,7 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase $this->quoteCollectionMock->expects($this->once())->method('getSize')->will($this->returnValue(10)); $this->searchResultsBuilderMock->expects($this->once())->method('setTotalCount')->with(10); - $sortOrderMock = $this->getMockBuilder('Magento\Framework\Service\V1\Data\SortOrder') + $sortOrderMock = $this->getMockBuilder('Magento\Framework\Api\SortOrder') ->setMethods(['getField', 'getDirection']) ->disableOriginalConstructor() ->getMock(); @@ -178,18 +178,18 @@ class ReadServiceTest extends \PHPUnit_Framework_TestCase */ public function testGetCartListWithNotExistingField() { - $searchCriteriaMock = $this->getMock('\Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false); $this->searchResultsBuilderMock ->expects($this->once()) ->method('setSearchCriteria') ->will($this->returnValue($searchCriteriaMock)); - $filterGroupMock = $this->getMock('\Magento\Framework\Service\V1\Data\Search\FilterGroup', [], [], '', false); + $filterGroupMock = $this->getMock('\Magento\Framework\Api\Search\FilterGroup', [], [], '', false); $searchCriteriaMock ->expects($this->any()) ->method('getFilterGroups') ->will($this->returnValue([$filterGroupMock])); - $filterMock = $this->getMock('\Magento\Framework\Service\V1\Data\Filter', [], [], '', false); + $filterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); $filterGroupMock->expects($this->any())->method('getFilters')->will($this->returnValue([$filterMock])); $filterMock->expects($this->once())->method('getField')->will($this->returnValue('any_value')); $filterMock->expects($this->never())->method('getConditionType'); diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php index f7b8fa6fd8ef619a0924267c1600aad4d1d70c87..51c8cfbda4ca55484e5584740ceeb3e1e8ab05cb 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Service/V1/Product/Option/WriteServiceTest.php @@ -548,7 +548,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase /** * Return instance of option for configurable product * - * @return \Magento\Framework\Service\Data\AbstractExtensibleObject + * @return \Magento\Framework\Api\AbstractExtensibleObject */ private function getOption() { diff --git a/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php index b4c0a4cbc3563bb5ab7427c8da0efd562af9111c..d8904af20d8535a2df4ed557cabbbf1c0a2daa0f 100644 --- a/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Contact/Helper/DataTest.php @@ -96,7 +96,7 @@ class DataTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(true)); $objectBuilder = $this->getMockForAbstractClass( - '\Magento\Framework\Service\Data\AbstractSimpleObjectBuilder', + '\Magento\Framework\Api\AbstractSimpleObjectBuilder', ['getData'], '', false diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php index 93cecc96275016af3d264ffbacb235cb92211462..3ecd8d355fba4ce9d636f9af5a10a4fa5515a5c1 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php @@ -35,7 +35,6 @@ class StateTest extends \PHPUnit_Framework_TestCase { $model = new \Magento\Framework\App\State( $this->getMockForAbstractClass('Magento\Framework\Config\ScopeInterface', array(), '', false), - time(), $mode ); $this->assertEquals($mode, $model->getMode()); @@ -61,7 +60,6 @@ class StateTest extends \PHPUnit_Framework_TestCase { new \Magento\Framework\App\State( $this->getMockForAbstractClass('Magento\Framework\Config\ScopeInterface', array(), '', false), - time(), "unknown mode" ); } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php index 8c9a3b28281bcec69073c2cf32325a26cb4c8a6c..23113b7d5a2bcfc7481a12ac1b520f7f40e514cb 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php @@ -26,9 +26,9 @@ namespace Magento\Customer\Block\Adminhtml\Edit\Tab; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Service\Data\AttributeValue; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\AbstractExtensibleObject; +use Magento\Framework\Api\AttributeValue; +use Magento\Framework\Api\ExtensibleDataObjectConverter; class AccountTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php index 46e39cff31ceacef2578cff7c5a6b37b9ff82671..2b526ac8ee6141d873e0ebda3479d58d99f3cc14 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php @@ -24,8 +24,6 @@ namespace Magento\Customer\Block\Widget; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Customer\Service\V1\Data\Eav\ValidationRule; -use Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder; class DobTest extends \PHPUnit_Framework_TestCase { @@ -343,27 +341,32 @@ class DobTest extends \PHPUnit_Framework_TestCase */ public function getMinDateRangeDataProvider() { - $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $emptyValidationRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + + $validationRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + $validationRule->expects($this->any()) + ->method('getName') + ->will($this->returnValue(Dob::MIN_DATE_RANGE_KEY)); + $validationRule->expects($this->any()) + ->method('getValue') + ->will($this->returnValue(strtotime(self::MIN_DATE))); + return array( array( array( - new ValidationRule( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder') - ->populateWithArray( - array( - 'name' => Dob::MIN_DATE_RANGE_KEY, - 'value' => strtotime(self::MIN_DATE) - ) - ) - ) + $validationRule ), date('Y/m/d', strtotime(self::MIN_DATE)) ), array( array( - new ValidationRule( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder') - ) + $emptyValidationRule ), null ) @@ -409,27 +412,31 @@ class DobTest extends \PHPUnit_Framework_TestCase */ public function getMaxDateRangeDataProvider() { - $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $emptyValidationRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + + $validationRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + $validationRule->expects($this->any()) + ->method('getName') + ->will($this->returnValue(Dob::MAX_DATE_RANGE_KEY)); + $validationRule->expects($this->any()) + ->method('getValue') + ->will($this->returnValue(strtotime(self::MAX_DATE))); return array( array( array( - new ValidationRule( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder') - ->populateWithArray( - array( - 'name' => Dob::MAX_DATE_RANGE_KEY, - 'value' => strtotime(self::MAX_DATE) - ) - ) - ) + $validationRule ), date('Y/m/d', strtotime(self::MAX_DATE)) ), array( array( - new ValidationRule( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder') - ) + $emptyValidationRule ), null ) diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php index 0db0601dc8a11f6f4f72a1665c181e328df91925..42744a2a59b2846e5936347d46f4e93b2348b473 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/CreatePostTest.php @@ -349,6 +349,7 @@ class CreatePostTest extends \PHPUnit_Framework_TestCase ->method('getParam') ->willReturnMap([ ['password', null, $password], + ['password_confirmation', null, $password], ['is_subscribed', false, true], ]); @@ -486,6 +487,7 @@ class CreatePostTest extends \PHPUnit_Framework_TestCase ->method('getParam') ->willReturnMap([ ['password', null, $password], + ['password_confirmation', null, $password], ['is_subscribed', false, true], ]); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConverterTest.php index a9b0abe3bf27e285e3d751a0946fa7d85b57703f..d04e1ab5b393a4b189fb6be3aa948124c7f72b35 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConverterTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Model\Address; -use Magento\Framework\Service\Data\AttributeValue; +use Magento\Framework\Api\AttributeValue; class ConverterTest extends \PHPUnit_Framework_TestCase { @@ -103,7 +103,7 @@ class ConverterTest extends \PHPUnit_Framework_TestCase $addressModelMock->expects($this->once()) ->method('setAttributeSetId') ->with($this->equalTo( - \Magento\Customer\Service\V1\AddressMetadataServiceInterface::ATTRIBUTE_SET_ID_ADDRESS + \Magento\Customer\Api\AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS )); $addressMock = $this->getMock('Magento\Customer\Service\V1\Data\Address', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Attribute/Data/PostcodeTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Attribute/Data/PostcodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..32ff20fa88f14b4d18c52e18de8d44113cef3951 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Attribute/Data/PostcodeTest.php @@ -0,0 +1,117 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Attribute\Data; + +use Magento\Directory\Helper\Data as DirectoryHelper; +use Magento\Eav\Model\Entity\Attribute\AbstractAttribute; + +class PostcodeTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var DirectoryHelper|\PHPUnit_Framework_MockObject_MockObject + */ + protected $directoryHelperMock; + + /** + * @var AbstractAttribute|\PHPUnit_Framework_MockObject_MockObject + */ + protected $attributeMock; + + protected function setUp() + { + $this->localeMock = $this->getMockBuilder('Magento\Framework\Stdlib\DateTime\TimezoneInterface') + ->getMock(); + $this->localeResolverMock = $this->getMockBuilder('Magento\Framework\Locale\ResolverInterface') + ->getMock(); + $this->loggerMock = $this->getMockBuilder('Magento\Framework\Logger') + ->disableOriginalConstructor() + ->getMock(); + $this->directoryHelperMock = $this->getMockBuilder('Magento\Directory\Helper\Data') + ->disableOriginalConstructor() + ->getMock(); + $this->attributeMock = $this->getMockBuilder('Magento\Eav\Model\Entity\Attribute\AbstractAttribute') + ->disableOriginalConstructor() + ->setMethods(['getStoreLabel']) + ->getMock(); + } + + /** + * Create an instance of the class that is being tested + * + * @param string|int|bool|null $value The value undergoing testing by a given test + * @return Postcode + */ + protected function getClass($value) + { + return new Postcode( + $this->localeMock, + $this->loggerMock, + $this->localeResolverMock, + $this->directoryHelperMock + ); + } + + /** + * @param string $value to assign to boolean + * @param bool $expected text output + * @param string $countryId + * @param bool $isOptional + * + * @dataProvider validateValueDataProvider + */ + public function testValidateValue($value, $expected, $countryId, $isOptional) + { + $storeLabel = 'Zip/Postal Code'; + $this->attributeMock->expects($this->once()) + ->method('getStoreLabel') + ->willReturn($storeLabel); + + $this->directoryHelperMock->expects($this->once()) + ->method('isZipCodeOptional') + ->willReturnMap([ + [$countryId, $isOptional] + ]); + + $object = $this->getClass($value); + $object->setAttribute($this->attributeMock); + $object->setExtractedData(['country_id' => $countryId]); + + $actual = $object->validateValue($value); + $this->assertEquals($expected, $actual); + } + + /** + * @return array + */ + public function validateValueDataProvider() + { + return [ + ['', ['"Zip/Postal Code" is a required value.'], 'US', false], + ['90034', true, 'US', false], + ['', true, 'IE', true], + ['90034', true, 'IE', true], + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php index c61edf9803419f21be5be09515f7d57f2bbc9c8e..9fee2ea16f2675d6547f6eff4af557b6ad6e39e6 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php @@ -28,7 +28,7 @@ namespace Magento\Customer\Model; use Magento\Customer\Service\V1\Data\Eav\AttributeMetadata; use Magento\Customer\Service\V1\Data\CustomerBuilder; use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AttributeValueBuilder; class ConverterTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php index aafc348f8bb436abe19e6714389e98a5d0dd1715..9d9144ff0d56d8b68e1edeb3b65dc4c3ae9d9498 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php @@ -314,40 +314,6 @@ class CustomerTest extends \PHPUnit_Framework_TestCase ); } - public function testCanSkipConfirmationWithoutCustomerId() - { - $this->registryMock->expects($this->never())->method('registry'); - $this->_model->setData('id', false); - $this->assertFalse($this->_model->canSkipConfirmation()); - } - - public function testCanSkipConfirmationWithoutSkip() - { - $idFieldName = 'id'; - $this->registryMock->expects($this->once()) - ->method('registry') - ->with('skip_confirmation_if_email') - ->will($this->returnValue(false)); - - $this->_model->setData($idFieldName, 1); - $this->assertFalse($this->_model->canSkipConfirmation()); - } - - public function testCanSkipConfirmation() - { - $customerEmail = 'test@example.com'; - $this->registryMock->expects($this->once()) - ->method('registry') - ->with('skip_confirmation_if_email') - ->will($this->returnValue($customerEmail)); - - $this->_model->setData(array( - 'id' => 1, - 'email' => $customerEmail, - )); - $this->assertTrue($this->_model->canSkipConfirmation()); - } - /** * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Wrong transactional account email type diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php index f63294001f5d0eb61e169e82b7a826b951ab7bab..d5cac6fa3dc8741e4c58c9eb82ad69952dfa9347 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php @@ -25,9 +25,6 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Customer\Service\V1\Data\Eav\ValidationRule; -use Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder; - class AbstractDataTest extends \PHPUnit_Framework_TestCase { const MODEL = 'MODEL'; @@ -225,6 +222,18 @@ class AbstractDataTest extends \PHPUnit_Framework_TestCase public function testValidateInputRule($value, $label, $inputValidation, $expectedOutput) { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + + $validationRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + $validationRule->expects($this->any()) + ->method('getName') + ->will($this->returnValue('input_validation')); + $validationRule->expects($this->any()) + ->method('getValue') + ->will($this->returnValue($inputValidation)); + $this->_attributeMock->expects($this->any())->method('getStoreLabel')->will($this->returnValue($label)); $this->_attributeMock->expects( $this->any() @@ -233,15 +242,7 @@ class AbstractDataTest extends \PHPUnit_Framework_TestCase )->will( $this->returnValue( array( - new ValidationRule( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder') - ->populateWithArray( - array( - 'name' => 'input_validation', - 'value' => $inputValidation - ) - ) - ) + $validationRule ) ) ); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/DateTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/DateTest.php index 62ed6d4631741c69d7aba21e52e2f6055c01066b..0e455d93b6cbe45271578f38a2440f396fa8a9c1 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/DateTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/DateTest.php @@ -25,8 +25,8 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Customer\Service\V1\Data\Eav\ValidationRule; -use Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder; +use Magento\Customer\Model\Data\ValidationRule; +use Magento\Customer\Api\Data\ValidationRuleDataBuilder; class DateTest extends AbstractFormTestCase { @@ -91,13 +91,33 @@ class DateTest extends AbstractFormTestCase { $validationRules = array(); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $ruleBuilder = $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder'); - $ruleBuilder->populateWithArray(array('name' => 'input_validation', 'value' => 'date')); - $validationRules[] = new ValidationRule($ruleBuilder); + + $validationRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + $validationRule->expects($this->any()) + ->method('getName') + ->will($this->returnValue('input_validation')); + $validationRule->expects($this->any()) + ->method('getValue') + ->will($this->returnValue('date')); + + $validationRules[] = $validationRule; if (is_array($validation)) { foreach ($validation as $ruleName => $ruleValue) { - $ruleBuilder->populateWithArray(array('name' => $ruleName, 'value' => $ruleValue)); - $validationRules[] = new ValidationRule($ruleBuilder); + $validationRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + $validationRule->expects($this->any()) + ->method('getName') + ->will($this->returnValue($ruleName)); + $validationRule->expects($this->any()) + ->method('getValue') + ->will($this->returnValue($ruleValue)); + + $validationRules[] = $validationRule; } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/MultiselectTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/MultiselectTest.php index fe2ae2f9c00e684a94d5cc38f4b8babb77888ea2..fb313cc1f2efccedf98358d636fce1af522f4d26 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/MultiselectTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/MultiselectTest.php @@ -26,7 +26,6 @@ namespace Magento\Customer\Model\Metadata\Form; use Magento\Customer\Model\Metadata\ElementFactory; -use Magento\Customer\Service\V1\Data\Eav\OptionBuilder; class MultiselectTest extends AbstractFormTestCase { @@ -204,7 +203,27 @@ class MultiselectTest extends AbstractFormTestCase */ protected function runOutputValueTest($value, $expected, $format) { - $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $option1 = $this->getMockBuilder('Magento\Customer\Api\Data\OptionInterface') + ->disableOriginalConstructor() + ->setMethods(['getLabel', 'getValue']) + ->getMockForAbstractClass(); + $option1->expects($this->any()) + ->method('getLabel') + ->will($this->returnValue('fourteen')); + $option1->expects($this->any()) + ->method('getValue') + ->will($this->returnValue('14')); + + $option2 = $this->getMockBuilder('Magento\Customer\Api\Data\OptionInterface') + ->disableOriginalConstructor() + ->setMethods(['getLabel', 'getValue']) + ->getMockForAbstractClass(); + $option2->expects($this->any()) + ->method('getLabel') + ->will($this->returnValue('some string')); + $option2->expects($this->any()) + ->method('getValue') + ->will($this->returnValue('some key')); $this->attributeMetadataMock->expects( $this->any() @@ -213,10 +232,8 @@ class MultiselectTest extends AbstractFormTestCase )->will( $this->returnValue( array( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\OptionBuilder') - ->setValue('14')->setLabel('fourteen')->create(), - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\OptionBuilder') - ->setValue('some key')->setLabel('some string')->create() + $option1, + $option2 ) ) ); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/PostcodeTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/PostcodeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..79618c33437bd79dae8d58a86c25f49227e3fbea --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/PostcodeTest.php @@ -0,0 +1,105 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Customer\Model\Metadata\Form; + +use Magento\Directory\Helper\Data as DirectoryHelper; + +class PostcodeTest extends AbstractFormTestCase +{ + /** + * @var DirectoryHelper|\PHPUnit_Framework_MockObject_MockObject + */ + protected $directoryHelper; + + protected function setUp() + { + parent::setUp(); + + $this->directoryHelper = $this->getMockBuilder('Magento\Directory\Helper\Data') + ->disableOriginalConstructor() + ->getMock(); + } + + /** + * Create an instance of the class that is being tested + * + * @param string|int|bool|null $value The value undergoing testing by a given test + * @return Postcode + */ + protected function getClass($value) + { + return new Postcode( + $this->localeMock, + $this->loggerMock, + $this->attributeMetadataMock, + $this->localeResolverMock, + $value, + 0, + false, + $this->directoryHelper + ); + } + + /** + * @param string $value to assign to boolean + * @param bool $expected text output + * @param string $countryId + * @param bool $isOptional + * + * @dataProvider validateValueDataProvider + */ + public function testValidateValue($value, $expected, $countryId, $isOptional) + { + $storeLabel = 'Zip/Postal Code'; + $this->attributeMetadataMock->expects($this->once()) + ->method('getStoreLabel') + ->willReturn($storeLabel); + + $this->directoryHelper->expects($this->once()) + ->method('isZipCodeOptional') + ->willReturnMap([ + [$countryId, $isOptional] + ]); + + $object = $this->getClass($value); + $object->setExtractedData(['country_id' => $countryId]); + + $actual = $object->validateValue($value); + $this->assertEquals($expected, $actual); + } + + /** + * @return array + */ + public function validateValueDataProvider() + { + return [ + ['', ['"Zip/Postal Code" is a required value.'], 'US', false], + ['90034', true, 'US', false], + ['', true, 'IE', true], + ['90034', true, 'IE', true], + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/SelectTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/SelectTest.php index 25b072d916a1a71310e70e8dec5588cf445960bb..e443f747b768317247d3e2326d30234060b73064 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/SelectTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/SelectTest.php @@ -23,9 +23,6 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Customer\Service\V1\Data\Eav\Option; -use Magento\Customer\Service\V1\Data\Eav\OptionBuilder; - /** * test Magento\Customer\Model\Metadata\Form\Select */ @@ -113,7 +110,39 @@ class SelectTest extends AbstractFormTestCase */ public function testOutputValue($value, $expected) { - $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + $option1 = $this->getMockBuilder('Magento\Customer\Api\Data\OptionInterface') + ->disableOriginalConstructor() + ->setMethods(['getLabel', 'getValue']) + ->getMockForAbstractClass(); + $option1->expects($this->any()) + ->method('getLabel') + ->will($this->returnValue('fourteen')); + $option1->expects($this->any()) + ->method('getValue') + ->will($this->returnValue('14')); + + $option2 = $this->getMockBuilder('Magento\Customer\Api\Data\OptionInterface') + ->disableOriginalConstructor() + ->setMethods(['getLabel', 'getValue']) + ->getMockForAbstractClass(); + $option2->expects($this->any()) + ->method('getLabel') + ->will($this->returnValue('some string')); + $option2->expects($this->any()) + ->method('getValue') + ->will($this->returnValue('some key')); + + $option3 = $this->getMockBuilder('Magento\Customer\Api\Data\OptionInterface') + ->disableOriginalConstructor() + ->setMethods(['getLabel', 'getValue']) + ->getMockForAbstractClass(); + $option3->expects($this->any()) + ->method('getLabel') + ->will($this->returnValue('True')); + $option3->expects($this->any()) + ->method('getValue') + ->will($this->returnValue('true')); + $this->attributeMetadataMock->expects( $this->any() )->method( @@ -121,12 +150,9 @@ class SelectTest extends AbstractFormTestCase )->will( $this->returnValue( array( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\OptionBuilder') - ->setValue('14')->setLabel('fourteen')->create(), - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\OptionBuilder') - ->setValue('some key')->setLabel('some string')->create(), - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\OptionBuilder') - ->setValue('true')->setLabel('True')->create() + $option1, + $option2, + $option3 ) ) ); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php index b1c90ff6c5c43b86ba5e9a2c8545fb342d7ee922..07909ed6facea7b22adcf415565c39b24dbc5cd1 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php @@ -25,9 +25,6 @@ */ namespace Magento\Customer\Model\Metadata\Form; -use Magento\Customer\Service\V1\Data\Eav\ValidationRule; -use Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder; - class TextTest extends AbstractFormTestCase { /** @var \Magento\Framework\Stdlib\String */ @@ -125,15 +122,32 @@ class TextTest extends AbstractFormTestCase public function testValidateValueLength($value, $expected) { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); + + $minTextLengthRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + $minTextLengthRule->expects($this->any()) + ->method('getName') + ->will($this->returnValue('min_text_length')); + $minTextLengthRule->expects($this->any()) + ->method('getValue') + ->will($this->returnValue(4)); + + $maxTextLengthRule = $this->getMockBuilder('Magento\Customer\Api\Data\ValidationRuleInterface') + ->disableOriginalConstructor() + ->setMethods(['getName', 'getValue']) + ->getMockForAbstractClass(); + $maxTextLengthRule->expects($this->any()) + ->method('getName') + ->will($this->returnValue('max_text_length')); + $maxTextLengthRule->expects($this->any()) + ->method('getValue') + ->will($this->returnValue(8)); + $validationRules = array( - 'min_text_length' => new ValidationRule( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder') - ->populateWithArray(array('name' => 'min_text_length', 'value' => 4)) - ), - 'max_text_length' => new ValidationRule( - $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\ValidationRuleBuilder') - ->populateWithArray(array('name' => 'max_text_length', 'value' => 8)) - ) + 'min_text_length' => $minTextLengthRule, + 'max_text_length' => $maxTextLengthRule ); $this->attributeMetadataMock->expects( diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php index 52d09bf539cdf870cdce8e2214caaf69fa74714f..29329f92a1713fcd637962e5cfedc87dbd7956eb 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Model\Resource\Group\Grid; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Unit test for \Magento\Customer\Model\Resource\Group\Grid\ServiceCollection @@ -34,13 +34,13 @@ class ServiceCollectionTest extends \PHPUnit_Framework_TestCase /** @var \Magento\TestFramework\Helper\ObjectManager */ protected $objectManager; - /** @var \Magento\Framework\Service\V1\Data\FilterBuilder */ + /** @var \Magento\Framework\Api\FilterBuilder */ protected $filterBuilder; - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder */ protected $searchCriteriaBuilder; - /** @var \Magento\Framework\Service\V1\Data\SortOrderBuilder */ + /** @var \Magento\Framework\Api\SortOrderBuilder */ protected $sortOrderBuilder; /** @var \Magento\Customer\Service\V1\Data\SearchResults */ @@ -55,16 +55,16 @@ class ServiceCollectionTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->filterBuilder = $this->objectManager->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $this->filterBuilder = $this->objectManager->getObject('\Magento\Framework\Api\FilterBuilder'); $filterGroupBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + ->getObject('Magento\Framework\Api\Search\FilterGroupBuilder'); + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder */ $this->searchCriteriaBuilder = $this->objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); $this->sortOrderBuilder = $this->objectManager->getObject( - '\Magento\Framework\Service\V1\Data\SortOrderBuilder' + '\Magento\Framework\Api\SortOrderBuilder' ); $this->groupServiceMock = $this->getMockBuilder('\Magento\Customer\Service\V1\CustomerGroupServiceInterface') ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/VisitorTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/VisitorTest.php index 2a29852f17be5cbfb16e365b0d23b163d3d17ad3..92f4a1afb5b032fed2b0179761a06732846fb155 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/VisitorTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/VisitorTest.php @@ -75,7 +75,8 @@ class VisitorTest extends \PHPUnit_Framework_TestCase 'getIdFieldName', 'save', 'addCommitCallback', - 'commit' + 'commit', + 'clean' ])->disableOriginalConstructor()->getMock(); $this->resource->expects($this->any())->method('getIdFieldName')->will($this->returnValue('visitor_id')); $this->resource->expects($this->any())->method('addCommitCallback')->will($this->returnSelf()); @@ -179,4 +180,10 @@ class VisitorTest extends \PHPUnit_Framework_TestCase $this->visitor->bindQuoteDestroy($observer); $this->assertTrue($this->visitor->getDoQuoteDestroy()); } + + public function testClean() + { + $this->resource->expects($this->once())->method('clean')->with($this->visitor)->will($this->returnSelf()); + $this->visitor->clean(); + } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php index 67091b05057ac4ccdfa95a39f23a74d054d8fde1..37555bc3c3d11eb6cfc4434696f4eb0d71e1053e 100755 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php @@ -26,14 +26,14 @@ namespace Magento\Customer\Service\V1; use Magento\Customer\Model\Converter; use Magento\Customer\Model\CustomerRegistry; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\CustomerBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\FilterBuilder; use Magento\Framework\Mail\Exception as MailException; -use Magento\Framework\Service\ExtensibleDataObjectConverter; +use Magento\Framework\Api\ExtensibleDataObjectConverter; /** * Test for \Magento\Customer\Service\V1\CustomerAccountService @@ -157,10 +157,10 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $filterGroupBuilder = $this->_objectManager - ->getObject('Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); + ->getObject('Magento\Framework\Api\Search\FilterGroupBuilder'); /** @var SearchCriteriaBuilder $searchBuilder */ $this->_searchBuilder = $this->_objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); @@ -1275,13 +1275,13 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase public function testCreateCustomer() { + $password = 'password'; $customerData = array( 'customer_id' => self::ID, 'email' => self::EMAIL, 'firstname' => self::FIRSTNAME, 'lastname' => self::LASTNAME, 'create_in' => 'Admin', - 'password' => 'password' ); $this->_customerBuilder->populateWithArray($customerData); $customerEntity = $this->_customerBuilder->create(); @@ -1335,17 +1335,20 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $customerService = $this->_createService(); - $this->assertSame($customerEntity, $customerService->createCustomer($customerDetails)); + $this->assertSame( + $customerEntity, + $customerService->createCustomer($customerDetails, $password) + ); } public function testCreateNewCustomer() { + $password = 'password'; $customerData = array( 'email' => self::EMAIL, 'firstname' => self::FIRSTNAME, 'lastname' => self::LASTNAME, 'create_in' => 'Admin', - 'password' => 'password' ); $this->_customerBuilder->populateWithArray($customerData); $customerEntity = $this->_customerBuilder->create(); @@ -1398,7 +1401,10 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $customerService = $this->_createService(); - $this->assertSame($customerEntity, $customerService->createCustomer($customerDetails)); + $this->assertSame( + $customerEntity, + $customerService->createCustomer($customerDetails, $password) + ); } /** @@ -1407,12 +1413,12 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase */ public function testCreateCustomerWithException() { + $password = 'password'; $customerData = array( 'email' => self::EMAIL, 'firstname' => self::FIRSTNAME, 'lastname' => self::LASTNAME, 'create_in' => 'Admin', - 'password' => 'password' ); $this->_customerBuilder->populateWithArray($customerData); $customerEntity = $this->_customerBuilder->create(); @@ -1463,17 +1469,17 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase ->will($this->throwException(new \Exception('exception message'))); $customerService = $this->_createService(); - $customerService->createCustomer($customerDetails); + $customerService->createCustomer($customerDetails, $password); } public function testCreateCustomerWithInputException() { + $password = 'password'; $customerData = array( 'email' => self::EMAIL, 'firstname' => self::FIRSTNAME, 'lastname' => self::LASTNAME, 'create_in' => 'Admin', - 'password' => 'password' ); $this->_customerBuilder->populateWithArray($customerData); $customerEntity = $this->_customerBuilder->create(); @@ -1511,7 +1517,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase $customerService = $this->_createService(); try { - $customerService->createCustomer($customerDetails); + $customerService->createCustomer($customerDetails, $password); } catch (InputException $inputException) { $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getRawMessage()); $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getMessage()); @@ -1655,7 +1661,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase ); $customerService = $this->_createService(); - $filterBuilder = $this->_objectManager->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = $this->_objectManager->getObject('\Magento\Framework\Api\FilterBuilder'); $filter = $filterBuilder->setField('email')->setValue('customer@search.example.com')->create(); $this->_searchBuilder->addFilter([$filter]); @@ -1725,7 +1731,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase ); $customerService = $this->_createService(); - $filterBuilder = $this->_objectManager->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = $this->_objectManager->getObject('\Magento\Framework\Api\FilterBuilder'); $filter = $filterBuilder->setField('email')->setValue(self::EMAIL)->create(); $this->_searchBuilder->addFilter([$filter]); @@ -1855,6 +1861,8 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase public function testCreateAccountMailException() { + $password = 'password'; + $this->_customerFactoryMock->expects($this->any()) ->method('create') ->will($this->returnValue($this->_customerModelMock)); @@ -1872,8 +1880,6 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase ->method('getEmail') ->will($this->returnValue('somebody@example.com')); - - $this->_customerModelMock->expects($this->any()) ->method('getId') ->will($this->returnValue(true)); @@ -1916,13 +1922,12 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($mockCustomer)); $service = $this->_createService(); - $service->createCustomer($mockCustomerDetail, 'abc123'); + $service->createCustomer($mockCustomerDetail, $password); // If we get no mail exception, the test in considered a success } public function testGetCustomerByEmail() { - $this->_converter = $this->getMockBuilder('Magento\Customer\Model\Converter') ->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php index a6c0127f9877f8aee4c5d99f209e7ef72dfbcc54..1b37a67682c002b17bb4dd4f74f8848d141b8bd0 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php @@ -27,7 +27,7 @@ use Magento\Framework\Exception\InputException; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\RegionBuilder; use Magento\Customer\Service\V1\Data\CustomerBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AttributeValueBuilder; /** * \Magento\Customer\Service\V1\CustomerAddressService diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php index 49e72b5882f047e0ef14bb1aa514593b1935a974..9660223cb5c5706243b58e285db1cd9d7a9c6cda 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Service\V1\Data; use Magento\Customer\Service\V1\AddressMetadataService; -use Magento\Framework\Service\Data\AttributeValue; +use Magento\Framework\Api\AttributeValue; class AddressConverterTest extends \PHPUnit_Framework_TestCase { @@ -127,7 +127,7 @@ class AddressConverterTest extends \PHPUnit_Framework_TestCase ); $addressData = $this->_sampleAddressDataObject(); - $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Api\AttributeValueBuilder'); /** @var \Magento\Customer\Service\V1\Data\AddressBuilder $addressDataBuilder */ $addressDataBuilder = $this->_objectManager->getObject( 'Magento\Customer\Service\V1\Data\AddressBuilder', @@ -150,7 +150,7 @@ class AddressConverterTest extends \PHPUnit_Framework_TestCase { $regionBuilder = $this->_objectManager->getObject('\Magento\Customer\Service\V1\Data\RegionBuilder') ->setRegion('Texas')->setRegionId(1)->setRegionCode('TX'); - $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Api\AttributeValueBuilder'); /** @var \Magento\Customer\Service\V1\Data\AddressBuilder $addressData */ $addressData = $this->_objectManager->getObject( 'Magento\Customer\Service\V1\Data\AddressBuilder', diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php index 3c4a83db7d91b116daf72b6044ac6a9999202a67..5c075fdff02be7929caf0bc6a658d8f9884dee94 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php @@ -26,8 +26,8 @@ namespace Magento\Customer\Service\V1\Data; use Magento\Customer\Service\V1\Data\Address; use Magento\Customer\Service\V1\Data\AddressBuilder; use Magento\Customer\Service\V1\Data\RegionBuilder; -use Magento\Framework\Service\Data\AttributeValue; -use Magento\Framework\Service\Data\AttributeValueBuilder; +use Magento\Framework\Api\AttributeValue; +use Magento\Framework\Api\AttributeValueBuilder; class AddressTest extends \PHPUnit_Framework_TestCase { @@ -94,7 +94,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Service\V1\CustomerMetadataService */ private $_customerMetadataService; - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder */ private $_valueBuilder; /** @@ -125,7 +125,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase ) ); $this->_valueBuilder = $this->objectManagerHelper - ->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + ->getObject('Magento\Framework\Api\AttributeValueBuilder'); $this->_addressBuilder = $this->objectManagerHelper->getObject( 'Magento\Customer\Service\V1\Data\AddressBuilder', [ diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php index 559f6ab808f34b1d852114e233972dcac18ed336..e987df4569d73692f634b68999fcd350f708fb95 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php @@ -23,10 +23,7 @@ */ namespace Magento\Customer\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValue; -use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder; -use Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValue; class CustomerBuilderTest extends \PHPUnit_Framework_TestCase { @@ -42,7 +39,7 @@ class CustomerBuilderTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Service\V1\AddressMetadataService */ private $_addressMetadataService; - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder */ private $_valueBuilder; protected function setUp() @@ -84,7 +81,7 @@ class CustomerBuilderTest extends \PHPUnit_Framework_TestCase ) ); $this->_valueBuilder = $this->_objectManager->getObject( - 'Magento\Framework\Service\Data\AttributeValueBuilder' + 'Magento\Framework\Api\AttributeValueBuilder' ); $this->_customerBuilder = $this->_objectManager->getObject( 'Magento\Customer\Service\V1\Data\CustomerBuilder', @@ -258,13 +255,10 @@ class CustomerBuilderTest extends \PHPUnit_Framework_TestCase public function testSetCustomAttribute() { $this->_customerBuilder->populateWithArray(array()); - $address = $this->_customerBuilder->setCustomAttribute( - 'warehouse_zip', - '78777' - )->setCustomAttribute( - 'warehouse_alternate', - '90051' - )->create(); + $address = $this->_customerBuilder + ->setCustomAttribute('warehouse_zip', '78777') + ->setCustomAttribute('warehouse_alternate', '90051') + ->create(); $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')->getValue()); $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')->getValue()); @@ -477,7 +471,7 @@ class CustomerBuilderTest extends \PHPUnit_Framework_TestCase $this->assertEquals( $expectedCustomerData, - \Magento\Framework\Service\ExtensibleDataObjectConverter::toFlatArray($customer) + \Magento\Framework\Api\ExtensibleDataObjectConverter::toFlatArray($customer) ); } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php index 790908a1cfbe5852c41463aa4a731cbb1d6da616..91bab28761ab485ebea3ad607a77452949c98365 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Service\V1\Data; -use Magento\Framework\Service\Data\AttributeValue; +use Magento\Framework\Api\AttributeValue; /** * Customer @@ -95,7 +95,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase new \Magento\Framework\Object(['attribute_code' => 'locale']) ]) ); - $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Api\AttributeValueBuilder'); $this->_customerBuilder = $this->_objectManager->getObject( 'Magento\Customer\Service\V1\Data\CustomerBuilder', [ diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/Eav/OptionTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/Eav/OptionTest.php deleted file mode 100644 index 44dd81e8af8fbef95fe9c734fc20a932c9692e60..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/Eav/OptionTest.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Customer\Service\V1\Data\Eav; - -use Magento\Customer\Service\V1\Data\Eav\Option; -use Magento\Customer\Service\V1\Data\Eav\OptionBuilder; - -class OptionTest extends \PHPUnit_Framework_TestCase -{ - const LABEL = 'LABEL'; - - const VALUE = 'VALUE'; - - public function testConstructorAndGetters() - { - $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $optionBuilder = $helper->getObject('\Magento\Customer\Service\V1\Data\Eav\OptionBuilder') - ->setLabel(self::LABEL)->setValue(self::VALUE); - $option = new Option($optionBuilder); - $this->assertSame(self::LABEL, $option->getLabel()); - $this->assertSame(self::VALUE, $option->getValue()); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/BuilderTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/BuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/BuilderTest.php index 61c9b5cf360f095df48961f13510e416a8260c1d..2d4ccee5d96e498bf97af74c8a64ce805065310a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/BuilderTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\Io; use Magento\TestFramework\Helper\ObjectManager; @@ -31,9 +31,9 @@ use Magento\TestFramework\Helper\ObjectManager; */ class BuilderTest extends \PHPUnit_Framework_TestCase { - const SOURCE_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\Sample'; - const RESULT_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\SampleBuilder'; - const GENERATOR_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\Builder'; + const SOURCE_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\Sample'; + const RESULT_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\SampleBuilder'; + const GENERATOR_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\Builder'; const OUTPUT_FILE_NAME = 'SampleBuilder.php'; /** * @var Io | \PHPUnit_Framework_MockObject_MockObject @@ -46,9 +46,9 @@ class BuilderTest extends \PHPUnit_Framework_TestCase protected $generator; /** - * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\FileResolver | \PHPUnit_Framework_MockObject_MockObject */ - protected $autoloaderMock; + protected $fileResolverMock; /** * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject @@ -65,8 +65,8 @@ class BuilderTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolverMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', [], [], '', @@ -88,7 +88,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase 'resultClassName' => self::RESULT_CLASS_NAME, 'ioObject' => $this->ioObjectMock, 'classGenerator' => $this->classGenerator, - 'autoLoader' => $this->autoloaderMock + 'fileResolver' => $this->fileResolverMock ] ); } @@ -103,11 +103,11 @@ class BuilderTest extends \PHPUnit_Framework_TestCase $resultFileName = self::OUTPUT_FILE_NAME; //Mocking _validateData call - $this->autoloaderMock->expects($this->at(0)) + $this->fileResolverMock->expects($this->at(0)) ->method('getFile') ->with(self::SOURCE_CLASS_NAME) ->will($this->returnValue($sourceFileName)); - $this->autoloaderMock->expects($this->at(1)) + $this->fileResolverMock->expects($this->at(1)) ->method('getFile') ->with(self::RESULT_CLASS_NAME) ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/DataBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/DataBuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php index 3ee9d291f3c40c17f17e7c7b9c9b05e51740d710..eeb35b66f7af821cfecff0ac38d3afa53b353fa6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/DataBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/DataBuilderTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\Io; use Magento\TestFramework\Helper\ObjectManager; @@ -36,9 +36,9 @@ class DataBuilderTest extends \PHPUnit_Framework_TestCase * The test is based on assumption that the classes will be injecting "DataBuilder" as dependency which will * indicate the compiler to identify and code generate based on ExtensibleSample implementations' interface */ - const SOURCE_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\ExtensibleSample'; - const RESULT_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\ExtensibleSampleDataBuilder'; - const GENERATOR_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\DataBuilder'; + const SOURCE_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\ExtensibleSample'; + const RESULT_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\ExtensibleSampleDataBuilder'; + const GENERATOR_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\DataBuilder'; const OUTPUT_FILE_NAME = 'ExtensibleSampleDataBuilder.php'; /** * @var Io | \PHPUnit_Framework_MockObject_MockObject @@ -51,15 +51,18 @@ class DataBuilderTest extends \PHPUnit_Framework_TestCase protected $generator; /** - * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\FileResolver | \PHPUnit_Framework_MockObject_MockObject */ - protected $autoloaderMock; + protected $fileResolverMock; /** * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject */ protected $classGenerator; + /** @var \Magento\Framework\App\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ + protected $objectManagerMock; + protected function setUp() { require_once __DIR__ . '/_files/ExtensibleSampleInterface.php'; @@ -71,8 +74,8 @@ class DataBuilderTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolverMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', [], [], '', @@ -88,6 +91,8 @@ class DataBuilderTest extends \PHPUnit_Framework_TestCase false ); + $this->objectManagerMock = $this->getMock('Magento\Framework\App\ObjectManager', [], [], '', false); + \Magento\Framework\App\ObjectManager::setInstance($this->objectManagerMock); $this->generator = $objectManager->getObject( self::GENERATOR_CLASS_NAME, @@ -96,7 +101,7 @@ class DataBuilderTest extends \PHPUnit_Framework_TestCase 'resultClassName' => self::RESULT_CLASS_NAME, 'ioObject' => $this->ioObjectMock, 'classGenerator' => $this->classGenerator, - 'autoLoader' => $this->autoloaderMock + 'fileResolver' => $this->fileResolverMock ] ); } @@ -106,17 +111,16 @@ class DataBuilderTest extends \PHPUnit_Framework_TestCase */ public function testGenerate() { - //$this->markTestIncomplete('Incomplete feature'); $generatedCode = file_get_contents(__DIR__ . '/_files/ExtensibleSampleDataBuilder.txt'); $sourceFileName = 'ExtensibleSample.php'; $resultFileName = self::OUTPUT_FILE_NAME; //Mocking _validateData call - $this->autoloaderMock->expects($this->at(0)) + $this->fileResolverMock->expects($this->at(0)) ->method('getFile') - ->with(self::SOURCE_CLASS_NAME) + ->with(self::SOURCE_CLASS_NAME . "Interface") ->will($this->returnValue($sourceFileName)); - $this->autoloaderMock->expects($this->at(1)) + $this->fileResolverMock->expects($this->at(1)) ->method('getFile') ->with(self::RESULT_CLASS_NAME) ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateBuilderTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateBuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateBuilderTest.php index 59033b4611569a9980195497978a442cf30b8801..c2f7d9ccea9b46ba981da7cd6b2db65258262718 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateBuilderTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; /** * Class BuilderTest @@ -53,13 +53,14 @@ class GenerateBuilderTest extends \PHPUnit_Framework_TestCase public function testGenerate() { require_once __DIR__ . '/_files/Sample.php'; + /** @var \Magento\Framework\Api\Code\Generator\Builder $model */ $model = $this->getMock( - 'Magento\Framework\Service\Code\Generator\Builder', + '\Magento\Framework\Api\Code\Generator\Builder', [ '_validateData' ], [ - '\Magento\Framework\Service\Code\Generator\Sample', + '\Magento\Framework\Api\Code\Generator\Sample', null, $this->ioObjectMock, null, @@ -69,7 +70,7 @@ class GenerateBuilderTest extends \PHPUnit_Framework_TestCase $sampleBuilderCode = file_get_contents(__DIR__ . '/_files/SampleBuilder.txt'); $this->ioObjectMock->expects($this->once()) ->method('getResultFileName') - ->with('\Magento\Framework\Service\Code\Generator\SampleBuilder') + ->with('\Magento\Framework\Api\Code\Generator\SampleBuilder') ->will($this->returnValue('SampleBuilder.php')); $this->ioObjectMock->expects($this->once()) ->method('writeResultFile') diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateMapperTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateMapperTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateMapperTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateMapperTest.php index 0effd4a0c81a52fa389e000a6e7d2b659c532dcf..aaf56f6d3ef69cf40cf2ab97a3d9b2daa802af65 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateMapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateMapperTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; /** * Class MapperTest @@ -54,12 +54,12 @@ class GenerateMapperTest extends \PHPUnit_Framework_TestCase { require_once __DIR__ . '/_files/Sample.php'; $model = $this->getMock( - 'Magento\Framework\Service\Code\Generator\Mapper', + 'Magento\Framework\Api\Code\Generator\Mapper', [ '_validateData' ], [ - '\Magento\Framework\Service\Code\Generator\Sample', + '\Magento\Framework\Api\Code\Generator\Sample', null, $this->ioObjectMock, null, @@ -69,7 +69,7 @@ class GenerateMapperTest extends \PHPUnit_Framework_TestCase $sampleMapperCode = file_get_contents(__DIR__ . '/_files/SampleMapper.txt'); $this->ioObjectMock->expects($this->once()) ->method('getResultFileName') - ->with('\Magento\Framework\Service\Code\Generator\SampleMapper') + ->with('\Magento\Framework\Api\Code\Generator\SampleMapper') ->will($this->returnValue('SampleMapper.php')); $this->ioObjectMock->expects($this->once()) ->method('writeResultFile') diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateSearchResultsBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateSearchResultsBuilderTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateSearchResultsBuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateSearchResultsBuilderTest.php index 4af404ba580d98bc8dfa7ce55dadb7bc2e872d4a..0a991beb96c260506c5c9267caf5672916723818 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateSearchResultsBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateSearchResultsBuilderTest.php @@ -21,9 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; -use Magento\Framework\Service\Code\Generator\SearchResultsBuilder; +use Magento\Framework\Api\Code\Generator\SearchResultsBuilder; /** * Class SearchResultBuilderTest @@ -56,12 +56,12 @@ class GenerateSearchResultsBuilderTest extends \PHPUnit_Framework_TestCase { require_once __DIR__ . '/_files/Sample.php'; $model = $this->getMock( - 'Magento\Framework\Service\Code\Generator\SearchResultsBuilder', + 'Magento\Framework\Api\Code\Generator\SearchResultsBuilder', [ '_validateData' ], [ - '\Magento\Framework\Service\Code\Generator\Sample', + '\Magento\Framework\Api\Code\Generator\Sample', null, $this->ioObjectMock, null, @@ -71,7 +71,7 @@ class GenerateSearchResultsBuilderTest extends \PHPUnit_Framework_TestCase $sampleSearchResultBuilderCode = file_get_contents(__DIR__ . '/_files/SampleSearchResultsBuilder.txt'); $this->ioObjectMock->expects($this->once()) ->method('getResultFileName') - ->with('\Magento\Framework\Service\Code\Generator\SampleSearchResultsBuilder') + ->with('\Magento\Framework\Api\Code\Generator\SampleSearchResultsBuilder') ->will($this->returnValue('SampleSearchResultsBuilder.php')); $this->ioObjectMock->expects($this->once()) ->method('writeResultFile') diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateSearchResultsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateSearchResultsTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateSearchResultsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateSearchResultsTest.php index a2d0c66423e6867354c323de3d2f86e9bfe4ba17..5f37d35f5252efc90c78ec26260cf909e30b1871 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/GenerateSearchResultsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/GenerateSearchResultsTest.php @@ -21,9 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; -use Magento\Framework\Service\Code\Generator\SearchResults; +use Magento\Framework\Api\Code\Generator\SearchResults; /** * Class SearchResultTest @@ -56,12 +56,12 @@ class GenerateSearchResultsTest extends \PHPUnit_Framework_TestCase { require_once __DIR__ . '/_files/Sample.php'; $model = $this->getMock( - 'Magento\Framework\Service\Code\Generator\SearchResults', + 'Magento\Framework\Api\Code\Generator\SearchResults', [ '_validateData' ], [ - '\Magento\Framework\Service\Code\Generator\Sample', + '\Magento\Framework\Api\Code\Generator\Sample', null, $this->ioObjectMock, null, @@ -71,7 +71,7 @@ class GenerateSearchResultsTest extends \PHPUnit_Framework_TestCase $sampleSearchResultBuilderCode = file_get_contents(__DIR__ . '/_files/SampleSearchResults.txt'); $this->ioObjectMock->expects($this->once()) ->method('getResultFileName') - ->with('\Magento\Framework\Service\Code\Generator\SampleSearchResults') + ->with('\Magento\Framework\Api\Code\Generator\SampleSearchResults') ->will($this->returnValue('SampleSearchResults.php')); $this->ioObjectMock->expects($this->once()) ->method('writeResultFile') diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/MapperTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/MapperTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/MapperTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/MapperTest.php index 66207b268d7eb4771ac6e82277037449a4281eed..3732db6efa123afb6ba4eb93c06b525dc0b942dc 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/MapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/MapperTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\Io; use Magento\TestFramework\Helper\ObjectManager; @@ -31,9 +31,9 @@ use Magento\TestFramework\Helper\ObjectManager; */ class MapperTest extends \PHPUnit_Framework_TestCase { - const SOURCE_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\Sample'; - const RESULT_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\SampleMapper'; - const GENERATOR_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\Mapper'; + const SOURCE_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\Sample'; + const RESULT_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\SampleMapper'; + const GENERATOR_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\Mapper'; const OUTPUT_FILE_NAME = 'SampleMapper.php'; /** * @var Io | \PHPUnit_Framework_MockObject_MockObject @@ -46,9 +46,9 @@ class MapperTest extends \PHPUnit_Framework_TestCase protected $generator; /** - * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\FileResolver | \PHPUnit_Framework_MockObject_MockObject */ - protected $autoloaderMock; + protected $fileResolvererMock; /** * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject @@ -64,8 +64,8 @@ class MapperTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolvererMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', [], [], '', @@ -87,7 +87,7 @@ class MapperTest extends \PHPUnit_Framework_TestCase 'resultClassName' => self::RESULT_CLASS_NAME, 'ioObject' => $this->ioObjectMock, 'classGenerator' => $this->classGenerator, - 'autoLoader' => $this->autoloaderMock + 'fileResolver' => $this->fileResolvererMock ] ); } @@ -102,11 +102,11 @@ class MapperTest extends \PHPUnit_Framework_TestCase $resultFileName = self::OUTPUT_FILE_NAME; //Mocking _validateData call - $this->autoloaderMock->expects($this->at(0)) + $this->fileResolvererMock->expects($this->at(0)) ->method('getFile') ->with(self::SOURCE_CLASS_NAME) ->will($this->returnValue($sourceFileName)); - $this->autoloaderMock->expects($this->at(1)) + $this->fileResolvererMock->expects($this->at(1)) ->method('getFile') ->with(self::RESULT_CLASS_NAME) ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/SearchResultsBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/SearchResultsBuilderTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/SearchResultsBuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/SearchResultsBuilderTest.php index eebadd7f6ab832effcbf30c9f6c79fc1e943ebd0..acdca27b25844e74586271a37c3d1fa2116cc252 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/SearchResultsBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/SearchResultsBuilderTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\Io; use Magento\TestFramework\Helper\ObjectManager; @@ -31,9 +31,9 @@ use Magento\TestFramework\Helper\ObjectManager; */ class SearchResultsBuilderTest extends \PHPUnit_Framework_TestCase { - const SOURCE_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\Sample'; - const RESULT_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\SampleSearchResultsBuilder'; - const GENERATOR_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\SearchResultsBuilder'; + const SOURCE_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\Sample'; + const RESULT_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\SampleSearchResultsBuilder'; + const GENERATOR_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\SearchResultsBuilder'; const OUTPUT_FILE_NAME = 'SampleSearchResultsBuilder.php'; /** @@ -47,9 +47,9 @@ class SearchResultsBuilderTest extends \PHPUnit_Framework_TestCase protected $generator; /** - * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\FileResolver | \PHPUnit_Framework_MockObject_MockObject */ - protected $autoloaderMock; + protected $fileResolverMock; /** * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject @@ -65,8 +65,8 @@ class SearchResultsBuilderTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolverMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', [], [], '', @@ -88,7 +88,7 @@ class SearchResultsBuilderTest extends \PHPUnit_Framework_TestCase 'resultClassName' => self::RESULT_CLASS_NAME, 'ioObject' => $this->ioObjectMock, 'classGenerator' => $this->classGenerator, - 'autoLoader' => $this->autoloaderMock + 'fileResolver' => $this->fileResolverMock ] ); } @@ -103,11 +103,11 @@ class SearchResultsBuilderTest extends \PHPUnit_Framework_TestCase $resultFileName = self::OUTPUT_FILE_NAME; //Mocking _validateData call - $this->autoloaderMock->expects($this->at(0)) + $this->fileResolverMock->expects($this->at(0)) ->method('getFile') ->with(self::SOURCE_CLASS_NAME) ->will($this->returnValue($sourceFileName)); - $this->autoloaderMock->expects($this->at(1)) + $this->fileResolverMock->expects($this->at(1)) ->method('getFile') ->with(self::RESULT_CLASS_NAME) ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/SearchResultsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/SearchResultsTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/SearchResultsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/SearchResultsTest.php index c27513612f668205e90edb4a05d8e0acc3c8aaa0..cdc9ccd86a01b9f68605154628b0d20c202c4818 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/SearchResultsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/SearchResultsTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\Io; use Magento\TestFramework\Helper\ObjectManager; @@ -31,9 +31,9 @@ use Magento\TestFramework\Helper\ObjectManager; */ class SearchResultsTest extends \PHPUnit_Framework_TestCase { - const SOURCE_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\Sample'; - const RESULT_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\SampleSearchResults'; - const GENERATOR_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\SearchResults'; + const SOURCE_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\Sample'; + const RESULT_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\SampleSearchResults'; + const GENERATOR_CLASS_NAME = 'Magento\Framework\Api\Code\Generator\SearchResults'; const OUTPUT_FILE_NAME = 'SampleSearchResults.php'; /** @@ -47,9 +47,9 @@ class SearchResultsTest extends \PHPUnit_Framework_TestCase protected $generator; /** - * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\FileResolver | \PHPUnit_Framework_MockObject_MockObject */ - protected $autoloaderMock; + protected $fileResolverMock; /** * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject @@ -65,8 +65,8 @@ class SearchResultsTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolverMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', [], [], '', @@ -88,7 +88,7 @@ class SearchResultsTest extends \PHPUnit_Framework_TestCase 'resultClassName' => self::RESULT_CLASS_NAME, 'ioObject' => $this->ioObjectMock, 'classGenerator' => $this->classGenerator, - 'autoLoader' => $this->autoloaderMock + 'fileResolver' => $this->fileResolverMock ] ); } @@ -103,11 +103,11 @@ class SearchResultsTest extends \PHPUnit_Framework_TestCase $resultFileName = self::OUTPUT_FILE_NAME; //Mocking _validateData call - $this->autoloaderMock->expects($this->at(0)) + $this->fileResolverMock->expects($this->at(0)) ->method('getFile') ->with(self::SOURCE_CLASS_NAME) ->will($this->returnValue($sourceFileName)); - $this->autoloaderMock->expects($this->at(1)) + $this->fileResolverMock->expects($this->at(1)) ->method('getFile') ->with(self::RESULT_CLASS_NAME) ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSample.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSample.php index ec8d8f28dd30751b85e8e5b329693b233a531e5d..518308504d3818a031feab6dfcc0fbfae6076f1d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSample.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Model\AbstractExtensibleModel; @@ -30,7 +30,7 @@ use Magento\Framework\Model\AbstractExtensibleModel; * Class ExtensibleSample */ class ExtensibleSample extends AbstractExtensibleModel implements - \Magento\Framework\Service\Code\Generator\ExtensibleSampleInterface + \Magento\Framework\Api\Code\Generator\ExtensibleSampleInterface { /** * {@inheritdoc} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSampleDataBuilder.txt b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSampleDataBuilder.txt new file mode 100644 index 0000000000000000000000000000000000000000..5fd08f8ccfcb3884dddb7b4ed27c1bef7b5140cc --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSampleDataBuilder.txt @@ -0,0 +1,60 @@ +namespace Magento\Framework\Api\Code\Generator; + +/** + * DataBuilder class for + * \Magento\Framework\Api\Code\Generator\ExtensibleSampleInterface + */ +class ExtensibleSampleDataBuilder extends \Magento\Framework\Api\CompositeExtensibleDataBuilder +{ + /** + * @param array $items + * @return $this + */ + public function setItems($items) + { + $this->set('items', $items); + return $this; + } + + /** + * @param string $name + * @return $this + */ + public function setName($name) + { + $this->set('name', $name); + return $this; + } + + /** + * @param int $count + * @return $this + */ + public function setCount($count) + { + $this->set('count', $count); + return $this; + } + + /** + * @param int $createdAt + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->set('created_at', $createdAt); + return $this; + } + + /** + * Initialize the builder + * + * @param \Magento\Framework\ObjectManager $objectManager + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\ObjectManager\Config $objectManagerConfig + */ + public function __construct(\Magento\Framework\ObjectManager $objectManager, \Magento\Framework\Api\MetadataServiceInterface $metadataService, \Magento\Framework\ObjectManager\Config $objectManagerConfig) + { + parent::__construct($objectManager, $metadataService, $objectManagerConfig, 'Magento\Framework\Api\Code\Generator\ExtensibleSampleInterface'); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleInterface.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSampleInterface.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleInterface.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSampleInterface.php index d57f001c1732a5861d6ee23b9041972691e51809..eabd788b9c49534650030e91b42a50bca5726494 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleInterface.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/ExtensibleSampleInterface.php @@ -22,9 +22,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\ExtensibleDataInterface; /** * Interface for ExtensibleSample diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/Sample.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/Sample.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/Sample.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/Sample.php index 5c68f84fb3117a3a8180a01a47f7a2f6215a86f1..3eaf564f748000c2c9caa29838d174ae09fcad91 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/Sample.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/Sample.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; /** * Class Sample for Proxy and Factory generation diff --git a/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleBuilder.txt b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleBuilder.txt new file mode 100644 index 0000000000000000000000000000000000000000..cd38526a0242951d97bcc9f403e121e6e3f37a24 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleBuilder.txt @@ -0,0 +1,15 @@ +namespace \Magento\Framework\Api\Code\Generator; + +/** + * Builder class for \Magento\Framework\Api\Code\Generator\Sample + */ +class SampleBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder +{ + /** + * {@inheritdoc} + */ + public function setMessages($messages) + { + return $this->_set(\Magento\Framework\Api\Code\Generator\Sample::MESSAGES, $messages); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleMapper.txt b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleMapper.txt similarity index 56% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleMapper.txt rename to dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleMapper.txt index 6c0f698e38c9801ad75f0c16c401fc1de0d1764f..ae1c42a3ae31a5b8b175860eb324f6af1ce4c715 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleMapper.txt +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleMapper.txt @@ -1,19 +1,19 @@ -namespace \Magento\Framework\Service\Code\Generator; +namespace \Magento\Framework\Api\Code\Generator; /** - * Mapper class for \Magento\Framework\Service\Code\Generator\Sample + * Mapper class for \Magento\Framework\Api\Code\Generator\Sample */ class SampleMapper { /** * sampleBuilder * - * @var \Magento\Framework\Service\Code\Generator\SampleBuilder + * @var \Magento\Framework\Api\Code\Generator\SampleBuilder */ protected $sampleBuilder = null; /** - * Magento\Framework\Service\Code\Generator\Sample[] + * Magento\Framework\Api\Code\Generator\Sample[] * * @var array */ @@ -22,9 +22,9 @@ class SampleMapper /** * Mapper constructor * - * @param \Magento\Framework\Service\Code\Generator\Sample $sampleBuilder + * @param \Magento\Framework\Api\Code\Generator\Sample $sampleBuilder */ - public function __construct(\Magento\Framework\Service\Code\Generator\SampleBuilder $sampleBuilder) + public function __construct(\Magento\Framework\Api\Code\Generator\SampleBuilder $sampleBuilder) { $this->sampleBuilder = $sampleBuilder; } @@ -33,7 +33,7 @@ class SampleMapper * Extract data object from model * * @param \Magento\Framework\Model\AbstractModel $object - * @return \Magento\Framework\Service\Code\Generator\Sample + * @return \Magento\Framework\Api\Code\Generator\Sample */ public function extractDto(\Magento\Framework\Model\AbstractModel $object) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleSearchResults.txt b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleSearchResults.txt new file mode 100644 index 0000000000000000000000000000000000000000..3cb581c9bb1bff9ab87c04d24226a886b1ff9eca --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleSearchResults.txt @@ -0,0 +1,14 @@ +namespace \Magento\Framework\Api\Code\Generator; + +class SampleSearchResults extends \Magento\Framework\Api\SearchResults +{ + /** + * Returns array of items + * + * @return \Magento\Framework\Api\Code\Generator\Sample[] + */ + public function getItems() + { + return parent::getItems(); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleSearchResultsBuilder.txt b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleSearchResultsBuilder.txt new file mode 100644 index 0000000000000000000000000000000000000000..4bacbf1bd8f9710697e7863aede4093c4ea56a27 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Code/Generator/_files/SampleSearchResultsBuilder.txt @@ -0,0 +1,17 @@ +namespace \Magento\Framework\Api\Code\Generator; + +/** + * SearchResultsBuilder class for \Magento\Framework\Api\Code\Generator\Sample + */ +class SampleSearchResultsBuilder extends \Magento\Framework\Api\AbstractSearchResultsBuilder +{ + /** + * SearchResultsBuilder constructor + * + * @param + */ + public function __construct(\Magento\Framework\Api\ObjectFactory $objectFactory, \Magento\Framework\Api\AttributeValueBuilder $valueBuilder, \Magento\Framework\Api\Config\MetadataConfig $metadataService, \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, \Magento\Framework\Api\Code\Generator\SampleBuilder $itemObjectBuilder) + { + parent::__construct($objectFactory, $valueBuilder, $metadataService, $searchCriteriaBuilder, $itemObjectBuilder); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/ConverterTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Config/ConverterTest.php index 2fcf2ebc156b750720bc9149a1e3f5ef0f3016e1..099ed2a7d71a679367e55aeb426938d12fd50198 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/ConverterTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; class ConverterTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\Service\Config\Converter + * @var \Magento\Framework\Api\Config\Converter */ protected $_converter; @@ -35,7 +35,7 @@ class ConverterTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->_converter = new \Magento\Framework\Service\Config\Converter(); + $this->_converter = new \Magento\Framework\Api\Config\Converter(); } /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/ReaderTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Config/ReaderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Config/ReaderTest.php index b76599297c9a30cdfd5bea9c281e69a48c5fcaba..b30c03fa9883d2fb8788457baeef09e4b90bdbe7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/ReaderTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; class ReaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\Service\Config\Reader + * @var \Magento\Framework\Api\Config\Reader */ protected $_reader; @@ -38,16 +38,16 @@ class ReaderTest extends \PHPUnit_Framework_TestCase $fileResolver = $this->getMockBuilder('Magento\Framework\App\Config\FileResolver') ->disableOriginalConstructor() ->getMock(); - $converter = $this->getMockBuilder('Magento\Framework\Service\Config\Converter') + $converter = $this->getMockBuilder('Magento\Framework\Api\Config\Converter') ->disableOriginalConstructor() ->getMock(); - $schema = $this->getMockBuilder('Magento\Framework\Service\Config\SchemaLocator') + $schema = $this->getMockBuilder('Magento\Framework\Api\Config\SchemaLocator') ->disableOriginalConstructor() ->getMock(); $validator = $this->getMockBuilder('\Magento\Framework\Config\ValidationStateInterface') ->disableOriginalConstructor() ->getMock(); - $this->_reader = new \Magento\Framework\Service\Config\Reader($fileResolver, $converter, $schema, $validator); + $this->_reader = new \Magento\Framework\Api\Config\Reader($fileResolver, $converter, $schema, $validator); } /** @@ -55,6 +55,6 @@ class ReaderTest extends \PHPUnit_Framework_TestCase */ public function testInstanceof() { - $this->assertInstanceOf('Magento\Framework\Service\Config\Reader', $this->_reader); + $this->assertInstanceOf('Magento\Framework\Api\Config\Reader', $this->_reader); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/SchemaLocatorTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Config/SchemaLocatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Config/SchemaLocatorTest.php index 8547e4e0789da8cc01b8b869edfb40826a7feb4e..007917ef8e4cee3a9c9790a438135843010f466f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/SchemaLocatorTest.php @@ -21,26 +21,26 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; /** - * Test for \Magento\Framework\Service\Config\SchemaLocator + * Test for \Magento\Framework\Api\Config\SchemaLocator */ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Framework\Service\Config\SchemaLocator + * @var \Magento\Framework\Api\Config\SchemaLocator */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Framework\Service\Config\SchemaLocator(); + $this->_model = new \Magento\Framework\Api\Config\SchemaLocator(); } public function testGetSchema() { - $expected = str_replace('\\', '/', BP . '/lib/internal/Magento/Framework/Service/etc/data_object.xsd'); + $expected = str_replace('\\', '/', BP . '/lib/internal/Magento/Framework/Api/etc/data_object.xsd'); $actual = str_replace('\\', '/', $this->_model->getSchema()); $this->assertEquals($expected, $actual); } @@ -48,7 +48,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase public function testGetPerFileSchema() { $actual = str_replace('\\', '/', $this->_model->getPerFileSchema()); - $expected = str_replace('\\', '/', BP . '/lib/internal/Magento/Framework/Service/etc/data_object.xsd'); + $expected = str_replace('\\', '/', BP . '/lib/internal/Magento/Framework/Api/etc/data_object.xsd'); $this->assertEquals($expected, $actual); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/_files/data_object_valid.xml b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/_files/data_object_valid.xml similarity index 96% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Config/_files/data_object_valid.xml rename to dev/tests/unit/testsuite/Magento/Framework/Api/Config/_files/data_object_valid.xml index f59381a1f0a680457c67a49bdeb6559abbe1f715..0fda4b3c84ef223022c736d057a68d3350acf88d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Config/_files/data_object_valid.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Config/_files/data_object_valid.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> -<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Service/etc/data_object.xsd"> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/Api/etc/data_object.xsd"> <custom_attributes for="Magento\Tax\Service\V1\Data\TaxRate"> </custom_attributes> <custom_attributes for="Magento\Catalog\Service\Data\V1\Product"> diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Data/AttributeValueTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/Data/AttributeValueTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Framework/Service/Data/AttributeValueTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/Data/AttributeValueTest.php index 4c04e2db1326b1318bcfcb47721881e9f33a84fa..c748e9820c3461a542bcdca7edd6a0a28c647c1d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Data/AttributeValueTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/Data/AttributeValueTest.php @@ -21,9 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api\Data; -use Magento\Framework\Validator\Test\True; +use Magento\Framework\Api\AttributeValue; class AttributeValueTest extends \PHPUnit_Framework_TestCase { @@ -40,7 +40,7 @@ class AttributeValueTest extends \PHPUnit_Framework_TestCase public function testConstructorAndGettersWithString() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $attributeBuilder = $helper->getObject('\Magento\Framework\Service\Data\AttributeValueBuilder') + $attributeBuilder = $helper->getObject('\Magento\Framework\Api\AttributeValueBuilder') ->setAttributeCode(self::ATTRIBUTE_CODE) ->setValue(self::STRING_VALUE); $attribute = new AttributeValue($attributeBuilder); @@ -52,7 +52,7 @@ class AttributeValueTest extends \PHPUnit_Framework_TestCase public function testConstructorAndGettersWithInteger() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $attributeBuilder = $helper->getObject('\Magento\Framework\Service\Data\AttributeValueBuilder') + $attributeBuilder = $helper->getObject('\Magento\Framework\Api\AttributeValueBuilder') ->setAttributeCode(self::ATTRIBUTE_CODE) ->setValue(self::INTEGER_VALUE); $attribute = new AttributeValue($attributeBuilder); @@ -64,7 +64,7 @@ class AttributeValueTest extends \PHPUnit_Framework_TestCase public function testConstructorAndGettersWithFloat() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $attributeBuilder = $helper->getObject('\Magento\Framework\Service\Data\AttributeValueBuilder') + $attributeBuilder = $helper->getObject('\Magento\Framework\Api\AttributeValueBuilder') ->setAttributeCode(self::ATTRIBUTE_CODE) ->setValue(self::FLOAT_VALUE); $attribute = new AttributeValue($attributeBuilder); @@ -76,7 +76,7 @@ class AttributeValueTest extends \PHPUnit_Framework_TestCase public function testConstructorAndGettersWithBoolean() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $attributeBuilder = $helper->getObject('\Magento\Framework\Service\Data\AttributeValueBuilder') + $attributeBuilder = $helper->getObject('\Magento\Framework\Api\AttributeValueBuilder') ->setAttributeCode(self::ATTRIBUTE_CODE) ->setValue(self::BOOLEAN_VALUE); $attribute = new AttributeValue($attributeBuilder); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/SimpleDataObjectConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Api/SimpleDataObjectConverterTest.php similarity index 99% rename from dev/tests/unit/testsuite/Magento/Framework/Service/SimpleDataObjectConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Api/SimpleDataObjectConverterTest.php index 6d61092068cc985f9c98bd317080d882047253a4..5bb5caaff24ebf2c52d4ab189542610ac6e98ffe 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/SimpleDataObjectConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Api/SimpleDataObjectConverterTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service; +namespace Magento\Framework\Api; use Magento\Customer\Service\V1\Data\Customer; @@ -69,7 +69,7 @@ class SimpleDataObjectConverterTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->dataObjectConverter = $objectManager->getObject('Magento\Framework\Service\SimpleDataObjectConverter'); + $this->dataObjectConverter = $objectManager->getObject('Magento\Framework\Api\SimpleDataObjectConverter'); parent::setUp(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php index 72c443b10dcc531b56155da81350a868bca225b0..3d4c681120a2c01c17e934ea62585e19fc4f2e06 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php @@ -34,10 +34,7 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase public function testDirectoriesCustomization() { - $config = [ - DirectoryList::APP => [DirectoryList::PATH => 'foo', DirectoryList::URL_PATH => 'bar'], - 'unknown' => [DirectoryList::PATH => '/baz'], - ]; + $config = [DirectoryList::APP => [DirectoryList::PATH => 'foo', DirectoryList::URL_PATH => 'bar']]; $object = new DirectoryList('/root/dir', $config); $this->assertFileExists($object->getPath(DirectoryList::SYS_TMP)); $this->assertEquals('/root/dir/foo', $object->getPath(DirectoryList::APP)); @@ -48,4 +45,13 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase ); $object->getPath('unknown'); } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Unknown type: test + */ + public function testUnknownDirectory() + { + new DirectoryList('/root/dir', ['test' => [DirectoryList::PATH => '/baz']]); + } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php index 0af640c14497552987eae922521912a2089b5ce5..11c5c2a8c2eb6eacaf13261962206b46f48e88b3 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php @@ -268,6 +268,12 @@ class HttpTest extends \PHPUnit_Framework_TestCase */ public function testWakeUpWithException() { + /* ensure that the test preconditions are met */ + $objectManagerClass = new \ReflectionClass('Magento\Framework\App\ObjectManager'); + $instanceProperty = $objectManagerClass->getProperty('_instance'); + $instanceProperty->setAccessible(true); + $instanceProperty->setValue(null); + $this->model->__wakeup(); $this->assertNull($this->cookieMetadataFactoryMock); $this->assertNull($this->cookieManagerMock); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php index e54fa456a43bd872b0061418de074365d80e18da..ca5b2eaaa3cb66edec0fe3d7d469c8a8d3d06075 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php @@ -43,14 +43,7 @@ class StateTest extends \PHPUnit_Framework_TestCase '', false ); - $this->model = new \Magento\Framework\App\State($this->scopeMock, '0'); - } - - public function testIsInstalled() - { - $this->assertFalse($this->model->isInstalled()); - $this->model->setInstallDate(strtotime('now')); - $this->assertTrue($this->model->isInstalled()); + $this->model = new \Magento\Framework\App\State($this->scopeMock); } public function testSetGetUpdateMode() diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php index 7799f8495089ee2494b26c3829df703cfde7f7bb..202f82b2bee4988a19dfba4ee769d4429f3d1e56 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php @@ -80,7 +80,11 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase '_classGenerator', $this->_model ); - $this->assertAttributeInstanceOf('Magento\Framework\Autoload\IncludePath', '_autoloader', $this->_model); + $this->assertAttributeInstanceOf( + 'Magento\Framework\Code\Generator\FileResolver', + 'fileResolver', + $this->_model + ); // with source class name $this->_model = $this->getMockForAbstractClass( @@ -99,16 +103,16 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase '', false ); - $autoloader = $this->getMock('Magento\Framework\Autoload\IncludePath', array(), array(), '', false); + $fileResolver = $this->getMock('Magento\Framework\Code\Generator\FileResolver', array(), array(), '', false); $this->_model = $this->getMockForAbstractClass( 'Magento\Framework\Code\Generator\EntityAbstract', - array(self::SOURCE_CLASS, self::RESULT_CLASS, $ioObject, $codeGenerator, $autoloader) + array(self::SOURCE_CLASS, self::RESULT_CLASS, $ioObject, $codeGenerator, $fileResolver) ); $this->assertAttributeEquals(self::RESULT_CLASS, '_resultClassName', $this->_model); $this->assertAttributeEquals($ioObject, '_ioObject', $this->_model); $this->assertAttributeEquals($codeGenerator, '_classGenerator', $this->_model); - $this->assertAttributeEquals($autoloader, '_autoloader', $this->_model); + $this->assertAttributeEquals($fileResolver, 'fileResolver', $this->_model); } /** @@ -270,7 +274,7 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase '', false ); - $autoloader = $this->getMock('Magento\Framework\Autoload\IncludePath', array('getFile'), array(), '', false); + $fileresolver = $this->getMock('Magento\Framework\Code\Generator\FileResolver', ['getFile'], [], '', false); $ioObject->expects( $this->any() @@ -296,7 +300,7 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase $this->returnValue(self::RESULT_DIRECTORY) ); - $autoloader->expects( + $fileresolver->expects( $this->at(0) )->method( 'getFile' @@ -306,7 +310,7 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase $this->returnValue($classExistsFirst) ); if ($classExistsFirst) { - $autoloader->expects( + $fileresolver->expects( $this->at(1) )->method( 'getFile' @@ -321,7 +325,7 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase if ($classExistsFirst) { $expectedInvocations = 2; } - $autoloader->expects($this->exactly($expectedInvocations))->method('getFile'); + $fileresolver->expects($this->exactly($expectedInvocations))->method('getFile'); $expectedInvocations = 1; if (!$classExistsFirst || $classExistsSecond) { @@ -349,7 +353,7 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase 'result_class' => self::RESULT_CLASS, 'io_object' => $ioObject, 'code_generator' => null, - 'autoloader' => $autoloader + 'autoloader' => $fileresolver ); } diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/FileResolverTest.php similarity index 59% rename from dev/tests/unit/testsuite/Magento/Install/Model/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Generator/FileResolverTest.php index 1840da8e8153a3530643935055a39f1e3dd3e09a..fcbf45ac0b9b5d3a88b91a1893921e59fc926da5 100644 --- a/dev/tests/unit/testsuite/Magento/Install/Model/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/FileResolverTest.php @@ -1,6 +1,8 @@ <?php /** - * \Magento\Install\Model\Config_Converter + * Unit test for \Magento\Framework\Code\Generator\FileResolver + * + * Only one method is unit testable, other methods require integration testing. * * Magento * @@ -23,28 +25,25 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Install\Model\Config; +namespace Magento\Framework\Code\Generator; + +use \Magento\TestFramework\Helper\ObjectManager; -class ConverterTest extends \PHPUnit_Framework_TestCase +class FileResolverTest extends \PHPUnit_Framework_TestCase { + /** - * @var \Magento\Install\Model\Config\Converter + * @var \Magento\Framework\Code\Generator\FileResolver */ - protected $_model; + protected $model; public function setUp() { - $this->_model = new \Magento\Install\Model\Config\Converter(); + $this->model = (new ObjectManager($this))->getObject('Magento\Framework\Code\Generator\FileResolver'); } - public function testConvert() + public function testGetFilePath() { - $dom = new \DOMDocument(); - $xmlFile = __DIR__ . '/_files/install_wizard.xml'; - $dom->loadXML(file_get_contents($xmlFile)); - - $convertedFile = __DIR__ . '/_files/install_wizard_config.php'; - $expectedResult = include $convertedFile; - $this->assertEquals($expectedResult, $this->_model->convert($dom), '', 0, 20); + $this->assertSame('Path/To/My/Class.php', $this->model->getFilePath('Path\To\My_Class')); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/IoTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/IoTest.php index 29f08596025c57d6b8f30edabb37d7d8904eee66..36c4dfee260c8d8f4ae75487c662aedf6e98fe21 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/IoTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/IoTest.php @@ -60,7 +60,7 @@ class IoTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\Framework\Autoload\IncludePath|\PHPUnit_Framework_MockObject_MockObject */ - protected $_autoLoaderMock; + protected $fileResolverMock; protected function setUp() { @@ -72,14 +72,14 @@ class IoTest extends \PHPUnit_Framework_TestCase array() ); - $this->_autoLoaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolverMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', array('getFilePath'), array(), '', false ); - $this->_autoLoaderMock->expects( + $this->fileResolverMock->expects( $this->any() )->method( 'getFilePath' @@ -91,7 +91,7 @@ class IoTest extends \PHPUnit_Framework_TestCase $this->_object = new \Magento\Framework\Code\Generator\Io( $this->_filesystemDriverMock, - $this->_autoLoaderMock, + $this->fileResolverMock, self::GENERATION_DIRECTORY ); } @@ -100,7 +100,7 @@ class IoTest extends \PHPUnit_Framework_TestCase { unset($this->_generationDirectory); unset($this->_filesystemMock); - unset($this->_autoLoaderMock); + unset($this->fileResolverMock); unset($this->_object); unset($this->_filesystemDriverMock); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php index e5ddefbf8e9ae2ca8d0ec5b391250c86427f69e0..3ee1604c0b4078ab6e4e2817fd68f156afe3ac55 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php @@ -51,7 +51,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Autoload\IncludePath */ - protected $autoloader; + protected $fileResolver; /** * @var \PHPUnit_Framework_MockObject_MockObject|Generator\Io @@ -65,8 +65,8 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->autoloader = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolver = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', array('getFile'), array(), '', @@ -80,13 +80,13 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase protected function tearDown() { unset($this->model); - unset($this->autoloader); + unset($this->fileResolver); } public function testGetGeneratedEntities() { $this->model = new \Magento\Framework\Code\Generator( - $this->autoloader, + $this->fileResolver, $this->ioObjectMock, array('factory', 'proxy', 'interceptor') ); @@ -99,13 +99,13 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase */ public function testGenerateClass($className, $entityType) { - $this->autoloader->expects($this->any()) + $this->fileResolver->expects($this->any()) ->method('getFile') ->with($className . $entityType) ->will($this->returnValue(false)); $this->model = new \Magento\Framework\Code\Generator( - $this->autoloader, + $this->fileResolver, $this->ioObjectMock, array( 'factory' => '\Magento\Framework\ObjectManager\Code\Generator\Factory', @@ -122,13 +122,13 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase */ public function testGenerateClassWithExistName($className, $entityType) { - $this->autoloader->expects($this->once()) + $this->fileResolver->expects($this->once()) ->method('getFile') ->with($className . $entityType) ->will($this->returnValue(true)); $this->model = new \Magento\Framework\Code\Generator( - $this->autoloader, + $this->fileResolver, $this->ioObjectMock, array( 'factory' => '\Magento\Framework\ObjectManager\Code\Generator\Factory', @@ -145,9 +145,9 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase public function testGenerateClassWithWrongName() { - $this->autoloader->expects($this->never())->method('getFile'); + $this->fileResolver->expects($this->never())->method('getFile'); - $this->model = new \Magento\Framework\Code\Generator($this->autoloader, $this->ioObjectMock); + $this->model = new \Magento\Framework\Code\Generator($this->fileResolver, $this->ioObjectMock); $this->assertEquals( \Magento\Framework\Code\Generator::GENERATION_ERROR, @@ -160,10 +160,10 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase */ public function testGenerateClassWithError() { - $this->autoloader->expects($this->once())->method('getFile')->will($this->returnValue(false)); + $this->fileResolver->expects($this->once())->method('getFile')->will($this->returnValue(false)); $this->model = new \Magento\Framework\Code\Generator( - $this->autoloader, + $this->fileResolver, $this->ioObjectMock, array( 'factory' => '\Magento\Framework\ObjectManager\Code\Generator\Factory', diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php index 97d992cbd50c32d389100430f811dca93dc36d08..6e9840926498eaefd60b57591ebf85b97704c095 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php @@ -30,18 +30,49 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase $this->assertArrayHasKey(DirectoryList::SYS_TMP, DirectoryList::getDefaultConfig()); } - public function testGetters() + /** + * @param array $config + * @param string $expectedError + * @dataProvider validateDataProvider + */ + public function testValidate($config, $expectedError) { - $customDirs = [ - 'foo' => [DirectoryList::PATH => '/foo/dir'], - DirectoryList::SYS_TMP => [DirectoryList::PATH => '/bar/dir', DirectoryList::URL_PATH => 'bar'] + $this->setExpectedException('\InvalidArgumentException', $expectedError); + DirectoryList::validate($config); + } + + /** + * @return array + */ + public function validateDataProvider() + { + return [ + ['', 'Unexpected value type.'], + [1, 'Unexpected value type.'], + [[DirectoryList::SYS_TMP => ''], 'Unexpected value type.'], + [[DirectoryList::SYS_TMP => 1], 'Unexpected value type.'], + [[DirectoryList::SYS_TMP => []], 'Missing required keys at: ' . DirectoryList::SYS_TMP], ]; + } + + public function testGetters() + { + $customDirs = [DirectoryList::SYS_TMP => [DirectoryList::PATH => '/bar/dir', DirectoryList::URL_PATH => 'bar']]; $object = new DirectoryList('/root/dir', $customDirs); $this->assertEquals('/bar/dir', $object->getPath(DirectoryList::SYS_TMP)); $this->assertEquals('bar', $object->getUrlPath(DirectoryList::SYS_TMP)); $this->assertEquals('/root/dir', $object->getRoot()); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Unknown type: foo + */ + public function testUnknownType() + { + new DirectoryList('/root/dir', ['foo' => [DirectoryList::PATH => '/foo/dir']]); + } + /** * @param string $method * @expectedException \Magento\Framework\Filesystem\FilesystemException diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php index 7ef1c4eb0e2c9f93b707e7172a98075c7c71ba7b..84ae043980f867bd78d575ec5223a16ca713b2a2 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php @@ -39,11 +39,11 @@ class InterceptorTest extends \PHPUnit_Framework_TestCase /** * @var \PHPUnit_Framework_MockObject */ - protected $autoloaderMock; + protected $fileResolverMock; protected function setUp() { - $this->ioObjectMock = $this->getMock('\Magento\Framework\Code\Generator\Io', array(), array(), '', false); + $this->ioObjectMock = $this->getMock('\Magento\Framework\Code\Generator\Io', [], [], '', false); $this->classGeneratorMock = $this->getMock( '\Magento\Framework\Code\Generator\CodeGenerator\CodeGeneratorInterface', array(), @@ -51,7 +51,7 @@ class InterceptorTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock('\Magento\Framework\Autoload\IncludePath', array(), array(), '', false); + $this->fileResolverMock = $this->getMock('Magento\Framework\Code\Generator\FileResolver', [], [], '', false); } public function testGetDefaultResultClassName() @@ -59,7 +59,7 @@ class InterceptorTest extends \PHPUnit_Framework_TestCase // resultClassName should be stdClass_Interceptor $model = $this->getMock('\Magento\Framework\Interception\Code\Generator\Interceptor', array('_validateData'), - array('Exception', null, $this->ioObjectMock, $this->classGeneratorMock, $this->autoloaderMock) + array('Exception', null, $this->ioObjectMock, $this->classGeneratorMock, $this->fileResolverMock) ); $this->classGeneratorMock->expects($this->once())->method('setName') diff --git a/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php index d7ee416e3ab12f5644af6497915baf6d6f882fd1..b0984d320f7b18347d35a12c1f918afc5a530501 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php @@ -172,13 +172,13 @@ class AbstractExtensibleModelTest extends \PHPUnit_Framework_TestCase /** * @param string[] $attributesAsArray * @param \Magento\Framework\Model\AbstractExtensibleModel $model - * @return \Magento\Framework\Api\Data\AttributeInterface[] + * @return \Magento\Framework\Api\AttributeInterface[] */ protected function addCustomAttributesToModel($attributesAsArray, $model) { $objectManager = new ObjectManagerHelper($this); - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder $attributeValueBuilder */ - $attributeValueBuilder = $objectManager->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + /** @var \Magento\Framework\Api\AttributeValueBuilder $attributeValueBuilder */ + $attributeValueBuilder = $objectManager->getObject('Magento\Framework\Api\AttributeValueBuilder'); $addedAttributes = []; foreach ($attributesAsArray as $attributeCode => $attributeValue) { $addedAttributes[$attributeCode] = $attributeValueBuilder diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php index ffd87dcf7176c04e4dd881c93cf7761659636a44..f0c633c03d3cb0bdb274db2f86a66805ebc9e11b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php @@ -259,7 +259,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'), $this->getMock('Magento\Framework\Module\ModuleListInterface'), $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false, false), - $this->getMock('Magento\Install\Model\Resource\Resource', array(), array(), '', false), + $this->getMock('Magento\Framework\Module\Resource', array(), array(), '', false), $this->getMock('Magento\Core\Model\Resource\Theme\CollectionFactory', array(), array(), '', false), $this->getMock('Magento\Core\Model\Theme\CollectionFactory', array(), array(), '', false), $this->getMock('Magento\Framework\Module\Setup\MigrationFactory', array(), array(), '', false), diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/UpdaterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/UpdaterTest.php index 4ba40bc456dc21e57b3436ae1d457c6bbf17d3f5..507e6789bcc566f6c8d4c7aeccc2954e66cc9336 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/UpdaterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/UpdaterTest.php @@ -30,11 +30,6 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase */ protected $_factoryMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_appStateMock; - /** * @var \PHPUnit_Framework_MockObject_MockObject */ @@ -69,7 +64,6 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase '', false ); - $this->_appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); $this->_moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface'); $this->_resourceResolver = $this->getMock('Magento\Framework\Module\ResourceResolverInterface'); $this->_resourceSetupMock = $this->getMock( @@ -94,46 +88,12 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase $this->_model = new \Magento\Framework\Module\Updater( $this->_factoryMock, - $this->_appStateMock, $this->_moduleListMock, $this->_resourceResolver, $this->moduleManager ); } - public function testUpdateScheme() - { - $this->moduleManager->expects($this->once()) - ->method('isDbSchemaUpToDate') - ->with('Test_Module', 'catalog_setup') - ->will($this->returnValue(false)); - $this->_factoryMock->expects($this->any()) - ->method('create') - ->with('catalog_setup', 'Test_Module') - ->will($this->returnValue($this->_resourceSetupMock)) - ; - $this->_appStateMock->expects($this->at(0))->method('setUpdateMode')->with(true); - $this->_appStateMock->expects($this->at(1))->method('setUpdateMode')->with(false); - $this->_resourceSetupMock->expects($this->once())->method('applyUpdates'); - $this->_resourceSetupMock->expects($this->once()) - ->method('getCallAfterApplyAllUpdates') - ->will($this->returnValue(true)); - $this->_resourceSetupMock->expects($this->once())->method('afterApplyAllUpdates'); - - $this->_model->updateScheme(); - } - - public function testUpdateSchemeNoUpdates() - { - $this->moduleManager->expects($this->once()) - ->method('isDbSchemaUpToDate') - ->with('Test_Module', 'catalog_setup') - ->will($this->returnValue(true)); - $this->_factoryMock->expects($this->never()) - ->method('create'); - $this->_model->updateScheme(); - } - /** * @covers \Magento\Framework\Module\Updater::updateData */ @@ -150,10 +110,6 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase public function testUpdateData() { - $this->moduleManager->expects($this->once()) - ->method('isDbSchemaUpToDate') - ->with('Test_Module', 'catalog_setup') - ->will($this->returnValue(true)); $this->moduleManager->expects($this->once()) ->method('isDbDataUpToDate') ->with('Test_Module', 'catalog_setup') @@ -163,33 +119,21 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase ->with('catalog_setup', 'Test_Module') ->will($this->returnValue($this->_resourceSetupMock)) ; - $this->_appStateMock->expects($this->at(0))->method('setUpdateMode')->with(true); - $this->_appStateMock->expects($this->at(1))->method('setUpdateMode')->with(false); $this->_resourceSetupMock->expects($this->once()) ->method('applyDataUpdates'); - $this->_model->updateScheme(); $this->_model->updateData(); } public function testUpdateDataNoUpdates() { - $this->moduleManager->expects($this->once()) - ->method('isDbSchemaUpToDate') - ->with('Test_Module', 'catalog_setup') - ->will($this->returnValue(true)); $this->moduleManager->expects($this->once()) ->method('isDbDataUpToDate') ->with('Test_Module', 'catalog_setup') ->will($this->returnValue(true)); $this->_factoryMock->expects($this->never()) ->method('create'); - $this->_appStateMock->expects($this->at(0))->method('setUpdateMode')->with(true); - $this->_appStateMock->expects($this->at(1))->method('setUpdateMode')->with(false); - $this->_factoryMock->expects($this->never()) - ->method('create'); - $this->_model->updateScheme(); $this->_model->updateData(); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/ConverterTest.php index 167a36251d38db616e52e6e38c7332d1c31cbbb0..354b967c803f8985aca9fbb6cfaa680919cc7360 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/ConverterTest.php @@ -46,9 +46,9 @@ class ConverterTest extends \PHPUnit_Framework_TestCase protected $generator; /** - * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\FileResolver | \PHPUnit_Framework_MockObject_MockObject */ - protected $autoloaderMock; + protected $fileResolverMock; /** * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject @@ -64,8 +64,8 @@ class ConverterTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolverMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', [], [], '', @@ -87,7 +87,7 @@ class ConverterTest extends \PHPUnit_Framework_TestCase 'resultClassName' => self::RESULT_CLASS_NAME, 'ioObject' => $this->ioObjectMock, 'classGenerator' => $this->classGenerator, - 'autoLoader' => $this->autoloaderMock + 'fileResolver' => $this->fileResolverMock ] ); } @@ -99,11 +99,11 @@ class ConverterTest extends \PHPUnit_Framework_TestCase $resultFileName = 'SampleConverter.php'; //Mocking _validateData call - $this->autoloaderMock->expects($this->at(0)) + $this->fileResolverMock->expects($this->at(0)) ->method('getFile') ->with(self::SOURCE_CLASS_NAME) ->will($this->returnValue($sourceFileName)); - $this->autoloaderMock->expects($this->at(1)) + $this->fileResolverMock->expects($this->at(1)) ->method('getFile') ->with(self::RESULT_CLASS_NAME) ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/GenerateRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/GenerateRepositoryTest.php index 1254703f3a38d71d0cb724988d060b417bdb5d68..1b8b65974411cd1773804fda5c50325378b64f1f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/GenerateRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/GenerateRepositoryTest.php @@ -91,21 +91,21 @@ class GenerateRepositoryTest extends \PHPUnit_Framework_TestCase $sourceClassName = 'Magento_Module_Controller_Index'; $resultClassName = 'Magento_Module_Controller'; - $includePathMock = $this->getMockBuilder('Magento\Framework\Autoload\IncludePath') + $fileResolverMock = $this->getMockBuilder('Magento\Framework\Code\Generator\FileResolver') ->disableOriginalConstructor() ->setMethods(['getFile']) ->getMock(); - $includePathMock->expects($this->at(0)) + $fileResolverMock->expects($this->at(0)) ->method('getFile') ->with($sourceClassName) ->will($this->returnValue(true)); - $includePathMock->expects($this->at(1)) + $fileResolverMock->expects($this->at(1)) ->method('getFile') ->with($resultClassName) ->will($this->returnValue(false)); $repository = new Repository( - null, null, null, null, $includePathMock + null, null, null, null, $fileResolverMock ); $repository->init($sourceClassName, $resultClassName); $this->assertFalse($repository->generate()); diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/RepositoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/RepositoryTest.php index f6b61de9581a6ff00495bcec7dbe6eb144c1af71..822f87d71db2030493e22d8ebe43293aa8a6be65 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/RepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/RepositoryTest.php @@ -46,9 +46,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase protected $generator; /** - * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\FileResolver | \PHPUnit_Framework_MockObject_MockObject */ - protected $autoloaderMock; + protected $fileResolverMock; /** * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject @@ -64,8 +64,8 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase '', false ); - $this->autoloaderMock = $this->getMock( - 'Magento\Framework\Autoload\IncludePath', + $this->fileResolverMock = $this->getMock( + 'Magento\Framework\Code\Generator\FileResolver', [], [], '', @@ -87,7 +87,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase 'resultClassName' => self::RESULT_CLASS_NAME, 'ioObject' => $this->ioObjectMock, 'classGenerator' => $this->classGenerator, - 'autoLoader' => $this->autoloaderMock + 'fileResolver' => $this->fileResolverMock ] ); } @@ -102,11 +102,11 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $resultFileName = self::OUTPUT_FILE_NAME; //Mocking _validateData call - $this->autoloaderMock->expects($this->at(0)) + $this->fileResolverMock->expects($this->at(0)) ->method('getFile') ->with(self::SOURCE_CLASS_NAME) ->will($this->returnValue($sourceFileName)); - $this->autoloaderMock->expects($this->at(1)) + $this->fileResolverMock->expects($this->at(1)) ->method('getFile') ->with(self::RESULT_CLASS_NAME) ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleRepository.txt b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleRepository.txt index e905faec608eaad3884c99556d60a97bb9f9293b..b66f7aa522535b894974e719687f3142922f6745 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleRepository.txt +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleRepository.txt @@ -82,10 +82,10 @@ class SampleRepository /** * Find entities by criteria * - * @param \Magento\Framework\Service\V1\Data\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $criteria * @return \Magento\Framework\ObjectManager\Code\Generator\Sample[] */ - public function find(\Magento\Framework\Service\V1\Data\SearchCriteria $criteria) + public function find(\Magento\Framework\Api\SearchCriteria $criteria) { $collection = $this->sampleCollectionFactory->create(); foreach($criteria->getFilterGroups() as $filterGroup) { diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ClassReflector/TypeProcessorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Reflection/TypeProcessorTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ClassReflector/TypeProcessorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Reflection/TypeProcessorTest.php index a005e4c949af3c503cdd1b5c985f37e6f8c26ba1..0700d9c7658ef23c55aa88b87dc7e098183f34a5 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ClassReflector/TypeProcessorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Reflection/TypeProcessorTest.php @@ -21,26 +21,24 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Webapi\Model\Config\ClassReflector; +namespace Magento\Framework\Reflection; /** * Type processor Test */ class TypeProcessorTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */ + /** + * @var \Magento\Framework\Reflection\TypeProcessor + */ protected $_typeProcessor; - /** @var \Magento\Webapi\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */ - protected $_helperMock; - /** * Set up helper. */ protected function setUp() { - $this->_helperMock = $this->getMock('Magento\Webapi\Helper\Data', array(), array(), '', false); - $this->_typeProcessor = new \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor($this->_helperMock); + $this->_typeProcessor = new \Magento\Framework\Reflection\TypeProcessor(); } /** @@ -191,7 +189,7 @@ class TypeProcessorTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException \Magento\Webapi\Exception + * @expectedException \Magento\Framework\Exception\SerializationException * @expectedExceptionMessage Invalid type for value :"1". Expected Type: "int[]". */ public function testProcessSimpleTypeInvalidType() diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleDataBuilder.txt b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleDataBuilder.txt deleted file mode 100644 index a01defa3a7b73c3b48a102a15eed2091aeeb44e2..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleDataBuilder.txt +++ /dev/null @@ -1,53 +0,0 @@ -namespace Magento\Framework\Service\Code\Generator; - -/** - * DataBuilder class for \Magento\Framework\Service\Code\Generator\ExtensibleSample - */ -class ExtensibleSampleDataBuilder extends \Magento\Framework\Service\Data\ExtensibleDataBuilder -{ - /** - * @param array $items - */ - public function setItems($items) - { - $this->data['items'] = $items; - return $this; - } - - /** - * @param string $name - */ - public function setName($name) - { - $this->data['name'] = $name; - return $this; - } - - /** - * @param int $count - */ - public function setCount($count) - { - $this->data['count'] = $count; - return $this; - } - - /** - * @param int $createdAt - */ - public function setCreatedAt($createdAt) - { - $this->data['created_at'] = $createdAt; - return $this; - } - - /** - * Initialize the builder - * - * @param \Magento\Framework\ObjectManager $objectManager - */ - public function __construct(\Magento\Framework\ObjectManager $objectManager) - { - parent::__construct($objectManager, 'Magento\Framework\Service\Code\Generator\ExtensibleSampleInterface'); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleBuilder.txt b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleBuilder.txt deleted file mode 100644 index 6a29dca84792b525d96786bc565da444f2476404..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleBuilder.txt +++ /dev/null @@ -1,15 +0,0 @@ -namespace \Magento\Framework\Service\Code\Generator; - -/** - * Builder class for \Magento\Framework\Service\Code\Generator\Sample - */ -class SampleBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder -{ - /** - * {@inheritdoc} - */ - public function setMessages($messages) - { - $this->_set(\Magento\Framework\Service\Code\Generator\Sample::MESSAGES, $messages); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleSearchResults.txt b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleSearchResults.txt deleted file mode 100644 index e98e4d3a8dc4883e1c0949ed4eb236d1e4f64096..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleSearchResults.txt +++ /dev/null @@ -1,14 +0,0 @@ -namespace \Magento\Framework\Service\Code\Generator; - -class SampleSearchResults extends \Magento\Framework\Service\V1\Data\SearchResults -{ - /** - * Returns array of items - * - * @return \Magento\Framework\Service\Code\Generator\Sample[] - */ - public function getItems() - { - return parent::getItems(); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleSearchResultsBuilder.txt b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleSearchResultsBuilder.txt deleted file mode 100644 index e8debda567269ccbea6bb05b260b492b70fa006a..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/SampleSearchResultsBuilder.txt +++ /dev/null @@ -1,17 +0,0 @@ -namespace \Magento\Framework\Service\Code\Generator; - -/** - * SearchResultsBuilder class for \Magento\Framework\Service\Code\Generator\Sample - */ -class SampleSearchResultsBuilder extends \Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder -{ - /** - * SearchResultsBuilder constructor - * - * @param - */ - public function __construct(\Magento\Framework\Service\Data\ObjectFactory $objectFactory, \Magento\Framework\Service\Data\AttributeValueBuilder $valueBuilder, \Magento\Framework\Service\Config\MetadataConfig $metadataService, \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder, \Magento\Framework\Service\Code\Generator\SampleBuilder $itemObjectBuilder) - { - parent::__construct($objectFactory, $valueBuilder, $metadataService, $searchCriteriaBuilder, $itemObjectBuilder); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Shell/ComplexParameterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Shell/ComplexParameterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..47462978636211d83d54f3317b64db21abbe42c6 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Shell/ComplexParameterTest.php @@ -0,0 +1,79 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Framework\Shell; + +class ComplexParameterTest extends \PHPUnit_Framework_TestCase +{ + public function testGetFromArray() + { + $object = new ComplexParameter('baz'); + $this->assertSame([], $object->getFromArray(['--foo', '--bar'])); + $this->assertSame([], $object->getFromArray(['--foo', '--bar', '--baz'])); + $this->assertSame([1 => ''], $object->getFromArray(['--foo', '--bar', '--baz=1'])); + } + + /** + * @param string $str + * @param array $expected + * @dataProvider getFromStringDataProvider + */ + public function testGetFromString($str, $expected) + { + $object = new ComplexParameter('foo'); + $this->assertSame($expected, $object->getFromString($str)); + } + + /** + * @return array + */ + public function getFromStringDataProvider() + { + return [ + ['--not-matching', []], + ['--foo', []], + ['--foo=', []], + ['--foo=1', [1 => '']], + ['--foo=bar=1&baz=2', ['bar' => '1', 'baz' => '2']], + ['--foo=bar[1]=2&baz[3]=4', ['bar' => [1 => '2'], 'baz' => [3 => '4']]], + ['--foo=bar[one]=value1&bar[two]=value2', ['bar' => ['one' => 'value1', 'two' => 'value2']]], + ]; + } + + public function testPattern() + { + $object = new ComplexParameter('f', '/^-%s=(bar|baz)$/'); + $this->assertSame([], $object->getFromString('-f=1')); + $this->assertSame(['bar' => ''], $object->getFromString('-f=bar')); + $this->assertSame(['baz' => ''], $object->getFromString('-f=baz')); + } + + public function testMergeFromArgv() + { + $object = new ComplexParameter('foo'); + $server = ['argv' => ['--foo=bar=value1', '--nonfoo=value2']]; + $into = ['baz' => 'value3']; + $this->assertSame(['baz' => 'value3', 'bar' => 'value1'], $object->mergeFromArgv($server, $into)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php b/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php index 3157981660eb26a5240bcfd24878c2bc447357ff..4d805db8f0a2fca6e500ce0a9e534e1bba20df52 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php @@ -127,7 +127,7 @@ class ShellTest extends \PHPUnit_Framework_TestCase /** * @expectedException \Magento\Framework\Exception - * @expectedExceptionMessage Command `non_existing_command 2>&1` returned non-zero exit code + * @expectedExceptionMessage Command returned non-zero exit code: * @expectedExceptionCode 0 */ public function testExecuteFailure() diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/ConverterTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/ConverterTest.php index 349efdb57d32ab93dd437265573ff6135d03330f..511fc1853a515d4c223c3a13570739444ffe41f8 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Service/V1/Product/Link/Data/ProductLink/ProductEntity/ConverterTest.php @@ -25,7 +25,7 @@ namespace Magento\GroupedProduct\Service\V1\Product\Link\Data\ProductLink\ProductEntity; use \Magento\Catalog\Service\V1\Product\Link\Data\ProductLink; -use \Magento\Framework\Service\Data\AttributeValue; +use \Magento\Framework\Api\AttributeValue; class ConverterTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/Config/_files/install_wizard.xml b/dev/tests/unit/testsuite/Magento/Install/Model/Config/_files/install_wizard.xml deleted file mode 100644 index f93d58889dc4759cafe116ec1d500fa2be4cac02..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Install/Model/Config/_files/install_wizard.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License (AFL 3.0) - * that is bundled with this package in the file LICENSE_AFL.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/afl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<install_wizard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./install_wizard.xsd"> - <steps> - <step id="begin" controller="wizard" action="begin"> - <label translate="true">License Agreement</label> - </step> - <step id="locale" controller="wizard" action="locale"> - <label translate="true">Localization</label> - </step> - </steps> - <filesystem_prerequisites> - <directory alias="etc" recursive="false" existence="true" writable="true" /> - <directory alias="var" recursive="true" existence="true" writable="true" /> - </filesystem_prerequisites> -</install_wizard> diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/Config/_files/install_wizard_config.php b/dev/tests/unit/testsuite/Magento/Install/Model/Config/_files/install_wizard_config.php deleted file mode 100644 index b0c458e81010c4e680ae30ce61922d7c5230579d..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Install/Model/Config/_files/install_wizard_config.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -return array( - 'steps' => array( - 'begin' => array( - 'name' => 'begin', - 'controller' => 'wizard', - 'action' => 'begin', - 'code' => 'License Agreement' - ), - 'locale' => array('name' => 'locale', 'controller' => 'wizard', 'action' => 'locale', 'code' => 'Localization') - ), - 'filesystem_prerequisites' => array( - 'writables' => array( - 'etc' => array('existence' => '1', 'recursive' => '0'), - 'var' => array('existence' => '1', 'recursive' => '1') - ), - 'notWritables' => array() - ) -); diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/WizardTest.php b/dev/tests/unit/testsuite/Magento/Install/Model/WizardTest.php deleted file mode 100644 index e1b60b2447e2154af68438d8390dc9a97ed687f9..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Magento/Install/Model/WizardTest.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Test class for \Magento\Install\Model\Wizard - */ -namespace Magento\Install\Model; - -/** - * Class WizardTest - * - */ -class WizardTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var \Magento\Install\Model\Config - */ - protected $_configMock; - - /** - * @var \Magento\Framework\UrlInterface - */ - protected $_urlBuilderMock; - - /** - * @var \Magento\Install\Model\Wizard - */ - protected $_model; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $_objectManager; - - /** - * @var \Magento\Framework\App\RequestInterface - */ - protected $_requestMock; - - /** - * Set up before test - */ - public function setUp() - { - $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_configMock = $this->getMock('\Magento\Install\Model\Config', array(), array(), '', false); - $this->_configMock->expects($this->any())->method('getWizardSteps')->will($this->returnValue(array())); - $this->_urlBuilderMock = $this->getMock('\Magento\Framework\UrlInterface', array(), array(), '', false); - $this->_requestMock = $this->getMock('\Magento\Framework\App\RequestInterface', array(), array(), '', false); - $this->_model = $this->_objectManager->getObject( - 'Magento\Install\Model\Wizard', - array('urlBuilder' => $this->_urlBuilderMock, 'installConfig' => $this->_configMock) - ); - } - - /** - * Test get step with empty request - */ - public function testGetStepByRequest() - { - $this->assertFalse($this->_model->getStepByRequest($this->_requestMock)); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Log/Model/LogTest.php b/dev/tests/unit/testsuite/Magento/Log/Model/LogTest.php index f16c957f892ca013826dce06966b5348b4405d77..f2917050667f9b5a63c91febbe0a5c68fc25a3ce 100644 --- a/dev/tests/unit/testsuite/Magento/Log/Model/LogTest.php +++ b/dev/tests/unit/testsuite/Magento/Log/Model/LogTest.php @@ -57,7 +57,7 @@ class LogTest extends \PHPUnit_Framework_TestCase { $this->registry = $this->getMock('Magento\Framework\Registry'); $this->scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $resource = $this->getMockBuilder('Magento\Customer\Model\Resource\Visitor') + $resource = $this->getMockBuilder('\Magento\Log\Model\Resource\Log') ->setMethods(['clean', 'getIdFieldName']) ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php b/dev/tests/unit/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php index dfe08cdc4e65f1d7cf2450cddc3f0a424cc8c556..ffc1cdedfbb43fb9d9ed8919dfee6b08e7cfd334 100644 --- a/dev/tests/unit/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php +++ b/dev/tests/unit/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php @@ -164,7 +164,7 @@ class CheckoutTest extends \PHPUnit_Framework_TestCase $this->customerSessionMock->expects($this->once()) ->method('regenerateId'); - + $addressDataBuilderMock = $this->getMockBuilder('\Magento\Customer\Service\V1\Data\AddressBuilder') ->disableOriginalConstructor() ->getMock(); @@ -190,7 +190,7 @@ class CheckoutTest extends \PHPUnit_Framework_TestCase $addressDataBuilderMock->expects($this->any()) ->method('create') ->willReturn($addressDataMock); - + $addressMock = $this->getMock('\Magento\Sales\Model\Quote\Address', [], [], '', false); $this->quoteMock->expects($this->any()) ->method('getBillingAddress') diff --git a/dev/tests/unit/testsuite/Magento/Rss/Controller/Adminhtml/Feed/IndexTest.php b/dev/tests/unit/testsuite/Magento/Rss/Controller/Adminhtml/Feed/IndexTest.php index 6e94d8bcd69856dd429e4abe0fc1ae4ae02b068e..44701f5f9c6a48531a655c027f81b0cecddd4fba 100644 --- a/dev/tests/unit/testsuite/Magento/Rss/Controller/Adminhtml/Feed/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Rss/Controller/Adminhtml/Feed/IndexTest.php @@ -75,8 +75,8 @@ class IndexTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor()->getMock(); $objectManagerHelper = new ObjectManagerHelper($this); - $this->controller = $objectManagerHelper->getObject( - 'Magento\Rss\Controller\Feed\Index', + $controllerArguments = $objectManagerHelper->getConstructArguments( + 'Magento\Rss\Controller\Adminhtml\Feed\Index', [ 'rssManager' => $this->rssManager, 'scopeConfig' => $this->scopeConfigInterface, @@ -85,6 +85,14 @@ class IndexTest extends \PHPUnit_Framework_TestCase 'response' => $this->response ] ); + $objectManager = $controllerArguments['context']->getObjectManager(); + $urlInterface = $this->getMock('Magento\Backend\Model\UrlInterface'); + $objectManager->expects($this->at(0))->method('get')->with('Magento\Backend\Model\UrlInterface') + ->will($this->returnValue($urlInterface)); + $this->controller = $objectManagerHelper->getObject( + 'Magento\Rss\Controller\Adminhtml\Feed\Index', + $controllerArguments + ); } public function testExecute() diff --git a/dev/tests/unit/testsuite/Magento/Rss/Controller/Feed/IndexTest.php b/dev/tests/unit/testsuite/Magento/Rss/Controller/Feed/IndexTest.php index ca27de6c0c3a6a46bd283e9f1155ec36c95613ca..63eaf1744cd0b16cba2361ef1093c04e494ce3f1 100644 --- a/dev/tests/unit/testsuite/Magento/Rss/Controller/Feed/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Rss/Controller/Feed/IndexTest.php @@ -87,6 +87,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase $this->scopeConfigInterface->expects($this->once())->method('getValue')->will($this->returnValue(true)); $dataProvider = $this->getMock('Magento\Framework\App\Rss\DataProviderInterface'); $dataProvider->expects($this->once())->method('isAllowed')->will($this->returnValue(true)); + $dataProvider->expects($this->once())->method('isAuthRequired')->will($this->returnValue(false)); $rssModel = $this->getMock('Magento\Rss\Model\Rss', ['setDataProvider', 'createRssXml'], [], '', false); $rssModel->expects($this->once())->method('setDataProvider')->will($this->returnSelf()); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php index 75c485174cc21702bb0cb8c666388c1241fef5ae..77d2fdf6184242353877137b23f67a1c032a17ad 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php @@ -165,9 +165,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase public function testDispatchWithDisableAutoGroupChange() { - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder $attributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder $attributeValueBuilder */ $attributeValueBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + ->getObject('Magento\Framework\Api\AttributeValueBuilder'); $attributeValueBuilder->setAttributeCode('disable_auto_group_change')->setValue(true); $this->customerDataMock->expects( $this->exactly(2) @@ -184,9 +184,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase public function testDispatchWithDisableVatValidator() { - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder $attributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder $attributeValueBuilder */ $attributeValueBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + ->getObject('Magento\Framework\Api\AttributeValueBuilder'); $attributeValueBuilder->setAttributeCode('disable_auto_group_change')->setValue(false); $this->customerDataMock->expects( $this->exactly(2) @@ -213,9 +213,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase public function testDispatchWithCustomerCountryNotInEUAndNotLoggedCustomerInGroup() { - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder $attributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder $attributeValueBuilder */ $attributeValueBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + ->getObject('Magento\Framework\Api\AttributeValueBuilder'); $attributeValueBuilder->setAttributeCode('disable_auto_group_change')->setValue(false); /** Preconditions */ $this->customerDataMock->expects( @@ -271,9 +271,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase public function testDispatchWithDefaultCustomerGroupId() { - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder $attributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder $attributeValueBuilder */ $attributeValueBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + ->getObject('Magento\Framework\Api\AttributeValueBuilder'); $attributeValueBuilder->setAttributeCode('disable_auto_group_change')->setValue(false); /** Preconditions */ $this->customerDataMock->expects( @@ -351,9 +351,9 @@ class CollectTotalsTest extends \PHPUnit_Framework_TestCase public function testDispatchWithCustomerCountryInEU() { - /** @var \Magento\Framework\Service\Data\AttributeValueBuilder $attributeValueBuilder */ + /** @var \Magento\Framework\Api\AttributeValueBuilder $attributeValueBuilder */ $attributeValueBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\Data\AttributeValueBuilder'); + ->getObject('Magento\Framework\Api\AttributeValueBuilder'); $attributeValueBuilder->setAttributeCode('disable_auto_group_change')->setValue(false); /** Preconditions */ $this->customerDataMock->expects($this->exactly(2)) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Payment/TransactionRepositoryTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Payment/TransactionRepositoryTest.php index d7cfd952ce4dc258ce56bd20232d72e368688576..ee180ca389361dc17e195ee402ccf4cc2e28e9a6 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Payment/TransactionRepositoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Payment/TransactionRepositoryTest.php @@ -45,12 +45,12 @@ class TransactionRepositoryTest extends \PHPUnit_Framework_TestCase protected $transactionCollectionFactory; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $filterBuilder; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaBuilder; @@ -70,9 +70,9 @@ class TransactionRepositoryTest extends \PHPUnit_Framework_TestCase '', false ); - $this->filterBuilder = $this->getMock('Magento\Framework\Service\V1\Data\FilterBuilder', [], [], '', false); + $this->filterBuilder = $this->getMock('Magento\Framework\Api\FilterBuilder', [], [], '', false); $this->searchCriteriaBuilder = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', [], [], '', @@ -106,7 +106,7 @@ class TransactionRepositoryTest extends \PHPUnit_Framework_TestCase public function testGet($id, array $collectionIds, $conditionType) { $filter = $this->getMock( - 'Magento\Framework\Service\V1\Data\Filter', + 'Magento\Framework\Api\Filter', ['getConditionType', 'getField', 'getValue'], [], '', @@ -119,11 +119,11 @@ class TransactionRepositoryTest extends \PHPUnit_Framework_TestCase $this->filterBuilder->expects($this->once())->method('setConditionType')->with('eq')->willReturnSelf(); $this->filterBuilder->expects($this->once())->method('create')->willReturn($filter); - $filterGroup = $this->getMock('Magento\Framework\Service\V1\Data\Search\FilterGroup', [], [], '', false); + $filterGroup = $this->getMock('Magento\Framework\Api\Search\FilterGroup', [], [], '', false); $filterGroup->expects($this->any()) ->method('getFilters') ->willReturn($filter); - $searchCriteria = $this->getMock('Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteria = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false); $searchCriteria->expects($this->any()) ->method('getFilterGroups') ->willReturn([$filterGroup]); @@ -150,9 +150,9 @@ class TransactionRepositoryTest extends \PHPUnit_Framework_TestCase $transactionModelMock->expects($this->any())->method('getId')->will($this->returnValue($id)); $collection = $this->prepareCollection($transactionModelMock, $collectionIds); - $searchCriteriaMock = $this->getMock('Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); - $filterGroup = $this->getMock('Magento\Framework\Service\V1\Data\Search\FilterGroup', [], [], '', false); - $filter = $this->getMock('Magento\Framework\Service\V1\Data\Filter', [], [], '', false); + $searchCriteriaMock = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false); + $filterGroup = $this->getMock('Magento\Framework\Api\Search\FilterGroup', [], [], '', false); + $filter = $this->getMock('Magento\Framework\Api\Filter', [], [], '', false); $searchCriteriaMock->expects($this->once())->method('getFilterGroups')->will( $this->returnValue([$filterGroup]) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoCommentsListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoCommentsListTest.php index 01b7278f669fa66509642aad8a585fd0632d2a42..55c3db8149b1e202e050ec54b6e9692fc341a943 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoCommentsListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoCommentsListTest.php @@ -44,12 +44,12 @@ class CreditmemoCommentsListTest extends \PHPUnit_Framework_TestCase protected $commentMapperMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $criteriaBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $filterBuilderMock; @@ -69,7 +69,7 @@ class CreditmemoCommentsListTest extends \PHPUnit_Framework_TestCase protected $dataObjectMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -90,14 +90,14 @@ class CreditmemoCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->criteriaBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['create', 'addFilter'], [], '', false ); $this->filterBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\FilterBuilder', + 'Magento\Framework\Api\FilterBuilder', ['setField', 'setValue', 'create'], [], '', @@ -125,7 +125,7 @@ class CreditmemoCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoListTest.php index 43e7690f2ba6752177fe3edaa4e4dfd1cd0222f1..f8dad4e82fabbee9ab1e14e3647087c0f52bf87a 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/CreditmemoListTest.php @@ -49,7 +49,7 @@ class CreditmemoListTest extends \PHPUnit_Framework_TestCase protected $searchResultsBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -92,7 +92,7 @@ class CreditmemoListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceCommentsListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceCommentsListTest.php index 5636a851eba2e887a97f4ed1cd3a4202230f5f58..16f1b03fcbb1b26267e3a771186d458aa85bd21f 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceCommentsListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceCommentsListTest.php @@ -44,12 +44,12 @@ class InvoiceCommentsListTest extends \PHPUnit_Framework_TestCase protected $commentMapperMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $criteriaBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $filterBuilderMock; @@ -69,7 +69,7 @@ class InvoiceCommentsListTest extends \PHPUnit_Framework_TestCase protected $dataObjectMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -90,14 +90,14 @@ class InvoiceCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->criteriaBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['create', 'addFilter'], [], '', false ); $this->filterBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\FilterBuilder', + 'Magento\Framework\Api\FilterBuilder', ['setField', 'setValue', 'create'], [], '', @@ -125,7 +125,7 @@ class InvoiceCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceListTest.php index c254aca10217833ad77b0df1854c4f8625fec390..b405a81d6e55df2ea3073d8417398b152ce77763 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/InvoiceListTest.php @@ -49,7 +49,7 @@ class InvoiceListTest extends \PHPUnit_Framework_TestCase protected $searchResultsBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -90,7 +90,7 @@ class InvoiceListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderCommentsListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderCommentsListTest.php index ca486146b7ed305e933042c627081237ec292e20..0622a80b2346d9192df9f03f0295617c48b57be0 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderCommentsListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderCommentsListTest.php @@ -44,12 +44,12 @@ class OrderCommentsListTest extends \PHPUnit_Framework_TestCase protected $historyMapperMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $criteriaBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $filterBuilderMock; @@ -69,7 +69,7 @@ class OrderCommentsListTest extends \PHPUnit_Framework_TestCase protected $dataObjectMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -90,14 +90,14 @@ class OrderCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->criteriaBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['create', 'addFilter'], [], '', false ); $this->filterBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\FilterBuilder', + 'Magento\Framework\Api\FilterBuilder', ['setField', 'setValue', 'create'], [], '', @@ -125,7 +125,7 @@ class OrderCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderGetTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderGetTest.php index 44deab926bc82802ff9fc9c4c389f0034a51d4b5..56c2a1a0932bd681fcbd1cf6496e70b9f0273fc6 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderGetTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderGetTest.php @@ -80,7 +80,7 @@ class OrderGetTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderListTest.php index 074a9612f8680059965e86522fb688be9c892fe0..54d7626697ffeaa8140ec1a27f007468a380db70 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/OrderListTest.php @@ -49,7 +49,7 @@ class OrderListTest extends \PHPUnit_Framework_TestCase protected $searchResultsBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -90,7 +90,7 @@ class OrderListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentCommentsListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentCommentsListTest.php index 798e6bf4a000ee0370603adfe21579034c41206f..27c92c3ca81deabbd7f7dec47151db075eede9b1 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentCommentsListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentCommentsListTest.php @@ -44,12 +44,12 @@ class ShipmentCommentsListTest extends \PHPUnit_Framework_TestCase protected $commentMapperMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $criteriaBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\FilterBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $filterBuilderMock; @@ -69,7 +69,7 @@ class ShipmentCommentsListTest extends \PHPUnit_Framework_TestCase protected $dataObjectMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -90,14 +90,14 @@ class ShipmentCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->criteriaBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['create', 'addFilter'], [], '', false ); $this->filterBuilderMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\FilterBuilder', + 'Magento\Framework\Api\FilterBuilder', ['setField', 'setValue', 'create'], [], '', @@ -125,7 +125,7 @@ class ShipmentCommentsListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentListTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentListTest.php index ffff77e2ffec876d29a5d79eec72b5d04d755df7..0e2b88343751a8a6379b5ed895c872319d85e7e8 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentListTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Action/ShipmentListTest.php @@ -49,7 +49,7 @@ class ShipmentListTest extends \PHPUnit_Framework_TestCase protected $searchResultsBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteria|\PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaMock; @@ -90,7 +90,7 @@ class ShipmentListTest extends \PHPUnit_Framework_TestCase false ); $this->searchCriteriaMock = $this->getMock( - 'Magento\Framework\Service\V1\Data\SearchCriteria', + 'Magento\Framework\Api\SearchCriteria', [], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/CreditmemoReadTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/CreditmemoReadTest.php index 7dc3c992749a927d38d7a2fc930a24189e6c8234..27b63c3b26bc56a08b072c7a2f165dc484179e91 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/CreditmemoReadTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/CreditmemoReadTest.php @@ -99,7 +99,7 @@ class CreditmemoReadTest extends \PHPUnit_Framework_TestCase */ public function testSearch() { - $searchCriteria = $this->getMock('Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteria = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false); $this->creditmemoListMock->expects($this->once()) ->method('invoke') ->with($searchCriteria) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CommentTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CommentTest.php index 22aba6f29d3aa194800356709ba7cb8590ca71db..8708817fe92e0e26709721a56e1f2be88e25f41a 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CommentTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CommentTest.php @@ -28,7 +28,7 @@ class CommentTest extends \PHPUnit_Framework_TestCase public function testGetComment() { $data = ['comment' => 'test_value_comment']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class CommentTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class CommentTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class CommentTest extends \PHPUnit_Framework_TestCase public function testGetIsCustomerNotified() { $data = ['is_customer_notified' => 'test_value_is_customer_notified']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class CommentTest extends \PHPUnit_Framework_TestCase public function testGetIsVisibleOnFront() { $data = ['is_visible_on_front' => 'test_value_is_visible_on_front']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class CommentTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoItemTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoItemTest.php index d97dce25910ff0017ec3a2cc5479841f7b1f0823..50dc20e029817e1d4f1461e84667e49d91f3c247 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoItemTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoItemTest.php @@ -28,7 +28,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetAdditionalData() { $data = ['additional_data' => 'test_value_additional_data']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseCost() { $data = ['base_cost' => 'test_value_base_cost']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountAmount() { $data = ['base_discount_amount' => 'test_value_base_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxAmount() { $data = ['base_hidden_tax_amount' => 'test_value_base_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBasePrice() { $data = ['base_price' => 'test_value_base_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBasePriceInclTax() { $data = ['base_price_incl_tax' => 'test_value_base_price_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -124,7 +124,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseRowTotal() { $data = ['base_row_total' => 'test_value_base_row_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -140,7 +140,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseRowTotalInclTax() { $data = ['base_row_total_incl_tax' => 'test_value_base_row_total_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -156,7 +156,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxAmount() { $data = ['base_tax_amount' => 'test_value_base_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -172,7 +172,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxAppliedAmount() { $data = ['base_weee_tax_applied_amount' => 'test_value_base_weee_tax_applied_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -188,7 +188,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxAppliedRowAmnt() { $data = ['base_weee_tax_applied_row_amnt' => 'test_value_base_weee_tax_applied_row_amnt']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -204,7 +204,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxDisposition() { $data = ['base_weee_tax_disposition' => 'test_value_base_weee_tax_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -220,7 +220,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxRowDisposition() { $data = ['base_weee_tax_row_disposition' => 'test_value_base_weee_tax_row_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -236,7 +236,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetDescription() { $data = ['description' => 'test_value_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -252,7 +252,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetDiscountAmount() { $data = ['discount_amount' => 'test_value_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -268,7 +268,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -284,7 +284,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxAmount() { $data = ['hidden_tax_amount' => 'test_value_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -300,7 +300,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetName() { $data = ['name' => 'test_value_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -316,7 +316,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetOrderItemId() { $data = ['order_item_id' => 'test_value_order_item_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -332,7 +332,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -348,7 +348,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetPrice() { $data = ['price' => 'test_value_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -364,7 +364,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetPriceInclTax() { $data = ['price_incl_tax' => 'test_value_price_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -380,7 +380,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetProductId() { $data = ['product_id' => 'test_value_product_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -396,7 +396,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetQty() { $data = ['qty' => 'test_value_qty']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -412,7 +412,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetRowTotal() { $data = ['row_total' => 'test_value_row_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -428,7 +428,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetRowTotalInclTax() { $data = ['row_total_incl_tax' => 'test_value_row_total_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -444,7 +444,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetSku() { $data = ['sku' => 'test_value_sku']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -460,7 +460,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxAmount() { $data = ['tax_amount' => 'test_value_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -476,7 +476,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxApplied() { $data = ['weee_tax_applied' => 'test_value_weee_tax_applied']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -492,7 +492,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxAppliedAmount() { $data = ['weee_tax_applied_amount' => 'test_value_weee_tax_applied_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -508,7 +508,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxAppliedRowAmount() { $data = ['weee_tax_applied_row_amount' => 'test_value_weee_tax_applied_row_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -524,7 +524,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxDisposition() { $data = ['weee_tax_disposition' => 'test_value_weee_tax_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -540,7 +540,7 @@ class CreditmemoItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxRowDisposition() { $data = ['weee_tax_row_disposition' => 'test_value_weee_tax_row_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoTest.php index 6bff45d0ebba0672d82be1230af3bf561aefb7cd..f034b4e39e0732430a1b1ed6763a574e29dbaa9b 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/CreditmemoTest.php @@ -34,7 +34,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetAdjustment() { $data = ['adjustment' => 'test_value_adjustment']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -50,7 +50,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetAdjustmentNegative() { $data = ['adjustment_negative' => 'test_value_adjustment_negative']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -66,7 +66,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetAdjustmentPositive() { $data = ['adjustment_positive' => 'test_value_adjustment_positive']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -82,7 +82,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseAdjustment() { $data = ['base_adjustment' => 'test_value_base_adjustment']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -98,7 +98,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseAdjustmentNegative() { $data = ['base_adjustment_negative' => 'test_value_base_adjustment_negative']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -114,7 +114,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseAdjustmentPositive() { $data = ['base_adjustment_positive' => 'test_value_base_adjustment_positive']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -130,7 +130,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseCurrencyCode() { $data = ['base_currency_code' => 'test_value_base_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -146,7 +146,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountAmount() { $data = ['base_discount_amount' => 'test_value_base_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -162,7 +162,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseGrandTotal() { $data = ['base_grand_total' => 'test_value_base_grand_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -178,7 +178,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxAmount() { $data = ['base_hidden_tax_amount' => 'test_value_base_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -194,7 +194,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingAmount() { $data = ['base_shipping_amount' => 'test_value_base_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -210,7 +210,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingHiddenTaxAmnt() { $data = ['base_shipping_hidden_tax_amnt' => 'test_value_base_shipping_hidden_tax_amnt']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -226,7 +226,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingInclTax() { $data = ['base_shipping_incl_tax' => 'test_value_base_shipping_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -242,7 +242,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingTaxAmount() { $data = ['base_shipping_tax_amount' => 'test_value_base_shipping_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -258,7 +258,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotal() { $data = ['base_subtotal' => 'test_value_base_subtotal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -274,7 +274,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotalInclTax() { $data = ['base_subtotal_incl_tax' => 'test_value_base_subtotal_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -290,7 +290,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxAmount() { $data = ['base_tax_amount' => 'test_value_base_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -306,7 +306,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseToGlobalRate() { $data = ['base_to_global_rate' => 'test_value_base_to_global_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -322,7 +322,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBaseToOrderRate() { $data = ['base_to_order_rate' => 'test_value_base_to_order_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -338,7 +338,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetBillingAddressId() { $data = ['billing_address_id' => 'test_value_billing_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -354,7 +354,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -370,7 +370,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetCreditmemoStatus() { $data = ['creditmemo_status' => 'test_value_creditmemo_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -386,7 +386,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetDiscountAmount() { $data = ['discount_amount' => 'test_value_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -402,7 +402,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetDiscountDescription() { $data = ['discount_description' => 'test_value_discount_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -418,7 +418,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetEmailSent() { $data = ['email_sent' => 'test_value_email_sent']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -434,7 +434,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -450,7 +450,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetGlobalCurrencyCode() { $data = ['global_currency_code' => 'test_value_global_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -466,7 +466,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetGrandTotal() { $data = ['grand_total' => 'test_value_grand_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -482,7 +482,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxAmount() { $data = ['hidden_tax_amount' => 'test_value_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -498,7 +498,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetIncrementId() { $data = ['increment_id' => 'test_value_increment_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -514,7 +514,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetInvoiceId() { $data = ['invoice_id' => 'test_value_invoice_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -530,7 +530,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetOrderCurrencyCode() { $data = ['order_currency_code' => 'test_value_order_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -546,7 +546,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetOrderId() { $data = ['order_id' => 'test_value_order_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -562,7 +562,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetShippingAddressId() { $data = ['shipping_address_id' => 'test_value_shipping_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -578,7 +578,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetShippingAmount() { $data = ['shipping_amount' => 'test_value_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -594,7 +594,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetShippingHiddenTaxAmount() { $data = ['shipping_hidden_tax_amount' => 'test_value_shipping_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -610,7 +610,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetShippingInclTax() { $data = ['shipping_incl_tax' => 'test_value_shipping_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -626,7 +626,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetShippingTaxAmount() { $data = ['shipping_tax_amount' => 'test_value_shipping_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -642,7 +642,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetState() { $data = ['state' => 'test_value_state']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -658,7 +658,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetStoreCurrencyCode() { $data = ['store_currency_code' => 'test_value_store_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -674,7 +674,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetStoreId() { $data = ['store_id' => 'test_value_store_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -690,7 +690,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetStoreToBaseRate() { $data = ['store_to_base_rate' => 'test_value_store_to_base_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -706,7 +706,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetStoreToOrderRate() { $data = ['store_to_order_rate' => 'test_value_store_to_order_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -722,7 +722,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetSubtotal() { $data = ['subtotal' => 'test_value_subtotal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -738,7 +738,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetSubtotalInclTax() { $data = ['subtotal_incl_tax' => 'test_value_subtotal_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -754,7 +754,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetTaxAmount() { $data = ['tax_amount' => 'test_value_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -770,7 +770,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetTransactionId() { $data = ['transaction_id' => 'test_value_transaction_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -786,7 +786,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetUpdatedAt() { $data = ['updated_at' => 'test_value_updated_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -802,7 +802,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testGetItems() { $data = ['items' => 'test_value_items']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceItemTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceItemTest.php index e2a6a61494245fcee382bcfbf2ddf8741b6ab12c..98bd2fc7d3e0bc14b9cc10d4ca74d34d10d05c07 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceItemTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceItemTest.php @@ -28,7 +28,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetAdditionalData() { $data = ['additional_data' => 'test_value_additional_data']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseCost() { $data = ['base_cost' => 'test_value_base_cost']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountAmount() { $data = ['base_discount_amount' => 'test_value_base_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxAmount() { $data = ['base_hidden_tax_amount' => 'test_value_base_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBasePrice() { $data = ['base_price' => 'test_value_base_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBasePriceInclTax() { $data = ['base_price_incl_tax' => 'test_value_base_price_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -124,7 +124,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseRowTotal() { $data = ['base_row_total' => 'test_value_base_row_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -140,7 +140,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseRowTotalInclTax() { $data = ['base_row_total_incl_tax' => 'test_value_base_row_total_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -156,7 +156,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxAmount() { $data = ['base_tax_amount' => 'test_value_base_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -172,7 +172,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetDescription() { $data = ['description' => 'test_value_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -188,7 +188,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetDiscountAmount() { $data = ['discount_amount' => 'test_value_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -204,7 +204,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -220,7 +220,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxAmount() { $data = ['hidden_tax_amount' => 'test_value_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -236,7 +236,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetName() { $data = ['name' => 'test_value_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -252,7 +252,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetOrderItemId() { $data = ['order_item_id' => 'test_value_order_item_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -268,7 +268,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -284,7 +284,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetPrice() { $data = ['price' => 'test_value_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -300,7 +300,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetPriceInclTax() { $data = ['price_incl_tax' => 'test_value_price_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -316,7 +316,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetProductId() { $data = ['product_id' => 'test_value_product_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -332,7 +332,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetQty() { $data = ['qty' => 'test_value_qty']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -348,7 +348,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetRowTotal() { $data = ['row_total' => 'test_value_row_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -364,7 +364,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetRowTotalInclTax() { $data = ['row_total_incl_tax' => 'test_value_row_total_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -380,7 +380,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetSku() { $data = ['sku' => 'test_value_sku']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -396,7 +396,7 @@ class InvoiceItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxAmount() { $data = ['tax_amount' => 'test_value_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceTest.php index ca989eb45dbc1a0168b4787e09daf248a5174877..12b3ae28282f681f1acb58b6bffa484ac149588a 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/InvoiceTest.php @@ -34,7 +34,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseCurrencyCode() { $data = ['base_currency_code' => 'test_value_base_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -50,7 +50,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountAmount() { $data = ['base_discount_amount' => 'test_value_base_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -66,7 +66,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseGrandTotal() { $data = ['base_grand_total' => 'test_value_base_grand_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -82,7 +82,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxAmount() { $data = ['base_hidden_tax_amount' => 'test_value_base_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -98,7 +98,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingAmount() { $data = ['base_shipping_amount' => 'test_value_base_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -114,7 +114,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingHiddenTaxAmnt() { $data = ['base_shipping_hidden_tax_amnt' => 'test_value_base_shipping_hidden_tax_amnt']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -130,7 +130,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingInclTax() { $data = ['base_shipping_incl_tax' => 'test_value_base_shipping_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -146,7 +146,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingTaxAmount() { $data = ['base_shipping_tax_amount' => 'test_value_base_shipping_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -162,7 +162,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotal() { $data = ['base_subtotal' => 'test_value_base_subtotal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -178,7 +178,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotalInclTax() { $data = ['base_subtotal_incl_tax' => 'test_value_base_subtotal_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -194,7 +194,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxAmount() { $data = ['base_tax_amount' => 'test_value_base_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -210,7 +210,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalRefunded() { $data = ['base_total_refunded' => 'test_value_base_total_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -226,7 +226,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseToGlobalRate() { $data = ['base_to_global_rate' => 'test_value_base_to_global_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -242,7 +242,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBaseToOrderRate() { $data = ['base_to_order_rate' => 'test_value_base_to_order_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -258,7 +258,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetBillingAddressId() { $data = ['billing_address_id' => 'test_value_billing_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -274,7 +274,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetCanVoidFlag() { $data = ['can_void_flag' => 'test_value_can_void_flag']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -290,7 +290,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -306,7 +306,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetDiscountAmount() { $data = ['discount_amount' => 'test_value_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -322,7 +322,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetDiscountDescription() { $data = ['discount_description' => 'test_value_discount_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -338,7 +338,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetEmailSent() { $data = ['email_sent' => 'test_value_email_sent']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -354,7 +354,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -370,7 +370,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetGlobalCurrencyCode() { $data = ['global_currency_code' => 'test_value_global_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -386,7 +386,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetGrandTotal() { $data = ['grand_total' => 'test_value_grand_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -402,7 +402,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxAmount() { $data = ['hidden_tax_amount' => 'test_value_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -418,7 +418,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetIncrementId() { $data = ['increment_id' => 'test_value_increment_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -434,7 +434,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetIsUsedForRefund() { $data = ['is_used_for_refund' => 'test_value_is_used_for_refund']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -450,7 +450,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetOrderCurrencyCode() { $data = ['order_currency_code' => 'test_value_order_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -466,7 +466,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetOrderId() { $data = ['order_id' => 'test_value_order_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -482,7 +482,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetShippingAddressId() { $data = ['shipping_address_id' => 'test_value_shipping_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -498,7 +498,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetShippingAmount() { $data = ['shipping_amount' => 'test_value_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -514,7 +514,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetShippingHiddenTaxAmount() { $data = ['shipping_hidden_tax_amount' => 'test_value_shipping_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -530,7 +530,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetShippingInclTax() { $data = ['shipping_incl_tax' => 'test_value_shipping_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -546,7 +546,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetShippingTaxAmount() { $data = ['shipping_tax_amount' => 'test_value_shipping_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -562,7 +562,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetState() { $data = ['state' => 'test_value_state']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -578,7 +578,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetStoreCurrencyCode() { $data = ['store_currency_code' => 'test_value_store_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -594,7 +594,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetStoreId() { $data = ['store_id' => 'test_value_store_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -610,7 +610,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetStoreToBaseRate() { $data = ['store_to_base_rate' => 'test_value_store_to_base_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -626,7 +626,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetStoreToOrderRate() { $data = ['store_to_order_rate' => 'test_value_store_to_order_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -642,7 +642,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetSubtotal() { $data = ['subtotal' => 'test_value_subtotal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -658,7 +658,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetSubtotalInclTax() { $data = ['subtotal_incl_tax' => 'test_value_subtotal_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -674,7 +674,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetTaxAmount() { $data = ['tax_amount' => 'test_value_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -690,7 +690,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetTotalQty() { $data = ['total_qty' => 'test_value_total_qty']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -706,7 +706,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetTransactionId() { $data = ['transaction_id' => 'test_value_transaction_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -722,7 +722,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetUpdatedAt() { $data = ['updated_at' => 'test_value_updated_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -738,7 +738,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testGetItems() { $data = ['items' => 'test_value_items']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderAddressTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderAddressTest.php index 38a5cae149653d2dc387c6c8b877a5f3caf2ad58..7dcfff01cb82d42ac3a8afaff359ab8c5e64109d 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderAddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderAddressTest.php @@ -28,7 +28,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetAddressType() { $data = ['address_type' => 'test_value_address_type']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetCity() { $data = ['city' => 'test_value_city']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetCompany() { $data = ['company' => 'test_value_company']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetCountryId() { $data = ['country_id' => 'test_value_country_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetCustomerAddressId() { $data = ['customer_address_id' => 'test_value_customer_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetCustomerId() { $data = ['customer_id' => 'test_value_customer_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -124,7 +124,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetEmail() { $data = ['email' => 'test_value_email']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -140,7 +140,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -156,7 +156,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetFax() { $data = ['fax' => 'test_value_fax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -172,7 +172,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetFirstname() { $data = ['firstname' => 'test_value_firstname']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -188,7 +188,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetLastname() { $data = ['lastname' => 'test_value_lastname']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -204,7 +204,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetMiddlename() { $data = ['middlename' => 'test_value_middlename']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -220,7 +220,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -236,7 +236,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetPostcode() { $data = ['postcode' => 'test_value_postcode']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -252,7 +252,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetPrefix() { $data = ['prefix' => 'test_value_prefix']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -268,7 +268,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetQuoteAddressId() { $data = ['quote_address_id' => 'test_value_quote_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -284,7 +284,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetRegion() { $data = ['region' => 'test_value_region']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -300,7 +300,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetRegionId() { $data = ['region_id' => 'test_value_region_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -316,7 +316,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetStreet() { $data = ['street' => 'test_value_street']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -332,7 +332,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetSuffix() { $data = ['suffix' => 'test_value_suffix']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -348,7 +348,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetTelephone() { $data = ['telephone' => 'test_value_telephone']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -364,7 +364,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetVatId() { $data = ['vat_id' => 'test_value_vat_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -380,7 +380,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetVatIsValid() { $data = ['vat_is_valid' => 'test_value_vat_is_valid']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -396,7 +396,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetVatRequestDate() { $data = ['vat_request_date' => 'test_value_vat_request_date']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -412,7 +412,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetVatRequestId() { $data = ['vat_request_id' => 'test_value_vat_request_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -428,7 +428,7 @@ class OrderAddressTest extends \PHPUnit_Framework_TestCase public function testGetVatRequestSuccess() { $data = ['vat_request_success' => 'test_value_vat_request_success']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderItemTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderItemTest.php index 591296027d26eadaf2075203e1328538fdd066c1..2caacd1c38cc4cd02d629d9fde696984db9c07d7 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderItemTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderItemTest.php @@ -34,7 +34,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetAdditionalData() { $data = ['additional_data' => 'test_value_additional_data']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -50,7 +50,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetAmountRefunded() { $data = ['amount_refunded' => 'test_value_amount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -66,7 +66,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetAppliedRuleIds() { $data = ['applied_rule_ids' => 'test_value_applied_rule_ids']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -82,7 +82,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountRefunded() { $data = ['base_amount_refunded' => 'test_value_base_amount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -98,7 +98,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseCost() { $data = ['base_cost' => 'test_value_base_cost']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -114,7 +114,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountAmount() { $data = ['base_discount_amount' => 'test_value_base_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -130,7 +130,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountInvoiced() { $data = ['base_discount_invoiced' => 'test_value_base_discount_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -146,7 +146,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountRefunded() { $data = ['base_discount_refunded' => 'test_value_base_discount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -162,7 +162,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxAmount() { $data = ['base_hidden_tax_amount' => 'test_value_base_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -178,7 +178,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxInvoiced() { $data = ['base_hidden_tax_invoiced' => 'test_value_base_hidden_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -194,7 +194,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxRefunded() { $data = ['base_hidden_tax_refunded' => 'test_value_base_hidden_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -210,7 +210,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseOriginalPrice() { $data = ['base_original_price' => 'test_value_base_original_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -226,7 +226,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBasePrice() { $data = ['base_price' => 'test_value_base_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -242,7 +242,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBasePriceInclTax() { $data = ['base_price_incl_tax' => 'test_value_base_price_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -258,7 +258,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseRowInvoiced() { $data = ['base_row_invoiced' => 'test_value_base_row_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -274,7 +274,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseRowTotal() { $data = ['base_row_total' => 'test_value_base_row_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -290,7 +290,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseRowTotalInclTax() { $data = ['base_row_total_incl_tax' => 'test_value_base_row_total_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -306,7 +306,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxAmount() { $data = ['base_tax_amount' => 'test_value_base_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -322,7 +322,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxBeforeDiscount() { $data = ['base_tax_before_discount' => 'test_value_base_tax_before_discount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -338,7 +338,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxInvoiced() { $data = ['base_tax_invoiced' => 'test_value_base_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -354,7 +354,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxRefunded() { $data = ['base_tax_refunded' => 'test_value_base_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -370,7 +370,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxAppliedAmount() { $data = ['base_weee_tax_applied_amount' => 'test_value_base_weee_tax_applied_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -386,7 +386,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxAppliedRowAmnt() { $data = ['base_weee_tax_applied_row_amnt' => 'test_value_base_weee_tax_applied_row_amnt']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -402,7 +402,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxDisposition() { $data = ['base_weee_tax_disposition' => 'test_value_base_weee_tax_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -418,7 +418,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetBaseWeeeTaxRowDisposition() { $data = ['base_weee_tax_row_disposition' => 'test_value_base_weee_tax_row_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -434,7 +434,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -450,7 +450,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetDescription() { $data = ['description' => 'test_value_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -466,7 +466,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetDiscountAmount() { $data = ['discount_amount' => 'test_value_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -482,7 +482,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetDiscountInvoiced() { $data = ['discount_invoiced' => 'test_value_discount_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -498,7 +498,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetDiscountPercent() { $data = ['discount_percent' => 'test_value_discount_percent']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -514,7 +514,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetDiscountRefunded() { $data = ['discount_refunded' => 'test_value_discount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -530,7 +530,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetEventId() { $data = ['event_id' => 'test_value_event_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -546,7 +546,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetExtOrderItemId() { $data = ['ext_order_item_id' => 'test_value_ext_order_item_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -562,7 +562,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetFreeShipping() { $data = ['free_shipping' => 'test_value_free_shipping']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -578,7 +578,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwBasePrice() { $data = ['gw_base_price' => 'test_value_gw_base_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -594,7 +594,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwBasePriceInvoiced() { $data = ['gw_base_price_invoiced' => 'test_value_gw_base_price_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -610,7 +610,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwBasePriceRefunded() { $data = ['gw_base_price_refunded' => 'test_value_gw_base_price_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -626,7 +626,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwBaseTaxAmount() { $data = ['gw_base_tax_amount' => 'test_value_gw_base_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -642,7 +642,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwBaseTaxAmountInvoiced() { $data = ['gw_base_tax_amount_invoiced' => 'test_value_gw_base_tax_amount_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -658,7 +658,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwBaseTaxAmountRefunded() { $data = ['gw_base_tax_amount_refunded' => 'test_value_gw_base_tax_amount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -674,7 +674,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwId() { $data = ['gw_id' => 'test_value_gw_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -690,7 +690,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwPrice() { $data = ['gw_price' => 'test_value_gw_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -706,7 +706,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwPriceInvoiced() { $data = ['gw_price_invoiced' => 'test_value_gw_price_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -722,7 +722,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwPriceRefunded() { $data = ['gw_price_refunded' => 'test_value_gw_price_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -738,7 +738,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwTaxAmount() { $data = ['gw_tax_amount' => 'test_value_gw_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -754,7 +754,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwTaxAmountInvoiced() { $data = ['gw_tax_amount_invoiced' => 'test_value_gw_tax_amount_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -770,7 +770,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetGwTaxAmountRefunded() { $data = ['gw_tax_amount_refunded' => 'test_value_gw_tax_amount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -786,7 +786,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxAmount() { $data = ['hidden_tax_amount' => 'test_value_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -802,7 +802,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxCanceled() { $data = ['hidden_tax_canceled' => 'test_value_hidden_tax_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -818,7 +818,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxInvoiced() { $data = ['hidden_tax_invoiced' => 'test_value_hidden_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -834,7 +834,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxRefunded() { $data = ['hidden_tax_refunded' => 'test_value_hidden_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -850,7 +850,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetIsNominal() { $data = ['is_nominal' => 'test_value_is_nominal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -866,7 +866,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetIsQtyDecimal() { $data = ['is_qty_decimal' => 'test_value_is_qty_decimal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -882,7 +882,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetIsVirtual() { $data = ['is_virtual' => 'test_value_is_virtual']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -898,7 +898,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetItemId() { $data = ['item_id' => 'test_value_item_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -914,7 +914,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetLockedDoInvoice() { $data = ['locked_do_invoice' => 'test_value_locked_do_invoice']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -930,7 +930,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetLockedDoShip() { $data = ['locked_do_ship' => 'test_value_locked_do_ship']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -946,7 +946,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetName() { $data = ['name' => 'test_value_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -962,7 +962,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetNoDiscount() { $data = ['no_discount' => 'test_value_no_discount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -978,7 +978,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetOrderId() { $data = ['order_id' => 'test_value_order_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -994,7 +994,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetOriginalPrice() { $data = ['original_price' => 'test_value_original_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1010,7 +1010,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetParentItemId() { $data = ['parent_item_id' => 'test_value_parent_item_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1026,7 +1026,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetPrice() { $data = ['price' => 'test_value_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1042,7 +1042,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetPriceInclTax() { $data = ['price_incl_tax' => 'test_value_price_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1058,7 +1058,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetProductId() { $data = ['product_id' => 'test_value_product_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1074,7 +1074,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetProductOptions() { $data = ['product_options' => 'test_value_product_options']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1090,7 +1090,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetProductType() { $data = ['product_type' => 'test_value_product_type']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1106,7 +1106,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQtyBackordered() { $data = ['qty_backordered' => 'test_value_qty_backordered']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1122,7 +1122,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQtyCanceled() { $data = ['qty_canceled' => 'test_value_qty_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1138,7 +1138,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQtyInvoiced() { $data = ['qty_invoiced' => 'test_value_qty_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1154,7 +1154,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQtyOrdered() { $data = ['qty_ordered' => 'test_value_qty_ordered']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1170,7 +1170,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQtyRefunded() { $data = ['qty_refunded' => 'test_value_qty_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1186,7 +1186,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQtyReturned() { $data = ['qty_returned' => 'test_value_qty_returned']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1202,7 +1202,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQtyShipped() { $data = ['qty_shipped' => 'test_value_qty_shipped']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1218,7 +1218,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetQuoteItemId() { $data = ['quote_item_id' => 'test_value_quote_item_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1234,7 +1234,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetRowInvoiced() { $data = ['row_invoiced' => 'test_value_row_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1250,7 +1250,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetRowTotal() { $data = ['row_total' => 'test_value_row_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1266,7 +1266,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetRowTotalInclTax() { $data = ['row_total_incl_tax' => 'test_value_row_total_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1282,7 +1282,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetRowWeight() { $data = ['row_weight' => 'test_value_row_weight']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1298,7 +1298,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetSku() { $data = ['sku' => 'test_value_sku']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1314,7 +1314,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetStoreId() { $data = ['store_id' => 'test_value_store_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1330,7 +1330,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxAmount() { $data = ['tax_amount' => 'test_value_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1346,7 +1346,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxBeforeDiscount() { $data = ['tax_before_discount' => 'test_value_tax_before_discount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1362,7 +1362,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxCanceled() { $data = ['tax_canceled' => 'test_value_tax_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1378,7 +1378,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxInvoiced() { $data = ['tax_invoiced' => 'test_value_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1394,7 +1394,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxPercent() { $data = ['tax_percent' => 'test_value_tax_percent']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1410,7 +1410,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetTaxRefunded() { $data = ['tax_refunded' => 'test_value_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1426,7 +1426,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetUpdatedAt() { $data = ['updated_at' => 'test_value_updated_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1442,7 +1442,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxApplied() { $data = ['weee_tax_applied' => 'test_value_weee_tax_applied']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1458,7 +1458,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxAppliedAmount() { $data = ['weee_tax_applied_amount' => 'test_value_weee_tax_applied_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1474,7 +1474,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxAppliedRowAmount() { $data = ['weee_tax_applied_row_amount' => 'test_value_weee_tax_applied_row_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1490,7 +1490,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxDisposition() { $data = ['weee_tax_disposition' => 'test_value_weee_tax_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1506,7 +1506,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetWeeeTaxRowDisposition() { $data = ['weee_tax_row_disposition' => 'test_value_weee_tax_row_disposition']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1522,7 +1522,7 @@ class OrderItemTest extends \PHPUnit_Framework_TestCase public function testGetWeight() { $data = ['weight' => 'test_value_weight']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderPaymentTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderPaymentTest.php index cbcaa761612090e597b56ed5a6e80eb39083622d..b088d6677a319abb417806ad9912cb9296d05d79 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderPaymentTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderPaymentTest.php @@ -34,7 +34,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAccountStatus() { $data = ['account_status' => 'test_value_account_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -50,7 +50,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAdditionalData() { $data = ['additional_data' => 'test_value_additional_data']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -66,7 +66,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAdditionalInformation() { $data = ['additional_information' => 'test_value_additional_information']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -82,7 +82,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAddressStatus() { $data = ['address_status' => 'test_value_address_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -98,7 +98,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAmountAuthorized() { $data = ['amount_authorized' => 'test_value_amount_authorized']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -114,7 +114,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAmountCanceled() { $data = ['amount_canceled' => 'test_value_amount_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -130,7 +130,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAmountOrdered() { $data = ['amount_ordered' => 'test_value_amount_ordered']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -146,7 +146,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAmountPaid() { $data = ['amount_paid' => 'test_value_amount_paid']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -162,7 +162,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAmountRefunded() { $data = ['amount_refunded' => 'test_value_amount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -178,7 +178,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetAnetTransMethod() { $data = ['anet_trans_method' => 'test_value_anet_trans_method']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -194,7 +194,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountAuthorized() { $data = ['base_amount_authorized' => 'test_value_base_amount_authorized']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -210,7 +210,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountCanceled() { $data = ['base_amount_canceled' => 'test_value_base_amount_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -226,7 +226,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountOrdered() { $data = ['base_amount_ordered' => 'test_value_base_amount_ordered']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -242,7 +242,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountPaid() { $data = ['base_amount_paid' => 'test_value_base_amount_paid']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -258,7 +258,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountPaidOnline() { $data = ['base_amount_paid_online' => 'test_value_base_amount_paid_online']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -274,7 +274,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountRefunded() { $data = ['base_amount_refunded' => 'test_value_base_amount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -290,7 +290,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseAmountRefundedOnline() { $data = ['base_amount_refunded_online' => 'test_value_base_amount_refunded_online']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -306,7 +306,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingAmount() { $data = ['base_shipping_amount' => 'test_value_base_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -322,7 +322,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingCaptured() { $data = ['base_shipping_captured' => 'test_value_base_shipping_captured']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -338,7 +338,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingRefunded() { $data = ['base_shipping_refunded' => 'test_value_base_shipping_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -354,7 +354,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcApproval() { $data = ['cc_approval' => 'test_value_cc_approval']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -370,7 +370,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcAvsStatus() { $data = ['cc_avs_status' => 'test_value_cc_avs_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -386,7 +386,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcCidStatus() { $data = ['cc_cid_status' => 'test_value_cc_cid_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -402,7 +402,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcDebugRequestBody() { $data = ['cc_debug_request_body' => 'test_value_cc_debug_request_body']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -418,7 +418,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcDebugResponseBody() { $data = ['cc_debug_response_body' => 'test_value_cc_debug_response_body']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -434,7 +434,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcDebugResponseSerialized() { $data = ['cc_debug_response_serialized' => 'test_value_cc_debug_response_serialized']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -450,7 +450,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcExpMonth() { $data = ['cc_exp_month' => 'test_value_cc_exp_month']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -466,7 +466,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcExpYear() { $data = ['cc_exp_year' => 'test_value_cc_exp_year']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -482,7 +482,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcLast4() { $data = ['cc_last4' => 'test_value_cc_last4']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -498,7 +498,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcNumberEnc() { $data = ['cc_number_enc' => 'test_value_cc_number_enc']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -514,7 +514,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcOwner() { $data = ['cc_owner' => 'test_value_cc_owner']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -530,7 +530,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcSecureVerify() { $data = ['cc_secure_verify' => 'test_value_cc_secure_verify']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -546,7 +546,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcSsIssue() { $data = ['cc_ss_issue' => 'test_value_cc_ss_issue']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -562,7 +562,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcSsStartMonth() { $data = ['cc_ss_start_month' => 'test_value_cc_ss_start_month']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -578,7 +578,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcSsStartYear() { $data = ['cc_ss_start_year' => 'test_value_cc_ss_start_year']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -594,7 +594,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcStatus() { $data = ['cc_status' => 'test_value_cc_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -610,7 +610,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcStatusDescription() { $data = ['cc_status_description' => 'test_value_cc_status_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -626,7 +626,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcTransId() { $data = ['cc_trans_id' => 'test_value_cc_trans_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -642,7 +642,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetCcType() { $data = ['cc_type' => 'test_value_cc_type']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -658,7 +658,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetEcheckAccountName() { $data = ['echeck_account_name' => 'test_value_echeck_account_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -674,7 +674,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetEcheckAccountType() { $data = ['echeck_account_type' => 'test_value_echeck_account_type']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -690,7 +690,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetEcheckBankName() { $data = ['echeck_bank_name' => 'test_value_echeck_bank_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -706,7 +706,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetEcheckRoutingNumber() { $data = ['echeck_routing_number' => 'test_value_echeck_routing_number']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -722,7 +722,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetEcheckType() { $data = ['echeck_type' => 'test_value_echeck_type']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -738,7 +738,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -754,7 +754,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetLastTransId() { $data = ['last_trans_id' => 'test_value_last_trans_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -770,7 +770,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetMethod() { $data = ['method' => 'test_value_method']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -786,7 +786,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -802,7 +802,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetPoNumber() { $data = ['po_number' => 'test_value_po_number']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -818,7 +818,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetProtectionEligibility() { $data = ['protection_eligibility' => 'test_value_protection_eligibility']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -834,7 +834,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetQuotePaymentId() { $data = ['quote_payment_id' => 'test_value_quote_payment_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -850,7 +850,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetShippingAmount() { $data = ['shipping_amount' => 'test_value_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -866,7 +866,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetShippingCaptured() { $data = ['shipping_captured' => 'test_value_shipping_captured']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -882,7 +882,7 @@ class OrderPaymentTest extends \PHPUnit_Framework_TestCase public function testGetShippingRefunded() { $data = ['shipping_refunded' => 'test_value_shipping_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderStatusHistoryTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderStatusHistoryTest.php index 6c2c10cb26e5f774157827303ae2a6d352ac0568..72eed2ed39e1d062f1590b46fcaf38a940fe5912 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderStatusHistoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderStatusHistoryTest.php @@ -28,7 +28,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetComment() { $data = ['comment' => 'test_value_comment']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetEntityName() { $data = ['entity_name' => 'test_value_entity_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetIsCustomerNotified() { $data = ['is_customer_notified' => 'test_value_is_customer_notified']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetIsVisibleOnFront() { $data = ['is_visible_on_front' => 'test_value_is_visible_on_front']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -124,7 +124,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -140,7 +140,7 @@ class OrderStatusHistoryTest extends \PHPUnit_Framework_TestCase public function testGetStatus() { $data = ['status' => 'test_value_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderTest.php index 1c973d5cdabae9f3d0423a9f41d52d36124eec9d..430546cbe41453c73930d3d96d2bc4c07ba076a6 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/OrderTest.php @@ -35,7 +35,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetAdjustmentNegative() { $data = ['adjustment_negative' => 'test_value_adjustment_negative']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -51,7 +51,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetAdjustmentPositive() { $data = ['adjustment_positive' => 'test_value_adjustment_positive']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -67,7 +67,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetAppliedRuleIds() { $data = ['applied_rule_ids' => 'test_value_applied_rule_ids']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -83,7 +83,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseAdjustmentNegative() { $data = ['base_adjustment_negative' => 'test_value_base_adjustment_negative']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -99,7 +99,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseAdjustmentPositive() { $data = ['base_adjustment_positive' => 'test_value_base_adjustment_positive']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -115,7 +115,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseCurrencyCode() { $data = ['base_currency_code' => 'test_value_base_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -131,7 +131,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountAmount() { $data = ['base_discount_amount' => 'test_value_base_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -147,7 +147,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountCanceled() { $data = ['base_discount_canceled' => 'test_value_base_discount_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -163,7 +163,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountInvoiced() { $data = ['base_discount_invoiced' => 'test_value_base_discount_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -179,7 +179,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseDiscountRefunded() { $data = ['base_discount_refunded' => 'test_value_base_discount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -195,7 +195,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseGrandTotal() { $data = ['base_grand_total' => 'test_value_base_grand_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -211,7 +211,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxAmount() { $data = ['base_hidden_tax_amount' => 'test_value_base_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -227,7 +227,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxInvoiced() { $data = ['base_hidden_tax_invoiced' => 'test_value_base_hidden_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -243,7 +243,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseHiddenTaxRefunded() { $data = ['base_hidden_tax_refunded' => 'test_value_base_hidden_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -259,7 +259,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingAmount() { $data = ['base_shipping_amount' => 'test_value_base_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -275,7 +275,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingCanceled() { $data = ['base_shipping_canceled' => 'test_value_base_shipping_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -291,7 +291,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingDiscountAmount() { $data = ['base_shipping_discount_amount' => 'test_value_base_shipping_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -307,7 +307,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingHiddenTaxAmnt() { $data = ['base_shipping_hidden_tax_amnt' => 'test_value_base_shipping_hidden_tax_amnt']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -323,7 +323,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingInclTax() { $data = ['base_shipping_incl_tax' => 'test_value_base_shipping_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -339,7 +339,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingInvoiced() { $data = ['base_shipping_invoiced' => 'test_value_base_shipping_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -355,7 +355,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingRefunded() { $data = ['base_shipping_refunded' => 'test_value_base_shipping_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -371,7 +371,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingTaxAmount() { $data = ['base_shipping_tax_amount' => 'test_value_base_shipping_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -387,7 +387,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseShippingTaxRefunded() { $data = ['base_shipping_tax_refunded' => 'test_value_base_shipping_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -403,7 +403,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotal() { $data = ['base_subtotal' => 'test_value_base_subtotal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -419,7 +419,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotalCanceled() { $data = ['base_subtotal_canceled' => 'test_value_base_subtotal_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -435,7 +435,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotalInclTax() { $data = ['base_subtotal_incl_tax' => 'test_value_base_subtotal_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -451,7 +451,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotalInvoiced() { $data = ['base_subtotal_invoiced' => 'test_value_base_subtotal_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -467,7 +467,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseSubtotalRefunded() { $data = ['base_subtotal_refunded' => 'test_value_base_subtotal_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -483,7 +483,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxAmount() { $data = ['base_tax_amount' => 'test_value_base_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -499,7 +499,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxCanceled() { $data = ['base_tax_canceled' => 'test_value_base_tax_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -515,7 +515,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxInvoiced() { $data = ['base_tax_invoiced' => 'test_value_base_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -531,7 +531,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTaxRefunded() { $data = ['base_tax_refunded' => 'test_value_base_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -547,7 +547,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalCanceled() { $data = ['base_total_canceled' => 'test_value_base_total_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -563,7 +563,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalDue() { $data = ['base_total_due' => 'test_value_base_total_due']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -579,7 +579,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalInvoiced() { $data = ['base_total_invoiced' => 'test_value_base_total_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -595,7 +595,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalInvoicedCost() { $data = ['base_total_invoiced_cost' => 'test_value_base_total_invoiced_cost']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -611,7 +611,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalOfflineRefunded() { $data = ['base_total_offline_refunded' => 'test_value_base_total_offline_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -627,7 +627,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalOnlineRefunded() { $data = ['base_total_online_refunded' => 'test_value_base_total_online_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -643,7 +643,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalPaid() { $data = ['base_total_paid' => 'test_value_base_total_paid']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -659,7 +659,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalQtyOrdered() { $data = ['base_total_qty_ordered' => 'test_value_base_total_qty_ordered']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -675,7 +675,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseTotalRefunded() { $data = ['base_total_refunded' => 'test_value_base_total_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -691,7 +691,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseToGlobalRate() { $data = ['base_to_global_rate' => 'test_value_base_to_global_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -707,7 +707,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBaseToOrderRate() { $data = ['base_to_order_rate' => 'test_value_base_to_order_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -723,7 +723,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBillingAddressId() { $data = ['billing_address_id' => 'test_value_billing_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -739,7 +739,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCanShipPartially() { $data = ['can_ship_partially' => 'test_value_can_ship_partially']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -755,7 +755,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCanShipPartiallyItem() { $data = ['can_ship_partially_item' => 'test_value_can_ship_partially_item']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -771,7 +771,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCouponCode() { $data = ['coupon_code' => 'test_value_coupon_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -787,7 +787,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -803,7 +803,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerDob() { $data = ['customer_dob' => 'test_value_customer_dob']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -819,7 +819,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerEmail() { $data = ['customer_email' => 'test_value_customer_email']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -835,7 +835,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerFirstname() { $data = ['customer_firstname' => 'test_value_customer_firstname']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -851,7 +851,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerGender() { $data = ['customer_gender' => 'test_value_customer_gender']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -867,7 +867,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerGroupId() { $data = ['customer_group_id' => 'test_value_customer_group_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -883,7 +883,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerId() { $data = ['customer_id' => 'test_value_customer_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -899,7 +899,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerIsGuest() { $data = ['customer_is_guest' => 'test_value_customer_is_guest']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -915,7 +915,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerLastname() { $data = ['customer_lastname' => 'test_value_customer_lastname']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -931,7 +931,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerMiddlename() { $data = ['customer_middlename' => 'test_value_customer_middlename']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -947,7 +947,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerNote() { $data = ['customer_note' => 'test_value_customer_note']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -963,7 +963,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerNoteNotify() { $data = ['customer_note_notify' => 'test_value_customer_note_notify']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -979,7 +979,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerPrefix() { $data = ['customer_prefix' => 'test_value_customer_prefix']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -995,7 +995,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerSuffix() { $data = ['customer_suffix' => 'test_value_customer_suffix']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1011,7 +1011,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetCustomerTaxvat() { $data = ['customer_taxvat' => 'test_value_customer_taxvat']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1027,7 +1027,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetDiscountAmount() { $data = ['discount_amount' => 'test_value_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1043,7 +1043,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetDiscountCanceled() { $data = ['discount_canceled' => 'test_value_discount_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1059,7 +1059,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetDiscountDescription() { $data = ['discount_description' => 'test_value_discount_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1075,7 +1075,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetDiscountInvoiced() { $data = ['discount_invoiced' => 'test_value_discount_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1091,7 +1091,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetDiscountRefunded() { $data = ['discount_refunded' => 'test_value_discount_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1107,7 +1107,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetEditIncrement() { $data = ['edit_increment' => 'test_value_edit_increment']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1123,7 +1123,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetEmailSent() { $data = ['email_sent' => 'test_value_email_sent']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1139,7 +1139,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1155,7 +1155,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetExtCustomerId() { $data = ['ext_customer_id' => 'test_value_ext_customer_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1171,7 +1171,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetExtOrderId() { $data = ['ext_order_id' => 'test_value_ext_order_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1187,7 +1187,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetForcedShipmentWithInvoice() { $data = ['forced_shipment_with_invoice' => 'test_value_forced_shipment_with_invoice']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1203,7 +1203,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetGlobalCurrencyCode() { $data = ['global_currency_code' => 'test_value_global_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1219,7 +1219,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetGrandTotal() { $data = ['grand_total' => 'test_value_grand_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1235,7 +1235,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxAmount() { $data = ['hidden_tax_amount' => 'test_value_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1251,7 +1251,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxInvoiced() { $data = ['hidden_tax_invoiced' => 'test_value_hidden_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1267,7 +1267,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetHiddenTaxRefunded() { $data = ['hidden_tax_refunded' => 'test_value_hidden_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1283,7 +1283,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetHoldBeforeState() { $data = ['hold_before_state' => 'test_value_hold_before_state']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1299,7 +1299,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetHoldBeforeStatus() { $data = ['hold_before_status' => 'test_value_hold_before_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1315,7 +1315,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetIncrementId() { $data = ['increment_id' => 'test_value_increment_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1331,7 +1331,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetIsVirtual() { $data = ['is_virtual' => 'test_value_is_virtual']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1347,7 +1347,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetOrderCurrencyCode() { $data = ['order_currency_code' => 'test_value_order_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1363,7 +1363,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetOriginalIncrementId() { $data = ['original_increment_id' => 'test_value_original_increment_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1379,7 +1379,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetPaymentAuthorizationAmount() { $data = ['payment_authorization_amount' => 'test_value_payment_authorization_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1395,7 +1395,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetPaymentAuthExpiration() { $data = ['payment_auth_expiration' => 'test_value_payment_auth_expiration']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1411,7 +1411,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetProtectCode() { $data = ['protect_code' => 'test_value_protect_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1427,7 +1427,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetQuoteAddressId() { $data = ['quote_address_id' => 'test_value_quote_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1443,7 +1443,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetQuoteId() { $data = ['quote_id' => 'test_value_quote_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1459,7 +1459,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetRelationChildId() { $data = ['relation_child_id' => 'test_value_relation_child_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1475,7 +1475,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetRelationChildRealId() { $data = ['relation_child_real_id' => 'test_value_relation_child_real_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1491,7 +1491,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetRelationParentId() { $data = ['relation_parent_id' => 'test_value_relation_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1507,7 +1507,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetRelationParentRealId() { $data = ['relation_parent_real_id' => 'test_value_relation_parent_real_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1523,7 +1523,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetRemoteIp() { $data = ['remote_ip' => 'test_value_remote_ip']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1539,7 +1539,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingAddressId() { $data = ['shipping_address_id' => 'test_value_shipping_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1555,7 +1555,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingAmount() { $data = ['shipping_amount' => 'test_value_shipping_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1571,7 +1571,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingCanceled() { $data = ['shipping_canceled' => 'test_value_shipping_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1587,7 +1587,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingDescription() { $data = ['shipping_description' => 'test_value_shipping_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1603,7 +1603,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingDiscountAmount() { $data = ['shipping_discount_amount' => 'test_value_shipping_discount_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1619,7 +1619,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingHiddenTaxAmount() { $data = ['shipping_hidden_tax_amount' => 'test_value_shipping_hidden_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1635,7 +1635,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingInclTax() { $data = ['shipping_incl_tax' => 'test_value_shipping_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1651,7 +1651,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingInvoiced() { $data = ['shipping_invoiced' => 'test_value_shipping_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1667,7 +1667,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingMethod() { $data = ['shipping_method' => 'test_value_shipping_method']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1683,7 +1683,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingRefunded() { $data = ['shipping_refunded' => 'test_value_shipping_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1699,7 +1699,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingTaxAmount() { $data = ['shipping_tax_amount' => 'test_value_shipping_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1715,7 +1715,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingTaxRefunded() { $data = ['shipping_tax_refunded' => 'test_value_shipping_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1731,7 +1731,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetState() { $data = ['state' => 'test_value_state']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1747,7 +1747,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetStatus() { $data = ['status' => 'test_value_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1763,7 +1763,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetStoreCurrencyCode() { $data = ['store_currency_code' => 'test_value_store_currency_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1779,7 +1779,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetStoreId() { $data = ['store_id' => 'test_value_store_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1795,7 +1795,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetStoreName() { $data = ['store_name' => 'test_value_store_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1811,7 +1811,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetStoreToBaseRate() { $data = ['store_to_base_rate' => 'test_value_store_to_base_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1827,7 +1827,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetStoreToOrderRate() { $data = ['store_to_order_rate' => 'test_value_store_to_order_rate']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1843,7 +1843,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetSubtotal() { $data = ['subtotal' => 'test_value_subtotal']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1859,7 +1859,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetSubtotalCanceled() { $data = ['subtotal_canceled' => 'test_value_subtotal_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1875,7 +1875,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetSubtotalInclTax() { $data = ['subtotal_incl_tax' => 'test_value_subtotal_incl_tax']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1891,7 +1891,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetSubtotalInvoiced() { $data = ['subtotal_invoiced' => 'test_value_subtotal_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1907,7 +1907,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetSubtotalRefunded() { $data = ['subtotal_refunded' => 'test_value_subtotal_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1923,7 +1923,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTaxAmount() { $data = ['tax_amount' => 'test_value_tax_amount']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1939,7 +1939,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTaxCanceled() { $data = ['tax_canceled' => 'test_value_tax_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1955,7 +1955,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTaxInvoiced() { $data = ['tax_invoiced' => 'test_value_tax_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1971,7 +1971,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTaxRefunded() { $data = ['tax_refunded' => 'test_value_tax_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -1987,7 +1987,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalCanceled() { $data = ['total_canceled' => 'test_value_total_canceled']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2003,7 +2003,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalDue() { $data = ['total_due' => 'test_value_total_due']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2019,7 +2019,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalInvoiced() { $data = ['total_invoiced' => 'test_value_total_invoiced']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2035,7 +2035,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalItemCount() { $data = ['total_item_count' => 'test_value_total_item_count']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2051,7 +2051,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalOfflineRefunded() { $data = ['total_offline_refunded' => 'test_value_total_offline_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2067,7 +2067,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalOnlineRefunded() { $data = ['total_online_refunded' => 'test_value_total_online_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2083,7 +2083,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalPaid() { $data = ['total_paid' => 'test_value_total_paid']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2099,7 +2099,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalQtyOrdered() { $data = ['total_qty_ordered' => 'test_value_total_qty_ordered']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2115,7 +2115,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetTotalRefunded() { $data = ['total_refunded' => 'test_value_total_refunded']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2131,7 +2131,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetUpdatedAt() { $data = ['updated_at' => 'test_value_updated_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2147,7 +2147,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetWeight() { $data = ['weight' => 'test_value_weight']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2163,7 +2163,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetXForwardedFor() { $data = ['x_forwarded_for' => 'test_value_x_forwarded_for']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2179,7 +2179,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetItems() { $data = ['items' => 'test_value_items']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2195,7 +2195,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetBillingAddress() { $data = ['billing_address' => 'test_value_billing_address']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2211,7 +2211,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetShippingAddress() { $data = ['shipping_address' => 'test_value_shipping_address']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -2227,7 +2227,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testGetPayments() { $data = ['payments' => 'test_value_payments']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentItemTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentItemTest.php index 8123abfc2b3df8941260ca22de62eff11a7d00e6..d267bfc852ef8eddc4cc2f7b9c2643fa9a55a767 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentItemTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentItemTest.php @@ -28,7 +28,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetAdditionalData() { $data = ['additional_data' => 'test_value_additional_data']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetDescription() { $data = ['description' => 'test_value_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetName() { $data = ['name' => 'test_value_name']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetOrderItemId() { $data = ['order_item_id' => 'test_value_order_item_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -124,7 +124,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetPrice() { $data = ['price' => 'test_value_price']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -140,7 +140,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetProductId() { $data = ['product_id' => 'test_value_product_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -156,7 +156,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetQty() { $data = ['qty' => 'test_value_qty']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -172,7 +172,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetRowTotal() { $data = ['row_total' => 'test_value_row_total']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -188,7 +188,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetSku() { $data = ['sku' => 'test_value_sku']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -204,7 +204,7 @@ class ShipmentItemTest extends \PHPUnit_Framework_TestCase public function testGetWeight() { $data = ['weight' => 'test_value_weight']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTest.php index 907aefed9e915dcb91b17dc5a5ee8bf3769dce91..925d6f80882f0f5320424cee7df0fc3c33c1c729 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTest.php @@ -28,7 +28,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetBillingAddressId() { $data = ['billing_address_id' => 'test_value_billing_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetCustomerId() { $data = ['customer_id' => 'test_value_customer_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetEmailSent() { $data = ['email_sent' => 'test_value_email_sent']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetIncrementId() { $data = ['increment_id' => 'test_value_increment_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -124,7 +124,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetOrderId() { $data = ['order_id' => 'test_value_order_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -140,7 +140,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetPackages() { $data = ['packages' => 'test_value_packages']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -156,7 +156,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetShipmentStatus() { $data = ['shipment_status' => 'test_value_shipment_status']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -172,7 +172,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetShippingAddressId() { $data = ['shipping_address_id' => 'test_value_shipping_address_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -188,7 +188,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetShippingLabel() { $data = ['shipping_label' => 'test_value_shipping_label']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -204,7 +204,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetStoreId() { $data = ['store_id' => 'test_value_store_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -220,7 +220,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetTotalQty() { $data = ['total_qty' => 'test_value_total_qty']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -236,7 +236,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetTotalWeight() { $data = ['total_weight' => 'test_value_total_weight']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -252,7 +252,7 @@ class ShipmentTest extends \PHPUnit_Framework_TestCase public function testGetUpdatedAt() { $data = ['updated_at' => 'test_value_updated_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTrackTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTrackTest.php index 77cc1739e13a20a2b33267fce007a8ac33233d26..f464b174a0a74c74e4825aed6a7cbb30da256246 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTrackTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/Data/ShipmentTrackTest.php @@ -28,7 +28,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetCarrierCode() { $data = ['carrier_code' => 'test_value_carrier_code']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -44,7 +44,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetCreatedAt() { $data = ['created_at' => 'test_value_created_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -60,7 +60,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetDescription() { $data = ['description' => 'test_value_description']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -76,7 +76,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetEntityId() { $data = ['entity_id' => 'test_value_entity_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -92,7 +92,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetOrderId() { $data = ['order_id' => 'test_value_order_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -108,7 +108,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetParentId() { $data = ['parent_id' => 'test_value_parent_id']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -124,7 +124,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetQty() { $data = ['qty' => 'test_value_qty']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -140,7 +140,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetTitle() { $data = ['title' => 'test_value_title']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -156,7 +156,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetTrackNumber() { $data = ['track_number' => 'test_value_track_number']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -172,7 +172,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetUpdatedAt() { $data = ['updated_at' => 'test_value_updated_at']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); @@ -188,7 +188,7 @@ class ShipmentTrackTest extends \PHPUnit_Framework_TestCase public function testGetWeight() { $data = ['weight' => 'test_value_weight']; - $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder') + $abstractBuilderMock = $this->getMockBuilder('Magento\Framework\Api\ExtensibleObjectBuilder') ->setMethods(['getData']) ->disableOriginalConstructor() ->getMockForAbstractClass(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/InvoiceReadTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/InvoiceReadTest.php index 3caefcc055173a3d27d08f4d27a0e9d9bad60a16..ed4df9ca1482d5eb596cbb7e0cb0471263cfa7ce 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/InvoiceReadTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/InvoiceReadTest.php @@ -99,7 +99,7 @@ class InvoiceReadTest extends \PHPUnit_Framework_TestCase */ public function testSearch() { - $searchCriteria = $this->getMock('Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteria = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false); $this->invoiceListMock->expects($this->once()) ->method('invoke') ->with($searchCriteria) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/OrderReadTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/OrderReadTest.php index 302b128cf0108e4670721e0edf400264a7761d13..34ce6fd75085d94160acb108b254e5531d3a3f15 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/OrderReadTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/OrderReadTest.php @@ -112,7 +112,7 @@ class OrderReadTest extends \PHPUnit_Framework_TestCase */ public function testSearch() { - $searchCriteria = $this->getMock('Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteria = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false); $this->orderListMock->expects($this->once()) ->method('invoke') ->with($searchCriteria) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/ShipmentReadTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/ShipmentReadTest.php index d2fffc4c0e01d8141f10aa99f4c2364985d55715..0179ded9b53865d898ea72a37213e50dd3e47889 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/ShipmentReadTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/ShipmentReadTest.php @@ -112,7 +112,7 @@ class ShipmentReadTest extends \PHPUnit_Framework_TestCase */ public function testSearch() { - $searchCriteria = $this->getMock('Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteria = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false); $this->shipmentListMock->expects($this->once()) ->method('invoke') ->with($searchCriteria) diff --git a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/TransactionReadTest.php b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/TransactionReadTest.php index d117dbe19050b47a9265ad100730dbf5937367d7..6010d00c1aef230289e9a4d2466fcc45c358997d 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Service/V1/TransactionReadTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Service/V1/TransactionReadTest.php @@ -97,9 +97,9 @@ class TransactionReadTest extends \PHPUnit_Framework_TestCase public function testSearch() { /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria + * @var \Magento\Framework\Api\SearchCriteria $searchCriteria */ - $searchCriteria = $this->getMock('Magento\Framework\Service\V1\Data\SearchCriteria', [], [], '', false); + $searchCriteria = $this->getMock('Magento\Framework\Api\SearchCriteria', [], [], '', false); $transactions = $this->getMock('Magento\Sales\Model\Order\Payment\Transaction', [], [], '', false); $transactionDto = $this->getMock('Magento\Sales\Service\V1\Data\Transaction', [], [], '', false); $searchResults = $this->getMock('Magento\Sales\Service\V1\Data\TransactionSearchResults', [], [], '', false); diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/DefaultReaderTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/DefaultReaderTest.php index 783b1dcb23781361a630173c7e353a153c140ece..2be2729031ac94bb3f3f71198c2544d3edf0c41b 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/DefaultReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/DefaultReaderTest.php @@ -40,11 +40,6 @@ class DefaultReaderTest extends \PHPUnit_Framework_TestCase */ protected $_collectionFactory; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_appStateMock; - protected function setUp() { $this->_initialConfigMock = $this->getMock('Magento\Framework\App\Config\Initial', array(), array(), '', false); @@ -55,13 +50,10 @@ class DefaultReaderTest extends \PHPUnit_Framework_TestCase '', false ); - $this->_appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->_appStateMock->expects($this->any())->method('isInstalled')->will($this->returnValue(true)); $this->_model = new \Magento\Store\Model\Config\Reader\DefaultReader( $this->_initialConfigMock, new \Magento\Framework\App\Config\Scope\Converter(), - $this->_collectionFactory, - $this->_appStateMock + $this->_collectionFactory ); } diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/StoreTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/StoreTest.php index f763f4dd951fd497b0989aae31a3885061a6a541..5036fead596756fd41b31d0f0855e0a922a4008d 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/StoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/StoreTest.php @@ -50,11 +50,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase */ protected $_storeMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_appStateMock; - protected function setUp() { $this->_scopePullMock = $this->getMock('Magento\Framework\App\Config\ScopePool', [], [], '', false); @@ -71,9 +66,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase $this->_storeMock = $this->getMock('Magento\Store\Model\Store', [], [], '', false); $storeFactoryMock->expects($this->any())->method('create')->will($this->returnValue($this->_storeMock)); - $this->_appStateMock = $this->getMock('Magento\Framework\App\State', [], [], '', false); - $this->_appStateMock->expects($this->any())->method('isInstalled')->will($this->returnValue(true)); - $placeholderProcessor = $this->getMock( 'Magento\Store\Model\Config\Processor\Placeholder', [], @@ -88,7 +80,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase new \Magento\Store\Model\Config\Converter($placeholderProcessor), $this->_collectionFactory, $storeFactoryMock, - $this->_appStateMock, $this->_storeManagerMock ); } diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/WebsiteTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/WebsiteTest.php index 061ed34a1c1f3c42c935b24639152c01e81dec50..784c8dce08bdd6d98d84400923e3891484501e3b 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/WebsiteTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/WebsiteTest.php @@ -50,11 +50,6 @@ class WebsiteTest extends \PHPUnit_Framework_TestCase */ protected $_websiteMock; - /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $_appStateMock; - protected function setUp() { $this->_initialConfigMock = $this->getMock('Magento\Framework\App\Config\Initial', array(), array(), '', false); @@ -76,16 +71,12 @@ class WebsiteTest extends \PHPUnit_Framework_TestCase $this->_websiteMock = $this->getMock('Magento\Store\Model\Website', array(), array(), '', false); $websiteFactoryMock->expects($this->any())->method('create')->will($this->returnValue($this->_websiteMock)); - $this->_appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->_appStateMock->expects($this->any())->method('isInstalled')->will($this->returnValue(true)); - $this->_model = new \Magento\Store\Model\Config\Reader\Website( $this->_initialConfigMock, $this->_scopePullMock, new \Magento\Framework\App\Config\Scope\Converter(), $this->_collectionFactory, - $websiteFactoryMock, - $this->_appStateMock + $websiteFactoryMock ); } diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php index c28ada75cde1ba2aa2d26c7433c5b553d6ab50a4..a16558c3a51dd7269fa956ed144feb9cf073aee7 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php @@ -198,35 +198,8 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase })); } - public function testGetInNotInstalledModeWithInternalCache() + public function testGetModeWithInternalCache() { - $this->_appStateMock->expects($this->exactly(2))->method('isInstalled')->will($this->returnValue(false)); - - $this->_objectManagerMock->expects( - $this->once() - )->method( - 'create' - )->with( - $this->_defaultStorage - )->will( - $this->returnValue($this->_storeManager) - ); - - $this->_eventManagerMock->expects($this->never())->method('dispatch'); - $this->_logMock->expects($this->never())->method('initForStore'); - $this->_sidResolverMock->expects($this->never())->method('setUseSessionInUrl'); - - /** test create instance */ - $this->assertEquals($this->_storeManager, $this->_model->get($this->_arguments)); - - /** test read instance from internal cache */ - $this->assertEquals($this->_storeManager, $this->_model->get($this->_arguments)); - } - - public function testGetInstalledModeWithInternalCache() - { - $this->_appStateMock->expects($this->exactly(2))->method('isInstalled')->will($this->returnValue(true)); - $store = $this->getMock('Magento\Store\Model\Store', [], [], '', false); $this->_storeManager->expects($this->exactly(3))->method('getStore')->will($this->returnValue($store)); @@ -288,8 +261,6 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase */ public function testGetWithInvalidStorageClassName() { - $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); - $invalidObject = $this->getMock('Magento\Store\Model\Store', [], [], '', false); $this->_objectManagerMock->expects( @@ -332,7 +303,6 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase { $this->_arguments['scopeCode'] = $scopeCode; $this->_arguments['scopeType'] = $scopeType; - $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); $this->website->expects($defaultGroupId === null ? $this->never() : $this->atLeastOnce()) ->method('getDefaultGroupId') @@ -372,7 +342,6 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase $this->_arguments['scopeType'] = 'unknown'; $this->_objectManagerMock->expects($this->once())->method('create')->will($this->returnValue($this->storage)); - $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); $this->_model->get($this->_arguments); } @@ -389,8 +358,6 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase $this->_arguments['scopeCode'] = $scopeCode; $this->_arguments['scopeType'] = $scopeType; - $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); - $this->website->expects($this->any())->method('getDefaultGroupId')->will($this->returnValue(11)); $this->group->expects($this->any())->method('getDefaultStoreId')->will($this->returnValue(21)); @@ -431,8 +398,6 @@ class StorageFactoryTest extends \PHPUnit_Framework_TestCase */ public function testGetFromRequest($isActiveStore, $isDefault, $cookieCall = '') { - $this->_appStateMock->expects($this->once())->method('isInstalled')->will($this->returnValue(true)); - $storeDefault = $this->getMock('Magento\Store\Model\Store', [], [], '', false); if (!$isDefault) { $storeDefault->expects($this->atLeastOnce())->method('getId')->will($this->returnValue(22)); diff --git a/dev/tests/unit/testsuite/Magento/Tax/Model/TaxClass/Type/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Tax/Model/TaxClass/Type/CustomerTest.php index 0a8473e1bc598fcfe118f0a7990a9d5a34999fd0..e9562a5dd6d7eb2117365a207fd5cdbd670fc584 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Model/TaxClass/Type/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Model/TaxClass/Type/CustomerTest.php @@ -29,7 +29,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase { $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $searchResultsMock = $this->getMockBuilder('Magento\Framework\Service\V1\Data\SearchResults') + $searchResultsMock = $this->getMockBuilder('Magento\Framework\Api\SearchResults') ->setMethods(['getItems']) ->disableOriginalConstructor() ->getMock(); @@ -38,11 +38,11 @@ class CustomerTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue(['randomValue'])); $filterBuilder = $objectManagerHelper - ->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + ->getObject('\Magento\Framework\Api\FilterBuilder'); $filterGroupBuilder = $objectManagerHelper - ->getObject('\Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); + ->getObject('\Magento\Framework\Api\Search\FilterGroupBuilder'); $searchCriteriaBuilder = $objectManagerHelper->getObject( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', [ 'filterGroupBuilder' => $filterGroupBuilder ] diff --git a/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxClassServiceTest.php b/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxClassServiceTest.php index 72bb7ce3924d631f73cea3affa2c2dbccf0f2fde..86aae952ca9c246ef8b48d0213199bfea5f3d0ea 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxClassServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxClassServiceTest.php @@ -28,7 +28,7 @@ use Magento\Framework\Exception\InputException; use Magento\Tax\Service\V1\Data\TaxClass; use Magento\Tax\Service\V1\Data\TaxClassBuilder; use Magento\Tax\Service\V1\Data\TaxClassKey; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Test for \Magento\Tax\Service\V1\TaxClassService @@ -50,7 +50,7 @@ class TaxClassServiceTest extends \PHPUnit_Framework_TestCase private $searchResultBuilder; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder|\PHPUnit_Framework_MockObject_MockObject */ private $searchCriteriaBuilderMock; @@ -85,7 +85,7 @@ class TaxClassServiceTest extends \PHPUnit_Framework_TestCase private $objectManager; /** - * @var \Magento\Framework\Service\V1\Data\SortOrderBuilder; + * @var \Magento\Framework\Api\SortOrderBuilder; */ private $sortOrderBuilder; @@ -112,7 +112,7 @@ class TaxClassServiceTest extends \PHPUnit_Framework_TestCase $this->taxClassService = $this->createService(); $this->sortOrderBuilder = $this->objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SortOrderBuilder' + 'Magento\Framework\Api\SortOrderBuilder' ); } @@ -442,7 +442,7 @@ class TaxClassServiceTest extends \PHPUnit_Framework_TestCase $this->searchCriteriaBuilderMock->expects($this->exactly(2)) ->method('addFilter') ->will($this->returnValue($this->searchCriteriaBuilderMock)); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria */ + /** @var \Magento\Framework\Api\SearchCriteria $searchCriteria */ $searchCriteria = $this->createSearchCriteria(); $this->searchCriteriaBuilderMock->expects($this->once()) ->method('create') @@ -546,7 +546,7 @@ class TaxClassServiceTest extends \PHPUnit_Framework_TestCase ->getMock(); $this->searchCriteriaBuilderMock = $this->getMockBuilder( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder' + 'Magento\Framework\Api\SearchCriteriaBuilder' )->disableOriginalConstructor() ->getMock(); @@ -565,21 +565,21 @@ class TaxClassServiceTest extends \PHPUnit_Framework_TestCase } /** - * @return \Magento\Framework\Service\V1\Data\SearchCriteria + * @return \Magento\Framework\Api\SearchCriteria */ private function createSearchCriteria() { - /** @var \Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder $filterGroupBuilder */ + /** @var \Magento\Framework\Api\Search\FilterGroupBuilder $filterGroupBuilder */ $filterGroupBuilder = $this->objectManager->getObject( - 'Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder' + 'Magento\Framework\Api\Search\FilterGroupBuilder' ); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder */ + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */ $searchCriteriaBuilder = $this->objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); - /** @var \Magento\Framework\Service\V1\Data\FilterBuilder $filterBuilder */ - $filterBuilder = $this->objectManager->getObject('Magento\Framework\Service\V1\Data\FilterBuilder'); + /** @var \Magento\Framework\Api\FilterBuilder $filterBuilder */ + $filterBuilder = $this->objectManager->getObject('Magento\Framework\Api\FilterBuilder'); $productTaxClass = [TaxClass::KEY_NAME => 'Taxable Goods', TaxClass::KEY_TYPE => 'PRODUCT']; $customerTaxClass = [TaxClass::KEY_NAME => 'Retail Customer', TaxClass::KEY_TYPE => 'CUSTOMER']; @@ -602,11 +602,11 @@ class TaxClassServiceTest extends \PHPUnit_Framework_TestCase */ $searchCriteriaBuilder->addFilter([$filter1, $filter2]); $searchCriteriaBuilder->addFilter([$filter3, $filter4]); - /**@var \Magento\Framework\Service\V1\Data\SortOrderBuilder $sortOrderBuilder */ + /**@var \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */ $sortOrderBuilder = $this->objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SortOrderBuilder' + 'Magento\Framework\Api\SortOrderBuilder' ); - /** @var \Magento\Framework\Service\V1\Data\SortOrder $sortOrder */ + /** @var \Magento\Framework\Api\SortOrder $sortOrder */ $sortOrder = $sortOrderBuilder->setField('class_name')->setDirection(SearchCriteria::SORT_ASC)->create(); $searchCriteria = $searchCriteriaBuilder ->setCurrentPage(1) diff --git a/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php b/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php index 33d0dc7ba1d9b2cf166afbfc5a4f7ba3da2ee727..0aa9402853c398a65f3c7ca7a10d3f13559e7f03 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRateServiceTest.php @@ -27,9 +27,9 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Tax\Model\Calculation\Rate as RateModel; use Magento\Tax\Service\V1\Data\TaxRate; use Magento\TestFramework\Helper\ObjectManager; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Tax\Model\Calculation\RateFactory; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -114,10 +114,10 @@ class TaxRateServiceTest extends \PHPUnit_Framework_TestCase 'Magento\Tax\Service\V1\Data\TaxRateSearchResultsBuilder' ); $filterGroupBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); + ->getObject('Magento\Framework\Api\Search\FilterGroupBuilder'); /** @var SearchCriteriaBuilder $searchBuilder */ $this->searchCriteriaBuilder = $this->objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); @@ -524,7 +524,7 @@ class TaxRateServiceTest extends \PHPUnit_Framework_TestCase ] ); - $filterBuilder = $this->objectManager->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = $this->objectManager->getObject('\Magento\Framework\Api\FilterBuilder'); $filter = $filterBuilder->setField(TaxRate::KEY_REGION_ID)->setValue(self::REGION_ID)->create(); $this->searchCriteriaBuilder->addFilter([$filter]); @@ -580,9 +580,9 @@ class TaxRateServiceTest extends \PHPUnit_Framework_TestCase ->with($this->rateModelMock) ->will($this->returnValue($taxRate)); - $filterBuilder = $this->objectManager->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = $this->objectManager->getObject('\Magento\Framework\Api\FilterBuilder'); $filter = $filterBuilder->setField(TaxRate::KEY_REGION_ID)->setValue(self::REGION_ID)->create(); - $sortOrderBuilder = $this->objectManager->getObject('\Magento\Framework\Service\V1\Data\SortOrderBuilder'); + $sortOrderBuilder = $this->objectManager->getObject('\Magento\Framework\Api\SortOrderBuilder'); $sortOrder = $sortOrderBuilder ->setField(TaxRate::KEY_REGION_ID) ->setDirection(SearchCriteria::SORT_ASC) diff --git a/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php b/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php index 61f05b3668427750dd5c415260cb889a3dcd5dcd..31d13cc278cb17fe452c7ed98c6519a8f7676e8c 100644 --- a/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Tax/Service/V1/TaxRuleServiceTest.php @@ -30,7 +30,7 @@ use Magento\Tax\Service\V1\Data\TaxRule; use Magento\Tax\Service\V1\Data\TaxClass; use Magento\Tax\Model\ClassModel as TaxClassModel; use Magento\TestFramework\Helper\ObjectManager; -use Magento\Framework\Service\V1\Data\SearchCriteria; +use Magento\Framework\Api\SearchCriteria; /** * Class TaxRuleServiceTest @@ -65,12 +65,12 @@ class TaxRuleServiceTest extends \PHPUnit_Framework_TestCase private $taxRuleModelFactoryMock; /** - * @var \Magento\Framework\Service\V1\Data\FilterBuilder | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\FilterBuilder | \PHPUnit_Framework_MockObject_MockObject */ protected $filterBuilderMock; /** - * @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Api\SearchCriteriaBuilder | \PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaBuilderMock; @@ -113,11 +113,11 @@ class TaxRuleServiceTest extends \PHPUnit_Framework_TestCase $taxRuleResultsBuilder = $this->objectManager->getObject( 'Magento\Tax\Service\V1\Data\TaxRuleSearchResultsBuilder' ); - $this->filterBuilderMock = $this->getMockBuilder('\Magento\Framework\Service\V1\Data\FilterBuilder') + $this->filterBuilderMock = $this->getMockBuilder('\Magento\Framework\Api\FilterBuilder') ->disableOriginalConstructor() ->getMock(); $this->searchCriteriaBuilderMock = $this->getMockBuilder( - '\Magento\Framework\Service\V1\Data\SearchCriteriaBuilder' + '\Magento\Framework\Api\SearchCriteriaBuilder' ) ->disableOriginalConstructor() ->getMock(); @@ -460,8 +460,8 @@ class TaxRuleServiceTest extends \PHPUnit_Framework_TestCase public function testSearchTaxRulesEmptyResult() { /** @var \PHPUnit_Framework_MockObject_MockObject | - * \Magento\Framework\Service\V1\Data\SearchCriteria $mockSearchCriteria */ - $mockSearchCriteria = $this->getMockBuilder('\Magento\Framework\Service\V1\Data\SearchCriteria') + * \Magento\Framework\Api\SearchCriteria $mockSearchCriteria */ + $mockSearchCriteria = $this->getMockBuilder('\Magento\Framework\Api\SearchCriteria') ->disableOriginalConstructor() ->getMock(); @@ -517,17 +517,17 @@ class TaxRuleServiceTest extends \PHPUnit_Framework_TestCase ->method('getSize') ->will($this->returnValue(1)); - $filterBuilder = $this->objectManager->getObject('\Magento\Framework\Service\V1\Data\FilterBuilder'); + $filterBuilder = $this->objectManager->getObject('\Magento\Framework\Api\FilterBuilder'); $filter = $filterBuilder->setField('code')->setValue('code')->setConditionType('eq')->create(); $filterGroupBuilder = $this->objectManager - ->getObject('Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); - /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteriaBuilder */ + ->getObject('Magento\Framework\Api\Search\FilterGroupBuilder'); + /** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */ $searchCriteriaBuilder = $this->objectManager->getObject( - 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Api\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); - $sortOrderBuilder = $this->objectManager->getObject('\Magento\Framework\Service\V1\Data\SortOrderBuilder'); + $sortOrderBuilder = $this->objectManager->getObject('\Magento\Framework\Api\SortOrderBuilder'); $sortOrder = $sortOrderBuilder ->setField('id') ->setDirection(SearchCriteria::SORT_ASC) @@ -628,15 +628,15 @@ class TaxRuleServiceTest extends \PHPUnit_Framework_TestCase ->with($this->logicalOr([$filterOne], [$filterTwo])) ->will($this->returnSelf()); - $searchCriteria = $this->getMockBuilder('\Magento\Framework\Service\V1\Data\SearchCriteria') + $searchCriteria = $this->getMockBuilder('\Magento\Framework\Api\SearchCriteria') ->disableOriginalConstructor() ->getMock(); - $mockFilters = $this->getMockBuilder('\Magento\Framework\Service\V1\Data\Filter') + $mockFilters = $this->getMockBuilder('\Magento\Framework\Api\Filter') ->disableOriginalConstructor() ->getMock(); - $mockFilterGroups = $this->getMockBuilder('\Magento\Framework\Service\V1\Data\Search\FilterGroup') + $mockFilterGroups = $this->getMockBuilder('\Magento\Framework\Api\Search\FilterGroup') ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/JsonTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/JsonTest.php index 1c75c6157a22904bb6ea87037c7e42736fa24e0f..5619bfa1b6081d52e3c1a8712ffb14dcd11888de 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/JsonTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/JsonTest.php @@ -66,6 +66,12 @@ class JsonTest extends \PHPUnit_Framework_TestCase $this->_jsonDeserializer->deserialize(false); } + public function testDeserializerOauthInputException() + { + $this->setExpectedException('\Magento\Webapi\Exception', 'Request body should not be empty.'); + $this->_jsonDeserializer->deserialize(''); + } + public function testDeserialize() { /** Prepare mocks for SUT constructor. */ diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/XmlTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/XmlTest.php index c75820267ef30db4973ea09b1d530d8d734c6290..0ac5ecc05ecb1ca31afd89800dc73fb22a9446c3 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/XmlTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Rest/Request/Deserializer/XmlTest.php @@ -61,6 +61,12 @@ class XmlTest extends \PHPUnit_Framework_TestCase $this->_xmlDeserializer->deserialize(false); } + public function testDeserializerOauthInputException() + { + $this->setExpectedException('\Magento\Webapi\Exception', 'Request body is expected.'); + $this->_xmlDeserializer->deserialize(''); + } + public function testDeserialize() { /** Prepare mocks for SUT constructor. */ diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php index 60a7e22a6b2aaf5bec2e02e19e2cf90a6dceead6..d1f49e3933e92f4aff8f034c7cec33d5269aca3d 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php @@ -99,7 +99,7 @@ class RestTest extends \PHPUnit_Framework_TestCase protected $userContextMock; /** - * @var \Magento\Webapi\Model\DataObjectProcessor|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Reflection\DataObjectProcessor|\PHPUnit_Framework_MockObject_MockObject */ protected $dataObjectProcessorMock; @@ -130,7 +130,7 @@ class RestTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor()->getMock(); $this->userContextMock = $this->getMockBuilder('Magento\Authorization\Model\UserContextInterface') ->disableOriginalConstructor()->setMethods(['getUserId'])->getMockForAbstractClass(); - $this->dataObjectProcessorMock = $this->getMockBuilder('Magento\Webapi\Model\DataObjectProcessor') + $this->dataObjectProcessorMock = $this->getMockBuilder('Magento\Framework\Reflection\DataObjectProcessor') ->disableOriginalConstructor()->setMethods(['getMethodReturnType'])->getMockForAbstractClass(); } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php index 8cb3d2286f4b5b56cf85747265bb39df52717ba4..99cc00e7e7031ecb125fb3fb6c19f05ce783dcfc 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Webapi\Controller\Soap\Request; -use Magento\Framework\Service\SimpleDataObjectConverter; +use Magento\Framework\Api\SimpleDataObjectConverter; use Magento\Webapi\Model\Soap\Config as SoapConfig; /** @@ -52,7 +52,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Webapi\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */ protected $_serializerMock; - /** @var \Magento\Framework\Service\DataObjectProcessor|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Reflection\DataObjectProcessor|\PHPUnit_Framework_MockObject_MockObject */ protected $_dataObjectProcessorMock; /** @var array */ @@ -67,7 +67,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager', [], [], '', false); $this->_authorizationMock = $this->getMock('Magento\Framework\AuthorizationInterface', [], [], '', false); $this->_dataObjectConverter = $this->getMock( - 'Magento\Framework\Service\SimpleDataObjectConverter', + 'Magento\Framework\Api\SimpleDataObjectConverter', ['convertStdObjectToArray'], [], '', @@ -75,7 +75,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase ); $this->_serializerMock = $this->getMock('Magento\Webapi\Controller\ServiceArgsSerializer', [], [], '', false); $this->_dataObjectProcessorMock = $this->getMock( - 'Magento\Webapi\Model\DataObjectProcessor', + 'Magento\Framework\Reflection\DataObjectProcessor', ['getMethodReturnType'], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ClassReflectorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ClassReflectorTest.php index 8eeedc203f07125655e73ddfb0f2ef685824734f..21c3fb3a5fcaa9b7b9c128bff13ff2eca46d8e89 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ClassReflectorTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Config/ClassReflectorTest.php @@ -28,7 +28,7 @@ namespace Magento\Webapi\Model\Config; */ class ClassReflectorTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Reflection\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ protected $_typeProcessor; /** @var \Magento\Webapi\Model\Config\ClassReflector */ @@ -40,7 +40,7 @@ class ClassReflectorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_typeProcessor = $this->getMock( - '\Magento\Webapi\Model\Config\ClassReflector\TypeProcessor', + '\Magento\Framework\Reflection\TypeProcessor', array('process'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php index bf82cc4a2f11a59768b24fde572c509c06c226dc..c1dfbbbff3213f3d7d963a4bea88d499a3df618b 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php @@ -41,7 +41,7 @@ class DataObjectProcessorTest extends \PHPUnit_Framework_TestCase protected function setup() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->dataObjectProcessor = $objectManager->getObject('Magento\Webapi\Model\DataObjectProcessor'); + $this->dataObjectProcessor = $objectManager->getObject('Magento\Framework\Reflection\DataObjectProcessor'); parent::setUp(); } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ServerTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ServerTest.php index 97b6eb20476b4de361db753b6db69095d0c1661c..7fe5fece1e1d721c3d19f311c15f6260234bcc08 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ServerTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ServerTest.php @@ -45,7 +45,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Webapi\Model\Soap\Server\Factory */ protected $_soapServerFactory; - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Reflection\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ protected $_typeProcessor; /** @var \PHPUnit_Framework_MockObject_MockObject */ @@ -94,7 +94,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase )->disableOriginalConstructor()->getMock(); $this->_typeProcessor = $this->getMock( - 'Magento\Webapi\Model\Config\ClassReflector\TypeProcessor', + 'Magento\Framework\Reflection\TypeProcessor', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategyTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategyTest.php index 0f4e2171db72fde9f59f3e73c564782af7071fa9..6babf2c4e32e3ffb7b949ef8f9af4f2750bc8023 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategyTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/ComplexTypeStrategyTest.php @@ -30,7 +30,7 @@ use Zend\Soap\Wsdl; */ class ComplexTypeStrategyTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Reflection\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ protected $_typeProcessor; /** @var \Magento\Webapi\Model\Soap\Wsdl|\PHPUnit_Framework_MockObject_MockObject */ @@ -45,7 +45,7 @@ class ComplexTypeStrategyTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_typeProcessor = $this->getMockBuilder( - 'Magento\Webapi\Model\Config\ClassReflector\TypeProcessor' + 'Magento\Framework\Reflection\TypeProcessor' )->setMethods( array('getTypeData') )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/GeneratorTest.php index 29679944e47086d9abe9f0c8b1eb5581d17a057e..2decf757f5b650bce6b957985b40031d7f37c482 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/GeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/Wsdl/GeneratorTest.php @@ -39,7 +39,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Webapi\Model\Cache\Type|\PHPUnit_Framework_MockObject_MockObject */ protected $_cacheMock; - /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Reflection\TypeProcessor|\PHPUnit_Framework_MockObject_MockObject */ protected $_typeProcessor; /** @var \Magento\Framework\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ @@ -83,7 +83,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase $this->_cacheMock->expects($this->any())->method('save')->will($this->returnValue(true)); $this->_typeProcessor = $this->getMock( - 'Magento\Webapi\Model\Config\ClassReflector\TypeProcessor', + 'Magento\Framework\Reflection\TypeProcessor', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayData.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArray.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayData.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArray.php index 77fb941d7ea742943b3fcff2cbdbc83162d770f4..5324cdc6b3a79b4512a96ea8c1e52304e994fba5 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayData.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArray.php @@ -23,9 +23,9 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; -class AssociativeArrayData extends AbstractExtensibleObject +class AssociativeArray extends AbstractExtensibleObject { /** * @return string[] diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataBuilder.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayBuilder.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataBuilder.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayBuilder.php index 55590856fcdbe27fb20bb863ae09363e0c47f277..e7b8bf9198a1d5d664e94b11fd2def60465219f4 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataBuilder.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayBuilder.php @@ -23,9 +23,9 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; -class AssociativeArrayDataBuilder extends AbstractExtensibleObjectBuilder +class AssociativeArrayBuilder extends ExtensibleObjectBuilder { /** * @param string[] $associativeArray @@ -33,7 +33,7 @@ class AssociativeArrayDataBuilder extends AbstractExtensibleObjectBuilder */ public function setAssociativeArray($associativeArray) { - $this->_data['associativeArray'] = $associativeArray; + $this->data['associativeArray'] = $associativeArray; return $this; } } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayData.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArray.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayData.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArray.php index 328e2963afc92449d26bf9398f7992ea5b8f73fc..83078d59fd80bffecd80aefc9f62282764469e08 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayData.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArray.php @@ -23,12 +23,12 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; -class DataArrayData extends AbstractExtensibleObject +class DataArray extends AbstractExtensibleObject { /** - * @return \Magento\Webapi\Service\Entity\SimpleData[]|null + * @return \Magento\Webapi\Service\Entity\Simple[]|null */ public function getItems() { diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayDataBuilder.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayBuilder.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayDataBuilder.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayBuilder.php index 0662e813eea4e9a0bdaf1d1873aab9b39c4ed857..047b9e667fb76ca9c931c10cc0dc27389f5217e3 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayDataBuilder.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataArrayBuilder.php @@ -23,17 +23,17 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; -class DataArrayDataBuilder extends AbstractExtensibleObjectBuilder +class DataArrayBuilder extends ExtensibleObjectBuilder { /** - * @param \Magento\Webapi\Service\Entity\SimpleData[] $items + * @param \Magento\Webapi\Service\Entity\Simple[] $items * @return $this */ public function setItems($items) { - $this->_data['items'] = $items; + $this->data['items'] = $items; return $this; } } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataFromArrayTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataFromArrayTest.php index 31a891d2017937e9768e26c977f44089aed3c307..a993bc884f4970de3f241b1a4a1af3db9e18c267 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataFromArrayTest.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/DataFromArrayTest.php @@ -23,8 +23,7 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Service\Data\AbstractExtensibleObjectTest; +use Magento\Framework\Api\AbstractExtensibleObjectTest; use Magento\Webapi\Controller\ServiceArgsSerializer; class DataFromArrayTest extends \PHPUnit_Framework_TestCase @@ -35,11 +34,12 @@ class DataFromArrayTest extends \PHPUnit_Framework_TestCase public function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $objectFactory = new \Magento\Webapi\Service\Entity\WebapiObjectManager($objectManager); - $typeProcessor = $objectManager->getObject('Magento\Webapi\Model\Config\ClassReflector\TypeProcessor'); + $objectFactory = new \Magento\Webapi\Service\Entity\WebapiBuilderFactory($objectManager); + /** @var \Magento\Framework\Reflection\TypeProcessor $typeProcessor */ + $typeProcessor = $objectManager->getObject('Magento\Framework\Reflection\TypeProcessor'); $this->serializer = $objectManager->getObject( 'Magento\Webapi\Controller\ServiceArgsSerializer', - ['typeProcessor' => $typeProcessor, 'objectManager' => $objectFactory] + ['typeProcessor' => $typeProcessor, 'builderFactory' => $objectFactory] ); } @@ -61,17 +61,17 @@ class DataFromArrayTest extends \PHPUnit_Framework_TestCase $data ); $this->assertNotNull($result); - $this->assertTrue($result[0] instanceof NestedData); + $this->assertTrue($result[0] instanceof Nested); /** @var array $result */ $this->assertEquals(1, count($result)); $this->assertNotEmpty($result[0]); /** @var NestedData $arg */ $arg = $result[0]; - $this->assertTrue($arg instanceof NestedData); + $this->assertTrue($arg instanceof Nested); /** @var SimpleData $details */ $details = $arg->getDetails(); $this->assertNotNull($details); - $this->assertTrue($details instanceof SimpleData); + $this->assertTrue($details instanceof Simple); $this->assertEquals(15, $details->getEntityId()); $this->assertEquals('Test', $details->getName()); } @@ -135,10 +135,10 @@ class DataFromArrayTest extends \PHPUnit_Framework_TestCase $first = $dataObjects[0]; /** @var SimpleData $second */ $second = $dataObjects[1]; - $this->assertTrue($first instanceof SimpleData); + $this->assertTrue($first instanceof Simple); $this->assertEquals(14, $first->getEntityId()); $this->assertEquals('First', $first->getName()); - $this->assertTrue($second instanceof SimpleData); + $this->assertTrue($second instanceof Simple); $this->assertEquals(15, $second->getEntityId()); $this->assertEquals('Second', $second->getName()); } @@ -156,7 +156,7 @@ class DataFromArrayTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1, count($result)); /** @var SimpleArrayData $dataObject */ $dataObject = $result[0]; - $this->assertTrue($dataObject instanceof SimpleArrayData); + $this->assertTrue($dataObject instanceof SimpleArray); /** @var array $ids */ $ids = $dataObject->getIds(); $this->assertNotNull($ids); @@ -177,9 +177,9 @@ class DataFromArrayTest extends \PHPUnit_Framework_TestCase $this->assertNotNull($result); /** @var array $result */ $this->assertEquals(1, count($result)); - /** @var AssociativeArrayData $dataObject */ + /** @var AssociativeArray $dataObject */ $dataObject = $result[0]; - $this->assertTrue($dataObject instanceof AssociativeArrayData); + $this->assertTrue($dataObject instanceof AssociativeArray); /** @var array $associativeArray */ $associativeArray = $dataObject->getAssociativeArray(); $this->assertNotNull($associativeArray); @@ -204,7 +204,7 @@ class DataFromArrayTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1, count($result)); /** @var DataArrayData $dataObjects */ $dataObjects = $result[0]; - $this->assertTrue($dataObjects instanceof DataArrayData); + $this->assertTrue($dataObjects instanceof DataArray); /** @var array $items */ $items = $dataObjects->getItems(); $this->assertEquals(2, count($items)); @@ -212,10 +212,10 @@ class DataFromArrayTest extends \PHPUnit_Framework_TestCase $first = $items[0]; /** @var SimpleData $second */ $second = $items[1]; - $this->assertTrue($first instanceof SimpleData); + $this->assertTrue($first instanceof Simple); $this->assertEquals(1, $first->getEntityId()); $this->assertEquals('First', $first->getName()); - $this->assertTrue($second instanceof SimpleData); + $this->assertTrue($second instanceof Simple); $this->assertEquals(2, $second->getEntityId()); $this->assertEquals('Second', $second->getName()); } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedData.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/Nested.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedData.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/Nested.php index 56ec8b9e8e239a3d7e0fe7a8444cc3b65142ce4e..8433efe06f260e5e00e2690f81d1f20fc107f830 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedData.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/Nested.php @@ -23,12 +23,12 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; -class NestedData extends AbstractExtensibleObject +class Nested extends AbstractExtensibleObject { /** - * @return \Magento\Webapi\Service\Entity\SimpleData + * @return \Magento\Webapi\Service\Entity\Simple */ public function getDetails() { diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedDataBuilder.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedBuilder.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedDataBuilder.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedBuilder.php index 4bb47fbe5c7caa874388b209a90da1156d1ac082..457bbafa6e065c6ac3e49c35e330376b6ae2df59 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedDataBuilder.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/NestedBuilder.php @@ -23,9 +23,9 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; -class NestedDataBuilder extends AbstractExtensibleObjectBuilder +class NestedBuilder extends ExtensibleObjectBuilder { /** * @param string $details @@ -33,7 +33,7 @@ class NestedDataBuilder extends AbstractExtensibleObjectBuilder */ public function setDetails($details) { - $this->_data['details'] = $details; + $this->data['details'] = $details; return $this; } } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleData.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/Simple.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleData.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/Simple.php index f3087e923ebd556e5b03a8f8b532b9e6a705a996..bf3bb7515eea30c873c3dbe15095da479ad893ff 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleData.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/Simple.php @@ -23,9 +23,9 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; -class SimpleData extends AbstractExtensibleObject +class Simple extends AbstractExtensibleObject { /** * @return int|null diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayData.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArray.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayData.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArray.php index f1712e170f27232e2a58a78fc67e5af3bbc2f627..d33607708fd8d8f5857f3a846a4b8a7f874f8b2d 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayData.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArray.php @@ -23,9 +23,9 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; -class SimpleArrayData extends AbstractExtensibleObject +class SimpleArray extends AbstractExtensibleObject { /** * @return int[] diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataBuilder.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayBuilder.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataBuilder.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayBuilder.php index c4c5fd6b347840c534a8791cb68c89acfa8da6cc..d11ae4a3c609473ee3761ed08304a3a02cf9ef07 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataBuilder.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleArrayBuilder.php @@ -23,9 +23,9 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; -class SimpleArrayDataBuilder extends AbstractExtensibleObjectBuilder +class SimpleArrayBuilder extends ExtensibleObjectBuilder { /** * @param array $ids @@ -33,7 +33,7 @@ class SimpleArrayDataBuilder extends AbstractExtensibleObjectBuilder */ public function setIds($ids) { - $this->_data['ids'] = $ids; + $this->data['ids'] = $ids; return $this; } } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleDataBuilder.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleBuilder.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleDataBuilder.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleBuilder.php index 0a2c868b57fa51b87993c5dc137ce751477d0a94..3d5e4be77b340e81e6b6e48f64fddebb161f60c5 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleDataBuilder.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/SimpleBuilder.php @@ -23,9 +23,9 @@ */ namespace Magento\Webapi\Service\Entity; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; -class SimpleDataBuilder extends AbstractExtensibleObjectBuilder +class SimpleBuilder extends ExtensibleObjectBuilder { /** * @param int $id @@ -33,7 +33,7 @@ class SimpleDataBuilder extends AbstractExtensibleObjectBuilder */ public function setEntityId($id) { - $this->_data['entityId'] = $id; + $this->data['entityId'] = $id; return $this; } @@ -43,7 +43,7 @@ class SimpleDataBuilder extends AbstractExtensibleObjectBuilder */ public function setName($name) { - $this->_data['name'] = $name; + $this->data['name'] = $name; return $this; } } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/TestService.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/TestService.php index bf6edddcb52ea7b915f97fde33cda3ad03d1f3c5..23e531e8d8e37eda98a5413ead2a6b0e138b9cc0 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/TestService.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/TestService.php @@ -36,10 +36,10 @@ class TestService } /** - * @param \Magento\Webapi\Service\Entity\NestedData $nested - * @return \Magento\Webapi\Service\Entity\NestedData + * @param \Magento\Webapi\Service\Entity\Nested $nested + * @return \Magento\Webapi\Service\Entity\Nested */ - public function nestedData(NestedData $nested) + public function nestedData(Nested $nested) { return $nested; } @@ -63,8 +63,8 @@ class TestService } /** - * @param \Magento\Webapi\Service\Entity\SimpleData[] $dataObjects - * @return \Magento\Webapi\Service\Entity\SimpleData[] + * @param \Magento\Webapi\Service\Entity\Simple[] $dataObjects + * @return \Magento\Webapi\Service\Entity\Simple[] */ public function dataArray(array $dataObjects) { @@ -72,28 +72,28 @@ class TestService } /** - * @param \Magento\Webapi\Service\Entity\SimpleArrayData $arrayData - * @return \Magento\Webapi\Service\Entity\SimpleArrayData + * @param \Magento\Webapi\Service\Entity\SimpleArray $arrayData + * @return \Magento\Webapi\Service\Entity\SimpleArray */ - public function nestedSimpleArray(SimpleArrayData $arrayData) + public function nestedSimpleArray(SimpleArray $arrayData) { return $arrayData; } /** - * @param \Magento\Webapi\Service\Entity\AssociativeArrayData $associativeArrayData - * @return \Magento\Webapi\Service\Entity\AssociativeArrayData + * @param \Magento\Webapi\Service\Entity\AssociativeArray $associativeArrayData + * @return \Magento\Webapi\Service\Entity\AssociativeArray */ - public function nestedAssociativeArray(AssociativeArrayData $associativeArrayData) + public function nestedAssociativeArray(AssociativeArray $associativeArrayData) { return $associativeArrayData; } /** - * @param \Magento\Webapi\Service\Entity\DataArrayData $dataObjects - * @return \Magento\Webapi\Service\Entity\DataArrayData + * @param \Magento\Webapi\Service\Entity\DataArray $dataObjects + * @return \Magento\Webapi\Service\Entity\DataArray */ - public function nestedDataArray(DataArrayData $dataObjects) + public function nestedDataArray(DataArray $dataObjects) { return $dataObjects; } diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/WebapiObjectManager.php b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/WebapiBuilderFactory.php similarity index 51% rename from dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/WebapiObjectManager.php rename to dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/WebapiBuilderFactory.php index b395f8c83c58a3cd69ad517b263fe2d6389742fe..dead3735e8ac034441a712bba81200466aaee032 100644 --- a/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/WebapiObjectManager.php +++ b/dev/tests/unit/testsuite/Magento/Webapi/Service/Entity/WebapiBuilderFactory.php @@ -23,57 +23,32 @@ */ namespace Magento\Webapi\Service\Entity; -class WebapiObjectManager implements \Magento\Framework\ObjectManager +class WebapiBuilderFactory extends \Magento\Framework\Serialization\DataBuilderFactory { /** - * @var array + * @param \Magento\TestFramework\Helper\ObjectManager $objectManager */ - private $configuration; - - /** - * @var \Magento\TestFramework\Helper\ObjectManager - */ - protected $factory; - - /** - * @param \Magento\TestFramework\Helper\ObjectManager $factory - */ - public function __construct(\Magento\TestFramework\Helper\ObjectManager $factory) - { - $this->factory = $factory; - } - - /** - * Create new object instance - * - * @param string $type - * @param array $arguments - * @return mixed - */ - public function create($type, array $arguments = array()) - { - return $this->factory->getObject($type, $arguments); - } - - /** - * Retrieve cached object instance - * - * @param string $type - * @return mixed - */ - public function get($type) + public function __construct(\Magento\TestFramework\Helper\ObjectManager $objectManager) { - return $this->factory->getObject($type); + $this->objectManager = $objectManager; } /** - * Configure object manager + * Returns a builder for a given class name. * - * @param array $configuration - * @return void + * @param string $className + * @return \Magento\Framework\Api\ExtensibleDataBuilderInterface Builder Instance */ - public function configure(array $configuration) + public function getDataBuilder($className) { - $this->configuration = $configuration; + $interfaceSuffix = 'Interface'; + if (substr($className, -strlen($interfaceSuffix)) === $interfaceSuffix) { + /** If class name ends with Interface, replace it with Data suffix */ + $builderClassName = substr($className, 0, -strlen($interfaceSuffix)) . 'Data'; + } else { + $builderClassName = $className; + } + $builderClassName .= 'Builder'; + return $this->objectManager->getObject($builderClassName); } } diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php index d8eec8eb601d656d474e725cbbf16907cbc85b34..ca3f5ed43c9da1942560f1eb5deb7026696d920e 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Item/ConfigureTest.php @@ -66,6 +66,19 @@ class ConfigureTest extends \PHPUnit_Framework_TestCase ); } + public function testGetWishlistOptions() + { + $typeId = 'simple'; + $product = $this->getMockBuilder('Magento\Catalog\Model\Product')->disableOriginalConstructor()->getMock(); + $product->expects($this->once())->method('getTypeId')->willReturn($typeId); + $this->_mockRegistry->expects($this->once()) + ->method('registry') + ->with($this->equalTo('product')) + ->willReturn($product); + + $this->assertEquals(['productType' => $typeId], $this->_model->getWishlistOptions()); + } + public function testGetProduct() { $product = 'some test product'; diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Block/Rss/EmailLinkTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Rss/EmailLinkTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b406d8e5e9a1b43f0ec550e7946481b7d9213a89 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Rss/EmailLinkTest.php @@ -0,0 +1,87 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Wishlist\Block\Rss; + +use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; + +class EmailLinkTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Wishlist\Block\Rss\EmailLink */ + protected $link; + + /** @var ObjectManagerHelper */ + protected $objectManagerHelper; + + /** @var \Magento\Wishlist\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */ + protected $wishlistHelper; + + /** @var \Magento\Framework\App\Rss\UrlBuilderInterface|\PHPUnit_Framework_MockObject_MockObject */ + protected $urlBuilder; + + protected function setUp() + { + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['getId', 'getSharingCode'], [], '', false); + $wishlist->expects($this->any())->method('getId')->will($this->returnValue(5)); + $wishlist->expects($this->any())->method('getSharingCode')->will($this->returnValue('somesharingcode')); + $customer = $this->getMock('Magento\Customer\Service\V1\Data\Customer', [], [], '', false); + $customer->expects($this->any())->method('getId')->will($this->returnValue(8)); + $customer->expects($this->any())->method('getEmail')->will($this->returnValue('test@example.com')); + + $this->wishlistHelper = $this->getMock( + 'Magento\Wishlist\Helper\Data', + ['getWishlist', 'getCustomer'], + [], + '', + false + ); + $this->wishlistHelper->expects($this->any())->method('getWishlist')->will($this->returnValue($wishlist)); + $this->wishlistHelper->expects($this->any())->method('getCustomer')->will($this->returnValue($customer)); + + $this->urlBuilder = $this->getMock('Magento\Framework\App\Rss\UrlBuilderInterface'); + $this->objectManagerHelper = new ObjectManagerHelper($this); + $this->link = $this->objectManagerHelper->getObject( + 'Magento\Wishlist\Block\Rss\EmailLink', + [ + 'wishlistHelper' => $this->wishlistHelper, + 'rssUrlBuilder' => $this->urlBuilder + ] + ); + } + + public function testGetLink() + { + $this->urlBuilder->expects($this->atLeastOnce())->method('getUrl') + ->with($this->equalTo(array( + 'type' => 'wishlist', + 'data' => 'OCx0ZXN0QGV4YW1wbGUuY29t', + '_secure' => false, + 'wishlist_id' => 5, + 'sharing_code' => 'somesharingcode' + ))) + ->will($this->returnValue('http://url.com/rss/feed/index/type/wishlist/wishlist_id/5')); + $this->assertEquals('http://url.com/rss/feed/index/type/wishlist/wishlist_id/5', $this->link->getLink()); + } + +} diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Block/Rss/LinkTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Rss/LinkTest.php index 8bc5d349f4c34897a3443c78bbf923edc506b87e..ca22c973253c2658cdaa23ca04a59d23a03fd1c2 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Block/Rss/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Block/Rss/LinkTest.php @@ -45,9 +45,8 @@ class LinkTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', [], [], '', false); + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['getId'], [], '', false); $wishlist->expects($this->any())->method('getId')->will($this->returnValue(5)); - $customer = $this->getMock('Magento\Customer\Service\V1\Data\Customer', [], [], '', false); $customer->expects($this->any())->method('getId')->will($this->returnValue(8)); $customer->expects($this->any())->method('getEmail')->will($this->returnValue('test@example.com')); diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php index 943592bb0622f7cfc4ed0a25336a9fc0b1f6e3b6..ad3fc2eb0251198b74cf52f4f786fc5354d9c0dd 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Model/Rss/WishlistTest.php @@ -71,6 +71,11 @@ class WishlistTest extends \PHPUnit_Framework_TestCase */ protected $layoutMock; + /** + * @var \Magento\Customer\Model\CustomerFactory + */ + protected $customerFactory; + /** * Set up mock objects for tested class * @@ -88,24 +93,9 @@ class WishlistTest extends \PHPUnit_Framework_TestCase '', false ); - $this->urlBuilderMock = $this->getMockForAbstractClass( - 'Magento\Framework\UrlInterface', - [], - '', - true, - true, - true, - ['getUrl'] - ); - $this->scopeConfig = $this->getMockForAbstractClass( - 'Magento\Framework\App\Config\ScopeConfigInterface', - [], - '', - true, - true, - true, - ['getConfig'] - ); + $this->urlBuilderMock = $this->getMockForAbstractClass('Magento\Framework\UrlInterface'); + $this->scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); + $this->imageHelperMock = $this->getMock('Magento\Catalog\Helper\Image', [], [], '', false); $this->layoutMock = $this->getMockForAbstractClass( @@ -118,6 +108,13 @@ class WishlistTest extends \PHPUnit_Framework_TestCase ['getBlock'] ); + $this->customerFactory = $this->getMockBuilder('Magento\Customer\Model\CustomerFactory') + ->setMethods(['create'])->disableOriginalConstructor()->getMock(); + + $requestMock = $this->getMock('\Magento\Framework\App\RequestInterface'); + $requestMock->expects($this->any())->method('getParam')->with('sharing_code') + ->will($this->returnValue('somesharingcode')); + $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $objectManager->getObject( 'Magento\Wishlist\Model\Rss\Wishlist', @@ -130,6 +127,8 @@ class WishlistTest extends \PHPUnit_Framework_TestCase 'scopeConfig' => $this->scopeConfig, 'rssFactory' => $this->rssFactoryMock, 'layout' => $this->layoutMock, + 'request' => $requestMock, + 'customerFactory' => $this->customerFactory ] ); } @@ -141,7 +140,7 @@ class WishlistTest extends \PHPUnit_Framework_TestCase $title = "$customerName's Wishlist"; $wishlistModelMock = $this->getMock( 'Magento\Wishlist\Model\Wishlist', - ['getId', '__wakeup', 'getCustomerId', 'getItemCollection'], + ['getId', '__wakeup', 'getCustomerId', 'getItemCollection', 'getSharingCode'], [], '', false @@ -152,15 +151,20 @@ class WishlistTest extends \PHPUnit_Framework_TestCase $productUrl = 'http://product.url/'; $productName = 'Product name'; + $customer = $this->getMockBuilder('Magento\Customer\Model\Customer') + ->setMethods(['getName', '__wakeup', 'load']) + ->disableOriginalConstructor()->getMock(); + $customer->expects($this->once())->method('load')->will($this->returnSelf()); + $customer->expects($this->once())->method('getName')->will($this->returnValue('Customer Name')); + + $this->customerFactory->expects($this->once())->method('create')->will($this->returnValue($customer)); + $this->wishlistHelperMock->expects($this->any()) ->method('getWishlist') ->will($this->returnValue($wishlistModelMock)); $this->wishlistHelperMock->expects($this->any()) ->method('getCustomer') ->will($this->returnValue($customerServiceMock)); - $this->wishlistHelperMock->expects($this->once()) - ->method('getCustomerName') - ->will($this->returnValue($customerName)); $wishlistModelMock->expects($this->once()) ->method('getId') ->will($this->returnValue($wishlistId)); @@ -207,7 +211,6 @@ class WishlistTest extends \PHPUnit_Framework_TestCase ) ); - $this->assertEquals($expectedResult, $this->model->getRssData()); } @@ -313,4 +316,16 @@ class WishlistTest extends \PHPUnit_Framework_TestCase { $this->assertEquals(60, $this->model->getCacheLifetime()); } + + public function testIsAuthRequired() + { + $wishlist = $this->getMockBuilder('Magento\Wishlist\Model\Wishlist')->setMethods( + ['getId', '__wakeup', 'getCustomerId', 'getItemCollection', 'getSharingCode'] + )->disableOriginalConstructor()->getMock(); + $wishlist->expects($this->any())->method('getSharingCode') + ->will($this->returnValue('somesharingcode')); + $this->wishlistHelperMock->expects($this->any())->method('getWishlist') + ->will($this->returnValue($wishlist)); + $this->assertEquals(false, $this->model->isAuthRequired()); + } } diff --git a/dev/tools/Magento/Tools/Dependency/generate/bootstrap.php b/dev/tools/Magento/Tools/Dependency/generate/bootstrap.php index feb6edff6deb9f5cfafd4e56bbc1ead0e78b0fa7..8b94f8fb297c46bc91e2c5dd95e8c6cf12b40585 100644 --- a/dev/tools/Magento/Tools/Dependency/generate/bootstrap.php +++ b/dev/tools/Magento/Tools/Dependency/generate/bootstrap.php @@ -23,6 +23,3 @@ */ require_once __DIR__ . '/../../../../../../app/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath( - array(BP . '/dev/tests/static/framework', BP . '/dev/tools') -); diff --git a/dev/tools/Magento/Tools/Di/compiler.php b/dev/tools/Magento/Tools/Di/compiler.php index 8c3986a4e45f94a6e40ad2368fdd0544060085ce..91aac919d29cf75a1f4aaa136f33f667a98338ad 100644 --- a/dev/tools/Magento/Tools/Di/compiler.php +++ b/dev/tools/Magento/Tools/Di/compiler.php @@ -22,7 +22,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ require __DIR__ . '/../../../bootstrap.php'; + $rootDir = realpath(__DIR__ . '/../../../../../'); +use Magento\Framework\ObjectManager\Code\Generator\Converter; use Magento\Framework\ObjectManager\Code\Generator\Factory; use Magento\Framework\ObjectManager\Code\Generator\Repository; use Magento\Framework\ObjectManager\Code\Generator\Proxy; @@ -32,35 +34,35 @@ use Magento\Tools\Di\Compiler\Directory; use Magento\Tools\Di\Code\Scanner; use Magento\Tools\Di\Definition\Compressor; use Magento\Tools\Di\Definition\Serializer; -use Magento\Framework\Service\Code\Generator\Builder; -use Magento\Framework\Service\Code\Generator\Mapper; -use Magento\Framework\ObjectManager\Code\Generator\Converter; -use Magento\Framework\Service\Code\Generator\SearchResults; -use Magento\Framework\Service\Code\Generator\SearchResultsBuilder; +use Magento\Framework\Api\Code\Generator\Builder; +use Magento\Framework\Api\Code\Generator\Mapper; +use Magento\Framework\Api\Code\Generator\SearchResults; +use Magento\Framework\Api\Code\Generator\SearchResultsBuilder; +use Magento\Framework\Api\Code\Generator\DataBuilder; -$filePatterns = array('php' => '/.*\.php$/', 'di' => '/\/etc\/([a-zA-Z_]*\/di|di)\.xml$/'); +$filePatterns = ['php' => '/.*\.php$/', 'di' => '/\/etc\/([a-zA-Z_]*\/di|di)\.xml$/']; $codeScanDir = realpath($rootDir . '/app'); try { $opt = new Zend_Console_Getopt( - array( - 'serializer=w' => 'serializer function that should be used (serialize|binary) default = serialize', - 'verbose|v' => 'output report after tool run', + [ + 'serializer=w' => 'serializer function that should be used (serialize|binary) default = serialize', + 'verbose|v' => 'output report after tool run', 'extra-classes-file=s' => 'path to file with extra proxies and factories to generate', - 'generation=s' => 'absolute path to generated classes, <magento_root>/var/generation by default', - 'di=s' => 'absolute path to DI definitions directory, <magento_root>/var/di by default' - ) + 'generation=s' => 'absolute path to generated classes, <magento_root>/var/generation by default', + 'di=s' => 'absolute path to DI definitions directory, <magento_root>/var/di by default' + ] ); $opt->parse(); $generationDir = $opt->getOption('generation') ? $opt->getOption('generation') : $rootDir . '/var/generation'; - (new \Magento\Framework\Autoload\IncludePath())->addIncludePath($generationDir); + \Magento\Framework\Code\Generator\FileResolver::addIncludePath($generationDir); $diDir = $opt->getOption('di') ? $opt->getOption('di') : $rootDir . '/var/di'; $compiledFile = $diDir . '/definitions.php'; $relationsFile = $diDir . '/relations.php'; $pluginDefFile = $diDir . '/plugins.php'; - $compilationDirs = array($rootDir . '/app/code', $rootDir . '/lib/internal/Magento'); + $compilationDirs = [$rootDir . '/app/code', $rootDir . '/lib/internal/Magento']; /** @var Writer\WriterInterface $logWriter Writer model for success messages */ $logWriter = $opt->getOption('v') ? new Writer\Console() : new Writer\Quiet(); @@ -79,8 +81,8 @@ try { // 1.1 Code scan $directoryScanner = new Scanner\DirectoryScanner(); $files = $directoryScanner->scan($codeScanDir, $filePatterns); - $files['additional'] = array($opt->getOption('extra-classes-file')); - $entities = array(); + $files['additional'] = [$opt->getOption('extra-classes-file')]; + $entities = []; $scanner = new Scanner\CompositeScanner(); $scanner->addChild(new Scanner\PhpScanner($log), 'php'); @@ -90,37 +92,43 @@ try { $interceptorScanner = new Scanner\XmlInterceptorScanner(); $entities['interceptors'] = $interceptorScanner->collectEntities($files['di']); + $fileResolver = new \Magento\Framework\Code\Generator\FileResolver(); // 1.2 Generation of Factory and Additional Classes $generatorIo = new \Magento\Framework\Code\Generator\Io( new \Magento\Framework\Filesystem\Driver\File(), - null, + $fileResolver, $generationDir ); $generator = new \Magento\Framework\Code\Generator( - null, + $fileResolver, $generatorIo, - array( + [ + DataBuilder::ENTITY_TYPE => 'Magento\Framework\Api\Code\Generator\DataBuilder', \Magento\Framework\Interception\Code\Generator\Interceptor::ENTITY_TYPE => 'Magento\Framework\Interception\Code\Generator\Interceptor', - SearchResultsBuilder::ENTITY_TYPE => 'Magento\Framework\Service\Code\Generator\SearchResultsBuilder', + SearchResultsBuilder::ENTITY_TYPE => 'Magento\Framework\Api\Code\Generator\SearchResultsBuilder', Proxy::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Proxy', Factory::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Factory', - Builder::ENTITY_TYPE => 'Magento\Framework\Service\Code\Generator\Builder', - Mapper::ENTITY_TYPE => 'Magento\Framework\Service\Code\Generator\Mapper', + Builder::ENTITY_TYPE => 'Magento\Framework\Api\Code\Generator\Builder', + Mapper::ENTITY_TYPE => 'Magento\Framework\Api\Code\Generator\Mapper', Repository::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Repository', Converter::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Converter', - SearchResults::ENTITY_TYPE => 'Magento\Framework\Service\Code\Generator\SearchResults', - ) + SearchResults::ENTITY_TYPE => 'Magento\Framework\Api\Code\Generator\SearchResults', + ] ); - $autoloader = new \Magento\Framework\Code\Generator\Autoloader($generator); - spl_autoload_register(array($autoloader, 'load')); - foreach (array('php', 'additional') as $type) { + $autoloader = new \Magento\Framework\Code\Generator\Autoloader($generator, $fileResolver); + spl_autoload_register([$autoloader, 'load']); + foreach (['php', 'additional'] as $type) { sort($entities[$type]); foreach ($entities[$type] as $entityName) { switch ($generator->generateClass($entityName)) { case \Magento\Framework\Code\Generator::GENERATION_SUCCESS: $log->add(Log::GENERATION_SUCCESS, $entityName); + $file = $fileResolver->getFile($entityName); + if ($file) { + include_once $file; + } break; case \Magento\Framework\Code\Generator::GENERATION_ERROR: @@ -151,11 +159,15 @@ try { ); // 2.1.1 Generation of Proxy and Interceptor Classes - foreach (array('interceptors', 'di') as $type) { + foreach (['interceptors', 'di'] as $type) { foreach ($entities[$type] as $entityName) { switch ($generator->generateClass($entityName)) { case \Magento\Framework\Code\Generator::GENERATION_SUCCESS: $log->add(Log::GENERATION_SUCCESS, $entityName); + $file = $fileResolver->getFile($entityName); + if ($file) { + include_once $file; + } break; case \Magento\Framework\Code\Generator::GENERATION_ERROR: @@ -189,7 +201,7 @@ try { // 3. Plugin Definition Compilation $pluginScanner = new Scanner\CompositeScanner(); $pluginScanner->addChild(new Scanner\PluginScanner(), 'di'); - $pluginDefinitions = array(); + $pluginDefinitions = []; $pluginList = $pluginScanner->collectEntities($files); $pluginDefinitionList = new \Magento\Framework\Interception\Definition\Runtime(); foreach ($pluginList as $type => $entityList) { @@ -218,5 +230,5 @@ try { exit(1); } catch (Exception $e) { fwrite(STDERR, "Compiler failed with exception: " . $e->getMessage()); - exit(1); + throw($e); } diff --git a/dev/tools/Magento/Tools/Di/entity_generator.php b/dev/tools/Magento/Tools/Di/entity_generator.php index 21745c00408b062481c9ec9a4a0f6acc3f3db698..58e72db1b02e5e61a39450bbf758252f5dbe5ca3 100644 --- a/dev/tools/Magento/Tools/Di/entity_generator.php +++ b/dev/tools/Magento/Tools/Di/entity_generator.php @@ -29,12 +29,13 @@ use Magento\Framework\ObjectManager\Code\Generator\Factory; use Magento\Framework\ObjectManager\Code\Generator\Proxy; use Magento\Framework\Interception\Code\Generator\Interceptor; use Magento\Framework\Exception; -use Magento\Framework\Service\Code\Generator\Builder; -use Magento\Framework\Service\Code\Generator\Mapper; +use Magento\Framework\Api\Code\Generator\Builder; +use Magento\Framework\Api\Code\Generator\DataBuilder; +use Magento\Framework\Api\Code\Generator\Mapper; use Magento\Framework\ObjectManager\Code\Generator\Repository; use Magento\Framework\ObjectManager\Code\Generator\Converter; -use Magento\Framework\Service\Code\Generator\SearchResults; -use Magento\Framework\Service\Code\Generator\SearchResultsBuilder; +use Magento\Framework\Api\Code\Generator\SearchResults; +use Magento\Framework\Api\Code\Generator\SearchResultsBuilder; require __DIR__ . '/../../../../../app/bootstrap.php'; @@ -70,7 +71,7 @@ try { $generationDir = $opt->getOption('g'); } } catch (\Zend_Console_Getopt_Exception $e) { - $generator = new Generator(); + $generator = new Generator(new \Magento\Framework\Code\Generator\FileResolver()); $entities = $generator->getGeneratedEntities(); $allowedTypes = 'Allowed entity types are: ' . implode(', ', $entities) . '.'; @@ -85,7 +86,7 @@ try { exit($example); } -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath($generationDir); +\Magento\Framework\Code\Generator\FileResolver::addIncludePath($generationDir); //reinit generator with correct generation path $io = new Io(new File(), null, $generationDir); @@ -93,8 +94,9 @@ $generator = new Generator( null, $io, [ + DataBuilder::ENTITY_TYPE => 'Magento\Framework\Api\Code\Generator\DataBuilder', SearchResultsBuilder::ENTITY_TYPE => - 'Magento\Framework\Service\Code\Generator\SearchResultsBuilder', + 'Magento\Framework\Api\Code\Generator\SearchResultsBuilder', Proxy::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Proxy', Factory::ENTITY_TYPE => @@ -102,15 +104,15 @@ $generator = new Generator( Interceptor::ENTITY_TYPE => 'Magento\Framework\Interception\Code\Generator\Interceptor', Builder::ENTITY_TYPE => - 'Magento\Framework\Service\Code\Generator\Builder', + 'Magento\Framework\Api\Code\Generator\Builder', Mapper::ENTITY_TYPE => - 'Magento\Framework\Service\Code\Generator\Mapper', + 'Magento\Framework\Api\Code\Generator\Mapper', Repository::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Repository', Converter::ENTITY_TYPE => 'Magento\Framework\ObjectManager\Code\Generator\Converter', SearchResults::ENTITY_TYPE => - 'Magento\Framework\Service\Code\Generator\SearchResults', + 'Magento\Framework\Api\Code\Generator\SearchResults', ] ); diff --git a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php b/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php deleted file mode 100644 index 60d4b996515cb12a3c0d7fa00722ac2a5b7732f2..0000000000000000000000000000000000000000 --- a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php +++ /dev/null @@ -1,966 +0,0 @@ -<?php -/** - * Zend_Console_Getopt is a class to parse options for command-line - * applications. - * - * LICENSE - * - * This source file is subject to the new BSD license that is bundled - * with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://framework.zend.com/license/new-bsd - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@zend.com so we can send you a copy immediately. - * - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Getopt.php 22191 2010-05-17 21:50:14Z jan $ - */ - -/** - * Zend_Console_Getopt is a class to parse options for command-line - * applications. - * - * Terminology: - * Argument: an element of the argv array. This may be part of an option, - * or it may be a non-option command-line argument. - * Flag: the letter or word set off by a '-' or '--'. Example: in '--output filename', - * '--output' is the flag. - * Parameter: the additional argument that is associated with the option. - * Example: in '--output filename', the 'filename' is the parameter. - * Option: the combination of a flag and its parameter, if any. - * Example: in '--output filename', the whole thing is the option. - * - * The following features are supported: - * - * - Short flags like '-a'. Short flags are preceded by a single - * dash. Short flags may be clustered e.g. '-abc', which is the - * same as '-a' '-b' '-c'. - * - Long flags like '--verbose'. Long flags are preceded by a - * double dash. Long flags may not be clustered. - * - Options may have a parameter, e.g. '--output filename'. - * - Parameters for long flags may also be set off with an equals sign, - * e.g. '--output=filename'. - * - Parameters for long flags may be checked as string, word, or integer. - * - Automatic generation of a helpful usage message. - * - Signal end of options with '--'; subsequent arguments are treated - * as non-option arguments, even if they begin with '-'. - * - Raise exception Zend_Console_Getopt_Exception in several cases - * when invalid flags or parameters are given. Usage message is - * returned in the exception object. - * - * The format for specifying options uses a PHP associative array. - * The key is has the format of a list of pipe-separated flag names, - * followed by an optional '=' to indicate a required parameter or - * '-' to indicate an optional parameter. Following that, the type - * of parameter may be specified as 's' for string, 'w' for word, - * or 'i' for integer. - * - * Examples: - * - 'user|username|u=s' this means '--user' or '--username' or '-u' - * are synonyms, and the option requires a string parameter. - * - 'p=i' this means '-p' requires an integer parameter. No synonyms. - * - 'verbose|v-i' this means '--verbose' or '-v' are synonyms, and - * they take an optional integer parameter. - * - 'help|h' this means '--help' or '-h' are synonyms, and - * they take no parameter. - * - * The values in the associative array are strings that are used as - * brief descriptions of the options when printing a usage message. - * - * The simpler format for specifying options used by PHP's getopt() - * function is also supported. This is similar to GNU getopt and shell - * getopt format. - * - * Example: 'abc:' means options '-a', '-b', and '-c' - * are legal, and the latter requires a string parameter. - * - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @version Release: @package_version@ - * @since Class available since Release 0.6.0 - * - * @todo Handle params with multiple values, e.g. --colors=red,green,blue - * Set value of parameter to the array of values. Allow user to specify - * the separator with Zend_Console_Getopt::CONFIG_PARAMETER_SEPARATOR. - * If this config value is null or empty string, do not split values - * into arrays. Default separator is comma (','). - * - * @todo Handle params with multiple values specified with separate options - * e.g. --colors red --colors green --colors blue should give one - * option with an array(red, green, blue). - * Enable with Zend_Console_Getopt::CONFIG_CUMULATIVE_PARAMETERS. - * Default is that subsequent options overwrite the parameter value. - * - * @todo Handle flags occurring multiple times, e.g. -v -v -v - * Set value of the option's parameter to the integer count of instances - * instead of a boolean. - * Enable with Zend_Console_Getopt::CONFIG_CUMULATIVE_FLAGS. - * Default is that the value is simply boolean true regardless of - * how many instances of the flag appear. - * - * @todo Handle flags that implicitly print usage message, e.g. --help - * - * @todo Handle freeform options, e.g. --set-variable - * Enable with Zend_Console_Getopt::CONFIG_FREEFORM_FLAGS - * All flag-like syntax is recognized, no flag generates an exception. - * - * @todo Handle numeric options, e.g. -1, -2, -3, -1000 - * Enable with Zend_Console_Getopt::CONFIG_NUMERIC_FLAGS - * The rule must specify a named flag and the '#' symbol as the - * parameter type. e.g., 'lines=#' - * - * @todo Enable user to specify header and footer content in the help message. - * - * @todo Feature request to handle option interdependencies. - * e.g. if -b is specified, -a must be specified or else the - * usage is invalid. - * - * @todo Feature request to implement callbacks. - * e.g. if -a is specified, run function 'handleOptionA'(). - */ -class Zend_Console_Getopt -{ - - /** - * The options for a given application can be in multiple formats. - * modeGnu is for traditional 'ab:c:' style getopt format. - * modeZend is for a more structured format. - */ - const MODE_ZEND = 'zend'; - const MODE_GNU = 'gnu'; - - /** - * Constant tokens for various symbols used in the mode_zend - * rule format. - */ - const PARAM_REQUIRED = '='; - const PARAM_OPTIONAL = '-'; - const TYPE_STRING = 's'; - const TYPE_WORD = 'w'; - const TYPE_INTEGER = 'i'; - - /** - * These are constants for optional behavior of this class. - * ruleMode is either 'zend' or 'gnu' or a user-defined mode. - * dashDash is true if '--' signifies the end of command-line options. - * ignoreCase is true if '--opt' and '--OPT' are implicitly synonyms. - * parseAll is true if all options on the command line should be parsed, regardless of - * whether an argument appears before them. - */ - const CONFIG_RULEMODE = 'ruleMode'; - const CONFIG_DASHDASH = 'dashDash'; - const CONFIG_IGNORECASE = 'ignoreCase'; - const CONFIG_PARSEALL = 'parseAll'; - - /** - * Defaults for getopt configuration are: - * ruleMode is 'zend' format, - * dashDash (--) token is enabled, - * ignoreCase is not enabled, - * parseAll is enabled. - */ - protected $_getoptConfig = array( - self::CONFIG_RULEMODE => self::MODE_ZEND, - self::CONFIG_DASHDASH => true, - self::CONFIG_IGNORECASE => false, - self::CONFIG_PARSEALL => true, - ); - - /** - * Stores the command-line arguments for the calling applicaion. - * - * @var array - */ - protected $_argv = array(); - - /** - * Stores the name of the calling applicaion. - * - * @var string - */ - protected $_progname = ''; - - /** - * Stores the list of legal options for this application. - * - * @var array - */ - protected $_rules = array(); - - /** - * Stores alternate spellings of legal options. - * - * @var array - */ - protected $_ruleMap = array(); - - /** - * Stores options given by the user in the current invocation - * of the application, as well as parameters given in options. - * - * @var array - */ - protected $_options = array(); - - /** - * Stores the command-line arguments other than options. - * - * @var array - */ - protected $_remainingArgs = array(); - - /** - * State of the options: parsed or not yet parsed? - * - * @var boolean - */ - protected $_parsed = false; - - /** - * The constructor takes one to three parameters. - * - * The first parameter is $rules, which may be a string for - * gnu-style format, or a structured array for Zend-style format. - * - * The second parameter is $argv, and it is optional. If not - * specified, $argv is inferred from the global argv. - * - * The third parameter is an array of configuration parameters - * to control the behavior of this instance of Getopt; it is optional. - * - * @param array $rules - * @param array $argv - * @param array $getoptConfig - * @return void - */ - public function __construct($rules, $argv = null, $getoptConfig = array()) - { - if (!isset($_SERVER['argv'])) { - #require_once 'Zend/Console/Getopt/Exception.php'; - if (ini_get('register_argc_argv') == false) { - throw new Zend_Console_Getopt_Exception( - "argv is not available, because ini option 'register_argc_argv' is set Off" - ); - } else { - throw new Zend_Console_Getopt_Exception( - '$_SERVER["argv"] is not set, but Zend_Console_Getopt cannot work without this information.' - ); - } - } - - $this->_progname = $_SERVER['argv'][0]; - $this->setOptions($getoptConfig); - $this->addRules($rules); - if (!is_array($argv)) { - $argv = array_slice($_SERVER['argv'], 1); - } - if (isset($argv)) { - $this->addArguments((array)$argv); - } - } - - /** - * Return the state of the option seen on the command line of the - * current application invocation. This function returns true, or the - * parameter to the option, if any. If the option was not given, - * this function returns null. - * - * The magic __get method works in the context of naming the option - * as a virtual member of this class. - * - * @param string $key - * @return string - */ - public function __get($key) - { - return $this->getOption($key); - } - - /** - * Test whether a given option has been seen. - * - * @param string $key - * @return boolean - */ - public function __isset($key) - { - $this->parse(); - if (isset($this->_ruleMap[$key])) { - $key = $this->_ruleMap[$key]; - return isset($this->_options[$key]); - } - return false; - } - - /** - * Set the value for a given option. - * - * @param string $key - * @param string $value - * @return void - */ - public function __set($key, $value) - { - $this->parse(); - if (isset($this->_ruleMap[$key])) { - $key = $this->_ruleMap[$key]; - $this->_options[$key] = $value; - } - } - - /** - * Return the current set of options and parameters seen as a string. - * - * @return string - */ - public function __toString() - { - return $this->toString(); - } - - /** - * Unset an option. - * - * @param string $key - * @return void - */ - public function __unset($key) - { - $this->parse(); - if (isset($this->_ruleMap[$key])) { - $key = $this->_ruleMap[$key]; - unset($this->_options[$key]); - } - } - - /** - * Define additional command-line arguments. - * These are appended to those defined when the constructor was called. - * - * @param array $argv - * @throws Zend_Console_Getopt_Exception When not given an array as parameter - * @return Zend_Console_Getopt Provides a fluent interface - */ - public function addArguments($argv) - { - if(!is_array($argv)) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Parameter #1 to addArguments should be an array"); - } - $this->_argv = array_merge($this->_argv, $argv); - $this->_parsed = false; - return $this; - } - - /** - * Define full set of command-line arguments. - * These replace any currently defined. - * - * @param array $argv - * @throws Zend_Console_Getopt_Exception When not given an array as parameter - * @return Zend_Console_Getopt Provides a fluent interface - */ - public function setArguments($argv) - { - if(!is_array($argv)) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Parameter #1 to setArguments should be an array"); - } - $this->_argv = $argv; - $this->_parsed = false; - return $this; - } - - /** - * Define multiple configuration options from an associative array. - * These are not program options, but properties to configure - * the behavior of Zend_Console_Getopt. - * - * @param array $getoptConfig - * @return Zend_Console_Getopt Provides a fluent interface - */ - public function setOptions($getoptConfig) - { - if (isset($getoptConfig)) { - foreach ($getoptConfig as $key => $value) { - $this->setOption($key, $value); - } - } - return $this; - } - - /** - * Define one configuration option as a key/value pair. - * These are not program options, but properties to configure - * the behavior of Zend_Console_Getopt. - * - * @param string $configKey - * @param string $configValue - * @return Zend_Console_Getopt Provides a fluent interface - */ - public function setOption($configKey, $configValue) - { - if ($configKey !== null) { - $this->_getoptConfig[$configKey] = $configValue; - } - return $this; - } - - /** - * Define additional option rules. - * These are appended to the rules defined when the constructor was called. - * - * @param array $rules - * @return Zend_Console_Getopt Provides a fluent interface - */ - public function addRules($rules) - { - $ruleMode = $this->_getoptConfig['ruleMode']; - switch ($this->_getoptConfig['ruleMode']) { - case self::MODE_ZEND: - if (is_array($rules)) { - $this->_addRulesModeZend($rules); - break; - } - // intentional fallthrough - case self::MODE_GNU: - $this->_addRulesModeGnu($rules); - break; - default: - /** - * Call addRulesModeFoo() for ruleMode 'foo'. - * The developer should subclass Getopt and - * provide this method. - */ - $method = '_addRulesMode' . ucfirst($ruleMode); - $this->$method($rules); - } - $this->_parsed = false; - return $this; - } - - /** - * Return the current set of options and parameters seen as a string. - * - * @return string - */ - public function toString() - { - $this->parse(); - $s = array(); - foreach ($this->_options as $flag => $value) { - $s[] = $flag . '=' . ($value === true ? 'true' : $value); - } - return implode(' ', $s); - } - - /** - * Return the current set of options and parameters seen - * as an array of canonical options and parameters. - * - * Clusters have been expanded, and option aliases - * have been mapped to their primary option names. - * - * @return array - */ - public function toArray() - { - $this->parse(); - $s = array(); - foreach ($this->_options as $flag => $value) { - $s[] = $flag; - if ($value !== true) { - $s[] = $value; - } - } - return $s; - } - - /** - * Return the current set of options and parameters seen in Json format. - * - * @return string - */ - public function toJson() - { - $this->parse(); - $j = array(); - foreach ($this->_options as $flag => $value) { - $j['options'][] = array( - 'option' => array( - 'flag' => $flag, - 'parameter' => $value - ) - ); - } - - /** - * @see Zend_Json - */ - #require_once 'Zend/Json.php'; - $json = Zend_Json::encode($j); - - return $json; - } - - /** - * Return the current set of options and parameters seen in XML format. - * - * @return string - */ - public function toXml() - { - $this->parse(); - $doc = new DomDocument('1.0', 'utf-8'); - $optionsNode = $doc->createElement('options'); - $doc->appendChild($optionsNode); - foreach ($this->_options as $flag => $value) { - $optionNode = $doc->createElement('option'); - $optionNode->setAttribute('flag', utf8_encode($flag)); - if ($value !== true) { - $optionNode->setAttribute('parameter', utf8_encode($value)); - } - $optionsNode->appendChild($optionNode); - } - $xml = $doc->saveXML(); - return $xml; - } - - /** - * Return a list of options that have been seen in the current argv. - * - * @return array - */ - public function getOptions() - { - $this->parse(); - return array_keys($this->_options); - } - - /** - * Return the state of the option seen on the command line of the - * current application invocation. - * - * This function returns true, or the parameter value to the option, if any. - * If the option was not given, this function returns false. - * - * @param string $flag - * @return mixed - */ - public function getOption($flag) - { - $this->parse(); - if ($this->_getoptConfig[self::CONFIG_IGNORECASE]) { - $flag = strtolower($flag); - } - if (isset($this->_ruleMap[$flag])) { - $flag = $this->_ruleMap[$flag]; - if (isset($this->_options[$flag])) { - return $this->_options[$flag]; - } - } - return null; - } - - /** - * Return the arguments from the command-line following all options found. - * - * @return array - */ - public function getRemainingArgs() - { - $this->parse(); - return $this->_remainingArgs; - } - - /** - * Return a useful option reference, formatted for display in an - * error message. - * - * Note that this usage information is provided in most Exceptions - * generated by this class. - * - * @return string - */ - public function getUsageMessage() - { - $usage = "Usage: {$this->_progname} [ options ]\n"; - $maxLen = 20; - $lines = array(); - foreach ($this->_rules as $rule) { - $flags = array(); - if (is_array($rule['alias'])) { - foreach ($rule['alias'] as $flag) { - $flags[] = (strlen($flag) == 1 ? '-' : '--') . $flag; - } - } - $linepart['name'] = implode('|', $flags); - if (isset($rule['param']) && $rule['param'] != 'none') { - $linepart['name'] .= ' '; - switch ($rule['param']) { - case 'optional': - $linepart['name'] .= "[ <{$rule['paramType']}> ]"; - break; - case 'required': - $linepart['name'] .= "<{$rule['paramType']}>"; - break; - } - } - if (strlen($linepart['name']) > $maxLen) { - $maxLen = strlen($linepart['name']); - } - $linepart['help'] = ''; - if (isset($rule['help'])) { - $linepart['help'] .= $rule['help']; - } - $lines[] = $linepart; - } - foreach ($lines as $linepart) { - $usage .= sprintf("%s %s\n", - str_pad($linepart['name'], $maxLen), - $linepart['help']); - } - return $usage; - } - - /** - * Define aliases for options. - * - * The parameter $aliasMap is an associative array - * mapping option name (short or long) to an alias. - * - * @param array $aliasMap - * @throws Zend_Console_Getopt_Exception - * @return Zend_Console_Getopt Provides a fluent interface - */ - public function setAliases($aliasMap) - { - foreach ($aliasMap as $flag => $alias) - { - if ($this->_getoptConfig[self::CONFIG_IGNORECASE]) { - $flag = strtolower($flag); - $alias = strtolower($alias); - } - if (!isset($this->_ruleMap[$flag])) { - continue; - } - $flag = $this->_ruleMap[$flag]; - if (isset($this->_rules[$alias]) || isset($this->_ruleMap[$alias])) { - $o = (strlen($alias) == 1 ? '-' : '--') . $alias; - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Option \"$o\" is being defined more than once."); - } - $this->_rules[$flag]['alias'][] = $alias; - $this->_ruleMap[$alias] = $flag; - } - return $this; - } - - /** - * Define help messages for options. - * - * The parameter $help_map is an associative array - * mapping option name (short or long) to the help string. - * - * @param array $helpMap - * @return Zend_Console_Getopt Provides a fluent interface - */ - public function setHelp($helpMap) - { - foreach ($helpMap as $flag => $help) - { - if (!isset($this->_ruleMap[$flag])) { - continue; - } - $flag = $this->_ruleMap[$flag]; - $this->_rules[$flag]['help'] = $help; - } - return $this; - } - - /** - * Parse command-line arguments and find both long and short - * options. - * - * Also find option parameters, and remaining arguments after - * all options have been parsed. - * - * @return Zend_Console_Getopt|null Provides a fluent interface - */ - public function parse() - { - if ($this->_parsed === true) { - return; - } - $argv = $this->_argv; - $this->_options = array(); - $this->_remainingArgs = array(); - while (count($argv) > 0) { - if ($argv[0] == '--') { - array_shift($argv); - if ($this->_getoptConfig[self::CONFIG_DASHDASH]) { - $this->_remainingArgs = array_merge($this->_remainingArgs, $argv); - break; - } - } - if (substr($argv[0], 0, 2) == '--') { - $this->_parseLongOption($argv); - } else if (substr($argv[0], 0, 1) == '-' && ('-' != $argv[0] || count($argv) >1)) { - $this->_parseShortOptionCluster($argv); - } else if($this->_getoptConfig[self::CONFIG_PARSEALL]) { - $this->_remainingArgs[] = array_shift($argv); - } else { - /* - * We should put all other arguments in _remainingArgs and stop parsing - * since CONFIG_PARSEALL is false. - */ - $this->_remainingArgs = array_merge($this->_remainingArgs, $argv); - break; - } - } - $this->_parsed = true; - return $this; - } - - /** - * Parse command-line arguments for a single long option. - * A long option is preceded by a double '--' character. - * Long options may not be clustered. - * - * @param mixed &$argv - * @return void - */ - protected function _parseLongOption(&$argv) - { - $optionWithParam = ltrim(array_shift($argv), '-'); - $l = explode('=', $optionWithParam, 2); - $flag = array_shift($l); - $param = array_shift($l); - if (isset($param)) { - array_unshift($argv, $param); - } - $this->_parseSingleOption($flag, $argv); - } - - /** - * Parse command-line arguments for short options. - * Short options are those preceded by a single '-' character. - * Short options may be clustered. - * - * @param mixed &$argv - * @return void - */ - protected function _parseShortOptionCluster(&$argv) - { - $flagCluster = ltrim(array_shift($argv), '-'); - foreach (str_split($flagCluster) as $flag) { - $this->_parseSingleOption($flag, $argv); - } - } - - /** - * Parse command-line arguments for a single option. - * - * @param string $flag - * @param mixed $argv - * @throws Zend_Console_Getopt_Exception - * @return void - */ - protected function _parseSingleOption($flag, &$argv) - { - if ($this->_getoptConfig[self::CONFIG_IGNORECASE]) { - $flag = strtolower($flag); - } - if (!isset($this->_ruleMap[$flag])) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Option \"$flag\" is not recognized.", - $this->getUsageMessage()); - } - $realFlag = $this->_ruleMap[$flag]; - switch ($this->_rules[$realFlag]['param']) { - case 'required': - if (count($argv) > 0) { - $param = array_shift($argv); - $this->_checkParameterType($realFlag, $param); - } else { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Option \"$flag\" requires a parameter.", - $this->getUsageMessage()); - } - break; - case 'optional': - if (count($argv) > 0 && substr($argv[0], 0, 1) != '-') { - $param = array_shift($argv); - $this->_checkParameterType($realFlag, $param); - } else { - $param = true; - } - break; - default: - $param = true; - } - $this->_options[$realFlag] = $param; - } - - /** - * Return true if the parameter is in a valid format for - * the option $flag. - * Throw an exception in most other cases. - * - * @param string $flag - * @param string $param - * @throws Zend_Console_Getopt_Exception - * @return bool - */ - protected function _checkParameterType($flag, $param) - { - $type = 'string'; - if (isset($this->_rules[$flag]['paramType'])) { - $type = $this->_rules[$flag]['paramType']; - } - switch ($type) { - case 'word': - if (preg_match('/\W/', $param)) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Option \"$flag\" requires a single-word parameter, but was given \"$param\".", - $this->getUsageMessage()); - } - break; - case 'integer': - if (preg_match('/\D/', $param)) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Option \"$flag\" requires an integer parameter, but was given \"$param\".", - $this->getUsageMessage()); - } - break; - case 'string': - default: - break; - } - return true; - } - - /** - * Define legal options using the gnu-style format. - * - * @param string $rules - * @return void - */ - protected function _addRulesModeGnu($rules) - { - $ruleArray = array(); - - /** - * Options may be single alphanumeric characters. - * Options may have a ':' which indicates a required string parameter. - * No long options or option aliases are supported in GNU style. - */ - preg_match_all('/([a-zA-Z0-9]:?)/', $rules, $ruleArray); - foreach ($ruleArray[1] as $rule) { - $r = array(); - $flag = substr($rule, 0, 1); - if ($this->_getoptConfig[self::CONFIG_IGNORECASE]) { - $flag = strtolower($flag); - } - $r['alias'][] = $flag; - if (substr($rule, 1, 1) == ':') { - $r['param'] = 'required'; - $r['paramType'] = 'string'; - } else { - $r['param'] = 'none'; - } - $this->_rules[$flag] = $r; - $this->_ruleMap[$flag] = $flag; - } - } - - /** - * Define legal options using the Zend-style format. - * - * @param array $rules - * @throws Zend_Console_Getopt_Exception - * @return void - */ - protected function _addRulesModeZend($rules) - { - foreach ($rules as $ruleCode => $helpMessage) - { - // this may have to translate the long parm type if there - // are any complaints that =string will not work (even though that use - // case is not documented) - if (in_array(substr($ruleCode, -2, 1), array('-', '='))) { - $flagList = substr($ruleCode, 0, -2); - $delimiter = substr($ruleCode, -2, 1); - $paramType = substr($ruleCode, -1); - } else { - $flagList = $ruleCode; - $delimiter = $paramType = null; - } - if ($this->_getoptConfig[self::CONFIG_IGNORECASE]) { - $flagList = strtolower($flagList); - } - $flags = explode('|', $flagList); - $rule = array(); - $mainFlag = $flags[0]; - foreach ($flags as $flag) { - if (empty($flag)) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Blank flag not allowed in rule \"$ruleCode\"."); - } - if (strlen($flag) == 1) { - if (isset($this->_ruleMap[$flag])) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Option \"-$flag\" is being defined more than once."); - } - $this->_ruleMap[$flag] = $mainFlag; - $rule['alias'][] = $flag; - } else { - if (isset($this->_rules[$flag]) || isset($this->_ruleMap[$flag])) { - #require_once 'Zend/Console/Getopt/Exception.php'; - throw new Zend_Console_Getopt_Exception( - "Option \"--$flag\" is being defined more than once."); - } - $this->_ruleMap[$flag] = $mainFlag; - $rule['alias'][] = $flag; - } - } - if (isset($delimiter)) { - switch ($delimiter) { - case self::PARAM_REQUIRED: - $rule['param'] = 'required'; - break; - case self::PARAM_OPTIONAL: - default: - $rule['param'] = 'optional'; - } - switch (substr($paramType, 0, 1)) { - case self::TYPE_WORD: - $rule['paramType'] = 'word'; - break; - case self::TYPE_INTEGER: - $rule['paramType'] = 'integer'; - break; - case self::TYPE_STRING: - default: - $rule['paramType'] = 'string'; - } - } else { - $rule['param'] = 'none'; - } - $rule['help'] = $helpMessage; - $this->_rules[$mainFlag] = $rule; - } - } - -} diff --git a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php b/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php deleted file mode 100644 index adece5f0e11b0e83a2c4434abb385f8064fe4886..0000000000000000000000000000000000000000 --- a/dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Zend Framework - * - * LICENSE - * - * This source file is subject to the new BSD license that is bundled - * with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://framework.zend.com/license/new-bsd - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@zend.com so we can send you a copy immediately. - * - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ - */ - - -/** - * @see Zend_Console_Getopt_Exception - */ -#require_once 'Zend/Exception.php'; - - -/** - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -class Zend_Console_Getopt_Exception extends Zend_Exception -{ - /** - * Usage - * - * @var string - */ - protected $usage = ''; - - /** - * Constructor - * - * @param string $message - * @param string $usage - * @return void - */ - public function __construct($message, $usage = '') - { - $this->usage = $usage; - parent::__construct($message); - } - - /** - * Returns the usage - * - * @return string - */ - public function getUsageMessage() - { - return $this->usage; - } -} diff --git a/dev/tools/Magento/Tools/I18n/Zend/Exception.php b/dev/tools/Magento/Tools/I18n/Zend/Exception.php deleted file mode 100644 index 4947cec2e287a3db97f201d0f480d0a6a6532b86..0000000000000000000000000000000000000000 --- a/dev/tools/Magento/Tools/I18n/Zend/Exception.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php -/** - * Zend Framework - * - * LICENSE - * - * This source file is subject to the new BSD license that is bundled - * with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://framework.zend.com/license/new-bsd - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@zend.com so we can send you a copy immediately. - * - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 20978 2010-02-08 15:35:25Z matthew $ - */ - -/** - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -class Zend_Exception extends Exception -{ - /** - * @var null|Exception - */ - private $_previous = null; - - /** - * Construct the exception - * - * @param string $msg - * @param int $code - * @param Exception $previous - * @return void - */ - public function __construct($msg = '', $code = 0, Exception $previous = null) - { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - parent::__construct($msg, (int) $code); - $this->_previous = $previous; - } else { - parent::__construct($msg, (int) $code, $previous); - } - } - - /** - * Overloading - * - * For PHP < 5.3.0, provides access to the getPrevious() method. - * - * @param string $method - * @param array $args - * @return mixed - */ - public function __call($method, array $args) - { - if ('getprevious' == strtolower($method)) { - return $this->_getPrevious(); - } - return null; - } - - /** - * String representation of the exception - * - * @return string - */ - public function __toString() - { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - if (null !== ($e = $this->getPrevious())) { - return $e->__toString() - . "\n\nNext " - . parent::__toString(); - } - } - return parent::__toString(); - } - - /** - * Returns previous Exception - * - * @return Exception|null - */ - protected function _getPrevious() - { - return $this->_previous; - } -} diff --git a/dev/tools/Magento/Tools/I18n/bootstrap.php b/dev/tools/Magento/Tools/I18n/bootstrap.php index 1df747f66623836a873f7898c6f2c9586e05be62..1d2cd7c116c310f8a03995061e6664b4fe9156ef 100644 --- a/dev/tools/Magento/Tools/I18n/bootstrap.php +++ b/dev/tools/Magento/Tools/I18n/bootstrap.php @@ -23,22 +23,8 @@ */ define('BP', realpath(__DIR__) . '/'); -/** - * @param string $className - * @return bool - */ -function i18n_tool_autoloader($className) -{ - if (strpos($className, 'Magento\\Tools\\') !== false) { - $filePath = str_replace('\\', '/', str_replace('Magento\\Tools\\I18n\\', '', $className)); - $filePath = BP . $filePath . '.php'; - } elseif (strpos($className, 'Zend_') !== false) { - $filePath = BP . str_replace('_', '/', $className) . '.php'; - } - if (isset($filePath) && file_exists($filePath)) { - include_once $filePath; - } else { - return false; - } +$vendorDir = require BP . '../../../../../app/etc/vendor_path.php'; +$vendorAutoload = BP . "../../../../../{$vendorDir}/autoload.php"; +if (file_exists($vendorAutoload)) { + require_once $vendorAutoload; } -spl_autoload_register('i18n_tool_autoloader'); diff --git a/dev/tools/Magento/Tools/Layout/xmlUpdater.php b/dev/tools/Magento/Tools/Layout/xmlUpdater.php index 6f69cd8dda80f47425c3187136b4362c189bfb7a..c1647dd55f11bd361a82b4e4f82a15a5e1f62a56 100644 --- a/dev/tools/Magento/Tools/Layout/xmlUpdater.php +++ b/dev/tools/Magento/Tools/Layout/xmlUpdater.php @@ -25,8 +25,6 @@ $basePath = realpath(__DIR__ . '/../../../../../'); require_once $basePath . '/app/autoload.php'; require __DIR__ . '/Formatter.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array($basePath . '/lib/internal')); - try { $opt = new \Zend_Console_Getopt( array( diff --git a/dev/tools/Magento/Tools/Migration/Acl/db.php b/dev/tools/Magento/Tools/Migration/Acl/db.php index 6616c68218f1f152a1848a5638a0ee32a412e312..aadb20fa694171636575bcaa05ca424c137a5c58 100644 --- a/dev/tools/Magento/Tools/Migration/Acl/db.php +++ b/dev/tools/Magento/Tools/Migration/Acl/db.php @@ -24,7 +24,7 @@ $rootDir = realpath(__DIR__ . '/../../../..'); require $rootDir . '/app/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array($rootDir . '/lib', $rootDir . '/dev')); +\Magento\Framework\Code\Generator\FileResolver::addIncludePath([$rootDir . '/lib', $rootDir . '/dev']); $defaultReportFile = 'report.log'; try { diff --git a/dev/tools/Magento/Tools/Migration/system_config.php b/dev/tools/Magento/Tools/Migration/system_config.php index 8ce21c9a3fc02fd01b9ab3eac173bfee3014c9d9..609815b7a24fa0c14934d3bf9e9127d03b1246c9 100644 --- a/dev/tools/Magento/Tools/Migration/system_config.php +++ b/dev/tools/Magento/Tools/Migration/system_config.php @@ -21,7 +21,6 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -use Magento\Framework\Autoload\IncludePath; use Magento\Tools\Migration\System\Configuration\Formatter; use Magento\Tools\Migration\System\Configuration\Generator; use Magento\Tools\Migration\System\Configuration\Mapper\Field; @@ -36,8 +35,10 @@ use Magento\Tools\Migration\System\Writer\Factory; use Magento\Tools\Migration\System\Configuration\Logger as Logger; $rootDir = realpath(__DIR__ . '../../../../../../'); + require __DIR__ . '/../../../../../app/autoload.php'; -(new IncludePath())->addIncludePath(array($rootDir . '/lib', $rootDir . '/dev')); +\Magento\Framework\Code\Generator\FileResolver::addIncludePath([$rootDir . '/lib', $rootDir . '/dev']); + $defaultReportFile = 'report.log'; try { diff --git a/dev/tools/Magento/Tools/View/deploy.php b/dev/tools/Magento/Tools/View/deploy.php index 10a6c88aefd195b486a6774dc25915a75c1a09ce..b0cd9635d8c5fd3f3f45feb940e4626936a675ce 100644 --- a/dev/tools/Magento/Tools/View/deploy.php +++ b/dev/tools/Magento/Tools/View/deploy.php @@ -31,8 +31,10 @@ $baseName = basename(__FILE__); $options = getopt('', array('langs::', 'dry-run', 'verbose::', 'help')); define('USAGE', "USAGE:\n\tphp -f {$baseName} -- [--langs=en_US,de_DE,...] [--verbose=0|1] [--dry-run] [--help]\n"); require __DIR__ . '/../../../../../app/bootstrap.php'; -$autoloader = new \Magento\Framework\Autoload\IncludePath(); -$autoloader->addIncludePath([BP . '/dev/tests/static/framework', realpath(__DIR__ . '/../../..')]); + +\Magento\Framework\Code\Generator\FileResolver::addIncludePath( + [BP . '/dev/tests/static/framework', realpath(__DIR__ . '/../../..')] +); // parse all options if (isset($options['help'])) { diff --git a/dev/tools/bootstrap.php b/dev/tools/bootstrap.php index 06ca15114a447d3915033c2b7ad28e65e77c80f3..4581dbaa8bd966f001d8a5aece04083ce7409abd 100644 --- a/dev/tools/bootstrap.php +++ b/dev/tools/bootstrap.php @@ -22,28 +22,3 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ require_once __DIR__ . '/../../app/autoload.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath( - array( - BP . '/app/code', - BP . '/lib/internal', - ) -); - -/** - * @param string $className - * @return bool - */ -function tool_autoloader($className) -{ - if (strpos($className, 'Magento\\Tools\\') === false) { - return false; - } - $filePath = str_replace('\\', '/', $className); - $filePath = __DIR__ . '/' . $filePath . '.php'; - if (file_exists($filePath)) { - include($filePath); - } else { - return false; - } -} -spl_autoload_register('tool_autoloader'); diff --git a/dev/tools/layout/xml-updater.php b/dev/tools/layout/xml-updater.php index 9fdbd0fe7a89c30dfd36cb5ce68b45bb20cd7810..e69ffb9fec073a9ea471d751d23d280300ae5ee6 100644 --- a/dev/tools/layout/xml-updater.php +++ b/dev/tools/layout/xml-updater.php @@ -25,10 +25,6 @@ $basePath = realpath(__DIR__ . '/../../../'); require_once $basePath . '/app/autoload.php'; require __DIR__ . '/Formatter.php'; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array( - $basePath . '/lib/internal', -)); - try{ $opt = new Zend_Console_Getopt(array( 'file|f=s' => 'File to process(required)', diff --git a/dev/tools/performance-toolkit/benchmark.jmx b/dev/tools/performance-toolkit/benchmark.jmx index de669dabd7f4fb5c60d23ca53f57a3dbc57fe82f..5a31d4e0c4863d72143cabae91482062220986b3 100644 --- a/dev/tools/performance-toolkit/benchmark.jmx +++ b/dev/tools/performance-toolkit/benchmark.jmx @@ -33,7 +33,7 @@ <collectionProp name="Arguments.arguments"> <elementProp name="host" elementType="Argument"> <stringProp name="Argument.name">host</stringProp> - <stringProp name="Argument.value">${__P(host)}</stringProp> + <stringProp name="Argument.value">${__P(host,localhost)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="base_path" elementType="Argument"> @@ -689,7 +689,7 @@ productList.add(productMap); </stringProp> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert login form shown" enabled="true"> <collectionProp name="Asserion.test_strings"> <stringProp name="-1397214398">Welcome</stringProp> - <stringProp name="-1309286748"><title>Magento Admin</title></stringProp> + <stringProp name="-515240035"><title>Magento Admin</title></stringProp> </collectionProp> <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> <boolProp name="Assertion.assume_success">false</boolProp> @@ -857,7 +857,7 @@ vars.put("searchData", new String(Base64Encoder.encode(searchData)));< <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp> - <stringProp name="HTTPSampler.path">${base_path}${admin_path}/customer/index/limit/{$users}/filter/${searchData}</stringProp> + <stringProp name="HTTPSampler.path">${base_path}${admin_path}/customer/index/grid/limit/${users}/filter/${searchData}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3789,7 +3789,7 @@ if (emailsCount < 1) { <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert success" enabled="true"> <collectionProp name="Asserion.test_strings"> <stringProp name="494863233">Thank you for your purchase!</stringProp> - <stringProp name="1635682758">Your order # is</stringProp> + <stringProp name="-1590086334">Your order number is</stringProp> </collectionProp> <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> <boolProp name="Assertion.assume_success">false</boolProp> @@ -3937,7 +3937,7 @@ props.remove("customer_emails_list");</stringProp> <stringProp name="filename">${report_save_path}/detailed-urls-report.log</stringProp> </ResultCollector> <hashTree/> - <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false"> + <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> diff --git a/dev/tools/performance-toolkit/framework/bootstrap.php b/dev/tools/performance-toolkit/framework/bootstrap.php index 04692120fcade99f01c7dc7ab77bebac2ff38720..8d568e678a3721be04de3ac19d3fc15dea072b6c 100644 --- a/dev/tools/performance-toolkit/framework/bootstrap.php +++ b/dev/tools/performance-toolkit/framework/bootstrap.php @@ -24,10 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$toolkitBaseDir = realpath(__DIR__ . '/..'); -$magentoBaseDir = realpath($toolkitBaseDir . '/../../../'); +$magentoBaseDir = realpath(__DIR__ . '/../../../../'); require_once "$magentoBaseDir/app/bootstrap.php"; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath("$toolkitBaseDir/framework"); - return $magentoBaseDir; diff --git a/dev/tools/performance-toolkit/framework/tests/unit/framework/bootstrap.php b/dev/tools/performance-toolkit/framework/tests/unit/framework/bootstrap.php index ed06aa5c708a73e285e5ee1d5301036951fd4c7e..d213e5969b12d1b8705376d715b9b411605e198a 100644 --- a/dev/tools/performance-toolkit/framework/tests/unit/framework/bootstrap.php +++ b/dev/tools/performance-toolkit/framework/tests/unit/framework/bootstrap.php @@ -25,6 +25,7 @@ $magentoBaseDir = realpath(__DIR__ . '/../../../../../../../'); require_once "$magentoBaseDir/app/bootstrap.php"; -(new \Magento\Framework\Autoload\IncludePath())->addIncludePath( + +\Magento\Framework\Code\Generator\FileResolver::addIncludePath( "$magentoBaseDir/dev/tools/performance-toolkit/framework" ); diff --git a/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObject.php b/lib/internal/Magento/Framework/Api/AbstractExtensibleObject.php similarity index 87% rename from lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObject.php rename to lib/internal/Magento/Framework/Api/AbstractExtensibleObject.php index 558985f867ad7d136f429e6d9dfc57efc5055569..6281d9a64250fa55a8862266b0940c577cdb2417 100644 --- a/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObject.php +++ b/lib/internal/Magento/Framework/Api/AbstractExtensibleObject.php @@ -21,9 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\ExtensibleDataInterface; /** * Base Class for extensible data Objects @@ -40,7 +40,7 @@ abstract class AbstractExtensibleObject extends AbstractSimpleObject implements * Get an attribute value. * * @param string $attributeCode - * @return \Magento\Framework\Service\Data\AttributeValue|null null if the attribute has not been set + * @return \Magento\Framework\Api\AttributeValue|null null if the attribute has not been set */ public function getCustomAttribute($attributeCode) { @@ -53,7 +53,7 @@ abstract class AbstractExtensibleObject extends AbstractSimpleObject implements /** * Retrieve custom attributes values. * - * @return \Magento\Framework\Service\Data\AttributeValue[]|null + * @return \Magento\Framework\Api\AttributeValue[]|null */ public function getCustomAttributes() { diff --git a/lib/internal/Magento/Framework/Service/V1/Data/AbstractSearchResultsBuilder.php b/lib/internal/Magento/Framework/Api/AbstractSearchResultsBuilder.php similarity index 84% rename from lib/internal/Magento/Framework/Service/V1/Data/AbstractSearchResultsBuilder.php rename to lib/internal/Magento/Framework/Api/AbstractSearchResultsBuilder.php index 678bdb34776d7290557d7ae9d1c293f9fa2300b6..bb6c00ef7b8b1c0b6dbb37a26b999ae1186e42f9 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/AbstractSearchResultsBuilder.php +++ b/lib/internal/Magento/Framework/Api/AbstractSearchResultsBuilder.php @@ -22,19 +22,19 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Data\ObjectFactory; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ObjectFactory; /** * Builder for the SearchResults Service Data Object * * @method SearchResults create() */ -abstract class AbstractSearchResultsBuilder extends AbstractExtensibleObjectBuilder +abstract class AbstractSearchResultsBuilder extends ExtensibleObjectBuilder { /** * Search criteria builder @@ -46,7 +46,7 @@ abstract class AbstractSearchResultsBuilder extends AbstractExtensibleObjectBuil /** * Item data object builder * - * @var AbstractExtensibleObjectBuilder $itemObjectBuilder + * @var ExtensibleObjectBuilder $itemObjectBuilder */ protected $itemObjectBuilder; @@ -57,14 +57,14 @@ abstract class AbstractSearchResultsBuilder extends AbstractExtensibleObjectBuil * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param SearchCriteriaBuilder $searchCriteriaBuilder - * @param AbstractExtensibleObjectBuilder $itemObjectBuilder + * @param ExtensibleObjectBuilder $itemObjectBuilder */ public function __construct( ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, SearchCriteriaBuilder $searchCriteriaBuilder, - AbstractExtensibleObjectBuilder $itemObjectBuilder + ExtensibleObjectBuilder $itemObjectBuilder ) { parent::__construct($objectFactory, $valueBuilder, $metadataService); $this->searchCriteriaBuilder = $searchCriteriaBuilder; @@ -96,7 +96,7 @@ abstract class AbstractSearchResultsBuilder extends AbstractExtensibleObjectBuil /** * Set items * - * @param \Magento\Framework\Service\Data\AbstractExtensibleObject[] $items + * @param \Magento\Framework\Api\AbstractExtensibleObject[] $items * @return $this */ public function setItems($items) diff --git a/lib/internal/Magento/Framework/Service/AbstractServiceCollection.php b/lib/internal/Magento/Framework/Api/AbstractServiceCollection.php similarity index 92% rename from lib/internal/Magento/Framework/Service/AbstractServiceCollection.php rename to lib/internal/Magento/Framework/Api/AbstractServiceCollection.php index 6997e75a0d1c5fbd28a9c9e36a660210b6ef6493..ccd0049e5881a38b658964e28a4edbdd26a0715f 100644 --- a/lib/internal/Magento/Framework/Service/AbstractServiceCollection.php +++ b/lib/internal/Magento/Framework/Api/AbstractServiceCollection.php @@ -22,15 +22,15 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service; +namespace Magento\Framework\Api; use Magento\Framework\Data\Collection\EntityFactoryInterface; use Magento\Framework\Exception; -use Magento\Framework\Service\V1\Data\Filter; -use Magento\Framework\Service\V1\Data\FilterBuilder; -use Magento\Framework\Service\V1\Data\SearchCriteria; -use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Framework\Service\V1\Data\SortOrderBuilder; +use Magento\Framework\Api\Filter; +use Magento\Framework\Api\FilterBuilder; +use Magento\Framework\Api\SearchCriteria; +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Framework\Api\SortOrderBuilder; /** * Base for service collections @@ -64,7 +64,7 @@ abstract class AbstractServiceCollection extends \Magento\Framework\Data\Collect protected $searchCriteriaBuilder; /** - * @var \Magento\Framework\Service\V1\Data\SortOrderBuilder + * @var \Magento\Framework\Api\SortOrderBuilder */ protected $sortOrderBuilder; @@ -72,7 +72,7 @@ abstract class AbstractServiceCollection extends \Magento\Framework\Data\Collect * @param EntityFactoryInterface $entityFactory * @param FilterBuilder $filterBuilder * @param SearchCriteriaBuilder $searchCriteriaBuilder - * @param \Magento\Framework\Service\V1\Data\SortOrderBuilder $sortOrderBuilder + * @param \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder */ public function __construct( EntityFactoryInterface $entityFactory, @@ -158,7 +158,7 @@ abstract class AbstractServiceCollection extends \Magento\Framework\Data\Collect $this->searchCriteriaBuilder->addFilter($filterGroup); } foreach ($this->_orders as $field => $direction) { - /** @var \Magento\Framework\Service\V1\Data\SortOrder $sortOrder */ + /** @var \Magento\Framework\Api\SortOrder $sortOrder */ /** @var string $direction */ $direction = ($direction == 'ASC') ? SearchCriteria::SORT_ASC : SearchCriteria::SORT_DESC; $sortOrder = $this->sortOrderBuilder->setField($field)->setDirection($direction)->create(); diff --git a/lib/internal/Magento/Framework/Service/Data/AbstractSimpleObject.php b/lib/internal/Magento/Framework/Api/AbstractSimpleObject.php similarity index 98% rename from lib/internal/Magento/Framework/Service/Data/AbstractSimpleObject.php rename to lib/internal/Magento/Framework/Api/AbstractSimpleObject.php index 55a27b7a38ad91577f8727a55da9648f8bcf8737..5910f4db1cef4a0dedaa8996c18faf23cc3e1e41 100644 --- a/lib/internal/Magento/Framework/Service/Data/AbstractSimpleObject.php +++ b/lib/internal/Magento/Framework/Api/AbstractSimpleObject.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; /** * Base Class for simple data Objects diff --git a/lib/internal/Magento/Framework/Service/Data/AbstractSimpleObjectBuilder.php b/lib/internal/Magento/Framework/Api/AbstractSimpleObjectBuilder.php similarity index 83% rename from lib/internal/Magento/Framework/Service/Data/AbstractSimpleObjectBuilder.php rename to lib/internal/Magento/Framework/Api/AbstractSimpleObjectBuilder.php index 44adce498d4a011bc0be8bb4931984a4581d6580..1b025c16317d75768d357a120b3a7c7c4948b806 100644 --- a/lib/internal/Magento/Framework/Service/Data/AbstractSimpleObjectBuilder.php +++ b/lib/internal/Magento/Framework/Api/AbstractSimpleObjectBuilder.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; /** * Base Builder Class for simple data Objects @@ -32,7 +32,7 @@ abstract class AbstractSimpleObjectBuilder /** * @var array */ - protected $_data; + protected $data; /** * @var ObjectFactory @@ -44,7 +44,7 @@ abstract class AbstractSimpleObjectBuilder */ public function __construct(ObjectFactory $objectFactory) { - $this->_data = array(); + $this->data = array(); $this->objectFactory = $objectFactory; } @@ -58,7 +58,7 @@ abstract class AbstractSimpleObjectBuilder public function populate(AbstractSimpleObject $prototype) { $objectType = $this->_getDataObjectType(); - if (get_class($prototype) != $objectType) { + if (!($prototype instanceof $objectType)) { throw new \LogicException('Wrong prototype object given. It can only be of "' . $objectType . '" type.'); } return $this->populateWithArray($prototype->__toArray()); @@ -74,7 +74,7 @@ abstract class AbstractSimpleObjectBuilder */ public function populateWithArray(array $data) { - $this->_data = array(); + $this->data = array(); $this->_setDataValues($data); return $this; } @@ -91,11 +91,11 @@ abstract class AbstractSimpleObjectBuilder foreach ($data as $key => $value) { /* First, verify is there any getter for the key on the Service Data Object */ $possibleMethods = array( - 'get' . \Magento\Framework\Service\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key), - 'is' . \Magento\Framework\Service\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key) + 'get' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key), + 'is' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key) ); if (array_intersect($possibleMethods, $dataObjectMethods)) { - $this->_data[$key] = $value; + $this->data[$key] = $value; } } return $this; @@ -133,7 +133,7 @@ abstract class AbstractSimpleObjectBuilder public function mergeDataObjectWithArray(AbstractSimpleObject $dataObject, array $data) { $objectType = $this->_getDataObjectType(); - if (get_class($dataObject) != $objectType) { + if (!($dataObject instanceof $objectType)) { throw new \LogicException('Wrong prototype object given. It can only be of "' . $objectType . '" type.'); } $this->_setDataValues($dataObject->__toArray()); @@ -150,7 +150,7 @@ abstract class AbstractSimpleObjectBuilder { $dataObjectType = $this->_getDataObjectType(); $dataObject = $this->objectFactory->create($dataObjectType, ['builder' => $this]); - $this->_data = array(); + $this->data = array(); return $dataObject; } @@ -162,7 +162,7 @@ abstract class AbstractSimpleObjectBuilder */ protected function _set($key, $value) { - $this->_data[$key] = $value; + $this->data[$key] = $value; return $this; } @@ -173,7 +173,15 @@ abstract class AbstractSimpleObjectBuilder */ protected function _getDataObjectType() { - return substr(get_class($this), 0, -7); + $currentClass = get_class($this); + $dataBuilderSuffix = 'DataBuilder'; + if (substr($currentClass, -strlen($dataBuilderSuffix)) === $dataBuilderSuffix) { + $dataObjectType = substr($currentClass, 0, -strlen($dataBuilderSuffix)) . 'Interface'; + } else { + $builderSuffix = 'Builder'; + $dataObjectType = substr($currentClass, 0, -strlen($builderSuffix)); + } + return $dataObjectType; } /** @@ -183,6 +191,6 @@ abstract class AbstractSimpleObjectBuilder */ public function getData() { - return $this->_data; + return $this->data; } } diff --git a/lib/internal/Magento/Framework/Service/ArrayObjectSearch.php b/lib/internal/Magento/Framework/Api/ArrayObjectSearch.php similarity index 98% rename from lib/internal/Magento/Framework/Service/ArrayObjectSearch.php rename to lib/internal/Magento/Framework/Api/ArrayObjectSearch.php index 3a0d400fbfcabda3e8b9d927c42559373872daf1..9fd0e97467036bc271ecacb192b05df9b4a381ac 100644 --- a/lib/internal/Magento/Framework/Service/ArrayObjectSearch.php +++ b/lib/internal/Magento/Framework/Api/ArrayObjectSearch.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service; +namespace Magento\Framework\Api; /** * Class to provide possibility to search for any object's property value by the name and value of another property diff --git a/lib/internal/Magento/Framework/Api/AttributeDataBuilder.php b/lib/internal/Magento/Framework/Api/AttributeDataBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..11bb7df963907ee83717a1fccc1141454da9c2ac --- /dev/null +++ b/lib/internal/Magento/Framework/Api/AttributeDataBuilder.php @@ -0,0 +1,72 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Framework\Api; + +/** + * Custom Attribute Data object builder + */ +class AttributeDataBuilder extends CompositeExtensibleDataBuilder +{ + /** + * Set attribute code + * + * @param string $attributeCode + * @return $this + */ + public function setAttributeCode($attributeCode) + { + return $this->set(AttributeInterface::ATTRIBUTE_CODE, $attributeCode); + } + + /** + * Set attribute value + * + * @param string $value + * @return $this + */ + public function setValue($value) + { + return $this->set(AttributeInterface::VALUE, $value); + } + + /** + * Initialize the builder + * + * @param \Magento\Framework\ObjectManager $objectManager + * @param \Magento\Framework\Api\MetadataServiceInterface $metadataService + * @param \Magento\Framework\ObjectManager\Config $objectManagerConfig + */ + public function __construct( + \Magento\Framework\ObjectManager $objectManager, + \Magento\Framework\Api\MetadataServiceInterface $metadataService, + \Magento\Framework\ObjectManager\Config $objectManagerConfig + ) { + parent::__construct( + $objectManager, + $metadataService, + $objectManagerConfig, + 'Magento\Framework\Api\AttributeInterface' + ); + } +} diff --git a/lib/internal/Magento/Framework/Api/Data/AttributeInterface.php b/lib/internal/Magento/Framework/Api/AttributeInterface.php similarity index 87% rename from lib/internal/Magento/Framework/Api/Data/AttributeInterface.php rename to lib/internal/Magento/Framework/Api/AttributeInterface.php index bf74aaaf7308f76dcd73d2947ae4a283348fd895..749a535c1389b626644b724f6dd91ed180a608e9 100644 --- a/lib/internal/Magento/Framework/Api/Data/AttributeInterface.php +++ b/lib/internal/Magento/Framework/Api/AttributeInterface.php @@ -22,13 +22,20 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Api\Data; +namespace Magento\Framework\Api; /** * Interface for custom attribute value. */ interface AttributeInterface { + /**#@+ + * Constant used as key into $_data + */ + const ATTRIBUTE_CODE = 'attribute_code'; + const VALUE = 'value'; + /**#@-*/ + /** * Get attribute code * diff --git a/lib/internal/Magento/Framework/Service/Data/AttributeMetadata.php b/lib/internal/Magento/Framework/Api/AttributeMetadata.php similarity index 96% rename from lib/internal/Magento/Framework/Service/Data/AttributeMetadata.php rename to lib/internal/Magento/Framework/Api/AttributeMetadata.php index e95966363dc86cd76a9bcc801eb34022bb29d0e6..ce8f8eff68c3041473544e57f6d6ba788ec37e0e 100644 --- a/lib/internal/Magento/Framework/Service/Data/AttributeMetadata.php +++ b/lib/internal/Magento/Framework/Api/AttributeMetadata.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; /** * Base data object for custom attribute metadata diff --git a/lib/internal/Magento/Framework/Service/Data/AttributeMetadataBuilder.php b/lib/internal/Magento/Framework/Api/AttributeMetadataBuilder.php similarity index 97% rename from lib/internal/Magento/Framework/Service/Data/AttributeMetadataBuilder.php rename to lib/internal/Magento/Framework/Api/AttributeMetadataBuilder.php index 8ded44e4857bea3fae1c4a6b31eaff738b06470c..bf620020f13d15bc3d8fe0a42c748c94a871018d 100644 --- a/lib/internal/Magento/Framework/Service/Data/AttributeMetadataBuilder.php +++ b/lib/internal/Magento/Framework/Api/AttributeMetadataBuilder.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; /** * Default implementation of the AttributeMetadataBuilderInterface diff --git a/lib/internal/Magento/Framework/Service/Data/AttributeMetadataBuilderInterface.php b/lib/internal/Magento/Framework/Api/AttributeMetadataBuilderInterface.php similarity index 96% rename from lib/internal/Magento/Framework/Service/Data/AttributeMetadataBuilderInterface.php rename to lib/internal/Magento/Framework/Api/AttributeMetadataBuilderInterface.php index a438316cd71f690ffffe3e5bcfa66e2c31bdbfe9..9a19f23a33dcd4eddfb43e4f9c847a99101ffe40 100644 --- a/lib/internal/Magento/Framework/Service/Data/AttributeMetadataBuilderInterface.php +++ b/lib/internal/Magento/Framework/Api/AttributeMetadataBuilderInterface.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; /** * Attribute metadata object builder interface. diff --git a/lib/internal/Magento/Framework/Service/Data/AttributeValue.php b/lib/internal/Magento/Framework/Api/AttributeValue.php similarity index 85% rename from lib/internal/Magento/Framework/Service/Data/AttributeValue.php rename to lib/internal/Magento/Framework/Api/AttributeValue.php index e8c0670e580d0dacd3e55bd143a0e9317e1a2461..d2c957125684aeb06d393108d47b489a5e2c7cfb 100644 --- a/lib/internal/Magento/Framework/Service/Data/AttributeValue.php +++ b/lib/internal/Magento/Framework/Api/AttributeValue.php @@ -22,22 +22,15 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; -use Magento\Framework\Api\Data\AttributeInterface; +use Magento\Framework\Api\AttributeInterface; /** * Custom Attribute Data object */ class AttributeValue extends AbstractSimpleObject implements AttributeInterface { - /**#@+ - * Constant used as key into $_data - */ - const ATTRIBUTE_CODE = 'attribute_code'; - const VALUE = 'value'; - /**#@-*/ - /** * Get attribute code * diff --git a/lib/internal/Magento/Framework/Service/Data/AttributeValueBuilder.php b/lib/internal/Magento/Framework/Api/AttributeValueBuilder.php similarity index 97% rename from lib/internal/Magento/Framework/Service/Data/AttributeValueBuilder.php rename to lib/internal/Magento/Framework/Api/AttributeValueBuilder.php index 6232429e6097ba571808388e91dab4f3b46262df..e4113082c82c2128b71ddc715cafb5b11bc28617 100644 --- a/lib/internal/Magento/Framework/Service/Data/AttributeValueBuilder.php +++ b/lib/internal/Magento/Framework/Api/AttributeValueBuilder.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; /** * Custom Attribute Data object builder diff --git a/lib/internal/Magento/Framework/Service/Code/Generator/Builder.php b/lib/internal/Magento/Framework/Api/Code/Generator/Builder.php similarity index 93% rename from lib/internal/Magento/Framework/Service/Code/Generator/Builder.php rename to lib/internal/Magento/Framework/Api/Code/Generator/Builder.php index 3d19dfd98bf3cdca82a8881a2fd0e56f286f9f3c..76928c8432c72ffc2199b3a4209928939276b402 100644 --- a/lib/internal/Magento/Framework/Service/Code/Generator/Builder.php +++ b/lib/internal/Magento/Framework/Api/Code/Generator/Builder.php @@ -23,12 +23,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\EntityAbstract; /** * Class Builder + * + * @deprecated Use DataBuilder instead */ class Builder extends EntityAbstract { @@ -76,7 +78,7 @@ class Builder extends EntityAbstract $method->getName(), array('__sleep', '__wakeup', '__clone') ) && - $method->class !== 'Magento\Framework\Service\Data\AbstractExtensibleObject' + $method->class !== 'Magento\Framework\Api\AbstractExtensibleObject' ) { if (substr($method->getName(), 0, 3) == 'get') { $methods[] = $this->_getMethodInfo($reflectionClass, $method); @@ -101,7 +103,7 @@ class Builder extends EntityAbstract 'parameters' => [ ['name' => lcfirst(substr($method->getName(), 3))] ], - 'body' => "\$this->_set(" + 'body' => "return \$this->_set(" . '\\' . $class->getName() . "::" . strtoupper(preg_replace('/(.)([A-Z])/', "$1_$2", substr($method->getName(), 3))) . ", \$" . lcfirst(substr($method->getName(), 3)) . ");", @@ -149,7 +151,7 @@ class Builder extends EntityAbstract $this->_getClassMethods() )->setClassDocBlock( $this->_getClassDocBlock() - )->setExtendedClass('\\Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder'); + )->setExtendedClass('\\Magento\Framework\Api\ExtensibleObjectBuilder'); return $this->_getGeneratedCode(); } diff --git a/lib/internal/Magento/Framework/Api/Code/Generator/DataBuilder.php b/lib/internal/Magento/Framework/Api/Code/Generator/DataBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..2bb68f6c98ccb29b3b521a3e405aff52ae51f286 --- /dev/null +++ b/lib/internal/Magento/Framework/Api/Code/Generator/DataBuilder.php @@ -0,0 +1,271 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Framework\Api\Code\Generator; + +use \Magento\Framework\Code\Generator\FileResolver; +use Magento\Framework\Code\Generator\CodeGenerator; +use Magento\Framework\Code\Generator\EntityAbstract; +use Magento\Framework\Code\Generator\Io; +use Magento\Framework\ObjectManager\Config as ObjectManagerConfig; +use Zend\Code\Reflection\ClassReflection; + +/** + * Class Builder + */ +class DataBuilder extends EntityAbstract +{ + /** + * Entity type + */ + const ENTITY_TYPE = 'dataBuilder'; + + /** + * Data Model property name + */ + const DATA_PROPERTY_NAME = 'data'; + + /**#@+ + * Constant which defines if builder is created for building data objects or data models. + */ + const TYPE_DATA_OBJECT = 'data_object'; + const TYPE_DATA_MODEL = 'data_model'; + /**#@-*/ + + /** @var string */ + protected $currentDataType; + + /** @var string[] */ + protected $extensibleInterfaceMethods; + + /** + * Initialize dependencies. + * + * @param string|null $sourceClassName + * @param string|null $resultClassName + * @param Io|null $ioObject + * @param CodeGenerator\CodeGeneratorInterface|null $classGenerator + * @param FileResolver|null $fileResolver + */ + public function __construct( + $sourceClassName = null, + $resultClassName = null, + Io $ioObject = null, + CodeGenerator\CodeGeneratorInterface $classGenerator = null, + FileResolver $fileResolver = null + ) { + parent::__construct( + $sourceClassName, + $resultClassName, + $ioObject, + $classGenerator, + $fileResolver + ); + } + + /** + * Retrieve class properties + * + * @return array + */ + protected function _getClassProperties() + { + return []; + } + + /** + * Get default constructor definition for generated class + * + * @return array + */ + protected function _getDefaultConstructorDefinition() + { + $constructorDefinition = [ + 'name' => '__construct', + 'parameters' => [ + ['name' => 'objectManager', 'type' => '\Magento\Framework\ObjectManager'], + ['name' => 'metadataService', 'type' => '\Magento\Framework\Api\MetadataServiceInterface'], + ['name' => 'objectManagerConfig', 'type' => '\Magento\Framework\ObjectManager\Config'], + ], + 'docblock' => [ + 'shortDescription' => 'Initialize the builder', + 'tags' => [ + [ + 'name' => 'param', + 'description' => '\Magento\Framework\ObjectManager $objectManager' + ], + [ + 'name' => 'param', + 'description' => '\Magento\Framework\Api\MetadataServiceInterface $metadataService' + ], + [ + 'name' => 'param', + 'description' => '\Magento\Framework\ObjectManager\Config $objectManagerConfig' + ] + ] + ], + 'body' => "parent::__construct(\$objectManager, \$metadataService, \$objectManagerConfig, " + . "'{$this->_getSourceClassName()}');" + ]; + return $constructorDefinition; + } + + /** + * Return a list of methods for class generator + * + * @return array + */ + protected function _getClassMethods() + { + $methods = []; + $className = $this->_getSourceClassName(); + $reflectionClass = new \ReflectionClass($className); + $publicMethods = $reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC); + foreach ($publicMethods as $method) { + if ($this->canUseMethodForGeneration($method)) { + $methods[] = $this->_getMethodInfo($method); + } + } + $defaultConstructorDefinition = $this->_getDefaultConstructorDefinition(); + if (!empty($defaultConstructorDefinition)) { + $methods[] = $defaultConstructorDefinition; + } + return $methods; + } + + /** + * Check if the specified method should be used during generation builder generation. + * + * @param \ReflectionMethod $method + * @return bool + */ + protected function canUseMethodForGeneration($method) + { + $isGetter = (substr($method->getName(), 0, 3) == 'get'); + $isSuitableMethodType = !($method->isConstructor() || $method->isFinal() + || $method->isStatic() || $method->isDestructor()); + $isMagicMethod = in_array($method->getName(), array('__sleep', '__wakeup', '__clone')); + $isPartOfExtensibleInterface = in_array($method->getName(), $this->getExtensibleInterfaceMethods()); + return $isGetter && $isSuitableMethodType && !$isMagicMethod && !$isPartOfExtensibleInterface; + } + + /** + * Retrieve method info + * + * @param \ReflectionMethod $method + * @return array + */ + protected function _getMethodInfo(\ReflectionMethod $method) + { + $propertyName = substr($method->getName(), 3); + $returnType = (new ClassReflection($this->_getSourceClassName())) + ->getMethod($method->getName()) + ->getDocBlock() + ->getTag('return') + ->getType(); + $fieldName = strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $propertyName)); + $methodInfo = [ + 'name' => 'set' . $propertyName, + 'parameters' => [ + ['name' => lcfirst($propertyName)] + ], + 'body' => "\$this->set('{$fieldName}', \$" . lcfirst($propertyName) . ");" + . PHP_EOL . "return \$this;", + 'docblock' => [ + 'tags' => [ + ['name' => 'param', 'description' => $returnType . " \$" . lcfirst($propertyName)], + ['name' => 'return', 'description' => '$this'], + ] + ] + ]; + return $methodInfo; + } + + /** + * Validate data + * + * @return bool + */ + protected function _validateData() + { + $result = parent::_validateData(); + + if ($result) { + $sourceClassName = $this->_getSourceClassName(); + $resultClassName = $this->_getResultClassName(); + + if ($resultClassName !== str_replace('Interface', ucfirst(self::ENTITY_TYPE), $sourceClassName)) { + $this->_addError( + 'Invalid Builder class name [' . $resultClassName . ']. Use ' + . $sourceClassName + . ucfirst(self::ENTITY_TYPE) + ); + $result = false; + } + } + return $result; + } + + /** + * Generate code + * + * @return string + */ + protected function _generateCode() + { + $this->_classGenerator + ->setName($this->_getResultClassName()) + ->addProperties($this->_getClassProperties()) + ->addMethods($this->_getClassMethods()) + ->setClassDocBlock($this->_getClassDocBlock()) + ->setExtendedClass('\Magento\Framework\Api\CompositeExtensibleDataBuilder'); + return $this->_getGeneratedCode(); + } + + /** + * {@inheritdoc} + */ + protected function _getSourceClassName() + { + return parent::_getSourceClassName() . 'Interface'; + } + + /** + * Get a list of methods declared on extensible data interface. + * + * @return string[] + */ + protected function getExtensibleInterfaceMethods() + { + if ($this->extensibleInterfaceMethods === null) { + $interfaceReflection = new ClassReflection('Magento\Framework\Api\ExtensibleDataInterface'); + $methodsReflection = $interfaceReflection->getMethods(); + $this->extensibleInterfaceMethods = []; + foreach ($methodsReflection as $methodReflection) { + $this->extensibleInterfaceMethods[] = $methodReflection->getName(); + } + } + return $this->extensibleInterfaceMethods; + } +} diff --git a/lib/internal/Magento/Framework/Service/Code/Generator/Mapper.php b/lib/internal/Magento/Framework/Api/Code/Generator/Mapper.php similarity index 99% rename from lib/internal/Magento/Framework/Service/Code/Generator/Mapper.php rename to lib/internal/Magento/Framework/Api/Code/Generator/Mapper.php index c1602fc1e8018c19dd00d7dee4d4494108a9393a..57cb64359d2c5f1c3472184d03ef4bb93c6e204d 100644 --- a/lib/internal/Magento/Framework/Service/Code/Generator/Mapper.php +++ b/lib/internal/Magento/Framework/Api/Code/Generator/Mapper.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; /** * Class Repository diff --git a/lib/internal/Magento/Framework/Service/Code/Generator/SearchResults.php b/lib/internal/Magento/Framework/Api/Code/Generator/SearchResults.php similarity index 95% rename from lib/internal/Magento/Framework/Service/Code/Generator/SearchResults.php rename to lib/internal/Magento/Framework/Api/Code/Generator/SearchResults.php index 9b789fcab78e9d2148c4e1035e6a33490c34b631..432dd258448355908df9a754c7028f079c159c47 100644 --- a/lib/internal/Magento/Framework/Service/Code/Generator/SearchResults.php +++ b/lib/internal/Magento/Framework/Api/Code/Generator/SearchResults.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\EntityAbstract; @@ -41,7 +41,7 @@ class SearchResults extends EntityAbstract /** * Search result default class */ - const SEARCH_RESULT = '\\Magento\Framework\Service\V1\Data\SearchResults'; + const SEARCH_RESULT = '\\Magento\Framework\Api\SearchResults'; /** * Retrieve class properties diff --git a/lib/internal/Magento/Framework/Service/Code/Generator/SearchResultsBuilder.php b/lib/internal/Magento/Framework/Api/Code/Generator/SearchResultsBuilder.php similarity index 88% rename from lib/internal/Magento/Framework/Service/Code/Generator/SearchResultsBuilder.php rename to lib/internal/Magento/Framework/Api/Code/Generator/SearchResultsBuilder.php index 0654c0d1c7b1104f943d2bb61c2aa315f2d624ee..a668fbbeb50addaee5ef7d51568f1089f468d5b8 100644 --- a/lib/internal/Magento/Framework/Service/Code/Generator/SearchResultsBuilder.php +++ b/lib/internal/Magento/Framework/Api/Code/Generator/SearchResultsBuilder.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Code\Generator; +namespace Magento\Framework\Api\Code\Generator; use Magento\Framework\Code\Generator\EntityAbstract; @@ -40,7 +40,7 @@ class SearchResultsBuilder extends EntityAbstract /** * Search result builder abstract class */ - const SEARCH_RESULT_BUILDER = '\\Magento\Framework\Service\V1\Data\AbstractSearchResultsBuilder'; + const SEARCH_RESULT_BUILDER = '\\Magento\Framework\Api\AbstractSearchResultsBuilder'; /** * Retrieve class properties @@ -64,19 +64,19 @@ class SearchResultsBuilder extends EntityAbstract 'parameters' => [ [ 'name' => 'objectFactory', - 'type' => '\\Magento\Framework\Service\Data\ObjectFactory' + 'type' => '\\Magento\Framework\Api\ObjectFactory' ], [ 'name' => 'valueBuilder', - 'type' => '\\Magento\Framework\Service\Data\AttributeValueBuilder' + 'type' => '\\Magento\Framework\Api\AttributeValueBuilder' ], [ 'name' => 'metadataService', - 'type' => '\\Magento\Framework\Service\Config\MetadataConfig' + 'type' => '\\Magento\Framework\Api\Config\MetadataConfig' ], [ 'name' => 'searchCriteriaBuilder', - 'type' => '\\Magento\Framework\Service\V1\Data\SearchCriteriaBuilder' + 'type' => '\\Magento\Framework\Api\SearchCriteriaBuilder' ], [ 'name' => 'itemObjectBuilder', diff --git a/lib/internal/Magento/Framework/Api/CompositeExtensibleDataBuilder.php b/lib/internal/Magento/Framework/Api/CompositeExtensibleDataBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..15726b43411ce9cb2906de412d47971601d03c0f --- /dev/null +++ b/lib/internal/Magento/Framework/Api/CompositeExtensibleDataBuilder.php @@ -0,0 +1,168 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Framework\Api; + +use Magento\Framework\Model\AbstractExtensibleModel; +use Magento\Framework\ObjectManager; +use Magento\Framework\ObjectManager\Config as ObjectManagerConfig; + +/** + * Composite extensible data builder. + */ +class CompositeExtensibleDataBuilder implements ExtensibleDataBuilderInterface +{ + /**#@+ + * Constant which defines if builder is created for building data objects or data models. + */ + const TYPE_DATA_OBJECT = 'data_object'; + const TYPE_DATA_MODEL = 'data_model'; + /**#@-*/ + + /** @var string */ + protected $modelClassInterface; + + /** @var ExtensibleDataBuilderInterface */ + protected $currentBuilder; + + /** @var ObjectManagerConfig */ + protected $objectManagerConfig; + + /** + * Initialize dependencies. + * + * @param ObjectManager $objectManager + * @param MetadataServiceInterface $metadataService + * @param ObjectManagerConfig $objectManagerConfig + * @param string $modelClassInterface + */ + public function __construct( + ObjectManager $objectManager, + MetadataServiceInterface $metadataService, + ObjectManagerConfig $objectManagerConfig, + $modelClassInterface + ) { + $this->modelClassInterface = $modelClassInterface; + $this->objectManagerConfig = $objectManagerConfig; + $arguments = [ + 'metadataService' => $metadataService, + 'modelClassInterface' => $modelClassInterface + ]; + $builderClass = ($this->getDataType() == self::TYPE_DATA_MODEL) + ? 'Magento\Framework\Api\ExtensibleDataBuilder' + : 'Magento\Framework\Api\ExtensibleObjectBuilder'; + $this->currentBuilder = $objectManager->create($builderClass, $arguments); + } + + /** + * {@inheritdoc} + */ + public function setCustomAttribute($attributeCode, $attributeValue) + { + $this->currentBuilder->setCustomAttribute($attributeCode, $attributeValue); + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCustomAttributes(array $attributes) + { + $this->currentBuilder->setCustomAttributes($attributes); + return $this; + } + + /** + * {@inheritdoc} + */ + public function create() + { + return $this->currentBuilder->create(); + } + + /** + * Proxy all calls to current builder. + * + * @param string $name + * @param array $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + call_user_func_array([$this->currentBuilder, $name], $arguments); + return $this; + } + + /** + * Identify type of objects which should be built with generated builder. Value can be one of self::TYPE_DATA_*. + * + * @return string + * @throws \LogicException + */ + protected function getDataType() + { + $sourceClassPreference = $this->objectManagerConfig->getPreference($this->modelClassInterface); + if (empty($sourceClassPreference)) { + throw new \LogicException( + "Preference for {$this->modelClassInterface} is not defined." + ); + } + if (is_subclass_of($sourceClassPreference, '\Magento\Framework\Api\AbstractSimpleObject')) { + return self::TYPE_DATA_OBJECT; + } else if (is_subclass_of($sourceClassPreference, '\Magento\Framework\Model\AbstractExtensibleModel')) { + return self::TYPE_DATA_MODEL; + } else { + throw new \LogicException( + 'Preference of ' . $this->modelClassInterface + . ' must extend from AbstractSimpleObject or AbstractExtensibleModel' + ); + } + } + + /** + * Populates the fields with data from the array. + * + * Keys for the map are snake_case attribute/field names. + * + * @param array $data + * @return $this + */ + public function populateWithArray(array $data) + { + $this->currentBuilder->populateWithArray($data); + return $this; + } + + /** + * Populates the fields with data from the prototype. + * + * @param AbstractSimpleObject $prototype + * @return $this + */ + public function populate(AbstractSimpleObject $prototype) + { + $this->currentBuilder->populate($prototype); + return $this; + } +} diff --git a/lib/internal/Magento/Framework/Service/Config/Converter.php b/lib/internal/Magento/Framework/Api/Config/Converter.php similarity index 97% rename from lib/internal/Magento/Framework/Service/Config/Converter.php rename to lib/internal/Magento/Framework/Api/Config/Converter.php index 20c84b6e6a47cf3afc9b805dc13286ee80b04d25..4e4d0d94dad0e334bea488e864e06056b425b035 100644 --- a/lib/internal/Magento/Framework/Service/Config/Converter.php +++ b/lib/internal/Magento/Framework/Api/Config/Converter.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; class Converter implements \Magento\Framework\Config\ConverterInterface { diff --git a/lib/internal/Magento/Framework/Service/Config/MetadataConfig.php b/lib/internal/Magento/Framework/Api/Config/MetadataConfig.php similarity index 91% rename from lib/internal/Magento/Framework/Service/Config/MetadataConfig.php rename to lib/internal/Magento/Framework/Api/Config/MetadataConfig.php index 5b767cb17839e5ac344c82a6d25081fc7717137f..1b8ec0fef999c2184e8221475a53888fe5a740e3 100644 --- a/lib/internal/Magento/Framework/Service/Config/MetadataConfig.php +++ b/lib/internal/Magento/Framework/Api/Config/MetadataConfig.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\Config\Reader as ServiceConfigReader; -use Magento\Framework\Service\Data\AttributeMetadataBuilderInterface; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\Config\Reader as ServiceConfigReader; +use Magento\Framework\Api\AttributeMetadataBuilderInterface; /** * Class which allows to get a metadata of the attributes declared in a config. @@ -81,7 +81,7 @@ class MetadataConfig implements MetadataServiceInterface * Get custom attribute metadata for the given class/interface. * * @param string $dataObjectClassName - * @return \Magento\Framework\Service\Data\MetadataObjectInterface[] + * @return \Magento\Framework\Api\MetadataObjectInterface[] */ protected function getAttributesMetadata($dataObjectClassName) { diff --git a/lib/internal/Magento/Framework/Service/Config/Reader.php b/lib/internal/Magento/Framework/Api/Config/Reader.php similarity index 86% rename from lib/internal/Magento/Framework/Service/Config/Reader.php rename to lib/internal/Magento/Framework/Api/Config/Reader.php index e505d9ab8a358c7f8d380fe638d894d399a941b2..e92470f31f0e9926455716482790b1ac84772f78 100644 --- a/lib/internal/Magento/Framework/Service/Config/Reader.php +++ b/lib/internal/Magento/Framework/Api/Config/Reader.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; class Reader extends \Magento\Framework\Config\Reader\Filesystem { @@ -37,8 +37,8 @@ class Reader extends \Magento\Framework\Config\Reader\Filesystem /** * @param \Magento\Framework\Config\FileResolverInterface $fileResolver - * @param \Magento\Framework\Service\Config\Converter $converter - * @param \Magento\Framework\Service\Config\SchemaLocator $schemaLocator + * @param \Magento\Framework\Api\Config\Converter $converter + * @param \Magento\Framework\Api\Config\SchemaLocator $schemaLocator * @param \Magento\Framework\Config\ValidationStateInterface $validationState * @param string $fileName * @param array $idAttributes @@ -47,8 +47,8 @@ class Reader extends \Magento\Framework\Config\Reader\Filesystem */ public function __construct( \Magento\Framework\Config\FileResolverInterface $fileResolver, - \Magento\Framework\Service\Config\Converter $converter, - \Magento\Framework\Service\Config\SchemaLocator $schemaLocator, + \Magento\Framework\Api\Config\Converter $converter, + \Magento\Framework\Api\Config\SchemaLocator $schemaLocator, \Magento\Framework\Config\ValidationStateInterface $validationState, $fileName = 'data_object.xml', $idAttributes = array(), diff --git a/lib/internal/Magento/Framework/Service/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Api/Config/SchemaLocator.php similarity index 96% rename from lib/internal/Magento/Framework/Service/Config/SchemaLocator.php rename to lib/internal/Magento/Framework/Api/Config/SchemaLocator.php index e72a2dfd776c8327b9ed053548777fdc3a6c150e..b0a3769ca66dd349ae71457a94dc3e3646c8aaca 100644 --- a/lib/internal/Magento/Framework/Service/Config/SchemaLocator.php +++ b/lib/internal/Magento/Framework/Api/Config/SchemaLocator.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Config; +namespace Magento\Framework\Api\Config; class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface { diff --git a/lib/internal/Magento/Framework/Api/ExtensibleDataBuilder.php b/lib/internal/Magento/Framework/Api/ExtensibleDataBuilder.php new file mode 100644 index 0000000000000000000000000000000000000000..229e95ee06c3e6c6971136f324fd52c323677512 --- /dev/null +++ b/lib/internal/Magento/Framework/Api/ExtensibleDataBuilder.php @@ -0,0 +1,276 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Framework\Api; + +use Magento\Framework\Api\ExtensibleDataBuilderInterface; +use Magento\Framework\Model\AbstractExtensibleModel; +use Magento\Framework\ObjectManager; + +/** + * Implementation for \Magento\Framework\Api\ExtensibleDataBuilderInterface. + */ +class ExtensibleDataBuilder implements ExtensibleDataBuilderInterface +{ + /** + * @var string + */ + protected $modelClassInterface; + + /** + * @var array + */ + protected $data; + + /** + * @var ObjectManager + */ + protected $objectManager; + + /** + * @var MetadataServiceInterface + */ + protected $metadataService; + + /** + * @var string[] + */ + protected $customAttributesCodes = null; + + /** + * @var \Magento\Framework\Api\AttributeDataBuilder + */ + protected $attributeValueBuilder; + + /** + * @var \Magento\Framework\Reflection\DataObjectProcessor + */ + protected $objectProcessor; + + /** + * @var array + */ + protected $interfaceMethodsDescription; + + /** + * @var \Magento\Framework\Reflection\TypeProcessor + */ + protected $typeProcessor; + + /** + * @var \Magento\Framework\Serialization\DataBuilderFactory + */ + protected $dataBuilderFactory; + + /** + * Initialize the builder + * + * @param ObjectManager $objectManager + * @param MetadataServiceInterface $metadataService + * @param \Magento\Framework\Api\AttributeDataBuilder $attributeValueBuilder + * @param \Magento\Framework\Reflection\DataObjectProcessor $objectProcessor + * @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor + * @param \Magento\Framework\Serialization\DataBuilderFactory $dataBuilderFactory + * @param string $modelClassInterface + */ + public function __construct( + ObjectManager $objectManager, + MetadataServiceInterface $metadataService, + \Magento\Framework\Api\AttributeDataBuilder $attributeValueBuilder, + \Magento\Framework\Reflection\DataObjectProcessor $objectProcessor, + \Magento\Framework\Reflection\TypeProcessor $typeProcessor, + \Magento\Framework\Serialization\DataBuilderFactory $dataBuilderFactory, + $modelClassInterface + ) { + $this->objectManager = $objectManager; + $this->metadataService = $metadataService; + $this->modelClassInterface = $modelClassInterface; + $this->objectProcessor = $objectProcessor; + $this->attributeValueBuilder = $attributeValueBuilder; + $this->typeProcessor = $typeProcessor; + $this->dataBuilderFactory = $dataBuilderFactory; + } + + /** + * {@inheritdoc} + */ + public function setCustomAttribute($attributeCode, $attributeValue) + { + $attribute = $this->attributeValueBuilder + ->setAttributeCode($attributeCode) + ->setValue($attributeValue) + ->create(); + // Store as an associative array for easier lookup and processing + $this->data[AbstractExtensibleModel::CUSTOM_ATTRIBUTES_KEY][$attributeCode] = $attribute; + return $this; + } + + /** + * {@inheritdoc} + */ + public function setCustomAttributes(array $attributes) + { + /** @var \Magento\Framework\Api\AttributeInterface $attribute */ + foreach ($attributes as $attribute) { + $this->data[AbstractExtensibleModel::CUSTOM_ATTRIBUTES_KEY][$attribute->getAttributeCode()] = $attribute; + } + return $this; + } + + /** + * {@inheritdoc} + */ + public function create() + { + return $this->objectManager->create( + $this->modelClassInterface, + ['data' => $this->data] + ); + } + + /** + * Populates the fields with data from the array. + * + * Keys for the map are snake_case attribute/field names. + * + * @param array $data + * @return $this + */ + public function populateWithArray(array $data) + { + $this->data = array(); + $this->_setDataValues($data); + return $this; + } + + /** + * Template method used to configure the attribute codes for the custom attributes + * + * @return string[] + */ + protected function getCustomAttributesCodes() + { + if (!is_null($this->customAttributesCodes)) { + return $this->customAttributesCodes; + } + $attributeCodes = []; + /** @var \Magento\Framework\Api\MetadataObjectInterface[] $customAttributesMetadata */ + $customAttributesMetadata = $this->metadataService + ->getCustomAttributesMetadata($this->modelClassInterface); + if (is_array($customAttributesMetadata)) { + foreach ($customAttributesMetadata as $attribute) { + $attributeCodes[] = $attribute->getAttributeCode(); + } + } + $this->customAttributesCodes = $attributeCodes; + return $attributeCodes; + } + + /** + * Set data item value. + * + * @param string $key + * @param mixed $value + * @return $this + * @deprecated This method should not be used in the client code and will be removed after Service Layer refactoring + */ + public function set($key, $value) + { + $this->data[$key] = $value; + return $this; + } + + /** + * Initializes Data Object with the data from array + * + * @param array $data + * @return $this + */ + protected function _setDataValues(array $data) + { + $dataObjectMethods = get_class_methods($this->modelClassInterface); + foreach ($data as $key => $value) { + /* First, verify is there any getter for the key on the Service Data Object */ + $camelCaseKey = \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key); + $possibleMethods = array( + 'get' . $camelCaseKey, + 'is' . $camelCaseKey + ); + if ($key == AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY + && is_array($data[$key]) + && !empty($data[$key]) + ) { + foreach ($data[$key] as $customAttribute) { + $this->setCustomAttribute( + $customAttribute[AttributeValue::ATTRIBUTE_CODE], + $customAttribute[AttributeValue::VALUE] + ); + } + } elseif ($methodName = array_intersect($possibleMethods, $dataObjectMethods)) { + if (!is_array($value)) { + $this->data[$key] = $value; + } else { + $this->setComplexValue($methodName[0], $key, $value); + } + } elseif (in_array($key, $this->getCustomAttributesCodes())) { + $this->setCustomAttribute($key, $value); + } + } + + return $this; + } + + /** + * @param string $methodName + * @param string $key + * @param array $value + * @return $this + */ + protected function setComplexValue($methodName, $key, array $value) + { + $returnType = $this->objectProcessor->getMethodReturnType($this->modelClassInterface, $methodName); + if ($this->typeProcessor->isTypeSimple($returnType)) { + $this->data[$key] = $value; + return $this; + } + + if ($this->typeProcessor->isArrayType($returnType)) { + $type = $this->typeProcessor->getArrayItemType($returnType); + $dataBuilder = $this->dataBuilderFactory->getDataBuilder($type); + $objects = []; + foreach ($value as $arrayElementData) { + $objects[] = $dataBuilder->populateWithArray($arrayElementData) + ->create(); + } + $this->data[$key] = $objects; + return $this; + } + + $dataBuilder = $this->dataBuilderFactory->getDataBuilder($returnType); + $object = $dataBuilder->populateWithArray($value) + ->create(); + $this->data[$key] = $object; + return $this; + } +} diff --git a/lib/internal/Magento/Framework/Api/Data/ExtensibleDataBuilderInterface.php b/lib/internal/Magento/Framework/Api/ExtensibleDataBuilderInterface.php similarity index 68% rename from lib/internal/Magento/Framework/Api/Data/ExtensibleDataBuilderInterface.php rename to lib/internal/Magento/Framework/Api/ExtensibleDataBuilderInterface.php index 59dc098f81e745554d4ea50a67d406e11822cf86..d7de617e06e5f3fa9054e6e526dea214b101ef2b 100644 --- a/lib/internal/Magento/Framework/Api/Data/ExtensibleDataBuilderInterface.php +++ b/lib/internal/Magento/Framework/Api/ExtensibleDataBuilderInterface.php @@ -22,25 +22,26 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Api\Data; +namespace Magento\Framework\Api; /** - * Base builder interface for \Magento\Framework\Api\Data\ExtensibleDataInterface types. + * Base builder interface for \Magento\Framework\Api\ExtensibleDataInterface types. */ interface ExtensibleDataBuilderInterface { /** * Set custom attribute value. * - * @param \Magento\Framework\Api\Data\AttributeInterface $attribute + * @param string $attributeCode + * @param mixed $attributeValue * @return $this */ - public function setCustomAttribute(\Magento\Framework\Api\Data\AttributeInterface $attribute); + public function setCustomAttribute($attributeCode, $attributeValue); /** * Set array of custom attributes * - * @param \Magento\Framework\Service\Data\AttributeValue[] $attributes + * @param \Magento\Framework\Api\AttributeInterface[] $attributes * @return $this * @throws \LogicException If array elements are not of AttributeValue type */ @@ -49,7 +50,17 @@ interface ExtensibleDataBuilderInterface /** * Return created DataInterface object * - * @return ExtensibleDataInterface + * @return \Magento\Framework\Api\ExtensibleDataInterface */ public function create(); + + /** + * Populates the fields with data from the array. + * + * Keys for the map are snake_case attribute/field names. + * + * @param array $data + * @return $this + */ + public function populateWithArray(array $data); } diff --git a/lib/internal/Magento/Framework/Api/Data/ExtensibleDataInterface.php b/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php similarity index 86% rename from lib/internal/Magento/Framework/Api/Data/ExtensibleDataInterface.php rename to lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php index 5c5964b8ff2304a263b5103ebfaa4c587f9d9483..88cd4f2f40cc1a229b87c865ece97934e652977e 100644 --- a/lib/internal/Magento/Framework/Api/Data/ExtensibleDataInterface.php +++ b/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Api\Data; +namespace Magento\Framework\Api; /** * Interface for entities which can be extended with custom attributes. @@ -33,14 +33,14 @@ interface ExtensibleDataInterface * Get an attribute value. * * @param string $attributeCode - * @return \Magento\Framework\Api\Data\AttributeInterface|null null if the attribute has not been set + * @return \Magento\Framework\Api\AttributeInterface|null null if the attribute has not been set */ public function getCustomAttribute($attributeCode); /** * Retrieve custom attributes values. * - * @return \Magento\Framework\Api\Data\AttributeInterface[] + * @return \Magento\Framework\Api\AttributeInterface[]|null */ public function getCustomAttributes(); } diff --git a/lib/internal/Magento/Framework/Service/ExtensibleDataObjectConverter.php b/lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php similarity index 94% rename from lib/internal/Magento/Framework/Service/ExtensibleDataObjectConverter.php rename to lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php index f1f0afb02e464bd3d942efb3492a13881d9b5e68..8b54af16d631fbbd282d0d41bfd6b62ccec3807d 100644 --- a/lib/internal/Magento/Framework/Service/ExtensibleDataObjectConverter.php +++ b/lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service; +namespace Magento\Framework\Api; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; use Magento\Framework\Convert\ConvertArray; -use Magento\Framework\Service\Data\AttributeValue; +use Magento\Framework\Api\AttributeValue; /** * Class to convert Extensible Data Object array to flat array diff --git a/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObjectBuilder.php b/lib/internal/Magento/Framework/Api/ExtensibleObjectBuilder.php similarity index 73% rename from lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObjectBuilder.php rename to lib/internal/Magento/Framework/Api/ExtensibleObjectBuilder.php index 7aa57d0252b968ebaf57f2ce74c6bdb8be041039..b596533bea73e8397c2707659fcb3a9d9e2b2eab 100644 --- a/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObjectBuilder.php +++ b/lib/internal/Magento/Framework/Api/ExtensibleObjectBuilder.php @@ -22,18 +22,18 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; /** * Base Builder Class for extensible data Objects * @SuppressWarnings(PHPMD.NumberOfChildren) */ -abstract class AbstractExtensibleObjectBuilder extends AbstractSimpleObjectBuilder +class ExtensibleObjectBuilder extends AbstractSimpleObjectBuilder implements ExtensibleDataBuilderInterface { /** * @var AttributeValueBuilder */ - protected $valueBuilder; + protected $attributeValueBuilder; /** * @var MetadataServiceInterface @@ -46,26 +46,30 @@ abstract class AbstractExtensibleObjectBuilder extends AbstractSimpleObjectBuild protected $customAttributesCodes = null; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @var string + */ + protected $modelClassInterface; + + /** + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService + * @param string|null $modelClassInterface */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, - MetadataServiceInterface $metadataService + MetadataServiceInterface $metadataService, + $modelClassInterface = null ) { - $this->valueBuilder = $valueBuilder; + $this->attributeValueBuilder = $valueBuilder; $this->metadataService = $metadataService; + $this->modelClassInterface = $modelClassInterface; parent::__construct($objectFactory); } /** - * Set array of custom attributes - * - * @param \Magento\Framework\Service\Data\AttributeValue[] $attributes - * @return $this - * @throws \LogicException If array elements are not of AttributeValue type + * {@inheritdoc} */ public function setCustomAttributes(array $attributes) { @@ -76,29 +80,25 @@ abstract class AbstractExtensibleObjectBuilder extends AbstractSimpleObjectBuild } $attributeCode = $attribute->getAttributeCode(); if (in_array($attributeCode, $customAttributesCodes)) { - $this->_data[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY][$attributeCode] = $attribute; + $this->data[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY][$attributeCode] = $attribute; } } return $this; } /** - * Set custom attribute value - * - * @param string $attributeCode - * @param string|int|float|bool $attributeValue - * @return $this + * {@inheritdoc} */ public function setCustomAttribute($attributeCode, $attributeValue) { $customAttributesCodes = $this->getCustomAttributesCodes(); /* If key corresponds to custom attribute code, populate custom attributes */ if (in_array($attributeCode, $customAttributesCodes)) { - $valueObject = $this->valueBuilder + $attribute = $this->attributeValueBuilder ->setAttributeCode($attributeCode) ->setValue($attributeValue) ->create(); - $this->_data[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY][$attributeCode] = $valueObject; + $this->data[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY][$attributeCode] = $attribute; } return $this; } @@ -114,8 +114,7 @@ abstract class AbstractExtensibleObjectBuilder extends AbstractSimpleObjectBuild return $this->customAttributesCodes; } $attributeCodes = []; - $dataObjectClassName = $this->_getDataObjectType(); - $customAttributesMetadata = $this->metadataService->getCustomAttributesMetadata($dataObjectClassName); + $customAttributesMetadata = $this->metadataService->getCustomAttributesMetadata($this->_getDataObjectType()); if (is_array($customAttributesMetadata)) { foreach ($customAttributesMetadata as $attribute) { $attributeCodes[] = $attribute->getAttributeCode(); @@ -125,6 +124,19 @@ abstract class AbstractExtensibleObjectBuilder extends AbstractSimpleObjectBuild return $attributeCodes; } + /** + * Set data item value. + * + * @param string $key + * @param mixed $value + * @return $this + * @deprecated This method should not be used in the client code and will be removed after Service Layer refactoring + */ + public function set($key, $value) + { + return $this->_set($key, $value); + } + /** * Initializes Data Object with the data from array * @@ -136,7 +148,7 @@ abstract class AbstractExtensibleObjectBuilder extends AbstractSimpleObjectBuild $dataObjectMethods = get_class_methods($this->_getDataObjectType()); foreach ($data as $key => $value) { /* First, verify is there any getter for the key on the Service Data Object */ - $camelCaseKey = \Magento\Framework\Service\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key); + $camelCaseKey = \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase($key); $possibleMethods = array( 'get' . $camelCaseKey, 'is' . $camelCaseKey @@ -152,11 +164,19 @@ abstract class AbstractExtensibleObjectBuilder extends AbstractSimpleObjectBuild ); } } elseif (array_intersect($possibleMethods, $dataObjectMethods)) { - $this->_data[$key] = $value; + $this->data[$key] = $value; } else { $this->setCustomAttribute($key, $value); } } return $this; } + + /** + * {@inheritdoc} + */ + protected function _getDataObjectType() + { + return $this->modelClassInterface ?: parent::_getDataObjectType(); + } } diff --git a/lib/internal/Magento/Framework/Service/V1/Data/Filter.php b/lib/internal/Magento/Framework/Api/Filter.php similarity index 92% rename from lib/internal/Magento/Framework/Service/V1/Data/Filter.php rename to lib/internal/Magento/Framework/Api/Filter.php index 1625842c063f77132731fd9f2096a68cc175aba0..5d106584dc35e591ab38a953e731947b12a6a3b6 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/Filter.php +++ b/lib/internal/Magento/Framework/Api/Filter.php @@ -22,12 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; /** * Filter which can be used by any methods from service layer. */ -class Filter extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class Filter extends \Magento\Framework\Api\AbstractExtensibleObject { /** * Get field diff --git a/lib/internal/Magento/Framework/Service/V1/Data/FilterBuilder.php b/lib/internal/Magento/Framework/Api/FilterBuilder.php similarity index 84% rename from lib/internal/Magento/Framework/Service/V1/Data/FilterBuilder.php rename to lib/internal/Magento/Framework/Api/FilterBuilder.php index 87fbae016c2a40992e94695af2c01dc867ba5543..506f32587785cacf2d0dad99f5233fbe941bdcb1 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/FilterBuilder.php +++ b/lib/internal/Magento/Framework/Api/FilterBuilder.php @@ -22,14 +22,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; /** * Builder for Filter Service Data Object. * * @method Filter create() */ -class FilterBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder +class FilterBuilder extends \Magento\Framework\Api\ExtensibleObjectBuilder { /** * Set field @@ -39,7 +39,7 @@ class FilterBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleOb */ public function setField($field) { - $this->_data['field'] = $field; + $this->data['field'] = $field; return $this; } @@ -51,7 +51,7 @@ class FilterBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleOb */ public function setValue($value) { - $this->_data['value'] = $value; + $this->data['value'] = $value; return $this; } @@ -63,7 +63,7 @@ class FilterBuilder extends \Magento\Framework\Service\Data\AbstractExtensibleOb */ public function setConditionType($conditionType) { - $this->_data['condition_type'] = $conditionType; + $this->data['condition_type'] = $conditionType; return $this; } } diff --git a/lib/internal/Magento/Framework/Service/Data/MetadataObjectInterface.php b/lib/internal/Magento/Framework/Api/MetadataObjectInterface.php similarity index 96% rename from lib/internal/Magento/Framework/Service/Data/MetadataObjectInterface.php rename to lib/internal/Magento/Framework/Api/MetadataObjectInterface.php index 7f951c3bc0440ce1339661a4cd69276fd5037667..2bacd9cc52b74070e3ef7d5563eb5b5152a93216 100644 --- a/lib/internal/Magento/Framework/Service/Data/MetadataObjectInterface.php +++ b/lib/internal/Magento/Framework/Api/MetadataObjectInterface.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; interface MetadataObjectInterface diff --git a/lib/internal/Magento/Framework/Service/Data/MetadataServiceInterface.php b/lib/internal/Magento/Framework/Api/MetadataServiceInterface.php similarity index 91% rename from lib/internal/Magento/Framework/Service/Data/MetadataServiceInterface.php rename to lib/internal/Magento/Framework/Api/MetadataServiceInterface.php index 6939d501a2c6f715e6505fc893d2813a4e82f474..3995f0d70f8a9044ecb6f26bd579395e76570407 100644 --- a/lib/internal/Magento/Framework/Service/Data/MetadataServiceInterface.php +++ b/lib/internal/Magento/Framework/Api/MetadataServiceInterface.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; interface MetadataServiceInterface { @@ -30,7 +30,7 @@ interface MetadataServiceInterface * Get custom attribute metadata for the given class or interfaces it implements. * * @param string|null $dataObjectClassName Data object class name - * @return \Magento\Framework\Service\Data\MetadataObjectInterface[] + * @return \Magento\Framework\Api\MetadataObjectInterface[] */ public function getCustomAttributesMetadata($dataObjectClassName = null); } diff --git a/lib/internal/Magento/Framework/Service/Data/ObjectFactory.php b/lib/internal/Magento/Framework/Api/ObjectFactory.php similarity index 97% rename from lib/internal/Magento/Framework/Service/Data/ObjectFactory.php rename to lib/internal/Magento/Framework/Api/ObjectFactory.php index 0ccf8778476327639f91120667490f2edea16fff..6612b333e05dcf601fb3bc3aaadb3169ba2e61e1 100644 --- a/lib/internal/Magento/Framework/Service/Data/ObjectFactory.php +++ b/lib/internal/Magento/Framework/Api/ObjectFactory.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\Data; +namespace Magento\Framework\Api; class ObjectFactory { diff --git a/lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroup.php b/lib/internal/Magento/Framework/Api/Search/FilterGroup.php similarity index 87% rename from lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroup.php rename to lib/internal/Magento/Framework/Api/Search/FilterGroup.php index 75c5f27818d1f8df587e724c93a60d9f7a65491b..666649bf39ffd89ac49772179ef44361328b2b28 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroup.php +++ b/lib/internal/Magento/Framework/Api/Search/FilterGroup.php @@ -22,9 +22,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data\Search; +namespace Magento\Framework\Api\Search; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Groups two or more filters together using a logical OR @@ -36,7 +36,7 @@ class FilterGroup extends AbstractExtensibleObject /** * Returns a list of filters in this group * - * @return \Magento\Framework\Service\V1\Data\Filter[]|null + * @return \Magento\Framework\Api\Filter[]|null */ public function getFilters() { diff --git a/lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroupBuilder.php b/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php similarity index 74% rename from lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroupBuilder.php rename to lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php index d7fbc6ac73c6facc7fa1ee5682d74697fd54a35c..da0fbfc8f22ffe4a8c23103aef448fcb3c4f52f7 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/Search/FilterGroupBuilder.php +++ b/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php @@ -22,17 +22,17 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data\Search; +namespace Magento\Framework\Api\Search; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\FilterBuilder; /** * Builder for FilterGroup Data. */ -class FilterGroupBuilder extends AbstractExtensibleObjectBuilder +class FilterGroupBuilder extends ExtensibleObjectBuilder { /** * @var FilterBuilder @@ -40,13 +40,13 @@ class FilterGroupBuilder extends AbstractExtensibleObjectBuilder protected $_filterBuilder; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param FilterBuilder $filterBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, FilterBuilder $filterBuilder @@ -58,19 +58,19 @@ class FilterGroupBuilder extends AbstractExtensibleObjectBuilder /** * Add filter * - * @param \Magento\Framework\Service\V1\Data\Filter $filter + * @param \Magento\Framework\Api\Filter $filter * @return $this */ - public function addFilter(\Magento\Framework\Service\V1\Data\Filter $filter) + public function addFilter(\Magento\Framework\Api\Filter $filter) { - $this->_data[FilterGroup::FILTERS][] = $filter; + $this->data[FilterGroup::FILTERS][] = $filter; return $this; } /** * Set filters * - * @param \Magento\Framework\Service\V1\Data\Filter[] $filters + * @param \Magento\Framework\Api\Filter[] $filters * @return $this */ public function setFilters($filters) diff --git a/lib/internal/Magento/Framework/Service/V1/Data/SearchCriteria.php b/lib/internal/Magento/Framework/Api/SearchCriteria.php similarity index 86% rename from lib/internal/Magento/Framework/Service/V1/Data/SearchCriteria.php rename to lib/internal/Magento/Framework/Api/SearchCriteria.php index 962bcb3be60fdb91ebcf88bfa1bf48b13985bad2..5b62e1f6f51f9a9291af204eb5b5d61c738a1768 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/SearchCriteria.php +++ b/lib/internal/Magento/Framework/Api/SearchCriteria.php @@ -22,10 +22,10 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; -use Magento\Framework\Service\Data\AbstractExtensibleObject; -use Magento\Framework\Api\Data\SearchCriteriaInterface; +use Magento\Framework\Api\AbstractExtensibleObject; +use Magento\Framework\Api\SearchCriteriaInterface; /** * Data Object for SearchCriteria @@ -43,7 +43,7 @@ class SearchCriteria extends AbstractExtensibleObject implements SearchCriteriaI /** * Get a list of filter groups. * - * @return \Magento\Framework\Service\V1\Data\Search\FilterGroup[] + * @return \Magento\Framework\Api\Search\FilterGroup[] */ public function getFilterGroups() { @@ -53,7 +53,7 @@ class SearchCriteria extends AbstractExtensibleObject implements SearchCriteriaI /** * Get sort order. * - * @return \Magento\Framework\Service\V1\Data\SortOrder[]|null + * @return \Magento\Framework\Api\SortOrder[]|null */ public function getSortOrders() { diff --git a/lib/internal/Magento/Framework/Service/V1/Data/SearchCriteriaBuilder.php b/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php similarity index 74% rename from lib/internal/Magento/Framework/Service/V1/Data/SearchCriteriaBuilder.php rename to lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php index 6971ec7ef93c25727bc6b23688da8650efccada9..c97d5a94e19dc087165121d8872c60334f130af4 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/SearchCriteriaBuilder.php +++ b/lib/internal/Magento/Framework/Api/SearchCriteriaBuilder.php @@ -22,18 +22,18 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; -use Magento\Framework\Service\Data\AttributeValueBuilder; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder; -use Magento\Framework\Service\V1\Data\SortOrder; +use Magento\Framework\Api\ExtensibleObjectBuilder; +use Magento\Framework\Api\AttributeValueBuilder; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\Search\FilterGroupBuilder; +use Magento\Framework\Api\SortOrder; /** * Builder for SearchCriteria Service Data Object */ -class SearchCriteriaBuilder extends AbstractExtensibleObjectBuilder +class SearchCriteriaBuilder extends ExtensibleObjectBuilder { /** * @var FilterGroupBuilder @@ -41,13 +41,13 @@ class SearchCriteriaBuilder extends AbstractExtensibleObjectBuilder protected $_filterGroupBuilder; /** - * @param \Magento\Framework\Service\Data\ObjectFactory $objectFactory + * @param \Magento\Framework\Api\ObjectFactory $objectFactory * @param AttributeValueBuilder $valueBuilder * @param MetadataServiceInterface $metadataService * @param FilterGroupBuilder $filterGroupBuilder */ public function __construct( - \Magento\Framework\Service\Data\ObjectFactory $objectFactory, + \Magento\Framework\Api\ObjectFactory $objectFactory, AttributeValueBuilder $valueBuilder, MetadataServiceInterface $metadataService, FilterGroupBuilder $filterGroupBuilder @@ -64,7 +64,7 @@ class SearchCriteriaBuilder extends AbstractExtensibleObjectBuilder public function create() { //Initialize with empty array if not set - if (empty($this->_data[SearchCriteria::FILTER_GROUPS])) { + if (empty($this->data[SearchCriteria::FILTER_GROUPS])) { $this->_set(SearchCriteria::FILTER_GROUPS, []); } return parent::create(); @@ -73,19 +73,19 @@ class SearchCriteriaBuilder extends AbstractExtensibleObjectBuilder /** * Create a filter group based on the filter array provided and add to the filter groups * - * @param \Magento\Framework\Service\V1\Data\Filter[] $filter + * @param \Magento\Framework\Api\Filter[] $filter * @return $this */ public function addFilter(array $filter) { - $this->_data[SearchCriteria::FILTER_GROUPS][] = $this->_filterGroupBuilder->setFilters($filter)->create(); + $this->data[SearchCriteria::FILTER_GROUPS][] = $this->_filterGroupBuilder->setFilters($filter)->create(); return $this; } /** * Set filter groups * - * @param \Magento\Framework\Service\V1\Data\Search\FilterGroup[] $filterGroups + * @param \Magento\Framework\Api\Search\FilterGroup[] $filterGroups * @return $this */ public function setFilterGroups(array $filterGroups) @@ -101,10 +101,10 @@ class SearchCriteriaBuilder extends AbstractExtensibleObjectBuilder */ public function addSortOrder($sortOrder) { - if (!isset($this->_data[SearchCriteria::SORT_ORDERS])) { - $this->_data[SearchCriteria::SORT_ORDERS] = []; + if (!isset($this->data[SearchCriteria::SORT_ORDERS])) { + $this->data[SearchCriteria::SORT_ORDERS] = []; } - $this->_data[SearchCriteria::SORT_ORDERS][] = $sortOrder; + $this->data[SearchCriteria::SORT_ORDERS][] = $sortOrder; return $this; } diff --git a/app/code/Magento/Install/Model/Config/Data.php b/lib/internal/Magento/Framework/Api/SearchCriteriaDataBuilder.php similarity index 83% rename from app/code/Magento/Install/Model/Config/Data.php rename to lib/internal/Magento/Framework/Api/SearchCriteriaDataBuilder.php index 2b6200d1b3eb754809a1ac7f227c4d04ee08dc9e..3f6c4c0e096d9395bc58b22d78a05e0ad153894d 100644 --- a/app/code/Magento/Install/Model/Config/Data.php +++ b/lib/internal/Magento/Framework/Api/SearchCriteriaDataBuilder.php @@ -21,8 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Install\Model\Config; -class Data extends \Magento\Framework\Config\Data +namespace Magento\Framework\Api; + +/** + * TODO: Temporary search criteria builder builder + */ +class SearchCriteriaDataBuilder extends \Magento\Framework\Api\SearchCriteriaBuilder { } diff --git a/lib/internal/Magento/Framework/Api/Data/SearchCriteriaInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php similarity index 89% rename from lib/internal/Magento/Framework/Api/Data/SearchCriteriaInterface.php rename to lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php index 68feed1c06457d14ad42230688436106f97b5ee7..15037f9f046385074c8dd4ce8de11b9d881fc2f9 100644 --- a/lib/internal/Magento/Framework/Api/Data/SearchCriteriaInterface.php +++ b/lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Api\Data; +namespace Magento\Framework\Api; /** * Search criteria interface. @@ -35,14 +35,14 @@ interface SearchCriteriaInterface /** * Get a list of filter groups. * - * @return \Magento\Framework\Service\V1\Data\Search\FilterGroup[] + * @return \Magento\Framework\Api\Search\FilterGroup[] */ public function getFilterGroups(); /** * Get sort order. * - * @return \Magento\Framework\Service\V1\Data\SortOrder[]|null + * @return \Magento\Framework\Api\SortOrder[]|null */ public function getSortOrders(); diff --git a/lib/internal/Magento/Framework/Service/V1/Data/SearchResults.php b/lib/internal/Magento/Framework/Api/SearchResults.php similarity index 85% rename from lib/internal/Magento/Framework/Service/V1/Data/SearchResults.php rename to lib/internal/Magento/Framework/Api/SearchResults.php index 2479928dbfc2d0c6ea8b875bafa374f2dc83cc47..6c2cfc490b52d957de6ce5029b66cbc09f496fcc 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/SearchResults.php +++ b/lib/internal/Magento/Framework/Api/SearchResults.php @@ -22,12 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; /** * SearchResults Service Data Object used for the search service requests */ -class SearchResults extends \Magento\Framework\Service\Data\AbstractExtensibleObject +class SearchResults extends \Magento\Framework\Api\AbstractExtensibleObject { const KEY_ITEMS = 'items'; const KEY_SEARCH_CRITERIA = 'search_criteria'; @@ -36,7 +36,7 @@ class SearchResults extends \Magento\Framework\Service\Data\AbstractExtensibleOb /** * Get items * - * @return \Magento\Framework\Service\Data\AbstractExtensibleObject[] + * @return \Magento\Framework\Api\AbstractExtensibleObject[] */ public function getItems() { @@ -46,7 +46,7 @@ class SearchResults extends \Magento\Framework\Service\Data\AbstractExtensibleOb /** * Get search criteria * - * @return \Magento\Framework\Service\V1\Data\SearchCriteria + * @return \Magento\Framework\Api\SearchCriteria */ public function getSearchCriteria() { diff --git a/lib/internal/Magento/Framework/Api/Data/SearchResultsInterface.php b/lib/internal/Magento/Framework/Api/SearchResultsInterface.php similarity index 87% rename from lib/internal/Magento/Framework/Api/Data/SearchResultsInterface.php rename to lib/internal/Magento/Framework/Api/SearchResultsInterface.php index a53a97f5f324b6f0624b2d627b6798bbce0f8680..4ed7567f23a8fc9f5a46608181ab656e3dd32091 100644 --- a/lib/internal/Magento/Framework/Api/Data/SearchResultsInterface.php +++ b/lib/internal/Magento/Framework/Api/SearchResultsInterface.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Api\Data; +namespace Magento\Framework\Api; /** * Search results interface. @@ -32,14 +32,14 @@ interface SearchResultsInterface /** * Get items list. * - * @return \Magento\Framework\Api\Data\ExtensibleDataInterface[] + * @return \Magento\Framework\Api\ExtensibleDataInterface[] */ public function getItems(); /** * Get search criteria. * - * @return \Magento\Framework\Api\Data\SearchCriteriaInterface + * @return \Magento\Framework\Api\SearchCriteriaInterface */ public function getSearchCriteria(); diff --git a/lib/internal/Magento/Framework/Service/SimpleDataObjectConverter.php b/lib/internal/Magento/Framework/Api/SimpleDataObjectConverter.php similarity index 98% rename from lib/internal/Magento/Framework/Service/SimpleDataObjectConverter.php rename to lib/internal/Magento/Framework/Api/SimpleDataObjectConverter.php index 623f1f87a6e1c91b11783504c192b8f14d0903fc..af7b189c11cf07d86f7942d6b3a1534fe7dd06c0 100644 --- a/lib/internal/Magento/Framework/Service/SimpleDataObjectConverter.php +++ b/lib/internal/Magento/Framework/Api/SimpleDataObjectConverter.php @@ -21,10 +21,10 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service; +namespace Magento\Framework\Api; use Magento\Framework\Convert\ConvertArray; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; class SimpleDataObjectConverter { diff --git a/lib/internal/Magento/Framework/Service/V1/Data/SortOrder.php b/lib/internal/Magento/Framework/Api/SortOrder.php similarity index 92% rename from lib/internal/Magento/Framework/Service/V1/Data/SortOrder.php rename to lib/internal/Magento/Framework/Api/SortOrder.php index d33eee3a8b31a3c23b174314d7fce5f448ff27d1..54aaead97c292d9e7d3d7fde34cd07a7c754a088 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/SortOrder.php +++ b/lib/internal/Magento/Framework/Api/SortOrder.php @@ -22,9 +22,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; -use Magento\Framework\Service\Data\AbstractExtensibleObject; +use Magento\Framework\Api\AbstractExtensibleObject; /** * Data object for sort order. diff --git a/lib/internal/Magento/Framework/Service/V1/Data/SortOrderBuilder.php b/lib/internal/Magento/Framework/Api/SortOrderBuilder.php similarity index 89% rename from lib/internal/Magento/Framework/Service/V1/Data/SortOrderBuilder.php rename to lib/internal/Magento/Framework/Api/SortOrderBuilder.php index a6e315b2c458a0b2fcdbd247accc5717a83af11e..b2f1a90695ea031caa1dabf7599515ed72f828d8 100644 --- a/lib/internal/Magento/Framework/Service/V1/Data/SortOrderBuilder.php +++ b/lib/internal/Magento/Framework/Api/SortOrderBuilder.php @@ -22,16 +22,16 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Framework\Service\V1\Data; +namespace Magento\Framework\Api; -use Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder; +use Magento\Framework\Api\ExtensibleObjectBuilder; /** * Builder for sort order data object. * * @method SortOrder create() */ -class SortOrderBuilder extends AbstractExtensibleObjectBuilder +class SortOrderBuilder extends ExtensibleObjectBuilder { /** * Set sorting field. diff --git a/lib/internal/Magento/Framework/Service/etc/data_object.xsd b/lib/internal/Magento/Framework/Api/etc/data_object.xsd similarity index 100% rename from lib/internal/Magento/Framework/Service/etc/data_object.xsd rename to lib/internal/Magento/Framework/Api/etc/data_object.xsd diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php index c3536495b1381bdcce8575e159b917f2f232acf4..5c09f137c030038dcd8508324f349977677eda7e 100644 --- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php +++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php @@ -157,6 +157,6 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList */ public function __construct($root, array $config = array()) { - parent::__construct($root, [self::ROOT => $root] + $config); + parent::__construct($root, [self::ROOT => [self::PATH => $root]] + $config); } } diff --git a/lib/internal/Magento/Framework/App/Helper/AbstractHelper.php b/lib/internal/Magento/Framework/App/Helper/AbstractHelper.php index 0bffd8e97e6bccc9678010134711efec8d4caa20..1703cc1ed9e8dd5e0dad2a7e18804062864a2b59 100644 --- a/lib/internal/Magento/Framework/App/Helper/AbstractHelper.php +++ b/lib/internal/Magento/Framework/App/Helper/AbstractHelper.php @@ -118,7 +118,7 @@ abstract class AbstractHelper $class = get_class($this); $this->_moduleName = substr($class, 0, strpos($class, '\\Helper')); } - return str_replace(\Magento\Framework\Autoload\IncludePath::NS_SEPARATOR, '_', $this->_moduleName); + return str_replace('\\', '_', $this->_moduleName); } /** diff --git a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php index 9e326b4451f53fb2d1d89ea8f8a61e00197fb6fa..e9ed588bfcb2948b63997a91ae1f4f1c53614569 100644 --- a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php +++ b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php @@ -27,6 +27,7 @@ namespace Magento\Framework\App; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Profiler; +use Magento\Framework\Code\Generator\FileResolver; use Magento\Framework\Filesystem\DriverPool; /** @@ -93,9 +94,7 @@ class ObjectManagerFactory */ public function create(array $arguments, $useCompiled = true) { - (new \Magento\Framework\Autoload\IncludePath())->addIncludePath( - array($this->directoryList->getPath(DirectoryList::GENERATION)) - ); + FileResolver::addIncludePath($this->directoryList->getPath(DirectoryList::GENERATION)); $appArguments = $this->createAppArguments($this->directoryList, $arguments); diff --git a/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php b/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php index 4adb19b7225f497a496013169e099f5c16f001ac..e49e68c013f9142af8eec592a4679a2894336574 100644 --- a/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php +++ b/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php @@ -59,4 +59,9 @@ interface DataProviderInterface * @return array */ public function getFeeds(); + + /** + * @return bool + */ + public function isAuthRequired(); } diff --git a/lib/internal/Magento/Framework/App/State.php b/lib/internal/Magento/Framework/App/State.php index 00474eef4ad2004570049fa1648a01ae7a3e17b5..de10c24e0cabd94ac301702b32948d74fb05874a 100644 --- a/lib/internal/Magento/Framework/App/State.php +++ b/lib/internal/Magento/Framework/App/State.php @@ -53,13 +53,6 @@ class State */ protected $_updateMode = false; - /** - * Application install date - * - * @var string - */ - protected $_installDate; - /** * Config scope model * @@ -88,16 +81,13 @@ class State /** * @param \Magento\Framework\Config\ScopeInterface $configScope - * @param string $installDate * @param string $mode * @throws \LogicException */ public function __construct( \Magento\Framework\Config\ScopeInterface $configScope, - $installDate, $mode = self::MODE_DEFAULT ) { - $this->_installDate = strtotime((string)$installDate); $this->_configScope = $configScope; switch ($mode) { case self::MODE_DEVELOPER: @@ -110,16 +100,6 @@ class State } } - /** - * Check if application is installed - * - * @return bool - */ - public function isInstalled() - { - return (bool)$this->_installDate; - } - /** * Return current app mode * @@ -163,27 +143,6 @@ class State $this->_isDownloader = $flag; } - /** - * Set install date - * - * @param string $date - * @return void - */ - public function setInstallDate($date) - { - $this->_installDate = $date; - } - - /** - * Get install date - * - * @return int - */ - public function getInstallDate() - { - return $this->_installDate; - } - /** * Set area code * diff --git a/lib/internal/Magento/Framework/AppInterface.php b/lib/internal/Magento/Framework/AppInterface.php index 839d0af959c0235909c6da7642b557307358e864..cc6d1fa9c40ffb68a768f08bd45e91d43efc7b37 100644 --- a/lib/internal/Magento/Framework/AppInterface.php +++ b/lib/internal/Magento/Framework/AppInterface.php @@ -35,7 +35,7 @@ interface AppInterface /** * Magento version */ - const VERSION = '0.1.0-alpha102'; + const VERSION = '0.1.0-alpha103'; /** * Launch application diff --git a/lib/internal/Magento/Framework/Code/Generator.php b/lib/internal/Magento/Framework/Code/Generator.php index 9c6d0523c3b78d9238d6c31383354fa5a8cf3b73..e4b8828dfb672706e49070d43f294330e1faac81 100644 --- a/lib/internal/Magento/Framework/Code/Generator.php +++ b/lib/internal/Magento/Framework/Code/Generator.php @@ -32,9 +32,9 @@ class Generator const GENERATION_SKIP = 'skip'; /** - * @var \Magento\Framework\Autoload\IncludePath + * @var \Magento\Framework\Code\Generator\FileResolver */ - protected $_autoloader; + protected $fileResolver; /** * @var \Magento\Framework\Code\Generator\Io @@ -47,19 +47,19 @@ class Generator protected $_generatedEntities; /** - * @param \Magento\Framework\Autoload\IncludePath $autoloader + * @param \Magento\Framework\Code\Generator\FileResolver $fileResolver * @param Generator\Io $ioObject * @param array $generatedEntities */ public function __construct( - \Magento\Framework\Autoload\IncludePath $autoloader = null, + \Magento\Framework\Code\Generator\FileResolver $fileResolver, \Magento\Framework\Code\Generator\Io $ioObject = null, array $generatedEntities = array() ) { - $this->_autoloader = $autoloader ?: new \Magento\Framework\Autoload\IncludePath(); + $this->fileResolver = $fileResolver; $this->_ioObject = $ioObject ?: new \Magento\Framework\Code\Generator\Io( new \Magento\Framework\Filesystem\Driver\File(), - $this->_autoloader + $this->fileResolver ); $this->_generatedEntities = $generatedEntities; } @@ -94,7 +94,7 @@ class Generator $entity = $entityType; $entityName = rtrim( substr($className, 0, -1 * strlen($entitySuffix)), - \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR + '\\' ); break; } @@ -104,8 +104,7 @@ class Generator } // check if file already exists - $autoloader = $this->_autoloader; - if ($autoloader->getFile($className)) { + if ($this->fileResolver->getFile($className)) { return self::GENERATION_SKIP; } diff --git a/lib/internal/Magento/Framework/Code/Generator/Autoloader.php b/lib/internal/Magento/Framework/Code/Generator/Autoloader.php index c98b83ac674f0d049bf8413edd1c637222b6301a..ae1616d01dd540ca01b5b3a3c1dbf438153d087d 100644 --- a/lib/internal/Magento/Framework/Code/Generator/Autoloader.php +++ b/lib/internal/Magento/Framework/Code/Generator/Autoloader.php @@ -23,6 +23,8 @@ */ namespace Magento\Framework\Code\Generator; +use \Magento\Framework\Code\Generator; + class Autoloader { /** @@ -30,11 +32,20 @@ class Autoloader */ protected $_generator; + /** + * @var \Magento\Framework\Code\Generator\FileResolver + */ + protected $fileResolver; + /** * @param \Magento\Framework\Code\Generator $generator + * @param \Magento\Framework\Code\Generator\FileResolver $fileResolver */ - public function __construct(\Magento\Framework\Code\Generator $generator) - { + public function __construct( + \Magento\Framework\Code\Generator $generator, + \Magento\Framework\Code\Generator\FileResolver $fileResolver + ) { + $this->fileResolver = $fileResolver; $this->_generator = $generator; } @@ -47,8 +58,11 @@ class Autoloader public function load($className) { if (!class_exists($className)) { - if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS === $this->_generator->generateClass($className)) { - (new \Magento\Framework\Autoload\IncludePath())->load($className); + if (Generator::GENERATION_SUCCESS === $this->_generator->generateClass($className)) { + $file = $this->fileResolver->getFile($className); + if ($file) { + include $file; + } } } } diff --git a/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php b/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php index 6d1c0e40382dc789323f7970c92177f4fb6acf22..a789218b96b4f3b170c64e1973c401a49eb08702 100644 --- a/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php +++ b/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php @@ -23,7 +23,7 @@ */ namespace Magento\Framework\Code\Generator; -use Magento\Framework\Autoload\IncludePath; +use \Magento\Framework\Code\Generator\FileResolver; abstract class EntityAbstract { @@ -59,9 +59,9 @@ abstract class EntityAbstract /** * Autoloader instance * - * @var IncludePath + * @var FileResolver */ - private $_autoloader; + private $fileResolver; /** * Class generator object @@ -75,24 +75,24 @@ abstract class EntityAbstract * @param null|string $resultClassName * @param Io $ioObject * @param CodeGenerator\CodeGeneratorInterface $classGenerator - * @param IncludePath $autoLoader + * @param FileResolver $fileResolver */ public function __construct( $sourceClassName = null, $resultClassName = null, Io $ioObject = null, CodeGenerator\CodeGeneratorInterface $classGenerator = null, - IncludePath $autoLoader = null + FileResolver $fileResolver = null ) { - if ($autoLoader) { - $this->_autoloader = $autoLoader; + if ($fileResolver) { + $this->fileResolver = $fileResolver; } else { - $this->_autoloader = new IncludePath(); + $this->fileResolver = new FileResolver(); } if ($ioObject) { $this->_ioObject = $ioObject; } else { - $this->_ioObject = new Io(new \Magento\Framework\Filesystem\Driver\File(), $this->_autoloader); + $this->_ioObject = new Io(new \Magento\Framework\Filesystem\Driver\File(), $this->fileResolver); } if ($classGenerator) { $this->_classGenerator = $classGenerator; @@ -100,7 +100,7 @@ abstract class EntityAbstract $this->_classGenerator = new CodeGenerator\Zend(); } - $this->_sourceClassName = ltrim($sourceClassName, IncludePath::NS_SEPARATOR); + $this->_sourceClassName = ltrim($sourceClassName, '\\'); if ($resultClassName) { $this->_resultClassName = $resultClassName; } elseif ($sourceClassName) { @@ -160,7 +160,7 @@ abstract class EntityAbstract */ protected function _getFullyQualifiedClassName($className) { - return IncludePath::NS_SEPARATOR . ltrim($className, IncludePath::NS_SEPARATOR); + return '\\' . ltrim($className, '\\'); } /** @@ -284,13 +284,13 @@ abstract class EntityAbstract $filePath = stream_resolve_include_path(str_replace('_', '/', $controllerPath) . '.php'); $isSourceClassValid = !empty($filePath); } else { - $isSourceClassValid = $this->_autoloader->getFile($sourceClassName); + $isSourceClassValid = $this->fileResolver->getFile($sourceClassName); } if (!$isSourceClassValid) { $this->_addError('Source class ' . $sourceClassName . ' doesn\'t exist.'); return false; - } elseif ($this->_autoloader->getFile($resultClassName)) { + } elseif ($this->fileResolver->getFile($resultClassName)) { $this->_addError('Result class ' . $resultClassName . ' already exists.'); return false; } elseif (!$this->_ioObject->makeGenerationDirectory()) { diff --git a/lib/internal/Magento/Framework/Code/Generator/FileResolver.php b/lib/internal/Magento/Framework/Code/Generator/FileResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..a9774cf273bdc2a6cb731436e9186765835c82d5 --- /dev/null +++ b/lib/internal/Magento/Framework/Code/Generator/FileResolver.php @@ -0,0 +1,73 @@ +<?php +/** + * Contains logic for finding class filepaths. + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +namespace Magento\Framework\Code\Generator; + +class FileResolver +{ + /** + * Find a file in include path. Include path is set in composer.json or with set_include_path() + * + * @param string $class + * @return string|bool + */ + public function getFile($class) + { + $relativePath = $this->getFilePath($class); + return stream_resolve_include_path($relativePath); + } + + /** + * Get relative file path for specified class + * + * @static + * @param string $class + * @return string + */ + public function getFilePath($class) + { + return ltrim(str_replace(['_', '\\'], '/', $class), '/') . '.php'; + } + + /** + * Add specified path(s) to the current include_path + * + * @param string|array $path + * @param bool $prepend Whether to prepend paths or to append them + * @return void + */ + public static function addIncludePath($path, $prepend = true) + { + $includePathExtra = implode(PATH_SEPARATOR, (array)$path); + $includePath = get_include_path(); + $pathSeparator = $includePath && $includePathExtra ? PATH_SEPARATOR : ''; + if ($prepend) { + $includePath = $includePathExtra . $pathSeparator . $includePath; + } else { + $includePath = $includePath . $pathSeparator . $includePathExtra; + } + set_include_path($includePath); + } +} diff --git a/lib/internal/Magento/Framework/Code/Generator/Io.php b/lib/internal/Magento/Framework/Code/Generator/Io.php index 1ef24819b9b52f5eb9304cbe04385638c87f7845..48dcdd8dc46980321a57b52da0386c93c8ae30f2 100644 --- a/lib/internal/Magento/Framework/Code/Generator/Io.php +++ b/lib/internal/Magento/Framework/Code/Generator/Io.php @@ -44,11 +44,11 @@ class Io private $_generationDirectory; /** - * Autoloader instance + * File resolver * - * @var \Magento\Framework\Autoload\IncludePath + * @var \Magento\Framework\Code\Generator\FileResolver */ - private $_autoloader; + private $fileResolver; /** * @var \Magento\Framework\Filesystem\Driver\File @@ -57,15 +57,15 @@ class Io /** * @param \Magento\Framework\Filesystem\Driver\File $filesystemDriver - * @param \Magento\Framework\Autoload\IncludePath $autoLoader + * @param \Magento\Framework\Code\Generator\FileResolver $fileResolver * @param null $generationDirectory */ public function __construct( \Magento\Framework\Filesystem\Driver\File $filesystemDriver, - \Magento\Framework\Autoload\IncludePath $autoLoader = null, + \Magento\Framework\Code\Generator\FileResolver $fileResolver, $generationDirectory = null ) { - $this->_autoloader = $autoLoader ?: new \Magento\Framework\Autoload\IncludePath(); + $this->fileResolver = $fileResolver; $this->filesystemDriver = $filesystemDriver; $this->initGeneratorDirectory($generationDirectory); } @@ -104,8 +104,7 @@ class Io */ public function getResultFileName($className) { - $autoloader = $this->_autoloader; - $resultFileName = $autoloader->getFilePath($className); + $resultFileName = $this->fileResolver->getFilePath($className); return $this->_generationDirectory . $resultFileName; } diff --git a/lib/internal/Magento/Framework/Code/NameBuilder.php b/lib/internal/Magento/Framework/Code/NameBuilder.php index 2696de2fa8942bd787c1661c7a23a4fedf4b1706..469ecec22bf1f2fb3ad88d6896ba89adb444cf28 100644 --- a/lib/internal/Magento/Framework/Code/NameBuilder.php +++ b/lib/internal/Magento/Framework/Code/NameBuilder.php @@ -38,7 +38,7 @@ class NameBuilder */ public function buildClassName($parts) { - $separator = \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR; + $separator = '\\'; $string = join($separator, $parts); $string = str_replace('_', $separator, $string); $className = str_replace(' ', $separator, ucwords(str_replace($separator, ' ', $string))); diff --git a/lib/internal/Magento/Framework/Exception/SerializationException.php b/lib/internal/Magento/Framework/Exception/SerializationException.php new file mode 100644 index 0000000000000000000000000000000000000000..6d62898a97d1bc8a08ba48d5a9d6b5012172b410 --- /dev/null +++ b/lib/internal/Magento/Framework/Exception/SerializationException.php @@ -0,0 +1,43 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Framework\Exception; + +/** + * Serialization Exception + */ +class SerializationException extends LocalizedException +{ + const TYPE_MISMATCH = 'Invalid type for value :"%value". Expected Type: "%type".'; + + /** + * @param string $message + * @param array $params + * @param \Exception $cause + */ + public function __construct($message = self::TYPE_MISMATCH, array $params = [], \Exception $cause = null) + { + parent::__construct($message, $params, $cause); + } +} diff --git a/lib/internal/Magento/Framework/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/Filesystem/DirectoryList.php index 0da123241e952f4091be3dd6763b5ccda334141b..9744866e57a39504a428ff0716ac3ad5b67e6151 100644 --- a/lib/internal/Magento/Framework/Filesystem/DirectoryList.php +++ b/lib/internal/Magento/Framework/Filesystem/DirectoryList.php @@ -77,6 +77,32 @@ class DirectoryList return [self::SYS_TMP => [self::PATH => '']]; } + /** + * Validates format and contents of given configuration + * + * @param array $config + * @return void + * @throws \InvalidArgumentException + */ + public static function validate($config) + { + if (!is_array($config)) { + throw new \InvalidArgumentException('Unexpected value type.'); + } + $defaultConfig = static::getDefaultConfig(); + foreach ($config as $type => $row) { + if (!is_array($row)) { + throw new \InvalidArgumentException('Unexpected value type.'); + } + if (!isset($defaultConfig[$type])) { + throw new \InvalidArgumentException("Unknown type: {$type}"); + } + if (!isset($row[self::PATH]) && !isset($row[self::URL_PATH])) { + throw new \InvalidArgumentException("Missing required keys at: {$type}"); + } + } + } + /** * Constructor * @@ -85,6 +111,7 @@ class DirectoryList */ public function __construct($root, array $config = array()) { + static::validate($config); $this->root = $this->filterPath($root); $this->directories = static::getDefaultConfig(); $this->directories[self::SYS_TMP] = [self::PATH => sys_get_temp_dir()]; diff --git a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php index daa95701751114014e0a09181e781262a60e6a39..da46448e7954fb28924a065c4de66856d5958649 100644 --- a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php @@ -24,8 +24,8 @@ namespace Magento\Framework\Model; -use Magento\Framework\Service\Data\MetadataServiceInterface; -use Magento\Framework\Api\Data\ExtensibleDataInterface; +use Magento\Framework\Api\MetadataServiceInterface; +use Magento\Framework\Api\ExtensibleDataInterface; /** * Abstract model with custom attributes support. @@ -88,7 +88,7 @@ abstract class AbstractExtensibleModel extends AbstractModel implements Extensib /** * Retrieve custom attributes values. * - * @return \Magento\Framework\Service\Data\AttributeValue[]|null + * @return \Magento\Framework\Api\AttributeValue[]|null */ public function getCustomAttributes() { @@ -102,7 +102,7 @@ abstract class AbstractExtensibleModel extends AbstractModel implements Extensib * Get an attribute value. * * @param string $attributeCode - * @return \Magento\Framework\Service\Data\AttributeValue|null null if the attribute has not been set + * @return \Magento\Framework\Api\AttributeValue|null null if the attribute has not been set */ public function getCustomAttribute($attributeCode) { @@ -180,7 +180,7 @@ abstract class AbstractExtensibleModel extends AbstractModel implements Extensib $attributeCodes = []; $customAttributesMetadata = $this->metadataService->getCustomAttributesMetadata(get_class($this)); if (is_array($customAttributesMetadata)) { - /** @var $attribute \Magento\Framework\Service\Data\MetadataObjectInterface */ + /** @var $attribute \Magento\Framework\Api\MetadataObjectInterface */ foreach ($customAttributesMetadata as $attribute) { // Create a map for easier processing $attributeCodes[$attribute->getAttributeCode()] = $attribute->getAttributeCode(); diff --git a/lib/internal/Magento/Framework/Model/AbstractModel.php b/lib/internal/Magento/Framework/Model/AbstractModel.php index 85c2f2092137892835ed4e3e4ea7d50f885e36f2..b1e1da7b074e3c10807cbd08c478f62131cd0716 100644 --- a/lib/internal/Magento/Framework/Model/AbstractModel.php +++ b/lib/internal/Magento/Framework/Model/AbstractModel.php @@ -236,7 +236,7 @@ abstract class AbstractModel extends \Magento\Framework\Object { $this->_resourceName = $resourceName; if (is_null($collectionName)) { - $collectionName = $resourceName . \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR . 'Collection'; + $collectionName = $resourceName . '\\' . 'Collection'; } $this->_collectionName = $collectionName; } diff --git a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php index a837f4dc1dc913b40054db25466dfc816aff62c4..c8cb3243a76fcc174f3911429a5e8b66af20c86a 100644 --- a/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php +++ b/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php @@ -26,8 +26,6 @@ namespace Magento\Framework\Module\Plugin; use Magento\Framework\Cache\FrontendInterface; -use Magento\Framework\Module\Updater; -use Magento\Framework\App\State; class DbStatusValidator { diff --git a/lib/internal/Magento/Framework/Module/README.md b/lib/internal/Magento/Framework/Module/README.md index ac37b9e5e9156c1edd68785e9c846b40500565f2..533097f5f273ba55fb9c73e4199d07d926470a32 100644 --- a/lib/internal/Magento/Framework/Module/README.md +++ b/lib/internal/Magento/Framework/Module/README.md @@ -6,4 +6,4 @@ Magento\Framework\Module is Magento framework component that allows to build mod * module manager that provides all information about loaded modules * directory reader, that allows to read configuration files from module * ability to turn on/off module output in separate configuration application - * module db schema/data installers \ No newline at end of file + * module db data installers \ No newline at end of file diff --git a/app/code/Magento/Install/Model/Resource/Resource.php b/lib/internal/Magento/Framework/Module/Resource.php similarity index 99% rename from app/code/Magento/Install/Model/Resource/Resource.php rename to lib/internal/Magento/Framework/Module/Resource.php index 56acd864ee60ef288876301e3d1ba3484f87ff0d..05800cdbdef3e60070fb79f46d72d509d1a7e467 100644 --- a/app/code/Magento/Install/Model/Resource/Resource.php +++ b/lib/internal/Magento/Framework/Module/Resource.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Install\Model\Resource; +namespace Magento\Framework\Module; /** * Resource Resource Model diff --git a/lib/internal/Magento/Framework/Module/Setup.php b/lib/internal/Magento/Framework/Module/Setup.php index bf5e06c4641dbd18f911f232078cbbaeeb30d6bd..17c1e834b5f58863fd4135506c0c4bc7d0d9639e 100644 --- a/lib/internal/Magento/Framework/Module/Setup.php +++ b/lib/internal/Magento/Framework/Module/Setup.php @@ -223,37 +223,6 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface return $this; } - /** - * Apply module resource install, upgrade and data scripts - * - * @return $this|true - */ - public function applyUpdates() - { - $dbVer = $this->_resourceResource->getDbVersion($this->_resourceName); - $configVer = $this->_moduleConfig['schema_version']; - - // Module is installed - if ($dbVer !== false) { - $status = version_compare($configVer, $dbVer); - switch ($status) { - case self::VERSION_COMPARE_LOWER: - $this->_rollbackResourceDb($configVer, $dbVer); - break; - case self::VERSION_COMPARE_GREATER: - $this->_upgradeResourceDb($dbVer, $configVer); - break; - default: - return true; - break; - } - } elseif ($configVer) { - $this->_installResourceDb($configVer); - } - - return $this; - } - /** * Run data install scripts * @@ -284,103 +253,6 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface return $this; } - /** - * Run resource installation file - * - * @param string $newVersion - * @return $this - */ - protected function _installResourceDb($newVersion) - { - $oldVersion = $this->_modifyResourceDb(self::TYPE_DB_INSTALL, '', $newVersion); - $this->_modifyResourceDb(self::TYPE_DB_UPGRADE, $oldVersion, $newVersion); - $this->_resourceResource->setDbVersion($this->_resourceName, $newVersion); - - return $this; - } - - /** - * Run resource upgrade files from $oldVersion to $newVersion - * - * @param string $oldVersion - * @param string $newVersion - * @return $this - */ - protected function _upgradeResourceDb($oldVersion, $newVersion) - { - $this->_modifyResourceDb(self::TYPE_DB_UPGRADE, $oldVersion, $newVersion); - $this->_resourceResource->setDbVersion($this->_resourceName, $newVersion); - - return $this; - } - - /** - * Roll back resource - * - * @param string $newVersion - * @param string $oldVersion - * @return $this - */ - protected function _rollbackResourceDb($newVersion, $oldVersion) - { - $this->_modifyResourceDb(self::TYPE_DB_ROLLBACK, $newVersion, $oldVersion); - return $this; - } - - /** - * Uninstall resource - * - * @param string $version existing resource version - * @return $this - */ - protected function _uninstallResourceDb($version) - { - $this->_modifyResourceDb(self::TYPE_DB_UNINSTALL, $version, ''); - return $this; - } - - /** - * Retrieve available Database install/upgrade files for current module - * - * @param string $actionType - * @param string $fromVersion - * @param string $toVersion - * @return array - */ - protected function _getAvailableDbFiles($actionType, $fromVersion, $toVersion) - { - $modName = (string)$this->_moduleConfig['name']; - - $filesDir = $this->_modulesReader->getModuleDir('sql', $modName) . '/' . $this->_resourceName; - $modulesDirPath = $this->modulesDir->getRelativePath($filesDir); - if (!$this->modulesDir->isDirectory($modulesDirPath) || !$this->modulesDir->isReadable($modulesDirPath)) { - return array(); - } - - $dbFiles = array(); - $typeFiles = array(); - $regExpDb = sprintf('#%s-(.*)\.(php|sql)$#i', $actionType); - $regExpType = sprintf('#%s-%s-(.*)\.(php|sql)$#i', 'mysql4', $actionType); - foreach ($this->modulesDir->read($modulesDirPath) as $file) { - $matches = array(); - if (preg_match($regExpDb, $file, $matches)) { - $dbFiles[$matches[1]] = $this->modulesDir->getAbsolutePath($file); - } else if (preg_match($regExpType, $file, $matches)) { - $typeFiles[$matches[1]] = $this->modulesDir->getAbsolutePath($file); - } - } - - if (empty($typeFiles) && empty($dbFiles)) { - return array(); - } - - foreach ($typeFiles as $version => $file) { - $dbFiles[$version] = $file; - } - - return $this->_getModifySqlFiles($actionType, $fromVersion, $toVersion, $dbFiles); - } - /** * Retrieve available Data install/upgrade files for current module * @@ -413,31 +285,6 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface return $this->_getModifySqlFiles($actionType, $fromVersion, $toVersion, $files); } - /** - * Save resource version - * - * @param string $actionType - * @param string $version - * @return $this - */ - protected function _setResourceVersion($actionType, $version) - { - switch ($actionType) { - case self::TYPE_DB_INSTALL: - case self::TYPE_DB_UPGRADE: - $this->_resourceResource->setDbVersion($this->_resourceName, $version); - break; - case self::TYPE_DATA_INSTALL: - case self::TYPE_DATA_UPGRADE: - $this->_resourceResource->setDataVersion($this->_resourceName, $version); - break; - default: - break; - } - - return $this; - } - /** * Run module modification files. Return version of last applied upgrade (false if no upgrades applied) * @param string $actionType @@ -448,19 +295,7 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface */ protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) { - switch ($actionType) { - case self::TYPE_DB_INSTALL: - case self::TYPE_DB_UPGRADE: - $files = $this->_getAvailableDbFiles($actionType, $fromVersion, $toVersion); - break; - case self::TYPE_DATA_INSTALL: - case self::TYPE_DATA_UPGRADE: - $files = $this->_getAvailableDataFiles($actionType, $fromVersion, $toVersion); - break; - default: - $files = array(); - break; - } + $files = $this->_getAvailableDataFiles($actionType, $fromVersion, $toVersion); if (empty($files) || !$this->getConnection()) { return false; } @@ -491,7 +326,7 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface } if ($result) { - $this->_setResourceVersion($actionType, $file['toVersion']); + $this->_resourceResource->setDataVersion($this->_resourceName, $file['toVersion']); $this->_logger->log($fileName); } else { $this->_logger->log("Failed resource setup: {$fileName}"); @@ -532,7 +367,6 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface { $arrRes = []; switch ($actionType) { - case self::TYPE_DB_INSTALL: case self::TYPE_DATA_INSTALL: uksort($arrFiles, 'version_compare'); foreach ($arrFiles as $version => $file) { @@ -545,7 +379,6 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface } break; - case self::TYPE_DB_UPGRADE: case self::TYPE_DATA_UPGRADE: uksort($arrFiles, 'version_compare'); foreach ($arrFiles as $version => $file) { @@ -570,8 +403,6 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface } break; - case self::TYPE_DB_ROLLBACK: - case self::TYPE_DB_UNINSTALL: default: break; } diff --git a/lib/internal/Magento/Framework/Module/Updater.php b/lib/internal/Magento/Framework/Module/Updater.php index bc19c5b7ee5bd92880fe31c5f9d34dd767af8034..b76f3121ad2400151ab8e163ceb5320de372c300 100644 --- a/lib/internal/Magento/Framework/Module/Updater.php +++ b/lib/internal/Magento/Framework/Module/Updater.php @@ -1,6 +1,6 @@ <?php /** - * Application module updater. Used to install/upgrade module schemas. + * Application module updater. Used to install/upgrade module data. * * Magento * @@ -25,24 +25,8 @@ */ namespace Magento\Framework\Module; -use Magento\Framework\App\State; - class Updater { - /** - * Flag which allow run data install/upgrade - * - * @var bool - */ - protected $_isUpdatedSchema = false; - - /** - * Application state model - * - * @var \Magento\Framework\App\State - */ - protected $_appState; - /** * @var ModuleListInterface */ @@ -65,59 +49,22 @@ class Updater /** * @param Updater\SetupFactory $setupFactory - * @param State $appState * @param ModuleListInterface $moduleList * @param ResourceResolverInterface $resourceResolver * @param Manager $moduleManager */ public function __construct( Updater\SetupFactory $setupFactory, - State $appState, ModuleListInterface $moduleList, ResourceResolverInterface $resourceResolver, \Magento\Framework\Module\Manager $moduleManager ) { - $this->_appState = $appState; $this->_moduleList = $moduleList; $this->_resourceResolver = $resourceResolver; $this->_setupFactory = $setupFactory; $this->_moduleManager = $moduleManager; } - /** - * Apply database scheme updates whenever needed - * - * @return void - */ - public function updateScheme() - { - \Magento\Framework\Profiler::start('apply_db_schema_updates'); - $this->_appState->setUpdateMode(true); - - $afterApplyUpdates = array(); - foreach (array_keys($this->_moduleList->getModules()) as $moduleName) { - foreach ($this->_resourceResolver->getResourceList($moduleName) as $resourceName) { - if (!$this->_moduleManager->isDbSchemaUpToDate($moduleName, $resourceName)) { - $setup = $this->_setupFactory->create($resourceName, $moduleName); - $setup->applyUpdates(); - - if ($setup->getCallAfterApplyAllUpdates()) { - $afterApplyUpdates[] = $setup; - } - } - } - } - - /** @var $setup \Magento\Framework\Module\Updater\SetupInterface*/ - foreach ($afterApplyUpdates as $setup) { - $setup->afterApplyAllUpdates(); - } - - $this->_appState->setUpdateMode(false); - $this->_isUpdatedSchema = true; - \Magento\Framework\Profiler::stop('apply_db_schema_updates'); - } - /** * Apply database data updates whenever needed * diff --git a/lib/internal/Magento/Framework/Module/Updater/SetupInterface.php b/lib/internal/Magento/Framework/Module/Updater/SetupInterface.php index 763bb4d3ccfdd81a216f4d9a49101e7cba0436c9..ee76a779fbe779a7099b09a29eb1adebcf75fdf6 100644 --- a/lib/internal/Magento/Framework/Module/Updater/SetupInterface.php +++ b/lib/internal/Magento/Framework/Module/Updater/SetupInterface.php @@ -35,25 +35,10 @@ interface SetupInterface const VERSION_COMPARE_GREATER = 1; - const TYPE_DB_INSTALL = 'install'; - - const TYPE_DB_UPGRADE = 'upgrade'; - - const TYPE_DB_ROLLBACK = 'rollback'; - - const TYPE_DB_UNINSTALL = 'uninstall'; - const TYPE_DATA_INSTALL = 'data-install'; const TYPE_DATA_UPGRADE = 'data-upgrade'; - /** - * Apply module resource install, upgrade and data scripts - * - * @return \Magento\Framework\Module\Updater\SetupInterface - */ - public function applyUpdates(); - /** * Check call afterApplyAllUpdates method for setup class * diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Converter.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Converter.php index f440edcc5521a38dd7b22c7412123018eed4dfdd..97474b1e014fe4bcdf863de635e9e8bd9af88508 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Converter.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Converter.php @@ -127,7 +127,7 @@ class Converter extends \Magento\Framework\Code\Generator\EntityAbstract 'parameters' => [ [ 'name' => $paramName, - 'type' => '\Magento\Framework\Service\Data\AbstractExtensibleObject' + 'type' => '\Magento\Framework\Api\AbstractExtensibleObject' ] ], 'body' => $body, @@ -136,7 +136,7 @@ class Converter extends \Magento\Framework\Code\Generator\EntityAbstract 'tags' => [ [ 'name' => 'param', - 'description' => '\Magento\Framework\Service\Data\AbstractExtensibleObject $' . $paramName, + 'description' => '\Magento\Framework\Api\AbstractExtensibleObject $' . $paramName, ], [ 'name' => 'return', diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php index bc43a467506945cd0c42346b1f506a2a8055f83b..c536f7ecbb9b7308685976384ada4856776bcba7 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php @@ -38,7 +38,7 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract */ const NO_SUCH_ENTITY_EXCEPTION = '\\Magento\Framework\Exception\NoSuchEntityException'; const INPUT_EXCEPTION = '\\Magento\Framework\Exception\InputException'; - const SEARCH_CRITERIA = '\\Magento\Framework\Service\V1\Data\SearchCriteria'; + const SEARCH_CRITERIA = '\\Magento\Framework\Api\SearchCriteria'; /** * Retrieve class properties diff --git a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php index e408f8e207faddbab2226ee28c54a7827d2d9c3b..2ebbe7ed3dfaa400e28e696d882fee90c364cb7c 100644 --- a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php +++ b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php @@ -31,12 +31,12 @@ use Magento\Framework\ObjectManager\Definition\Runtime; use Magento\Framework\ObjectManager\Relations; use Magento\Framework\ObjectManager\Code\Generator; use Magento\Framework\Interception\Code\Generator as InterceptionGenerator; -use Magento\Framework\Service\Code\Generator\Builder as BuilderGenerator; -use Magento\Framework\Service\Code\Generator\DataBuilder as DataBuilderGenerator; -use Magento\Framework\Service\Code\Generator\Mapper as MapperGenerator; +use Magento\Framework\Api\Code\Generator\Builder as BuilderGenerator; +use Magento\Framework\Api\Code\Generator\DataBuilder as DataBuilderGenerator; +use Magento\Framework\Api\Code\Generator\Mapper as MapperGenerator; use Magento\Framework\ObjectManager\Code\Generator\Converter as ConverterGenerator; -use Magento\Framework\Service\Code\Generator\SearchResults; -use Magento\Framework\Service\Code\Generator\SearchResultsBuilder; +use Magento\Framework\Api\Code\Generator\SearchResults; +use Magento\Framework\Api\Code\Generator\SearchResultsBuilder; use Magento\Framework\ObjectManager\Profiler\Code\Generator as ProfilerGenerator; /** @@ -118,19 +118,18 @@ class DefinitionFactory $definitionModel = $this->_definitionClasses[$this->_definitionFormat]; $result = new $definitionModel($definitions); } else { - $autoloader = new \Magento\Framework\Autoload\IncludePath(); + $fileResolver = new \Magento\Framework\Code\Generator\FileResolver(); $generatorIo = new \Magento\Framework\Code\Generator\Io( $this->_filesystemDriver, - $autoloader, + $fileResolver, $this->_generationDir ); $generator = new \Magento\Framework\Code\Generator( - $autoloader, + $fileResolver, $generatorIo, array( - SearchResultsBuilder::ENTITY_TYPE - => '\Magento\Framework\Service\Code\Generator\SearchResultsBuilder', + => '\Magento\Framework\Api\Code\Generator\SearchResultsBuilder', Generator\Factory::ENTITY_TYPE => '\Magento\Framework\ObjectManager\Code\Generator\Factory', Generator\Proxy::ENTITY_TYPE @@ -140,20 +139,20 @@ class DefinitionFactory InterceptionGenerator\Interceptor::ENTITY_TYPE => '\Magento\Framework\Interception\Code\Generator\Interceptor', DataBuilderGenerator::ENTITY_TYPE - => '\Magento\Framework\Service\Code\Generator\DataBuilder', + => '\Magento\Framework\Api\Code\Generator\DataBuilder', BuilderGenerator::ENTITY_TYPE - => '\Magento\Framework\Service\Code\Generator\Builder', + => '\Magento\Framework\Api\Code\Generator\Builder', MapperGenerator::ENTITY_TYPE - => '\Magento\Framework\Service\Code\Generator\Mapper', + => '\Magento\Framework\Api\Code\Generator\Mapper', SearchResults::ENTITY_TYPE - => '\Magento\Framework\Service\Code\Generator\SearchResults', + => '\Magento\Framework\Api\Code\Generator\SearchResults', ConverterGenerator::ENTITY_TYPE => '\Magento\Framework\ObjectManager\Code\Generator\Converter', ProfilerGenerator\Logger::ENTITY_TYPE => '\Magento\Framework\ObjectManager\Profiler\Code\Generator\Logger' ) ); - $autoloader = new \Magento\Framework\Code\Generator\Autoloader($generator); + $autoloader = new \Magento\Framework\Code\Generator\Autoloader($generator, $fileResolver); spl_autoload_register(array($autoloader, 'load')); $result = new Runtime(); diff --git a/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php b/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php index c2331005300afb01d2a958ea9709173b3ce610a9..ebea10c5f85ced6df546312a0a323175d193c0e2 100644 --- a/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php +++ b/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php @@ -87,4 +87,13 @@ interface PriceCurrencyInterface * @return float */ public function round($price); + + /** + * Get currency model + * + * @param null|string|bool|int|\Magento\Store\Model\Store $store + * @param \Magento\Directory\Model\Currency|string|null $currency + * @return \Magento\Directory\Model\Currency + */ + public function getCurrency($store = null, $currency = null); } diff --git a/lib/internal/Magento/Framework/Pricing/Render/Amount.php b/lib/internal/Magento/Framework/Pricing/Render/Amount.php index 70453920a8d727e184db38f43c0ad5ece33e24e3..62eff80c601d4e1e1ec75bc6ab8976392b0a099c 100644 --- a/lib/internal/Magento/Framework/Pricing/Render/Amount.php +++ b/lib/internal/Magento/Framework/Pricing/Render/Amount.php @@ -152,6 +152,14 @@ class Amount extends Template implements AmountRenderInterface return $this->price; } + /** + * @return string + */ + public function getDisplayCurrencyCode() + { + return $this->priceCurrency->getCurrency()->getCurrencyCode(); + } + /** * @return bool */ diff --git a/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php b/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php index ce6ca6e6fcfc7dba93fcec185873639eb663591e..3bfaed7f6f8fc7d42a87ee189a031960c6fa7725 100644 --- a/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php +++ b/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php @@ -63,6 +63,11 @@ interface AmountRenderInterface */ public function getPrice(); + /** + * @return string + */ + public function getDisplayCurrencyCode(); + /** * @return string */ diff --git a/app/code/Magento/Webapi/Model/DataObjectProcessor.php b/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php similarity index 95% rename from app/code/Magento/Webapi/Model/DataObjectProcessor.php rename to lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php index 6189543202e30b8bc452f9f83fec14507bfde1cc..b50045e3020ec12d590ebd695041019d417164ed 100644 --- a/app/code/Magento/Webapi/Model/DataObjectProcessor.php +++ b/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php @@ -22,16 +22,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Webapi\Model; +namespace Magento\Framework\Reflection; use Zend\Code\Reflection\ClassReflection; use Zend\Code\Reflection\MethodReflection; -use Magento\Framework\Service\SimpleDataObjectConverter; -use Magento\Framework\Service\Data\AttributeValue; +use Magento\Framework\Api\SimpleDataObjectConverter; +use Magento\Framework\Api\AttributeValue; use Magento\Framework\Model\AbstractExtensibleModel; use Magento\Framework\ObjectManager; -use Magento\Webapi\Model\Config\ClassReflector\TypeProcessor; -use Magento\Webapi\Model\Cache\Type as WebapiCache; /** * Data object processor for de-serialization using class reflection @@ -45,7 +43,7 @@ class DataObjectProcessor const BASE_MODEL_CLASS = 'Magento\Framework\Model\AbstractExtensibleModel'; /** - * @var WebapiCache + * @var \Magento\Framework\Cache\FrontendInterface */ protected $cache; @@ -67,10 +65,10 @@ class DataObjectProcessor /** * Initialize dependencies. * - * @param WebapiCache $cache + * @param \Magento\Framework\Cache\FrontendInterface $cache * @param TypeProcessor $typeProcessor */ - public function __construct(WebapiCache $cache, TypeProcessor $typeProcessor) + public function __construct(\Magento\Framework\Cache\FrontendInterface $cache, TypeProcessor $typeProcessor) { $this->cache = $cache; $this->typeProcessor = $typeProcessor; @@ -194,7 +192,7 @@ class DataObjectProcessor /** * Convert array of custom_attributes to use flat array structure * - * @param \Magento\Framework\Api\Data\AttributeInterface[] $customAttributes + * @param \Magento\Framework\Api\AttributeInterface[] $customAttributes * @return array */ protected function convertCustomAttributes($customAttributes) @@ -209,7 +207,7 @@ class DataObjectProcessor /** * Convert custom_attribute object to use flat array structure * - * @param \Magento\Framework\Api\Data\AttributeInterface $customAttribute + * @param \Magento\Framework\Api\AttributeInterface $customAttribute * @return array */ protected function convertCustomAttribute($customAttribute) diff --git a/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php b/lib/internal/Magento/Framework/Reflection/TypeProcessor.php similarity index 95% rename from app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php rename to lib/internal/Magento/Framework/Reflection/TypeProcessor.php index ea2581b3629cb175ceb05c2641b5a22449eb83b9..6c52d8107a1a928c76a7cecdc47159c9597b6913 100644 --- a/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php +++ b/lib/internal/Magento/Framework/Reflection/TypeProcessor.php @@ -21,10 +21,10 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Webapi\Model\Config\ClassReflector; +namespace Magento\Framework\Reflection; use Zend\Code\Reflection\ClassReflection; -use Magento\Webapi\Exception as WebapiException; +use Magento\Framework\Exception\SerializationException; /** * Type processor of config reader properties @@ -442,29 +442,37 @@ class TypeProcessor * @param int|string|float|int[]|string[]|float[] $value * @param string $type Convert given value to the this simple type * @return int|string|float|int[]|string[]|float[] Return the value which is converted to type - * @throws \Magento\Webapi\Exception + * @throws SerializationException * * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function processSimpleAndAnyType($value, $type) { - $invalidTypeMsg = 'Invalid type for value :"%s". Expected Type: "%s".'; $isArrayType = $this->isArrayType($type); if ($isArrayType && is_array($value)) { $arrayItemType = $this->getArrayItemType($type); foreach (array_keys($value) as $key) { if ($value !== null && !settype($value[$key], $arrayItemType)) { - throw new WebapiException(sprintf($invalidTypeMsg, $value, $type)); + throw new SerializationException( + SerializationException::TYPE_MISMATCH, + ['value' => $value, 'type' => $type] + ); } } } elseif ($isArrayType && is_null($value)) { return null; } elseif (!$isArrayType && !is_array($value)) { if ($value !== null && $type !== self::ANY_TYPE && !settype($value, $type)) { - throw new WebapiException(sprintf($invalidTypeMsg, $value, $type)); + throw new SerializationException( + SerializationException::TYPE_MISMATCH, + ['value' => (string)$value, 'type' => $type] + ); } } else { - throw new WebapiException(sprintf($invalidTypeMsg, (string)$value, $type)); + throw new SerializationException( + SerializationException::TYPE_MISMATCH, + ['value' => (string)$value, 'type' => $type] + ); } return $value; } diff --git a/lib/internal/Magento/Framework/Serialization/DataBuilderFactory.php b/lib/internal/Magento/Framework/Serialization/DataBuilderFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..c996d3a8b649d09eca8dcc6897e1618b35695025 --- /dev/null +++ b/lib/internal/Magento/Framework/Serialization/DataBuilderFactory.php @@ -0,0 +1,65 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Framework\Serialization; + +use Magento\Framework\ObjectManager; + +/** + * Factory used to construct Data Builder based on interface name + */ +class DataBuilderFactory +{ + /** + * @var ObjectManager + */ + protected $objectManager; + + /** + * @param ObjectManager $objectManager + */ + public function __construct(ObjectManager $objectManager) + { + $this->objectManager = $objectManager; + } + + /** + * Returns a builder for a given class name. + * + * @param string $className + * @return \Magento\Framework\Api\ExtensibleDataBuilderInterface Builder Instance + */ + public function getDataBuilder($className) + { + $interfaceSuffix = 'Interface'; + if (substr($className, -strlen($interfaceSuffix)) === $interfaceSuffix) { + /** If class name ends with Interface, replace it with Data suffix */ + $builderClassName = substr($className, 0, -strlen($interfaceSuffix)) . 'Data'; + } else { + $builderClassName = $className; + } + $builderClassName .= 'Builder'; + return $this->objectManager->create($builderClassName); + } +} diff --git a/lib/internal/Magento/Framework/Service/Code/Generator/DataBuilder.php b/lib/internal/Magento/Framework/Service/Code/Generator/DataBuilder.php deleted file mode 100644 index 95fa50a573a92d562be037131b73f0d81c0c6318..0000000000000000000000000000000000000000 --- a/lib/internal/Magento/Framework/Service/Code/Generator/DataBuilder.php +++ /dev/null @@ -1,193 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Framework\Service\Code\Generator; - -use Magento\Framework\Code\Generator\EntityAbstract; -use Zend\Code\Reflection\ClassReflection; - -/** - * Class Builder - */ -class DataBuilder extends EntityAbstract -{ - /** - * Entity type - */ - const ENTITY_TYPE = 'dataBuilder'; - - /** - * Data Model property name - */ - const DATA_PROPERTY_NAME = 'data'; - - /** - * Retrieve class properties - * - * @return array - */ - protected function _getClassProperties() - { - return []; - } - - /** - * Get default constructor definition for generated class - * - * @return array - */ - protected function _getDefaultConstructorDefinition() - { - $constructorDefinition = [ - 'name' => '__construct', - 'parameters' => [ - ['name' => 'objectManager', 'type' => '\Magento\Framework\ObjectManager'] - ], - 'docblock' => [ - 'shortDescription' => 'Initialize the builder', - 'tags' => [['name' => 'param', 'description' => '\Magento\Framework\ObjectManager $objectManager']] - ], - 'body' => "parent::__construct(\$objectManager, " - . "'" . $this->_getSourceClassName() . "Interface');" - ]; - - return $constructorDefinition; - } - - /** - * Return a list of methods for class generator - * - * @return array - */ - protected function _getClassMethods() - { - $methods = []; - $className = $this->_getSourceClassName(); - $reflectionClass = new \ReflectionClass($className); - $lowerCaseClassName = strtolower($className); - $publicMethods = $reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC); - foreach ($publicMethods as $method) { - //since methods are sorted - lowest inheritance first, no need to loop through everything - if ($lowerCaseClassName !== strtolower($method->class)) { - break; - } - if ($this->canUseMethodForGeneration($method)) { - $methods[] = $this->_getMethodInfo($method); - } - } - $methods[] = $this->_getDefaultConstructorDefinition(); - return $methods; - } - - /** - * Check if the specified method should be used during generation builder generation. - * - * @param \ReflectionMethod $method - * @return bool - */ - protected function canUseMethodForGeneration($method) - { - $isGetter = (substr($method->getName(), 0, 3) == 'get'); - $isSuitableMethodType = !($method->isConstructor() || $method->isFinal() - || $method->isStatic() || $method->isDestructor()); - $isExcludedFromGeneration = in_array($method->getName(), array('__sleep', '__wakeup', '__clone')); - $isSuitableClass = $method->class !== 'Magento\Framework\Api\Data\ExtensibleDataInterface'; - return $isGetter && $isSuitableMethodType && !$isExcludedFromGeneration && $isSuitableClass; - } - - /** - * Retrieve method info - * - * @param \ReflectionMethod $method - * @return array - */ - protected function _getMethodInfo(\ReflectionMethod $method) - { - $propertyName = substr($method->getName(), 3); - - $returnType = (new ClassReflection($this->_getSourceClassName() . 'Interface')) - ->getMethod($method->getName()) - ->getDocBlock() - ->getTag('return') - ->getType(); - - $methodInfo = [ - 'name' => 'set' . $propertyName, - 'parameters' => [ - ['name' => lcfirst($propertyName)] - ], - 'body' => "\$this->" . self::DATA_PROPERTY_NAME . "['" - . strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $propertyName)) - . "'] = \$" . lcfirst($propertyName) . ";" . PHP_EOL . "return \$this;", - 'docblock' => array('shortDescription' => '@param ' . $returnType . " \$" . lcfirst($propertyName)) - ]; - - return $methodInfo; - } - - /** - * Validate data - * - * @return bool - */ - protected function _validateData() - { - $result = parent::_validateData(); - - if ($result) { - $sourceClassName = $this->_getSourceClassName(); - $resultClassName = $this->_getResultClassName(); - - if ($resultClassName !== $sourceClassName . ucfirst(self::ENTITY_TYPE)) { - $this->_addError( - 'Invalid Builder class name [' . $resultClassName . ']. Use ' - . $sourceClassName - . ucfirst(self::ENTITY_TYPE) - ); - $result = false; - } - } - return $result; - } - - /** - * Generate code - * - * @return string - */ - protected function _generateCode() - { - $this->_classGenerator->setName( - $this->_getResultClassName() - )->addProperties( - $this->_getClassProperties() - )->addMethods( - $this->_getClassMethods() - )->setClassDocBlock( - $this->_getClassDocBlock() - )->setExtendedClass('\Magento\Framework\Service\Data\ExtensibleDataBuilder'); - - return $this->_getGeneratedCode(); - } -} diff --git a/lib/internal/Magento/Framework/Service/Data/ExtensibleDataBuilder.php b/lib/internal/Magento/Framework/Service/Data/ExtensibleDataBuilder.php deleted file mode 100644 index b5f3228f7ba3cb6942254f65d597379eb9bfff08..0000000000000000000000000000000000000000 --- a/lib/internal/Magento/Framework/Service/Data/ExtensibleDataBuilder.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Framework\Service\Data; - -use Magento\Framework\Api\Data\ExtensibleDataBuilderInterface; -use Magento\Framework\Model\AbstractExtensibleModel; -use Magento\Framework\ObjectManager; - -/** - * Implementation for \Magento\Framework\Api\Data\ExtensibleDataBuilderInterface. - */ -class ExtensibleDataBuilder implements ExtensibleDataBuilderInterface -{ - /** - * @var string - */ - protected $modelClassInterface; - - /** - * @var array - */ - protected $data; - - /** - * @var ObjectManager - */ - protected $objectManager; - - /** - * Initialize the builder - * - * @param ObjectManager $objectManager - * @param string $modelClassInterface - */ - public function __construct(ObjectManager $objectManager, $modelClassInterface) - { - $this->objectManager = $objectManager; - $this->modelClassInterface = $modelClassInterface; - } - - /** - * {@inheritdoc} - */ - public function setCustomAttribute(\Magento\Framework\Api\Data\AttributeInterface $attribute) - { - // Store as an associative array for easier lookup and processing - $this->data[AbstractExtensibleModel::CUSTOM_ATTRIBUTES_KEY][$attribute->getAttributeCode()] - = $attribute; - return $this; - } - - /** - * {@inheritdoc} - */ - public function setCustomAttributes(array $attributes) - { - foreach ($attributes as $attribute) { - $this->setCustomAttribute($attribute); - } - return $this; - } - - /** - * {@inheritdoc} - */ - public function create() - { - return $this->objectManager->create( - $this->modelClassInterface, - ['data' => $this->data] - ); - } -} diff --git a/lib/internal/Magento/Framework/Shell.php b/lib/internal/Magento/Framework/Shell.php index 9aa386094d12ac6c000b5cb2374e59d0510761e9..f595efc91b843c0af8f92448ec3554c487717e7a 100644 --- a/lib/internal/Magento/Framework/Shell.php +++ b/lib/internal/Magento/Framework/Shell.php @@ -78,7 +78,7 @@ class Shell implements ShellInterface $this->log($output); if ($exitCode) { $commandError = new \Exception($output, $exitCode); - throw new Exception("Command `{$command}` returned non-zero exit code.", 0, $commandError); + throw new Exception("Command returned non-zero exit code:\n`{$command}`", 0, $commandError); } return $output; } diff --git a/lib/internal/Magento/Framework/Shell/ComplexParameter.php b/lib/internal/Magento/Framework/Shell/ComplexParameter.php new file mode 100644 index 0000000000000000000000000000000000000000..8b7de43900f003f94321f22b36490cb5eca4eb2a --- /dev/null +++ b/lib/internal/Magento/Framework/Shell/ComplexParameter.php @@ -0,0 +1,113 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Framework\Shell; + +/** + * A parser for complex parameters in command-line arguments + * + * Transforms parameter formatted as a URL query string into an array + */ +class ComplexParameter +{ + /** + * Default regex pattern for searching the parameter + */ + const DEFAULT_PATTERN = '/^\-\-%s=(.+)$/'; + + /** + * Argument name + * + * @var string + */ + private $name; + + /** + * Regex pattern for searching the parameter among arguments + * + * @var string + */ + private $pcre; + + /** + * Constructor + * + * @param string $name + * @param string $pattern + */ + public function __construct($name, $pattern = self::DEFAULT_PATTERN) + { + $this->name = $name; + $this->pcre = sprintf($pattern, preg_quote($name, '/')); + } + + /** + * Searches and parses the value from an array of arguments + * + * @param string[] $input + * @return array + */ + public function getFromArray($input) + { + foreach ($input as $row) { + $result = $this->getFromString($row); + if ($result) { + return $result; + } + } + return []; + } + + /** + * Parses the value from a specified argument string + * + * @param string $string + * @return array + */ + public function getFromString($string) + { + if (preg_match($this->pcre, $string, $matches)) { + parse_str($matches[1], $result); + return $result; + } + return []; + } + + /** + * Searches the value parameter in an "argv" array and merges it recursively into specified array + * + * @param array $server + * @param array $into + * @return array + */ + public function mergeFromArgv($server, array $into = []) + { + $result = $into; + if (isset($server['argv'])) { + $value = $this->getFromArray($server['argv']); + $result = array_replace_recursive($into, $value); + } + return $result; + } +} diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 1eb8915cdd2663aa632dc9628e8bfac5abb0f59e..689727d2ba0889311c51f01e3cd0c9ec3c7066ff 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -833,9 +833,9 @@ abstract class AbstractBlock extends \Magento\Framework\Object implements BlockI $namespace = substr( $className, 0, - strpos($className, \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR . 'Block') + strpos($className, '\\' . 'Block') ); - return str_replace(\Magento\Framework\Autoload\IncludePath::NS_SEPARATOR, '_', $namespace); + return str_replace('\\', '_', $namespace); } /** diff --git a/lib/internal/Magento/Framework/View/Result/Page.php b/lib/internal/Magento/Framework/View/Result/Page.php index 341a72be0d00331975722c3a22c763033201606e..5dbfd087d86d987f1fe776bfbea40ce3e80e38e2 100644 --- a/lib/internal/Magento/Framework/View/Result/Page.php +++ b/lib/internal/Magento/Framework/View/Result/Page.php @@ -207,12 +207,13 @@ class Page extends Layout $this->pageConfig->publicBuild(); if ($this->getPageLayout()) { $config = $this->getConfig(); - $this->addDefaultBodyClasses(); + $addBlock = $this->getLayout()->getBlock('head.additional'); // todo $requireJs = $this->getLayout()->getBlock('require.js'); $this->assign([ 'requireJs' => $requireJs ? $requireJs->toHtml() : null, 'headContent' => $this->pageConfigRenderer->renderHeadContent(), + 'headAdditional' => $addBlock ? $addBlock->toHtml() : null, 'htmlAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_HTML), 'headAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_HEAD), 'bodyAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_BODY) diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json index 8b7397ef53911c815710b2a0214265e93ee6ff87..41d9cff4101dfc8b3e0e9d3c349c2131438c0a92 100644 --- a/lib/internal/Magento/Framework/composer.json +++ b/lib/internal/Magento/Framework/composer.json @@ -2,7 +2,7 @@ "name": "magento/framework", "description": "N/A", "type": "magento2-library", - "version": "0.1.0-alpha102", + "version": "0.1.0-alpha103", "require": { "php": "~5.4.11|~5.5.0", "ext-spl": "*", diff --git a/lib/web/css/docs/forms.html b/lib/web/css/docs/forms.html index 8314cec9051afcac5d132f148e15d3e3a7f531cd..805948386e3967d0587dc10002705a547b835399 100644 --- a/lib/web/css/docs/forms.html +++ b/lib/web/css/docs/forms.html @@ -1,192 +1,192 @@ -<!DOCTYPE html><html><head><title>forms | Magento UI library -</title><meta charset="utf-8"><style>*{-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}body{padding:60px 0 40px;background-color:hsl(207,10%,90%);color:hsl(207,5%,30%)}.container{max-width:1300px;margin:0 auto;padding:0 20px}.section{position:relative;margin-bottom:20px}.docs{position:relative;z-index:2;width:68%;min-height:200px;background-color:hsl(207,0%,100%);background-clip:padding-box;border:1px solid hsla(207,5%,5%,.1);border-radius:5px;box-shadow:0 0 3px hsla(207,5%,5%,.1)}.code{position:absolute;top:5px;bottom:5px;right:0;z-index:1;width:33%;padding:10px 10px 10px 20px;border-radius:0 5px 5px 0;border:1px solid hsla(207,20%,10%,.1);background-color:hsla(207,20%,95%,.9);background-clip:padding-box;opacity:.5;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s}.code:hover{opacity:1}.preview{background:hsl(207,0%,100%);border-top:1px solid hsl(207,30%,95%);position:relative;z-index:1}.preview-code+.preview{margin-top:0;border-top:0}.preview iframe{display:block;width:100%;height:100%;overflow:hidden}.preview-code{position:relative;z-index:2;display:block;width:100%;color:hsl(207,9%,37%);max-height:200px;padding:10px 20px;overflow-y:auto;background:hsl(207,30%,95%);border:1px solid hsl(207,30%,85%);border-left:0;border-right;box-shadow:inset 0 1px 2px hsla(207,30%,10%,.1);line-height:1.1!important;resize:none}.preview-code:focus{outline:0;background:hsl(207,30%,97%);box-shadow:inset 0 1px 2px hsla(207,30%,10%,.1),0 0 5px hsla(207,75%,75%,.9)}.preview-code:last-child{border-bottom:0;border-radius:0 0 5px 5px}.resizeable{padding:15px;overflow:auto;background:hsl(207,0%,100%);box-shadow:0 0 2px hsla(207,10%,20%,.2);resize:both}.preview-code,pre{white-space:pre-wrap;word-wrap:break-word;overflow-y:auto}.code pre{height:100%;margin-top:0}.bar{position:fixed;left:0;right:0;z-index:1010;min-height:40px;line-height:40px;background-image:-webkit-linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92));background-image:-moz-linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92));background-image:-o-linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92));background-image:linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92))}.bar.top{top:0;box-shadow:0 1px 2px hsla(207,5%,0%,.2)}.bar.bottom{bottom:0;box-shadow:0 -1px 2px hsla(207,5%,0%,.2)}.bar ul{margin:0!important}.bar li{display:block;list-style:none}.bar .icon path{fill:hsla(27,10%,75%,.75)}.docs .icon path{fill:hsla(207,10%,75%,.5)}.docs .permalink:hover .icon path{fill:hsl(207,10%,75%)}.bar button{color:hsla(27,10%,75%,.75)}.bar button:hover .icon path,.bar button.is-active .icon path{fill:hsl(27,10%,85%)}.bar button:hover,.bar button.is-active{color:hsl(27,10%,85%)}.bar .icon{vertical-align:middle;display:inline-block}.bar,.bar a,.bar a:visited{color:hsl(27,10%,85%);text-shadow:1px 1px 0 hsla(27,5%,0%,.5)}.bar a:hover,.bar a.is-active{color:hsl(27,10%,95%);text-shadow:1px 1px 0 hsla(27,5%,0%,1);text-decoration:none}.brand{float:left;margin-right:20px;font-weight:700;font-size:16px;text-decoration:none}.brand,a.brand,a.brand:visited{color:hsl(27,5%,5%);text-shadow:1px 1px 0 hsla(27,5%,100%,.2)}.brand:hover,a.brand:hover{color:hsl(27,5%,0%);text-shadow:1px 1px 0 hsla(27,5%,100%,.3);text-decoration:none}.menu{font-size:12px}.menu>li{float:left;position:relative}.menu a{display:block;margin-right:15px}.dropdown-toggle{position:relative;padding-right:15px}.dropdown-toggle:after{display:block;position:absolute;right:0;top:18px;content:'';border:4px solid;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent}.nav-results,.dropdown{position:absolute;z-index:1020;top:32px;left:-16px;width:175px;max-height:500px;padding:10px 0;overflow-y:auto;word-wrap:break-word;font-size:11px;line-height:20px;background-color:hsla(207,10%,25%,.97);border:1px solid hsla(207,5%,70%,.3);border-radius:3px;box-shadow:0 0 3px hsla(207,5%,0%,.2)}.toc-list{width:200px}.nav-results{right:0;width:200px;left:auto;padding:5px 0}.nav-results-filename{display:block;font-size:10px;opacity:.75}.nav-results a{display:block;line-height:15px;padding:5px 10px}.nav-results li:not([hidden])~li a{border-top:1px solid hsla(27,10%,90%,.1)}.dropdown a{padding:0 15px}.dropdown li:hover{background-color:hsl(207,10%,22%)}.nav{float:right;position:relative}.nav input[type="search"]{padding:2px 4px;color:#fff;width:150px;border:1px solid hsla(207,5%,0%,.3);background:hsla(207,12%,40%,.9);box-shadow:inset 1px 1px 3px hsla(207,5%,0%,.05),1px 1px 0 hsla(207,5%,100%,.05);border-radius:10px;-webkit-appearance:textfield}.nav input[type="search"]:focus{outline:0;background:hsla(207,7%,45%,.9)}.settings{text-align:center}.bar button{display:inline-block;vertical-align:middle;padding:0 5px;margin:0 3px;background:transparent}.bar button:first-child{margin-left:0}.settings .auto{line-height:32px;font-size:11px;font-weight:700;letter-spacing:-1px;text-shadow:none;text-transform:uppercase}body{font-family:sans-serif;font-size:14px;line-height:1.618}.docs pre,p,ol,ul,dl,figure,blockquote,table{margin-left:20px;margin-right:20px}.preview,.docs pre,p,ol,ul,dl,figure,blockquote,table{margin-top:10px}ul ul,ol ol,ul ol,ol ul,blockquote p:last-child{margin-top:0}ul,ol{padding-left:1.5em}p:last-child,ol:last-child,ul:last-child,dl:last-child{margin-bottom:20px}hr,h1,h2,h3,h4,h5,h6{margin:1em 20px .5em}h1:first-of-type{margin-top:20px}h1,h2,h3,h4,h5,h6{line-height:1.2;color:hsl(207,10%,50%)}h1 a,h1 a:hover,h1 a:visited{color:inherit;text-decoration:inherit}h1{font-size:3.052em;font-weight:400;color:hsl(207,10%,45%)}h2{font-size:1.953em}h3{font-size:1.536em}h1,h2,h3{letter-spacing:-.025em}h4{font-size:1.25em}h5{font-size:1em;text-transform:uppercase}h6{font-size:1em}.permalink{position:absolute;top:15px;right:15px}a{color:hsl(207,90%,50%);text-decoration:none}a:hover{color:hsl(207,95%,40%);text-decoration:underline}a:visited{color:hsl(207,100%,35%)}.preview-code,pre,code,var{font-style:normal;font-family:"Ubuntu Mono","Andale Mono","DejaVu Sans Mono","Monaco","Bitstream Vera Sans Mono","Consolas","Lucida Console",monospace;font-size:12px}.docs pre,code,var{padding:.1em 3px;background:hsla(207,5%,0%,.025);border:1px solid hsla(207,5%,0%,.05);border-radius:3px}.code pre{line-height:1.1!important}pre code{padding:0;background:transparent;border:0}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}[unselectable="on"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[hidden]{display:none!important}small{font-size:85%;opacity:.9}.docs .vars_list{width:100%}.docs .vars_list th,.docs .vars_list td{width:33%}.docs pre th{text-align:left}.docs pre table{border-collapse:collapse;margin:0}.docs th,.docs td{border:0;padding:9px 10px 9px 0;vertical-align:top}.docs tr th:last-child,.docs tr td:last-child{padding-right:0}.docs pre th{font-weight:400}.docs pre th.vars_head{border-bottom:1px solid #e5e5e5;color:#707070;white-space:nowrap}.docs pre th.vars_section{border-bottom:1px solid #e5e5e5;color:#333;font-size:18px;padding-top:30px}.vars_value{color:#338bb8}.docs li p{margin:0 0 20px}.dropdown a{text-transform:capitalize}#default-button #default-button-big+.preview+.preview-code{display:block}#actions-toolbar-alignment .preview-code,#reverse-primary-and-secondary-blocks .preview-code,#actions-toolbar-indents-customizations .preview-code,#actionstoolbarclearfloats-mixin .preview-code,#responsive-actions-toolbar .preview-code,#button-with-gradient-background .preview-code,#primary-button .preview-code,#button-as-an-icon .preview-code,#button-with-an-icon-on-the-left-or-right-side-of-the-text .preview-code,#button-with-fixed-width .preview-code,#button-as-a-link .preview-code,#link-as-a-button .preview-code,#buttonstyled-breadcrumbs-with-gradient-background-border-and-no-separating-symbol .preview-code,#breadcrumbs-with-solid-background .preview-code,#pagination-without-label-with-solid-background .preview-code,#pagination-with-label-and-text-previousnext-links .preview-code,#pagination-with-label-and-gradient-background-on-links .preview-code,#fixed-height-popup .preview-code,#fixed-content-height-popup .preview-code,#margins-for-header-content-and-footer-block-in-popup .preview-code,#popup-titles-with-styled-as-theme-headings .preview-code,#popup-action-toolbar .preview-code,#popup-close-button-without-an-icon .preview-code,#modify-icon-of-popup-close-button .preview-code,#modify-overlay-styles .preview-code,#rating-summary-multiple-ratings .preview-code,#rating-summary-hide-label .preview-code,#rating-summary-icons-symbol .preview-code,#rating-summary-icons-color .preview-code,#rating-summary-set-number-of-icons .preview-code,#rating-summary .preview-code,#rating-with-vote-icon-symbol .preview-code,#rating-with-vote-setup-icons-colors .preview-code,#rating-with-vote-setup-number-of-icons .preview-code,#tabs-with-content-top-border .preview-code,#accordion-mixin-variables .preview-code,#tabs-base .preview-code,#accordion-base .preview-code,#warning-message .preview-code,#error-message .preview-code,#success-message .preview-code,#notice-message .preview-code,#message-with-inner-icon .preview-code,#message-with-lateral-icon .preview-code,#custom-message-style .preview-code,#modify-dropdown-list-styles .preview-code,#dropdown-with-icon-customization .preview-code,#split-button-button-styling .preview-code,#split-button-icon-customization .preview-code,#split-button-dropdown-list-customization .preview-code,#table-cells-resize .preview-code,#table-caption .preview-code,#table-typography .preview-code,#table-background-customization .preview-code,#table-borders-customization .preview-code,#table-without-borders .preview-code,#table-with-horizontal-borders .preview-code,#table-with-vertical-borders .preview-code,#striped-table .preview-code,#responsive-table-technics-1 .preview-code,#responsive-table-technics-2 .preview-code,#fontsize-mixin .preview-code,#word-breaking-mixin .preview-code,#word-breaking-mixin .preview-code,#text-overflow-mixin .preview-code,#text-hide .preview-code,#hyphens .preview-code,#font-style-and-color .preview-code,#reset-list-styles .preview-code,#inlineblock-list-item-styling .preview-code,#link-styling-mixin .preview-code,#heading-styling-mixin .preview-code,#icon-with-image-or-sprite .preview-code,#change-the-size-of-font-icon .preview-code,#sprite-and-font-icons-for-blank-theme .preview-code,#icon-position-for-an-icon-with-image-or-sprite .preview-code{display:none}article[id$="-variables"] .docs,#resets .docs,#ratings .docs,#tabs-and-accordions .docs,#messages .docs,#dropdown-and-split-buttons-mixins .docs,#font-face-mixin .docs,#layout .docs,#forms-mixins .docs,#including-magento-ui-library-to-your-theme .docs,#global-forms-elements-customization .docs,#page-layouts .docs,#layout-column .docs,#layout-width .docs,#mobile-off-canvas-navigation .docs,#desktop-navigation .docs{width:100%}article[id$="-variables"] .code{display:none}article[id$="-variables"] .docs pre{background:#fff;border:0;margin-top:0}</style><script type="text/preview">(function(){"use strict";var a=function(a){return Array.prototype.slice.call(a)},b=document.getElementsByTagName("body")[0],c=["link","visited","hover","active","focus","target","enabled","disabled","checked"],d=new RegExp(":(("+c.join(")|(")+"))","gi"),e=a(document.styleSheets).map(function(b){return a(b.cssRules).filter(function(a){return a.selectorText&&a.selectorText.match(d)}).map(function(a){return a.cssText.replace(d,".\\3A $1")}).join("")}).join("");if(e.length){var f=document.createElement("style");f.innerText=e;var g=document.getElementsByTagName("style")[0];g.parentNode.insertBefore(f,g)}var h=function(){var a=window.getComputedStyle(b,null);return function(){if(b.childElementCount===0)return b.offsetHeight;var c=b.getElementsByTagName("*"),d=[];for(var e=0,f=c.length;e<f;e++)d.push(c[e].offsetTop+c[e].offsetHeight+parseInt(window.getComputedStyle(c[e],null).getPropertyValue("margin-bottom")));var g=Math.max.apply(Math,d);return g+=parseInt(a.getPropertyValue("padding-bottom"),10),Math.max(g,b.offsetHeight)}}(),i={getHeight:function(){window.parent.postMessage({height:h()},"*")}};window.addEventListener("message",function(a){if(a.data==null)return;typeof a.data=="string"&&i[a.data]()},!1)})(),function(){var a=["../../jquery/jquery.js","../../mage/terms.js","../../mage/dropdowns.js","../../jquery/jquery.popups.js","../../js/mui.js"];for(var b=0,c=a.length;b<c;b++){var d=document.createElement("script");d.type="text/javascript",d.async=!1,d.src=a[b];var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(d,e)}}()</script><style type="text/preview">body{margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}p{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}abbr[title]{cursor:help;border-bottom:1px dotted #d1d1d1}b,strong{font-weight:700}em,i{font-style:italic}mark{background-color:#f0f0f0;color:#000}small,.small{font-size:12px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #d1d1d1}sub,sup{font-size:71.42857143000001%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dfn{font-style:italic}h1{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}h3{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}h4{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h5{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h6{font-size:10px;font-size:1rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-size:71.42857143000001%;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1}a,.alink{color:#1979c3;text-decoration:none}a:visited,.alink:visited{color:#800080;text-decoration:none}a:hover,.alink:hover{color:#006bb4;text-decoration:underline}a:active,.alink:active{color:#ff5501;text-decoration:underline}a:focus,.alink:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}ul,ol{margin-top:0;margin-top:0rem;margin-bottom:25px;margin-bottom:2.5rem}ul>li,ol>li{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}dl{margin-top:0;margin-bottom:20px}dt{font-weight:700;margin-top:0;margin-bottom:5px}dd{margin-top:0;margin-bottom:10px}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,'Courier New',monospace}code{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0;white-space:nowrap}kbd{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0}pre{background-color:#f0f0f0;border:1px solid #d1d1d1;color:#111;display:block;font-size:12px;font-size:1.2rem;margin:0 0 10px;line-height:1.42857143;padding:10px;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}blockquote{padding:0;margin:0 0 20px 40px;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:italic;line-height:1.42857143;border-left:0 solid #d1d1d1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{color:#333;display:block;font-size:10px;font-size:1rem;line-height:1.42857143}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote cite{font-style:normal}blockquote:before,blockquote:after{content:""}q{quotes:none}q:before,q:after{content:'';content:none}cite{font-style:normal}table{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}table th{text-align:left}table>tbody>tr>th,table>tfoot>tr>th,table>tbody>tr>td,table>tfoot>tr>td{vertical-align:top}table>thead>tr>th,table>thead>tr>td{vertical-align:bottom}table>thead>tr>th,table>tbody>tr>th,table>tfoot>tr>th,table>thead>tr>td,table>tbody>tr>td,table>tfoot>tr>td{padding:3px 10px}button,.cart.table.wrapper .cart.items .action{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle}button:focus,button:active,.cart.table.wrapper .cart.items .action:focus,.cart.table.wrapper .cart.items .action:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}button:hover,.cart.table.wrapper .cart.items .action:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}button.disabled,button[disabled],fieldset[disabled] button,.cart.table.wrapper .cart.items .action.disabled,.cart.table.wrapper .cart.items .action[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .action{cursor:default;pointer-events:none;opacity:.5}button::-moz-focus-inner,.cart.table.wrapper .cart.items .action::-moz-focus-inner{border:0;padding:0}input[type="text"],input[type="password"],input[type="url"],input[type="tel"],input[type="search"],input[type="number"],input[type="datetime"],input[type="email"]{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline}input[type="text"]:disabled,input[type="password"]:disabled,input[type="url"]:disabled,input[type="tel"]:disabled,input[type="search"]:disabled,input[type="number"]:disabled,input[type="datetime"]:disabled,input[type="email"]:disabled{opacity:.5}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type="search"]{-webkit-appearance:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{-webkit-appearance:none}select{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:5px 10px 4px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline}select:disabled{opacity:.5}select[multiple="multiple"]{height:auto}textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:auto;width:100%;padding:10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;resize:vertical}textarea:disabled{opacity:.5}input[type="checkbox"]{vertical-align:top;margin:2px 5px 0 0}input[type="checkbox"]:disabled{opacity:.5}input[type="radio"]{vertical-align:top;margin:2px 5px 0 0}input[type="radio"]:disabled{opacity:.5}input.mage-error,select.mage-error,textarea.mage-error{border-color:#ed8380}input+div.mage-error,select+div.mage-error,textarea+div.mage-error{font-size:12px;font-size:1.2rem;color:#e02b27;margin:3px 0 0}input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;*overflow:visible}input::-moz-focus-inner{border:0;padding:0}address{font-style:normal}@font-face{font-family:'icons-blank-theme';src:url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot');src:url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.svg#icons-blank-theme') format('svg');font-weight:400;font-style:normal}.truncated.full.value{display:none}.truncated.full.value.show{display:block}.layout-2-left.account .column.sidebar{width:22.3%}.layout-2-left.account .column.main{width:77.7%}.account .messages{margin-bottom:20px}.account .column.main h2{margin-top:0}.account .column.main .products.toolbar{background:transparent;margin-bottom:20px}.account .column.main .block:not(.widget) .title{margin-bottom:15px}.account .column.main .block:not(.widget) .title>strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.account .column.main .block:not(.widget) .title>.action{margin-left:15px}.account .column.main .block:not(.widget) .subtitle{display:inline-block;margin:5px 0 10px}.account .column.main .block:not(.widget) .subtitle>span{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.account .column.main .block:not(.widget) .subtitle>.action{font-weight:400;margin-left:15px}.account .column.main .block:not(.widget) .content:before,.account .column.main .block:not(.widget) .content:after{content:"";display:table}.account .column.main .block:not(.widget) .content:after{clear:both}.account .column.main .block:not(.widget) .content p:last-child{margin-bottom:0}.account .column.main .block:not(.widget) .content .box{margin-bottom:20px}.account .block.account.nav{background:#f5f5f5;padding:15px 0}.account .block.account.nav .title{padding:0 18px;margin-bottom:25px}.account .block.account.nav .title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.account .block.account.nav .nav.items{padding:0;margin:0}.account .block.account.nav .nav.items .nav.item{margin:2px 0 0;padding:0 18px 0 15px;line-height:30px;border-left:3px solid transparent}.account .block.account.nav .nav.items .nav.item:first-child{margin-top:0}.account .block.account.nav .nav.items .nav.item.current{border-color:#ff5501}.account .block.account.nav .nav.items .nav.item.current strong{font-weight:400}.account .wrapper.table{margin-bottom:20px}.account .wrapper.table:last-child{margin-bottom:0}.account .wrapper.table .data.table{border:0;margin-bottom:0}.account .wrapper.table .data.table>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.account .wrapper.table .data.table>thead>tr>th,.account .wrapper.table .data.table>tbody>tr>th,.account .wrapper.table .data.table>tfoot>tr>th,.account .wrapper.table .data.table>thead>tr>td,.account .wrapper.table .data.table>tbody>tr>td,.account .wrapper.table .data.table>tfoot>tr>td{border:0}.account .wrapper.table .data.table>thead>tr>th,.account .wrapper.table .data.table>thead>tr>td{border-bottom:1px solid #d1d1d1}.account .wrapper.table .data.table .col.actions .action{margin-right:15px}.account .wrapper.table .data.table .col.actions .action:last-child{margin-left:0}.page.main>.page.title{margin-bottom:40px}.page.main>.page.title .title{display:inline-block}.page.main>.page.title .title+.action{float:right;margin-top:33px}.block:last-child{margin:0}.block .title{margin-bottom:10px}.block .title strong{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.column.main .block .title strong{font-size:18px}.widget ol,.block ol,.widget ul,.block ul{margin:0;padding:0;list-style-type:none;list-style-image:none}.widget ol li,.block ol li,.widget ul li,.block ul li{margin-bottom:6px}.widget ol strong,.block ol strong,.widget ul strong,.block ul strong{font-weight:400}.block.compare .item{position:relative}.block.compare .item .product.name{margin-left:22px}.block.compare .item .action.delete{position:absolute;left:-6px;top:0}.block.reorder .item .checkbox{position:relative;top:2px;vertical-align:baseline}.block.wishlist .item.product{margin-bottom:14px}.block.wishlist .item.product>.product{position:relative}.block.wishlist .item.product>.product .product.photo{position:absolute;left:0;top:0}.block.wishlist .item.product>.product .product.details{margin:0 25px 0 64px}.block.wishlist .price-box{display:block;margin:7px 0}.block.wishlist .actions{margin:7px 0}.block.wishlist .actions .action.delete{position:absolute;right:0;top:0}.block.wishlist .actions a.action.tocart{display:inline-block;text-decoration:none}.block.wishlist .actions a.action.tocart:hover,.block.wishlist .actions a.action.tocart:active,.block.wishlist .actions a.action.tocart:focus{text-decoration:none}.block.wishlist .actions .action.tocart{width:112px;padding:0 7px}.block.wishlist .text,.block.compare .text{margin-right:8px}.block.wishlist .counter.qty,.block.compare .counter.qty{color:#999;font-size:12px;white-space:nowrap}.block.reorder .actions.toolbar,.block.compare .actions.toolbar{margin:17px 0;max-width:178px}.column.sidebar .block.reorder .subtitle,.column.sidebar .block.wishlist .subtitle{display:none}.product-list-item,.bundle.options.container .block.bundle.summary .bundle.items,.block.filter .items,.prices.tier.items,.cart .checkout.methods,.opc.wrapper>.opc,.order.details ul.items,.products.list.items{margin:0;padding:0;list-style-type:none;list-style-image:none}.product-list-item>li,.bundle.options.container .block.bundle.summary .bundle.items>li,.block.filter .items>li,.prices.tier.items>li,.cart .checkout.methods>li,.opc.wrapper>.opc>li,.order.details ul.items>li,.products.list.items>li{margin:0}.block.wishlist .actions .action.tocart,.product-list-item .action.tocart,.actions.toolbar .primary .action,.cart .action.primary,.opc.wrapper .action.continue,.opc.wrapper .action.primary.checkout,.minicart.wrapper .action.checkout,.products.list.items .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;border-radius:3px}.action-primary:focus,.action-primary:active,.block.wishlist .actions .action.tocart:focus,.block.wishlist .actions .action.tocart:active,.product-list-item .action.tocart:focus,.product-list-item .action.tocart:active,.actions.toolbar .primary .action:focus,.actions.toolbar .primary .action:active,.cart .action.primary:focus,.cart .action.primary:active,.opc.wrapper .action.continue:focus,.opc.wrapper .action.continue:active,.opc.wrapper .action.primary.checkout:focus,.opc.wrapper .action.primary.checkout:active,.minicart.wrapper .action.checkout:focus,.minicart.wrapper .action.checkout:active,.products.list.items .action.tocart:focus,.products.list.items .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.action-primary:hover,.block.wishlist .actions .action.tocart:hover,.product-list-item .action.tocart:hover,.actions.toolbar .primary .action:hover,.cart .action.primary:hover,.opc.wrapper .action.continue:hover,.opc.wrapper .action.primary.checkout:hover,.minicart.wrapper .action.checkout:hover,.products.list.items .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.action-primary.disabled,.action-primary[disabled],fieldset[disabled] .action-primary,.block.wishlist .actions .action.tocart.disabled,.block.wishlist .actions .action.tocart[disabled],fieldset[disabled] .block.wishlist .actions .action.tocart,.product-list-item .action.tocart.disabled,.product-list-item .action.tocart[disabled],fieldset[disabled] .product-list-item .action.tocart,.actions.toolbar .primary .action.disabled,.actions.toolbar .primary .action[disabled],fieldset[disabled] .actions.toolbar .primary .action,.cart .action.primary.disabled,.cart .action.primary[disabled],fieldset[disabled] .cart .action.primary,.opc.wrapper .action.continue.disabled,.opc.wrapper .action.continue[disabled],fieldset[disabled] .opc.wrapper .action.continue,.opc.wrapper .action.primary.checkout.disabled,.opc.wrapper .action.primary.checkout[disabled],fieldset[disabled] .opc.wrapper .action.primary.checkout,.minicart.wrapper .action.checkout.disabled,.minicart.wrapper .action.checkout[disabled],fieldset[disabled] .minicart.wrapper .action.checkout,.products.list.items .action.tocart.disabled,.products.list.items .action.tocart[disabled],fieldset[disabled] .products.list.items .action.tocart{cursor:default;pointer-events:none;opacity:.5}.product.info.main .action.tocompare,.product.info.main .action.towishlist{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;display:inline-block;text-decoration:none;border-radius:3px}.action-link-button:focus,.action-link-button:active,.product.info.main .action.tocompare:focus,.product.info.main .action.tocompare:active,.product.info.main .action.towishlist:focus,.product.info.main .action.towishlist:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.action-link-button:hover,.product.info.main .action.tocompare:hover,.product.info.main .action.towishlist:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.action-link-button.disabled,.action-link-button[disabled],fieldset[disabled] .action-link-button,.product.info.main .action.tocompare.disabled,.product.info.main .action.tocompare[disabled],fieldset[disabled] .product.info.main .action.tocompare,.product.info.main .action.towishlist.disabled,.product.info.main .action.towishlist[disabled],fieldset[disabled] .product.info.main .action.towishlist{cursor:default;pointer-events:none;opacity:.5}.action-link-button:hover,.action-link-button:active,.action-link-button:focus,.product.info.main .action.tocompare:hover,.product.info.main .action.tocompare:active,.product.info.main .action.tocompare:focus,.product.info.main .action.towishlist:hover,.product.info.main .action.towishlist:active,.product.info.main .action.towishlist:focus{text-decoration:none}.products.list.items .product.item{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative;vertical-align:top}.products.list.items .img.container{max-width:100%;margin-bottom:20px}.products.list.items .img.container>.image{max-width:100%;height:auto}.products.list.items .name{font-weight:400;display:block}.product-list-item .name>a,.products.list.items .name>a{color:#333;text-decoration:none}.product-list-item .name>a:visited,.products.list.items .name>a:visited{color:#333;text-decoration:none}.product-list-item .name>a:hover,.products.list.items .name>a:hover{color:#333;text-decoration:underline}.product-list-item .name>a:active,.products.list.items .name>a:active{color:#333;text-decoration:underline}.product-list-item .name>a:focus,.products.list.items .name>a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.products.list.items .price-box{margin-top:10px}.products.list.items .price-box .price{font-weight:700}.products.list.items .actions{text-align:left}.product-list-item .actions:before,.product-list-item .actions:after,.products.list.items .actions:before,.products.list.items .actions:after{content:"";display:table}.product-list-item .actions:after,.products.list.items .actions:after{clear:both}.product-list-item .actions .primary,.products.list.items .actions .primary{float:left}.product-list-item .actions .primary,.product-list-item .actions .secondary,.products.list.items .actions .primary,.products.list.items .actions .secondary{display:inline-block}.product-list-item .actions .primary .action,.product-list-item .actions .secondary .action,.products.list.items .actions .primary .action,.products.list.items .actions .secondary .action{margin:10px 0 0}.product-list-item .actions .primary a.action,.product-list-item .actions .secondary a.action,.products.list.items .actions .primary a.action,.products.list.items .actions .secondary a.action{display:inline-block}.product-list-item .actions .primary .action,.products.list.items .actions .primary .action{margin:10px 5px 0 0}.product-list-item .actions .secondary a.action,.products.list.items .actions .secondary a.action{margin-top:10px}.products.list.items .action.towishlist{display:inline-block;text-decoration:none}.product-list-item .action.towishlist>span,.products.list.items .action.towishlist>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product-list-item .action.towishlist:before,.products.list.items .action.towishlist:before{font-family:"icons-blank-theme";content:'\e601';font-size:28px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:baseline;text-align:center}.product-list-item .action.towishlist>span,.products.list.items .action.towishlist>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.list.items .action.tocompare{display:inline-block;text-decoration:none}.product-list-item .action.tocompare>span,.products.list.items .action.tocompare>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product-list-item .action.tocompare:before,.products.list.items .action.tocompare:before{font-family:"icons-blank-theme";content:'\e61f';font-size:28px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:baseline;text-align:center}.cart.table.wrapper .item.options dt:after,.opc.wrapper .data.table dt:after{content:':'}.cart.table.wrapper .item.options dt,.opc.wrapper .data.table dt{float:left;clear:left;margin:0 10px 5px 0}.cart.table.wrapper .item.options dd,.opc.wrapper .data.table dd{display:inline-block;margin:0 0 5px}.column.main .block.addbysku .fields .action.remove,.form.giftregistry.validation .fieldset.add-row .action.remove,.form.send.friend .action.delete{display:inline-block;text-decoration:none}.action-remove:before,.column.main .block.addbysku .fields .action.remove:before,.form.giftregistry.validation .fieldset.add-row .action.remove:before,.form.send.friend .action.delete:before{font-family:"icons-blank-theme";content:'\e616';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.account .column.main .block:not(.widget) .content .box,.opc.wrapper .step.login.wrapper .block,.login.container .block,.block.addresses.list ol.items.addresses li.item,.order.details .block{width:48.8%}.account .column.main .block:not(.widget) .content .box:nth-child(odd),.opc.wrapper .step.login.wrapper .block:nth-child(odd),.login.container .block:nth-child(odd),.block.addresses.list ol.items.addresses li.item:nth-child(odd),.order.details .block:nth-child(odd){float:left;clear:left}.account .column.main .block:not(.widget) .content .box:nth-child(even),.opc.wrapper .step.login.wrapper .block:nth-child(even),.login.container .block:nth-child(even),.block.addresses.list ol.items.addresses li.item:nth-child(even),.order.details .block:nth-child(even){float:right}.opc.wrapper .step.login.wrapper .block>.title{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid #e8e8e8}.opc.wrapper .step.login.wrapper .block>.title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.dropdown.giftregisty,.dropdown.wishlist{line-height:normal;display:inline-block;position:relative}.dropdown-simple:before,.dropdown-simple:after,.dropdown.giftregisty:before,.dropdown.giftregisty:after,.dropdown.wishlist:before,.dropdown.wishlist:after{content:"";display:table}.dropdown-simple:after,.dropdown.giftregisty:after,.dropdown.wishlist:after{clear:both}.dropdown-simple .action.toggle,.dropdown.giftregisty .action.toggle,.dropdown.wishlist .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.dropdown-simple .action.toggle:after,.dropdown.giftregisty .action.toggle:after,.dropdown.wishlist .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.dropdown-simple .action.toggle:hover:after,.dropdown.giftregisty .action.toggle:hover:after,.dropdown.wishlist .action.toggle:hover:after{color:inherit}.dropdown-simple .action.toggle:active:after,.dropdown.giftregisty .action.toggle:active:after,.dropdown.wishlist .action.toggle:active:after{color:inherit}.dropdown-simple .action.toggle.active,.dropdown.giftregisty .action.toggle.active,.dropdown.wishlist .action.toggle.active{display:inline-block;text-decoration:none}.dropdown-simple .action.toggle.active:after,.dropdown.giftregisty .action.toggle.active:after,.dropdown.wishlist .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.dropdown-simple .action.toggle.active:hover:after,.dropdown.giftregisty .action.toggle.active:hover:after,.dropdown.wishlist .action.toggle.active:hover:after{color:inherit}.dropdown-simple .action.toggle.active:active:after,.dropdown.giftregisty .action.toggle.active:active:after,.dropdown.wishlist .action.toggle.active:active:after{color:inherit}.dropdown-simple ul.dropdown,.dropdown.giftregisty ul.dropdown,.dropdown.wishlist ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.dropdown-simple ul.dropdown li,.dropdown.giftregisty ul.dropdown li,.dropdown.wishlist ul.dropdown li{margin:0;padding:3px 5px}.dropdown-simple ul.dropdown li:hover,.dropdown.giftregisty ul.dropdown li:hover,.dropdown.wishlist ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.dropdown-simple ul.dropdown:before,.dropdown-simple ul.dropdown:after,.dropdown.giftregisty ul.dropdown:before,.dropdown.giftregisty ul.dropdown:after,.dropdown.wishlist ul.dropdown:before,.dropdown.wishlist ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.dropdown-simple ul.dropdown:before,.dropdown.giftregisty ul.dropdown:before,.dropdown.wishlist ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.dropdown-simple ul.dropdown:after,.dropdown.giftregisty ul.dropdown:after,.dropdown.wishlist ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.dropdown-simple.active,.dropdown.giftregisty.active,.dropdown.wishlist.active{overflow:visible}.dropdown-simple.active ul.dropdown,.dropdown.giftregisty.active ul.dropdown,.dropdown.wishlist.active ul.dropdown{display:block}.dropdown.giftregisty ul.items.dropdown,.dropdown.wishlist ul.items.dropdown{min-width:155px}.column.main .block.addbysku .fields .field .control .qty,.data.table.giftregistry .field.qty .qty,.table.data.grouped .col.qty .control.qty .qty,.data.table.wishlist .box.tocart .qty{width:50px;text-align:center}.block,.widget.banners,div.widget.product.link,div.widget.category.link,.widget.widget-cms-link,.widget.widget-cms-hierarchy-link{margin-bottom:40px}.column.sidebar .widget.block.addbysku .field,.column.sidebar .widget.block.addbysku .fields .field,.block.widget.giftregistry .field,.block.widget.giftregistry .fields .field,.widget.block.wishlist.find .field,.widget.block.wishlist.find .fields .field,.widget.block.orders.returns .field,.widget.block.orders.returns .fields .field{margin:0 0 10px;border:0}.form-fields-for-widgets .field:not(.choice)>.label,.form-fields-for-widgets .fields .field:not(.choice)>.label,.column.sidebar .widget.block.addbysku .field:not(.choice)>.label,.column.sidebar .widget.block.addbysku .fields .field:not(.choice)>.label,.block.widget.giftregistry .field:not(.choice)>.label,.block.widget.giftregistry .fields .field:not(.choice)>.label,.widget.block.wishlist.find .field:not(.choice)>.label,.widget.block.wishlist.find .fields .field:not(.choice)>.label,.widget.block.orders.returns .field:not(.choice)>.label,.widget.block.orders.returns .fields .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.form-fields-for-widgets .field.choice:before,.form-fields-for-widgets .fields .field.choice:before,.form-fields-for-widgets .field.no-label:before,.form-fields-for-widgets .fields .field.no-label:before,.column.sidebar .widget.block.addbysku .field.choice:before,.column.sidebar .widget.block.addbysku .fields .field.choice:before,.column.sidebar .widget.block.addbysku .field.no-label:before,.column.sidebar .widget.block.addbysku .fields .field.no-label:before,.block.widget.giftregistry .field.choice:before,.block.widget.giftregistry .fields .field.choice:before,.block.widget.giftregistry .field.no-label:before,.block.widget.giftregistry .fields .field.no-label:before,.widget.block.wishlist.find .field.choice:before,.widget.block.wishlist.find .fields .field.choice:before,.widget.block.wishlist.find .field.no-label:before,.widget.block.wishlist.find .fields .field.no-label:before,.widget.block.orders.returns .field.choice:before,.widget.block.orders.returns .fields .field.choice:before,.widget.block.orders.returns .field.no-label:before,.widget.block.orders.returns .fields .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.form-fields-for-widgets .field>.control,.form-fields-for-widgets .fields .field>.control,.column.sidebar .widget.block.addbysku .field>.control,.column.sidebar .widget.block.addbysku .fields .field>.control,.block.widget.giftregistry .field>.control,.block.widget.giftregistry .fields .field>.control,.widget.block.wishlist.find .field>.control,.widget.block.wishlist.find .fields .field>.control,.widget.block.orders.returns .field>.control,.widget.block.orders.returns .fields .field>.control{float:none;width:auto}.form-fields-for-widgets .field>.label,.form-fields-for-widgets .fields .field>.label,.column.sidebar .widget.block.addbysku .field>.label,.column.sidebar .widget.block.addbysku .fields .field>.label,.block.widget.giftregistry .field>.label,.block.widget.giftregistry .fields .field>.label,.widget.block.wishlist.find .field>.label,.widget.block.wishlist.find .fields .field>.label,.widget.block.orders.returns .field>.label,.widget.block.orders.returns .fields .field>.label{font-size:14px;font-size:1.4rem;font-weight:400}.form-fields-for-widgets .field>.label+br,.form-fields-for-widgets .fields .field>.label+br,.column.sidebar .widget.block.addbysku .field>.label+br,.column.sidebar .widget.block.addbysku .fields .field>.label+br,.block.widget.giftregistry .field>.label+br,.block.widget.giftregistry .fields .field>.label+br,.widget.block.wishlist.find .field>.label+br,.widget.block.wishlist.find .fields .field>.label+br,.widget.block.orders.returns .field>.label+br,.widget.block.orders.returns .fields .field>.label+br{display:none}.form-fields-for-widgets .field.required>.label:after,.form-fields-for-widgets .fields .field.required>.label:after,.column.sidebar .widget.block.addbysku .field.required>.label:after,.column.sidebar .widget.block.addbysku .fields .field.required>.label:after,.block.widget.giftregistry .field.required>.label:after,.block.widget.giftregistry .fields .field.required>.label:after,.widget.block.wishlist.find .field.required>.label:after,.widget.block.wishlist.find .fields .field.required>.label:after,.widget.block.orders.returns .field.required>.label:after,.widget.block.orders.returns .fields .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.form-fields-for-widgets .field .nested .field,.form-fields-for-widgets .fields .field .nested .field,.column.sidebar .widget.block.addbysku .field .nested .field,.column.sidebar .widget.block.addbysku .fields .field .nested .field,.block.widget.giftregistry .field .nested .field,.block.widget.giftregistry .fields .field .nested .field,.widget.block.wishlist.find .field .nested .field,.widget.block.wishlist.find .fields .field .nested .field,.widget.block.orders.returns .field .nested .field,.widget.block.orders.returns .fields .field .nested .field{margin:5px 0}.form-fields-for-widgets .field.choice>.label,.form-fields-for-widgets .fields .field.choice>.label,.column.sidebar .widget.block.addbysku .field.choice>.label,.column.sidebar .widget.block.addbysku .fields .field.choice>.label,.block.widget.giftregistry .field.choice>.label,.block.widget.giftregistry .fields .field.choice>.label,.widget.block.wishlist.find .field.choice>.label,.widget.block.wishlist.find .fields .field.choice>.label,.widget.block.orders.returns .field.choice>.label,.widget.block.orders.returns .fields .field.choice>.label{display:inline}.form-fields-for-widgets .field.choice>input,.form-fields-for-widgets .fields .field.choice>input,.column.sidebar .widget.block.addbysku .field.choice>input,.column.sidebar .widget.block.addbysku .fields .field.choice>input,.block.widget.giftregistry .field.choice>input,.block.widget.giftregistry .fields .field.choice>input,.widget.block.wishlist.find .field.choice>input,.widget.block.wishlist.find .fields .field.choice>input,.widget.block.orders.returns .field.choice>input,.widget.block.orders.returns .fields .field.choice>input{vertical-align:top}.form-fields-for-widgets .field .fields.group,.form-fields-for-widgets .fields .field .fields.group,.column.sidebar .widget.block.addbysku .field .fields.group,.column.sidebar .widget.block.addbysku .fields .field .fields.group,.block.widget.giftregistry .field .fields.group,.block.widget.giftregistry .fields .field .fields.group,.widget.block.wishlist.find .field .fields.group,.widget.block.wishlist.find .fields .field .fields.group,.widget.block.orders.returns .field .fields.group,.widget.block.orders.returns .fields .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.form-fields-for-widgets .field .fields.group>*,.form-fields-for-widgets .fields .field .fields.group>*,.column.sidebar .widget.block.addbysku .field .fields.group>*,.column.sidebar .widget.block.addbysku .fields .field .fields.group>*,.block.widget.giftregistry .field .fields.group>*,.block.widget.giftregistry .fields .field .fields.group>*,.widget.block.wishlist.find .field .fields.group>*,.widget.block.wishlist.find .fields .field .fields.group>*,.widget.block.orders.returns .field .fields.group>*,.widget.block.orders.returns .fields .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.form-fields-for-widgets .field .fields.group .field,.form-fields-for-widgets .fields .field .fields.group .field,.column.sidebar .widget.block.addbysku .field .fields.group .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group .field,.block.widget.giftregistry .field .fields.group .field,.block.widget.giftregistry .fields .field .fields.group .field,.widget.block.wishlist.find .field .fields.group .field,.widget.block.wishlist.find .fields .field .fields.group .field,.widget.block.orders.returns .field .fields.group .field,.widget.block.orders.returns .fields .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.form-fields-for-widgets .field .fields.group .field .label,.form-fields-for-widgets .fields .field .fields.group .field .label,.column.sidebar .widget.block.addbysku .field .fields.group .field .label,.column.sidebar .widget.block.addbysku .fields .field .fields.group .field .label,.block.widget.giftregistry .field .fields.group .field .label,.block.widget.giftregistry .fields .field .fields.group .field .label,.widget.block.wishlist.find .field .fields.group .field .label,.widget.block.wishlist.find .fields .field .fields.group .field .label,.widget.block.orders.returns .field .fields.group .field .label,.widget.block.orders.returns .fields .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.form-fields-for-widgets .field .fields.group .field .control,.form-fields-for-widgets .fields .field .fields.group .field .control,.column.sidebar .widget.block.addbysku .field .fields.group .field .control,.column.sidebar .widget.block.addbysku .fields .field .fields.group .field .control,.block.widget.giftregistry .field .fields.group .field .control,.block.widget.giftregistry .fields .field .fields.group .field .control,.widget.block.wishlist.find .field .fields.group .field .control,.widget.block.wishlist.find .fields .field .fields.group .field .control,.widget.block.orders.returns .field .fields.group .field .control,.widget.block.orders.returns .fields .field .fields.group .field .control{float:none;width:auto}.form-fields-for-widgets .field .fields.group.group-2 .field,.form-fields-for-widgets .fields .field .fields.group.group-2 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-2 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-2 .field,.block.widget.giftregistry .field .fields.group.group-2 .field,.block.widget.giftregistry .fields .field .fields.group.group-2 .field,.widget.block.wishlist.find .field .fields.group.group-2 .field,.widget.block.wishlist.find .fields .field .fields.group.group-2 .field,.widget.block.orders.returns .field .fields.group.group-2 .field,.widget.block.orders.returns .fields .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.form-fields-for-widgets .field .fields.group.group-3 .field,.form-fields-for-widgets .fields .field .fields.group.group-3 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-3 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-3 .field,.block.widget.giftregistry .field .fields.group.group-3 .field,.block.widget.giftregistry .fields .field .fields.group.group-3 .field,.widget.block.wishlist.find .field .fields.group.group-3 .field,.widget.block.wishlist.find .fields .field .fields.group.group-3 .field,.widget.block.orders.returns .field .fields.group.group-3 .field,.widget.block.orders.returns .fields .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.form-fields-for-widgets .field .fields.group.group-4 .field,.form-fields-for-widgets .fields .field .fields.group.group-4 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-4 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-4 .field,.block.widget.giftregistry .field .fields.group.group-4 .field,.block.widget.giftregistry .fields .field .fields.group.group-4 .field,.widget.block.wishlist.find .field .fields.group.group-4 .field,.widget.block.wishlist.find .fields .field .fields.group.group-4 .field,.widget.block.orders.returns .field .fields.group.group-4 .field,.widget.block.orders.returns .fields .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.form-fields-for-widgets .field .fields.group.group-5 .field,.form-fields-for-widgets .fields .field .fields.group.group-5 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-5 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-5 .field,.block.widget.giftregistry .field .fields.group.group-5 .field,.block.widget.giftregistry .fields .field .fields.group.group-5 .field,.widget.block.wishlist.find .field .fields.group.group-5 .field,.widget.block.wishlist.find .fields .field .fields.group.group-5 .field,.widget.block.orders.returns .field .fields.group.group-5 .field,.widget.block.orders.returns .fields .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.form-fields-for-widgets .field .addon,.form-fields-for-widgets .fields .field .addon,.column.sidebar .widget.block.addbysku .field .addon,.column.sidebar .widget.block.addbysku .fields .field .addon,.block.widget.giftregistry .field .addon,.block.widget.giftregistry .fields .field .addon,.widget.block.wishlist.find .field .addon,.widget.block.wishlist.find .fields .field .addon,.widget.block.orders.returns .field .addon,.widget.block.orders.returns .fields .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.form-fields-for-widgets .field .addon textarea,.form-fields-for-widgets .fields .field .addon textarea,.form-fields-for-widgets .field .addon select,.form-fields-for-widgets .fields .field .addon select,.form-fields-for-widgets .field .addon input,.form-fields-for-widgets .fields .field .addon input,.column.sidebar .widget.block.addbysku .field .addon textarea,.column.sidebar .widget.block.addbysku .fields .field .addon textarea,.column.sidebar .widget.block.addbysku .field .addon select,.column.sidebar .widget.block.addbysku .fields .field .addon select,.column.sidebar .widget.block.addbysku .field .addon input,.column.sidebar .widget.block.addbysku .fields .field .addon input,.block.widget.giftregistry .field .addon textarea,.block.widget.giftregistry .fields .field .addon textarea,.block.widget.giftregistry .field .addon select,.block.widget.giftregistry .fields .field .addon select,.block.widget.giftregistry .field .addon input,.block.widget.giftregistry .fields .field .addon input,.widget.block.wishlist.find .field .addon textarea,.widget.block.wishlist.find .fields .field .addon textarea,.widget.block.wishlist.find .field .addon select,.widget.block.wishlist.find .fields .field .addon select,.widget.block.wishlist.find .field .addon input,.widget.block.wishlist.find .fields .field .addon input,.widget.block.orders.returns .field .addon textarea,.widget.block.orders.returns .fields .field .addon textarea,.widget.block.orders.returns .field .addon select,.widget.block.orders.returns .fields .field .addon select,.widget.block.orders.returns .field .addon input,.widget.block.orders.returns .fields .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.form-fields-for-widgets .field .addon .addbefore,.form-fields-for-widgets .fields .field .addon .addbefore,.form-fields-for-widgets .field .addon .addafter,.form-fields-for-widgets .fields .field .addon .addafter,.column.sidebar .widget.block.addbysku .field .addon .addbefore,.column.sidebar .widget.block.addbysku .fields .field .addon .addbefore,.column.sidebar .widget.block.addbysku .field .addon .addafter,.column.sidebar .widget.block.addbysku .fields .field .addon .addafter,.block.widget.giftregistry .field .addon .addbefore,.block.widget.giftregistry .fields .field .addon .addbefore,.block.widget.giftregistry .field .addon .addafter,.block.widget.giftregistry .fields .field .addon .addafter,.widget.block.wishlist.find .field .addon .addbefore,.widget.block.wishlist.find .fields .field .addon .addbefore,.widget.block.wishlist.find .field .addon .addafter,.widget.block.wishlist.find .fields .field .addon .addafter,.widget.block.orders.returns .field .addon .addbefore,.widget.block.orders.returns .fields .field .addon .addbefore,.widget.block.orders.returns .field .addon .addafter,.widget.block.orders.returns .fields .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.form-fields-for-widgets .field .addon .addbefore:disabled,.form-fields-for-widgets .fields .field .addon .addbefore:disabled,.form-fields-for-widgets .field .addon .addafter:disabled,.form-fields-for-widgets .fields .field .addon .addafter:disabled,.column.sidebar .widget.block.addbysku .field .addon .addbefore:disabled,.column.sidebar .widget.block.addbysku .fields .field .addon .addbefore:disabled,.column.sidebar .widget.block.addbysku .field .addon .addafter:disabled,.column.sidebar .widget.block.addbysku .fields .field .addon .addafter:disabled,.block.widget.giftregistry .field .addon .addbefore:disabled,.block.widget.giftregistry .fields .field .addon .addbefore:disabled,.block.widget.giftregistry .field .addon .addafter:disabled,.block.widget.giftregistry .fields .field .addon .addafter:disabled,.widget.block.wishlist.find .field .addon .addbefore:disabled,.widget.block.wishlist.find .fields .field .addon .addbefore:disabled,.widget.block.wishlist.find .field .addon .addafter:disabled,.widget.block.wishlist.find .fields .field .addon .addafter:disabled,.widget.block.orders.returns .field .addon .addbefore:disabled,.widget.block.orders.returns .fields .field .addon .addbefore:disabled,.widget.block.orders.returns .field .addon .addafter:disabled,.widget.block.orders.returns .fields .field .addon .addafter:disabled{opacity:.5}.form-fields-for-widgets .field .addon .addbefore,.form-fields-for-widgets .fields .field .addon .addbefore,.column.sidebar .widget.block.addbysku .field .addon .addbefore,.column.sidebar .widget.block.addbysku .fields .field .addon .addbefore,.block.widget.giftregistry .field .addon .addbefore,.block.widget.giftregistry .fields .field .addon .addbefore,.widget.block.wishlist.find .field .addon .addbefore,.widget.block.wishlist.find .fields .field .addon .addbefore,.widget.block.orders.returns .field .addon .addbefore,.widget.block.orders.returns .fields .field .addon .addbefore{float:left;order:1}.form-fields-for-widgets .field .note,.form-fields-for-widgets .fields .field .note,.column.sidebar .widget.block.addbysku .field .note,.column.sidebar .widget.block.addbysku .fields .field .note,.block.widget.giftregistry .field .note,.block.widget.giftregistry .fields .field .note,.widget.block.wishlist.find .field .note,.widget.block.wishlist.find .fields .field .note,.widget.block.orders.returns .field .note,.widget.block.orders.returns .fields .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.form-fields-for-widgets .field .note:before,.form-fields-for-widgets .fields .field .note:before,.column.sidebar .widget.block.addbysku .field .note:before,.column.sidebar .widget.block.addbysku .fields .field .note:before,.block.widget.giftregistry .field .note:before,.block.widget.giftregistry .fields .field .note:before,.widget.block.wishlist.find .field .note:before,.widget.block.wishlist.find .fields .field .note:before,.widget.block.orders.returns .field .note:before,.widget.block.orders.returns .fields .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.compare .item .action.delete,.block.wishlist .actions .action.delete,.data.comparison .cell.remove .action.delete{display:inline-block;text-decoration:none}.remove-button-for-blocks>span,.block.compare .item .action.delete>span,.block.wishlist .actions .action.delete>span,.data.comparison .cell.remove .action.delete>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.remove-button-for-blocks:before,.block.compare .item .action.delete:before,.block.wishlist .actions .action.delete:before,.data.comparison .cell.remove .action.delete:before{font-family:"icons-blank-theme";content:'\e616';font-size:26px;line-height:15px;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.remove-button-for-blocks:hover:before,.block.compare .item .action.delete:hover:before,.block.wishlist .actions .action.delete:hover:before,.data.comparison .cell.remove .action.delete:hover:before{color:#303030}.remove-button-for-blocks:active:before,.block.compare .item .action.delete:active:before,.block.wishlist .actions .action.delete:active:before,.data.comparison .cell.remove .action.delete:active:before{color:#303030}.block.compare .product.name a,.block.viewed.links .product.name a,.block.reorder .product.name a,.block.compared.links .product.name a,.block.wishlist .product.name a,.data.comparison .product.name a,.widget.product.link a{color:#303030;text-decoration:none}.product-link:visited,.block.compare .product.name a:visited,.block.viewed.links .product.name a:visited,.block.reorder .product.name a:visited,.block.compared.links .product.name a:visited,.block.wishlist .product.name a:visited,.data.comparison .product.name a:visited,.widget.product.link a:visited{color:#303030;text-decoration:none}.product-link:hover,.block.compare .product.name a:hover,.block.viewed.links .product.name a:hover,.block.reorder .product.name a:hover,.block.compared.links .product.name a:hover,.block.wishlist .product.name a:hover,.data.comparison .product.name a:hover,.widget.product.link a:hover{color:#303030;text-decoration:underline}.product-link:active,.block.compare .product.name a:active,.block.viewed.links .product.name a:active,.block.reorder .product.name a:active,.block.compared.links .product.name a:active,.block.wishlist .product.name a:active,.data.comparison .product.name a:active,.widget.product.link a:active{color:#303030;text-decoration:underline}.product-link:focus,.block.compare .product.name a:focus,.block.viewed.links .product.name a:focus,.block.reorder .product.name a:focus,.block.compared.links .product.name a:focus,.block.wishlist .product.name a:focus,.data.comparison .product.name a:focus,.widget.product.link a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.form.new.agreement .actions.toolbar,.opc.wrapper .form.shipping.methods .actions.toolbar,.opc.wrapper .form.payments .actions.toolbar,.form.giftregistry.items .actions.toolbar,.form.wishlist.items .actions.toolbar{margin-left:0}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.svg#Open Sans') format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.svg#Open Sans') format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.svg#Open Sans') format('svg');font-weight:600;font-style:normal}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.svg#Open Sans') format('svg');font-weight:700;font-style:normal}.navigation>ul,.breadcrumbs,.page.header .header.panel,.header.content,.footer.content,.page.main,.page.wrapper>.widget,.page.wrapper>.page.bottom,.block.category.event{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.columns{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap}.columns:after{content:" ";display:block;height:0;clear:both;overlow:hidden;visibility:hidden}.columns>.column{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;padding-bottom:40px}.column.main{min-height:300px}.layout-1 .column.main{width:100%;order:2}.layout-3 .column.main{width:66.66666667%;display:inline-block;order:2}.layout-2-left .column.main{width:83.33333333%;float:right;order:2}.layout-2-right .column.main{width:83.33333333%;float:left;order:1}.column.left{padding-right:2%}.layout-3 .column.left{width:16.66666667%;float:left;order:1}.layout-2-left .column.left{width:16.66666667%;float:left;order:1}.layout-2-right .column.left{width:16.66666667%;float:left;order:1}.column.right{padding-left:2%}.layout-3 .column.right{width:16.66666667%;float:right;order:3}.layout-2-left .column.right{width:16.66666667%;float:right;order:2}.layout-2-right .column.right{width:16.66666667%;float:right;order:2}.message.info{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.message.info a{color:#1979c3}.message.info a:hover{color:#006bb4}.message.info a:active{color:#006bb4}.message.info>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.error{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fae5e5;border-color:none;color:#e02b27;position:relative;padding-left:40px}.message.error a{color:#1979c3}.message.error a:hover{color:#006bb4}.message.error a:active{color:#006bb4}.message.error>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#b30000;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.warning{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.message.warning a{color:#1979c3}.message.warning a:hover{color:#006bb4}.message.warning a:active{color:#006bb4}.message.warning>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.notice{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.message.notice a{color:#1979c3}.message.notice a:hover{color:#006bb4}.message.notice a:active{color:#006bb4}.message.notice>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.success{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#e5efe5;border-color:none;color:#006400;position:relative;padding-left:40px}.message.success a{color:#1979c3}.message.success a:hover{color:#006bb4}.message.success a:active{color:#006bb4}.message.success>:first-child:before{font-family:"icons-blank-theme";content:'\e610';font-size:28px;line-height:28px;color:#006400;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.navigation{background:#e8e8e8;margin:0;padding:0;list-style-type:none;list-style-image:none;position:relative;z-index:2}.navigation>li{display:inline-block;vertical-align:top}.navigation:empty{display:none}.navigation .level0{display:inline-block;position:relative;vertical-align:top;margin:0 10px 0 0}.navigation .level0:last-child{margin-right:0;padding-right:0}.navigation .level0>.level-top{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;color:#575757;line-height:53px;padding:0 12px;display:inline-block;position:relative}.navigation .level0>.level-top:hover{color:#333}.navigation .level0.active>.level-top{color:#333}.navigation .level0.parent>.submenu:before,.navigation .level0.parent>.submenu:after{content:'';overflow:hidden;display:block;position:absolute;top:-20px}.navigation .level0.parent>.submenu:before{left:20px;color:#fff;z-index:4;width:0;height:0;border:10px solid rgba(0,0,0,0);border-bottom-color:#fff}.navigation .level0.parent>.submenu:after{left:19px;color:#d1d1d1;z-index:3;width:0;height:0;border:11px solid rgba(0,0,0,0);border-bottom-color:#d1d1d1}.navigation .level0.parent:hover>.submenu{overflow:visible!important}.navigation .level0.hover>.submenu,.navigation .level0:hover>.submenu{z-index:2}.navigation .level0.more{position:relative;display:inline-block;text-decoration:none}.navigation .level0.more:after{font-family:"icons-blank-theme";content:'\e607';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.navigation .level0.more:before{display:none}.navigation .level0.more:after{border-radius:4px 4px 0 0;cursor:pointer;padding:8px 12px;position:relative;z-index:1}.navigation .level0>.submenu{display:none;min-width:230px;position:absolute;left:0;top:100%;z-index:1}.navigation .level0>.submenu>ul{background:#fff;border:1px solid #d1d1d1;box-shadow:0 5px 5px rgba(0,0,0,.19);padding:15px 0;position:relative;margin:0}.navigation .level0>.submenu>ul>li{display:block;margin:0;position:relative}.navigation .level0>.submenu>ul>li a{display:block;line-height:normal;padding:8px 20px;color:#575757}.navigation .level0>.submenu>ul>li a:hover{background:#e8e8e8;color:#333;text-decoration:none}.navigation .level0>.submenu .submenu ul{padding-left:0}.navigation .level0>.submenu .submenu ul li{margin:0}.navigation .level0>.submenu .submenu ul a{padding-left:40px}.navigation{margin:0 0 30px}.navigation>ul>.level0{font-weight:700}.navigation>ul>.level0>a,.navigation>ul>.level0 .action.back>a{text-decoration:none;text-transform:uppercase}.load.indicator{position:fixed;left:0;top:0;right:0;bottom:0;background-color:rgba(255,255,255,.5);z-index:9999;position:absolute}.load.indicator:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:rgba(0,0,0,0);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat;border-radius:5px;content:'';position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;width:160px;height:160px}.load.indicator:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:rgba(0,0,0,0);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat;border-radius:5px;content:'';position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;width:160px;height:160px}.load.indicator>span{display:none}.fieldset{border:0;margin:0 0 40px;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.fieldset .legend+.fieldset,.fieldset .legend+div{clear:both}.fieldset>*{letter-spacing:normal;word-spacing:normal}.fieldset>.legend{margin:0 0 25px 25.8%;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.fieldset:last-child{margin-bottom:0}.fieldset>.field,.fieldset .fields>.field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 0 29px;border:0}.fieldset>.field:last-child,.fieldset .fields>.field:last-child{margin-bottom:0}.fieldset>.field.no-label>.label,.fieldset .fields>.field.no-label>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.fieldset>.field .label,.fieldset .fields>.field .label{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.fieldset>.field:before,.fieldset .fields>.field:before,.fieldset>.field:after,.fieldset .fields>.field:after{content:"";display:table}.fieldset>.field:after,.fieldset .fields>.field:after{clear:both}.fieldset>.field:not(.choice)>.label,.fieldset .fields>.field:not(.choice)>.label{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.fieldset>.field>.description,.fieldset .fields>.field>.description{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.fieldset>.field.choice:before,.fieldset .fields>.field.choice:before,.fieldset>.field.no-label:before,.fieldset .fields>.field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:1px;float:left;width:25.8%;padding:6px 15px 0 0}.fieldset>.field>.control,.fieldset .fields>.field>.control{float:left;width:74.2%}.fieldset>.field>.label,.fieldset .fields>.field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.fieldset>.field>.label+br,.fieldset .fields>.field>.label+br{display:none}.fieldset>.field.required>.label:after,.fieldset .fields>.field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.fieldset>.field .nested .field,.fieldset .fields>.field .nested .field{margin:5px 0}.fieldset>.field.choice>.label,.fieldset .fields>.field.choice>.label{display:inline}.fieldset>.field.choice>input,.fieldset .fields>.field.choice>input{vertical-align:top}.fieldset>.field .fields.group,.fieldset .fields>.field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.fieldset>.field .fields.group>*,.fieldset .fields>.field .fields.group>*{letter-spacing:normal;word-spacing:normal}.fieldset>.field .fields.group .field,.fieldset .fields>.field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.fieldset>.field .fields.group .field .label,.fieldset .fields>.field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.fieldset>.field .fields.group .field .control,.fieldset .fields>.field .fields.group .field .control{float:none;width:auto}.fieldset>.field .fields.group.group-2 .field,.fieldset .fields>.field .fields.group.group-2 .field{width:50%!important;display:inline-block}.fieldset>.field .fields.group.group-3 .field,.fieldset .fields>.field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.fieldset>.field .fields.group.group-4 .field,.fieldset .fields>.field .fields.group.group-4 .field{width:25%!important;display:inline-block}.fieldset>.field .fields.group.group-5 .field,.fieldset .fields>.field .fields.group.group-5 .field{width:20%!important;display:inline-block}.fieldset>.field .addon,.fieldset .fields>.field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.fieldset>.field .addon textarea,.fieldset .fields>.field .addon textarea,.fieldset>.field .addon select,.fieldset .fields>.field .addon select,.fieldset>.field .addon input,.fieldset .fields>.field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.fieldset>.field .addon .addbefore,.fieldset .fields>.field .addon .addbefore,.fieldset>.field .addon .addafter,.fieldset .fields>.field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.fieldset>.field .addon .addbefore:disabled,.fieldset .fields>.field .addon .addbefore:disabled,.fieldset>.field .addon .addafter:disabled,.fieldset .fields>.field .addon .addafter:disabled{opacity:.5}.fieldset>.field .addon .addbefore,.fieldset .fields>.field .addon .addbefore{float:left;order:1}.fieldset>.field .note,.fieldset .fields>.field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.fieldset>.field .note:before,.fieldset .fields>.field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.fieldset>.field.choice .label,.fieldset .fields>.field.choice .label{font-weight:400}.field .tooltip{position:relative;display:inline-block}.field .tooltip .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;left:100%;top:0;margin-left:5px}.field .tooltip .tooltip-content:after,.field .tooltip .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.field .tooltip .tooltip-content:after{border-color:transparent;border-width:5px}.field .tooltip .tooltip-content:before{border-color:transparent;border-width:6px}.field .tooltip .tooltip-content:after,.field .tooltip .tooltip-content:before{right:100%}.field .tooltip .tooltip-content:after{border-right-color:#fff;margin-top:-5px;top:15px}.field .tooltip .tooltip-content:before{border-right-color:#bbb;margin-top:-6px;top:15px}.field .tooltip>:first-child{cursor:help}.field .tooltip>:first-child:hover+.tooltip-content,.field .tooltip>:first-child:focus+.tooltip-content,.field .tooltip:hover>.tooltip-content{display:block}.field .tooltip .tooltip-content{min-width:200px;white-space:normal}input:focus~.tooltip .tooltip-content,select:focus~.tooltip .tooltip-content{display:block}button,.cart.table.wrapper .cart.items .action{border-radius:3px}button:active,button:focus,.cart.table.wrapper .cart.items .action:active,.cart.table.wrapper .cart.items .action:focus{box-shadow:inset 0 2px 1px rgba(0,0,0,.12)}@media only screen and (max-width: 99999px){.product.data.items{ position:relative;z-index:1}.product.data.items:before,.product.data.items:after{content:"";display:table}.product.data.items:after{clear:both}.product.data.items>.item.title{float:left}.product.data.items>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.product.data.items>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.product.data.items>.item.content:before,.product.data.items>.item.content:after{content:"";display:table}.product.data.items>.item.content:after{clear:both}.product.data.items>.item.content.active{display:block}.product.data.items>.item.title{margin:0 5px 0 0}.product.data.items>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.product.data.items>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.product.data.items>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.product.data.items>.item.title>.switch:active{color:#333;text-decoration:none}.product.data.items>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.product.data.items>.item.title:not(.disabled)>.switch:focus,.product.data.items>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.product.data.items>.item.title:not(.disabled)>.switch:active,.product.data.items>.item.title.active>.switch,.product.data.items>.item.title.active>.switch:focus,.product.data.items>.item.title.active>.switch:hover{background-color:#fff;color:#333}.product.data.items>.item.title.active>.switch{padding-bottom:6px}.product.data.items>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border-top:1px solid #d1d1d1}}@media only screen and (max-width: 768px){.product.data.items{ margin:0;padding:0}.product.data.items>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.product.data.items>.item.title>.switch{display:block}.product.data.items>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.product.data.items>.item.content:before,.product.data.items>.item.content:after{content:"";display:table}.product.data.items>.item.content:after{clear:both}.product.data.items>.item.content.active{display:block}.product.data.items>.item.title{margin:0 0 5px}.product.data.items>.item.title>.switch{border:1px solid #d1d1d1;background-color:#f0f0f0;font-size:18px;font-size:1.8rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:40px;color:#7d7d7d;text-decoration:none;height:40px;padding:5px 20px 5px 20px}.product.data.items>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.product.data.items>.item.title>.switch:hover{color:#7d7d7d;text-decoration:#7d7d7d}.product.data.items>.item.title>.switch:active{color:#333;text-decoration:none}.product.data.items>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.product.data.items>.item.title:not(.disabled)>.switch:focus,.product.data.items>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.product.data.items>.item.title:not(.disabled)>.switch:active,.product.data.items>.item.title.active>.switch,.product.data.items>.item.title.active>.switch:focus,.product.data.items>.item.title.active>.switch:hover{background-color:#fff;padding-bottom:5px}.product.data.items>.item.content{margin:0;padding:20px 20px 20px 20px;background-color:#fff;border:1px solid #d1d1d1}}.pages>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.pages .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.pages .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages a.page{padding:0 10px;color:#1979c3;display:inline-block;text-decoration:none}.pages a.page:visited{color:#800080}.pages a.page:hover{color:#006bb4;text-decoration:none}.pages a.page:active{color:#ff5501}.pages strong.page{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#333;display:inline-block;font-weight:700}.pages .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.pages .action:visited{color:#7d7d7d}.pages .action:hover{color:#7d7d7d;text-decoration:none}.pages .action:active{color:#7d7d7d}.pages .action.next{display:inline-block;text-decoration:none}.pages .action.next:visited:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.next:hover:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.previous{display:inline-block;text-decoration:none}.pages .action.previous:visited:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.pages .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.previous:hover:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.rating.summary{overflow:hidden}.rating.summary .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.rating.summary .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.rating.summary .rating.result>span{display:block;overflow:hidden}.rating.summary .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.rating.summary .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product.reviews.summary .label,.data.table.reviews .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.control.rating.vote{overflow:hidden}.control.rating.vote:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.control.rating.vote input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.control.rating.vote input[type="radio"]:focus+label:before,.control.rating.vote input[type="radio"]:checked+label:before{opacity:1}.control.rating.vote label{position:absolute;display:block;cursor:pointer}.control.rating.vote label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.control.rating.vote label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.control.rating.vote label:hover:before{opacity:1}.control.rating.vote label:hover~label:before{opacity:0}.control.rating.vote .rating-5{z-index:2}.control.rating.vote .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.control.rating.vote .rating-4{z-index:3}.control.rating.vote .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.control.rating.vote .rating-3{z-index:4}.control.rating.vote .rating-3:before{content:'\e605' '\e605' '\e605'}.control.rating.vote .rating-2{z-index:5}.control.rating.vote .rating-2:before{content:'\e605' '\e605'}.control.rating.vote .rating-1{z-index:6}.control.rating.vote .rating-1:before{content:'\e605'}.actions.toolbar:before,.actions.toolbar:after{content:"";display:table}.actions.toolbar:after{clear:both}.actions.toolbar .primary{float:left}.actions.toolbar .secondary{float:right}.actions.toolbar .primary,.actions.toolbar .secondary{display:inline-block}.actions.toolbar .primary a.action,.actions.toolbar .secondary a.action{display:inline-block}.actions.toolbar .primary .action{margin:0 5px 0 0}.actions.toolbar .secondary a.action{margin-top:6px}.actions.toolbar .primary a.action{display:inline-block;text-decoration:none}.actions.toolbar .primary a.action:hover,.actions.toolbar .primary a.action:active,.actions.toolbar .primary a.action:focus{text-decoration:none}.actions.toolbar .secondary a.action:visited{color:#1979c3}.form .actions.toolbar{margin-left:25.8%}.breadcrumbs{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.breadcrumbs .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.breadcrumbs .items{font-size:12px;font-size:1.2rem;color:#a3a3a3;margin:0;padding:0;list-style-type:none;list-style-image:none}.breadcrumbs .items>li{display:inline-block;vertical-align:top}.breadcrumbs a{color:#333;text-decoration:none}.breadcrumbs a:visited{color:#333;text-decoration:none}.breadcrumbs a:hover{color:#333;text-decoration:underline}.breadcrumbs a:active{color:#333;text-decoration:none}.breadcrumbs strong{font-weight:400}.breadcrumbs .item:not(:last-child):after{color:#a3a3a3;content:'>'}.paypal.after:after{content:"- " attr(data-label) " -";display:block;margin:0 5px 10px;text-transform:uppercase}.paypal.before:before{content:"- " attr(data-label) " -";display:block;margin:10px 5px;text-align:center;text-transform:uppercase}.column.main .block.addbysku .title{margin-bottom:30px}.column.main .block.addbysku .fields{position:relative;margin-bottom:45px}.column.main .block.addbysku .fields:last-child{margin-bottom:0}.column.main .block.addbysku .fields .field .control{width:50%}.column.main .block.addbysku .fields .action.remove{background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;line-height:normal;position:absolute;top:4px;margin-left:75.8%}.column.main .block.addbysku .fields .action.remove:focus,.column.main .block.addbysku .fields .action.remove:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.column.main .block.addbysku .fields .action.remove:hover{background:0;border:0}.column.main .block.addbysku .fields .action.remove.disabled,.column.main .block.addbysku .fields .action.remove[disabled],fieldset[disabled] .column.main .block.addbysku .fields .action.remove{cursor:not-allowed;pointer-events:none;opacity:.5}.column.main .block.addbysku .actions.toolbar .secondary{float:left}.column.main .block.addbysku .field .note{display:block}.column.main .block.addbysku .field .note p:first-child{display:inline-block}.actions.bundle{margin:10px 0}.actions.bundle .action.primary.customize{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.actions.bundle .action.primary.customize:focus,.actions.bundle .action.primary.customize:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.actions.bundle .action.primary.customize:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.actions.bundle .action.primary.customize.disabled,.actions.bundle .action.primary.customize[disabled],fieldset[disabled] .actions.bundle .action.primary.customize{cursor:default;pointer-events:none;opacity:.5}.bundle.options.container{clear:both;margin-bottom:40px}.bundle.options.container .legend.title{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.bundle.options.container .product.add.form{display:none}.bundle.options.container .field.option{margin:0 0 20px;border:0}.bundle.options.container .field.option:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.bundle.options.container .field.option.choice:before,.bundle.options.container .field.option.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.bundle.options.container .field.option>.control{float:none;width:auto}.bundle.options.container .field.option>.label{font-size:14px;font-size:1.4rem;font-weight:700}.bundle.options.container .field.option>.label+br{display:none}.bundle.options.container .field.option.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.bundle.options.container .field.option .nested .field{margin:5px 0}.bundle.options.container .field.option.choice>.label{display:inline}.bundle.options.container .field.option.choice>input{vertical-align:top}.bundle.options.container .field.option .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.bundle.options.container .field.option .fields.group>*{letter-spacing:normal;word-spacing:normal}.bundle.options.container .field.option .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.bundle.options.container .field.option .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.bundle.options.container .field.option .fields.group .field .control{float:none;width:auto}.bundle.options.container .field.option .fields.group.group-2 .field{width:50%!important;display:inline-block}.bundle.options.container .field.option .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.bundle.options.container .field.option .fields.group.group-4 .field{width:25%!important;display:inline-block}.bundle.options.container .field.option .fields.group.group-5 .field{width:20%!important;display:inline-block}.bundle.options.container .field.option .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.bundle.options.container .field.option .addon textarea,.bundle.options.container .field.option .addon select,.bundle.options.container .field.option .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.bundle.options.container .field.option .addon .addbefore,.bundle.options.container .field.option .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.bundle.options.container .field.option .addon .addbefore:disabled,.bundle.options.container .field.option .addon .addafter:disabled{opacity:.5}.bundle.options.container .field.option .addon .addbefore{float:left;order:1}.bundle.options.container .field.option .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.bundle.options.container .field.option .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.bundle.options.container .input-text.qty{width:50px}.bundle.options.container .product.options.wrapper{float:left;width:57%;margin-bottom:30px}.layout-2-left .bundle.options.container .product.options.wrapper,.layout-2-right .bundle.options.container .product.options.wrapper{width:48%}.layout-3 .bundle.options.container .product.options.wrapper{width:48%}.bundle.options.container .product.options.bottom{width:57%;clear:both}.layout-2-left .bundle.options.container .product.options.bottom,.layout-2-right .bundle.options.container .product.options.bottom{width:48%}.layout-3 .bundle.options.container .product.options.bottom{width:48%}.bundle.options.container .price-box .price{font-weight:700;font-size:18px}.bundle.options.container .block.bundle.summary{float:right;position:relative;width:40%;padding:10px 20px;background:#e8e8e8;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.layout-2-left .bundle.options.container .block.bundle.summary,.layout-2-right .bundle.options.container .block.bundle.summary{width:48%}.layout-3 .bundle.options.container .block.bundle.summary{width:48%}.bundle.options.container .block.bundle.summary>.title>strong{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.bundle.options.container .block.bundle.summary .bundle.summary{margin-top:30px}.bundle.options.container .block.bundle.summary .bundle.summary>.subtitle{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block}.bundle.options.container .block.bundle.summary .bundle.items>li{margin-bottom:10px}.bundle.options.container .block.bundle.summary .tocart .actions{margin:10px 0}.bundle.options.container .block.bundle.summary .tocart .action.primary{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.bundle.options.container .block.bundle.summary .tocart .action.primary:focus,.bundle.options.container .block.bundle.summary .tocart .action.primary:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.bundle.options.container .block.bundle.summary .tocart .action.primary:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.bundle.options.container .block.bundle.summary .tocart .action.primary.disabled,.bundle.options.container .block.bundle.summary .tocart .action.primary[disabled],fieldset[disabled] .bundle.options.container .block.bundle.summary .tocart .action.primary{cursor:default;pointer-events:none;opacity:.5}.bundle.options.container .block.bundle.summary .addto.links .action{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;margin-bottom:5px}.bundle.options.container .block.bundle.summary .addto.links .action:focus,.bundle.options.container .block.bundle.summary .addto.links .action:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.bundle.options.container .block.bundle.summary .addto.links .action:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.bundle.options.container .block.bundle.summary .addto.links .action.disabled,.bundle.options.container .block.bundle.summary .addto.links .action[disabled],fieldset[disabled] .bundle.options.container .block.bundle.summary .addto.links .action{cursor:default;pointer-events:none;opacity:.5}.bundle.options.container p.required{color:#e02b27}.layout-1 .products.grid .item.product{width:20%}.layout-2-left .products.grid .item.product{width:25%}.layout-2-right .products.grid .item.product{width:25%}.layout-3 .products.grid .item.product{width:33.33333333%}.old-price,.old.price{text-decoration:line-through}.actual.price{font-weight:700}.products.wrapper.grid .item.product{padding:0 20px 20px;margin:0 0 30px}.products.wrapper.list .item.product{margin-bottom:80px}.products.wrapper.list .item.product>.product{display:table;width:100%;table-layout:fixed}.products.wrapper.list .item.product .product.photo{display:table-cell;vertical-align:top;width:30%;padding-right:35px}.products.wrapper.list .item.product .product.details{display:table-cell;vertical-align:top}.products.wrapper.list .item.product .product.name{font-size:18px;margin-bottom:20px}.products.wrapper.list .item.product .price-box{width:30%;margin-right:2%;float:left}.products.wrapper.list .item.product .product.description{margin-top:30px;color:#111}.products.toolbar{display:table;width:100%;padding:10px;background:#f0f0f0;margin-bottom:40px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.products.toolbar .settings{display:table-cell;vertical-align:middle;text-align:left}.products.toolbar .pager{display:table-cell;vertical-align:middle;text-align:right}.products.toolbar .pages{display:table-cell;vertical-align:middle}.products.toolbar .modes{display:inline;margin-right:20px}.products.toolbar .modes .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .modes .mode{border:1px solid #d1d1d1;width:37px;text-align:center;color:#7d7d7d}.products.toolbar .modes .mode>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .modes .mode.active{background:#e5e5e5;color:#c7c7c7}.products.toolbar .modes .mode+.mode{margin-left:-4px;border-left:0}.products.toolbar .modes .mode.grid{display:inline-block;text-decoration:none}.products.toolbar .modes .mode.grid:before{font-family:"icons-blank-theme";content:'\e60d';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .modes .mode.list{display:inline-block;text-decoration:none}.products.toolbar .modes .mode.list:before{font-family:"icons-blank-theme";content:'\e60b';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .sorter{display:inline}.products.toolbar .sorter select{width:auto}.products.toolbar .sorter .action.sort.asc{display:inline-block;text-decoration:none}.products.toolbar .sorter .action.sort.asc:before{font-family:"icons-blank-theme";content:'\e614';font-size:27px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .sorter .action.sort.asc>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .sorter .action.sort.desc{display:inline-block;text-decoration:none}.products.toolbar .sorter .action.sort.desc:before{font-family:"icons-blank-theme";content:'\e613';font-size:27px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .sorter .action.sort.desc>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .limiter{display:inline;margin-left:20px}.products.toolbar .limiter select{width:auto}.products.toolbar .amount{display:inline}.block.filter .subtitle{display:block;font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.block.filter .options{margin:0}.block.filter .options>dt{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.block.filter .options>dd{margin:0 0 30px}.block.filter .options .count{color:#7d7d7d}.block.filter .options .count:before{content:"("}.block.filter .options .count:after{content:")"}.block.filter .filtered .item{position:relative;padding-left:25px}.block.filter .filtered .item .label{font-weight:700}.block.filter .filtered .item .action.remove{position:absolute;top:-4px;left:0;display:inline-block;text-decoration:none}.block.filter .filtered .item .action.remove:before{font-family:"icons-blank-theme";content:'\e616';font-size:28px;line-height:1;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.filter .filtered .item .action.remove>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.filter .filtered+.actions{margin-bottom:30px}.layout-1 .product.info.main{width:40%;float:right}.layout-1 .product.media{float:left;width:57%}.layout-2-left .product.info.main,.layout-2-right .product.info.main{width:48%;float:right}.layout-2-left .product.media,.layout-2-right .product.media{float:left;width:50%}.layout-3 .product.info.main{width:48%;float:right}.layout-3 .product.media{float:left;width:50%}.product.media .photo.image{display:block;max-width:100%;height:auto}.product.media .notice{margin:10px 0;color:#7d7d7d;font-size:12px;font-size:1.2rem}.product.media .product.thumbs{margin:20px 0 30px}.product.media .items.thumbs{margin:0;padding:0;list-style-type:none;list-style-image:none}.product.media .items.thumbs>li{display:inline-block;vertical-align:top}.product.media .items.thumbs .active{display:block;line-height:1;outline:1px solid #ff5501}.product.info.detailed{clear:both}.product.info.detailed .table.additional.attributes{width:auto}.product.info.detailed .table.additional.attributes>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product.info.detailed .table.additional.attributes>thead>tr>td,.product.info.detailed .table.additional.attributes>tbody>tr>td,.product.info.detailed .table.additional.attributes>tfoot>tr>td{padding:1.5px 5px 10px 5px}.product.info.detailed .table.additional.attributes>thead>tr>th,.product.info.detailed .table.additional.attributes>tbody>tr>th,.product.info.detailed .table.additional.attributes>tfoot>tr>th{padding:1.5px 30px 10px 0}.product.info.main .stock.available,.product.info.main .stock.unavailable{display:inline-block;vertical-align:top;margin-bottom:5px;margin-right:20px}.product.info.main .product.attibute.sku{display:inline-block;vertical-align:top;margin-bottom:10px;color:#7d7d7d}.product.info.main .product.attibute.sku>.value{display:inline-block;vertical-align:top}.product.info.main .product.attibute.overview{margin:20px 0}.product.info.main .product.alert{margin:10px 0}.product.info.main .product.options.wrapper .field{margin:0 0 20px;border:0}.product.info.main .product.options.wrapper .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.product.info.main .product.options.wrapper .field.choice:before,.product.info.main .product.options.wrapper .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.product.info.main .product.options.wrapper .field>.control{float:none;width:auto}.product.info.main .product.options.wrapper .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.product.info.main .product.options.wrapper .field>.label+br{display:none}.product.info.main .product.options.wrapper .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.product.info.main .product.options.wrapper .field .nested .field{margin:5px 0}.product.info.main .product.options.wrapper .field.choice>.label{display:inline}.product.info.main .product.options.wrapper .field.choice>input{vertical-align:top}.product.info.main .product.options.wrapper .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.product.info.main .product.options.wrapper .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.product.info.main .product.options.wrapper .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.product.info.main .product.options.wrapper .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.product.info.main .product.options.wrapper .field .fields.group .field .control{float:none;width:auto}.product.info.main .product.options.wrapper .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.product.info.main .product.options.wrapper .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.product.info.main .product.options.wrapper .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.product.info.main .product.options.wrapper .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.product.info.main .product.options.wrapper .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.product.info.main .product.options.wrapper .field .addon textarea,.product.info.main .product.options.wrapper .field .addon select,.product.info.main .product.options.wrapper .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.product.info.main .product.options.wrapper .field .addon .addbefore,.product.info.main .product.options.wrapper .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.product.info.main .product.options.wrapper .field .addon .addbefore:disabled,.product.info.main .product.options.wrapper .field .addon .addafter:disabled{opacity:.5}.product.info.main .product.options.wrapper .field .addon .addbefore{float:left;order:1}.product.info.main .product.options.wrapper .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.product.info.main .product.options.wrapper .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.product.info.main .price-box .price{font-weight:700;font-size:18px}.product.info.main .box.tocart{display:table;margin:20px 0}.product.info.main .box.tocart .field.qty{display:table-cell;vertical-align:bottom;padding-right:15px}.product.info.main .box.tocart .input-text.qty{height:52px;width:52px;text-align:center}.product.info.main .box.tocart .actions{display:table-cell;vertical-align:bottom}.product.info.main .box.tocart .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.product.info.main .box.tocart .action.tocart:focus,.product.info.main .box.tocart .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.product.info.main .box.tocart .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.product.info.main .box.tocart .action.tocart.disabled,.product.info.main .box.tocart .action.tocart[disabled],fieldset[disabled] .product.info.main .box.tocart .action.tocart{cursor:default;pointer-events:none;opacity:.5}.product.info.main .addto{margin:20px 0}.product.info.main .action.tocompare{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.prices.tier.items{background:#f5f5f5;padding:10px 15px;margin:10px 0}.minimal-price-link,.price-excluding-tax,.price-including-tax{white-space:nowrap;display:inline-block}.map.popup{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-top:10px;margin-left:0;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear;position:absolute}.map.popup .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.map.popup .popup.content{margin:10px 0 0}.map.popup .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.map.popup .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.map.popup .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.map.popup .popup.actions .action.close:hover:before{color:inherit}.map.popup .popup.actions .action.close:active:before{color:inherit}.map.popup .popup.actions .action.close:focus,.map.popup .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.map.popup .popup.actions .action.close:hover{background:0;border:0}.map.popup .popup.actions .action.close.disabled,.map.popup .popup.actions .action.close[disabled],fieldset[disabled] .map.popup .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.map.popup.active{opacity:1}.map.popup .form.map.checkout{float:right}.map.popup .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.map.popup .action.tocart:focus,.map.popup .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.map.popup .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.map.popup .action.tocart.disabled,.map.popup .action.tocart[disabled],fieldset[disabled] .map.popup .action.tocart{cursor:default;pointer-events:none;opacity:.5}body.catalog-product-compare-index .action.print{float:right;margin:15px 0}.comparison.wrapper{clear:both;position:relative;z-index:1;margin-bottom:50px}.comparison.container{overflow-x:auto}.data.comparison{table-layout:fixed;margin-bottom:0}.data.comparison caption,.data.comparison .cell.label.remove,.data.comparison .cell.label.product{font:0/0 a}.data.comparison .cell.label{font-weight:700;border-right:1px solid #e5e5e5}.data.comparison .cell.label .attribute.label{display:block;width:100%;word-break:break-all}.data.comparison .cell{width:140px;padding:15px;vertical-align:top}.data.comparison .cell .attibute.value{width:100%;overflow:hidden}.data.comparison .cell.product.info,.data.comparison .cell.product.label{border-bottom:1px solid #e5e5e5}.data.comparison .cell.attribute{font-size:13px}.data.comparison .cell.attribute img{max-width:100%;height:auto}.data.comparison td:last-child{border-right:1px solid #e5e5e5}.data.comparison .product.photo{text-align:center;display:block;margin:0 auto 15px}.data.comparison .product.photo .img.photo.container{display:inline-block!important}.data.comparison .actions,.data.comparison .price-box,.data.comparison .product.rating,.data.comparison .product.name{display:block;margin:15px 0}.data.comparison .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.data.comparison .action.tocart:focus,.data.comparison .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.data.comparison .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.data.comparison .action.tocart.disabled,.data.comparison .action.tocart[disabled],fieldset[disabled] .data.comparison .action.tocart{cursor:default;pointer-events:none;opacity:.5}.data.comparison .addto.links{margin-top:15px}.data.comparison .addto.links .action.split,.data.comparison .addto.links .action.toggle{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.data.comparison .addto.links .action.toggle{padding:0}.data.comparison .cell.remove{padding-top:0;padding-bottom:0;text-align:right}.comparison.headings{position:absolute;z-index:2;top:0;left:0;width:auto;background:#fff}.block.event{clear:both}.block.event.category{margin-top:10px;margin-bottom:25px}.block.event.category .content{padding:15px;text-align:center;min-height:67px}.block.event .ticker li{display:none;margin:0 3px}.block.event .ticker .value{font-size:21px}.block.event .ticker .label{display:block;font-size:12px}.block.event .dates .start,.block.event .dates .end{display:inline-block}.block.event .dates .date{font-size:21px}.block.event .dates .start:after{content:"\2013";margin:0 10px;display:inline-block}.block.event .content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;position:relative}.block.event .content:before,.block.event .content:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid;pointer-events:none}.block.event .content:before{bottom:-30px;left:50%;margin-left:-15px;z-index:99;border:solid 15px}.block.event .content:after{bottom:-32px;left:50%;margin-left:-16px;z-index:98;border:solid 16px}.block.event .content .subtitle{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block;margin-top:0}.block.event.open .content,.block.event .open .content{background:#feebe5;border:1px solid #f99d84;color:#da370a}.block.event.open .content:before,.block.event .open .content:before{border-color:#feebe5 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.open .content:after,.block.event .open .content:after{border-color:#f99d84 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.upcoming .content,.block.event .upcoming .content{background:#daf2fa;border:1px solid #81d2ed;color:#1b92ba}.block.event.upcoming .content:before,.block.event .upcoming .content:before{border-color:#daf2fa rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.upcoming .content:after,.block.event .upcoming .content:after{border-color:#81d2ed rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.closed .content,.block.event .closed .content{background:#f7f7f7;border:1px solid #c3c3c3;color:#777}.block.event.closed .content:before,.block.event .closed .content:before{border-color:#f7f7f7 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.closed .content:after,.block.event .closed .content:after{border-color:#c3c3c3 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.columns .block.event{position:relative;z-index:2}.block.event .panel{position:relative;overflow:hidden;z-index:2}.block.event .panel>.slider{white-space:nowrap}.block.event .panel>.slider .item{display:inline-block;text-align:center;white-space:normal;vertical-align:top;width:16.35%}.sidebar .block.event .panel>.slider .item{width:100%}.block.event .panel>.slider .item img{max-width:100%}.block.event .panel>.slider .item>.event .content{border-left:0;border-right:0;padding:15px 0;min-height:156px}.block.event .panel>.slider .item>.event .subtitle{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block;margin-top:0}.block.event .panel>.slider .item>.event .dates .start,.block.event .panel>.slider .item>.event .dates .end{display:block}.block.event .panel>.slider .item>.event .dates .start:after{display:block}.block.event .panel>.slider .item>.event .dates .date{font-size:14px;font-weight:600}.block.event .panel>.slider .item>.event .dates .time{font-size:10px}.block.event .panel>.slider .item>.event .action.event{margin-top:15px;display:inline-block}.block.event .panel>.slider .item .action.show{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:block;padding:0}.block.event .panel>.slider .item .action.show .category.name{display:inline-block;padding:30px 10px 0}.block.event .action.slider{cursor:pointer;position:absolute;z-index:3;top:50%;margin-top:-15px}.block.event .action.slider.backward,.block.event .action.slider.forward{width:20px;overflow:hidden;opacity:.5;display:inline-block;text-decoration:none}.block.event .action.slider.backward>span,.block.event .action.slider.forward>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.event .action.slider.backward:before,.block.event .action.slider.forward:before{font-family:"icons-blank-theme";content:'\e617';font-size:80px;line-height:30px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.event .action.slider.backward:before,.block.event .action.slider.forward:before{margin-left:-30px}.block.event .action.slider.backward{left:0}.block.event .action.slider.forward{right:0}.block.event .action.slider.forward:before{content:'\e608'}.block.event .action.slider.inactive{cursor:default;display:none}.block.event .action.slider:hover{opacity:1}.block.search{float:right;padding-left:15px;position:relative;width:250px;z-index:1}.block.search input{padding-right:35px}.block.search .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.search .title{display:none}.block.search .action.search{position:absolute;right:10px;top:0;z-index:1;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.block.search .action.search>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.search .action.search:before{font-family:"icons-blank-theme";content:'\e615';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.block.search .action.search:hover:before{color:inherit}.block.search .action.search:active:before{color:inherit}.block.search .action.search:focus,.block.search .action.search:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.block.search .action.search:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.block.search .action.search.disabled,.block.search .action.search[disabled],fieldset[disabled] .block.search .action.search{cursor:default;pointer-events:none;opacity:.5}.block.search .action.search:focus,.block.search .action.search:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.block.search .action.search:hover{background:0;border:0}.block.search .action.search.disabled,.block.search .action.search[disabled],fieldset[disabled] .block.search .action.search{cursor:not-allowed;pointer-events:none;opacity:.5}.block.search .nested{padding-top:5px;position:absolute}.cart.container:before,.cart.container:after{content:"";display:table}.cart.container:after{clear:both}.cart.summary{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:right;width:23%;background:#f5f5f5;margin-bottom:25px;padding:1px 15px 25px}.cart.summary>.title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block}.cart.summary .block{margin-bottom:0}.cart.summary .block>.title{display:inline-block;text-decoration:none;border-top:1px solid #d1d1d1;cursor:pointer;display:block;font-weight:600;line-height:36px;margin-bottom:0;padding:0 20px 0 5px;position:relative}.cart.summary .block>.title:after{font-family:"icons-blank-theme";content:'\e622';font-size:30px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.summary .block>.title:after{position:absolute;right:0;top:0}.cart.summary .block>.title.active:after{content:'\e617'}.cart.summary .block>.title strong{font-weight:400}.cart.summary .block .content{display:none}.cart.summary .block.active .content{display:block}.cart.summary .block .item.options{margin-left:0}.cart.summary .block.discount .field>.label{display:block;float:none;text-align:left;width:auto}.cart.summary .fieldset{margin:15px 0 25px 5px}.cart.summary .field{margin:0 0 10px;border:0}.cart.summary .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.cart.summary .field.choice:before,.cart.summary .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.cart.summary .field>.control{float:none;width:auto}.cart.summary .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.cart.summary .field>.label+br{display:none}.cart.summary .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.cart.summary .field .nested .field{margin:5px 0}.cart.summary .field.choice>.label{display:inline}.cart.summary .field.choice>input{vertical-align:top}.cart.summary .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.cart.summary .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.cart.summary .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.cart.summary .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.cart.summary .field .fields.group .field .control{float:none;width:auto}.cart.summary .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.cart.summary .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.cart.summary .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.cart.summary .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.cart.summary .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.cart.summary .field .addon textarea,.cart.summary .field .addon select,.cart.summary .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.cart.summary .field .addon .addbefore,.cart.summary .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.cart.summary .field .addon .addbefore:disabled,.cart.summary .field .addon .addafter:disabled{opacity:.5}.cart.summary .field .addon .addbefore{float:left;order:1}.cart.summary .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.cart.summary .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.summary .field.note{font-size:12px}.cart.summary .field.postcode,.cart.summary .coupon .field{display:table-cell;position:relative;vertical-align:bottom;width:99%;z-index:1}.cart.summary .field.postcode div.mage-error,.cart.summary .coupon .field div.mage-error{position:absolute}.cart.summary .control{float:none;width:auto}.cart.summary .estimate .actions,.cart.summary .coupon .actions{display:table-cell;width:1%;white-space:nowrap;vertical-align:bottom}.cart.summary .action.quote,.cart.summary .action.apply,.cart.summary .action.cancel{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.cart.totals{border-top:1px solid #d1d1d1;padding-top:10px}.cart.totals .mark{padding-left:4px}.cart.totals .amount{padding-right:4px;text-align:right}.cart.totals .grand .mark,.cart.totals .grand .amount{padding-top:25px}.cart.totals .grand .mark strong{font-weight:400}.cart.totals .msrp{margin-bottom:10px}.cart .checkout.methods{text-align:center}.cart .action.primary{line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin-bottom:20px;width:100%}.cart.table.wrapper{float:left;width:73%}.cart.table.wrapper .cart.items>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.cart.table.wrapper .cart.items .action{display:inline-block;text-decoration:none;margin-left:10px}.cart.table.wrapper .cart.items .action:hover,.cart.table.wrapper .cart.items .action:active,.cart.table.wrapper .cart.items .action:focus{text-decoration:none}.cart.table.wrapper .cart.items .action.help.map{background:0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;font-weight:400}.cart.table.wrapper .cart.items .action.help.map:visited{color:#800080;text-decoration:none}.cart.table.wrapper .cart.items .action.help.map:hover{color:#006bb4;text-decoration:underline}.cart.table.wrapper .cart.items .action.help.map:active{color:#ff5501;text-decoration:underline}.cart.table.wrapper .cart.items .action.help.map:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.cart.table.wrapper .cart.items .action.help.map:hover,.cart.table.wrapper .cart.items .action.help.map:active,.cart.table.wrapper .cart.items .action.help.map:focus{background:0;border:0;outline:0}.cart.table.wrapper .cart.items .action.help.map.disabled,.cart.table.wrapper .cart.items .action.help.map[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .action.help.map{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.cart.table.wrapper .cart.items thead+.cart.item{border-top:1px solid #d1d1d1}.cart.table.wrapper .cart.items>.item.cart{border-bottom:1px solid #d1d1d1}.cart.table.wrapper .item .col{padding-top:27px}.cart.table.wrapper .item .col.qty{padding-top:20px}.cart.table.wrapper .item .col.qty .input-text{width:3.3em}.cart.table.wrapper .item.actions td{padding-bottom:17px;text-align:right}.cart.table.wrapper .col.price,.cart.table.wrapper .col.qty,.cart.table.wrapper .col.qty .qty,.cart.table.wrapper .col.subtotal{white-space:nowrap;text-align:center}.cart.table.wrapper .product.photo{display:table-cell;padding-right:20px;vertical-align:top;width:1%}.cart.table.wrapper .product.details{display:table-cell;vertical-align:top;width:99%}.cart.table.wrapper .item.options{font-size:12px;margin-top:10px}.cart.table.wrapper .action.continue{background-image:none;background-color:#f2f2f2;padding:0 15px 0 5px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;display:inline-block;text-decoration:none;border-radius:3px;font-weight:700}.cart.table.wrapper .action.continue:hover,.cart.table.wrapper .action.continue:active,.cart.table.wrapper .action.continue:focus{text-decoration:none}.cart.table.wrapper .action.continue:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.cart.table.wrapper .action.continue:hover:before{color:inherit}.cart.table.wrapper .action.continue:active:before{color:inherit}.cart.table.wrapper .action.continue:focus,.cart.table.wrapper .action.continue:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.cart.table.wrapper .action.continue:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.cart.table.wrapper .action.continue.disabled,.cart.table.wrapper .action.continue[disabled],fieldset[disabled] .cart.table.wrapper .action.continue{cursor:default;pointer-events:none;opacity:.5}.cart.table.wrapper .action.continue:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.cart.table.wrapper .action.update{display:inline-block;text-decoration:none;float:right;padding-left:5px}.cart.table.wrapper .action.update:before{font-family:"icons-blank-theme";content:'\e603';font-size:32px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.table.wrapper .action.clear{float:right;margin-right:10px}.block.crosssell{margin-top:70px}.block.crosssell .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.block.crosssell .title strong{font-weight:400}.block.crosssell .item.product{margin:0 0 30px;padding:0 15px 0 0;width:20%}.block.progress.onepage{background:#f5f5f5;margin-bottom:30px;padding:1px 15px 5px}.block.progress.onepage>.title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;margin-bottom:20px}.block.progress.onepage>.title strong{font-weight:400}.block.progress.onepage .content dd.complete{margin:0 0 15px}.block.progress.onepage .content dd.complete .content{margin:0}.block.progress.onepage .content .action,.block.progress.onepage .content .payment.method .title{font-weight:400}.block.progress.onepage .content .data.table{font-size:12px}.opc.wrapper .section.allow>.title{cursor:pointer}.opc.wrapper .step.title{line-height:50px;border-bottom:1px solid #d1d1d1}.opc.wrapper .step.title h2,.opc.wrapper .step.title .number{display:inline-block;font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.opc.wrapper .step.title .number:after{content:"."}.opc.wrapper .step.content{padding:20px 25px 40px;position:relative}.opc.wrapper .step.content .addresses .control{margin:20px 0 30px}.opc.wrapper .step.content .fieldset{margin-bottom:0}.opc.wrapper .step.content .form:after{content:attr(data-hasrequired);display:block;font-size:12px;font-size:1.2rem;color:#e02b27;margin:10px 0 0;letter-spacing:normal;word-spacing:normal}.opc.wrapper .step.content .form:after{text-align:right}.opc.wrapper .step.content .form>.choice{margin-left:25.8%;margin-top:29px}.opc.wrapper .step.content .actions{margin-top:40px}.opc.wrapper .items.methods .content{margin-left:20px}.opc.wrapper .items.methods img{vertical-align:middle}.opc.wrapper .items.methods .field.month{padding-right:10px}.opc.wrapper .items.methods.payment .content{margin-bottom:0}.opc.wrapper .items.methods.payment .content .fieldset{padding:15px 0}.opc.wrapper .items.methods.payment .content .label{font-weight:400}.opc.wrapper .fieldset.gift.message>legend{margin-left:0;padding:0}.opc.wrapper .fieldset.gift.message .field.choice{font-weight:400;margin-left:20px}.opc.wrapper .fieldset.gift.message .field.choice:before{display:none}.opc.wrapper .fieldset.gift.message .block.items{background:#f5f5f5;display:block;padding:20px 30px;margin-bottom:0}.opc.wrapper .fieldset.gift.message .block.items>dt{margin-top:10px;margin-bottom:0}.opc.wrapper .fieldset.gift.message .block.items .block.message{margin-bottom:10px}.opc.wrapper .fieldset.gift.message .block.items .options.individual{margin-left:20px}.opc.wrapper .options.individual{margin-top:10px}.opc.wrapper .options.individual ol>.item{border-bottom:1px solid #d1d1d1;padding-bottom:10px;margin-bottom:20px}.opc.wrapper .options.individual ol>.item .product{margin-bottom:10px}.opc.wrapper .options.individual ol>.item .product:before,.opc.wrapper .options.individual ol>.item .product:after{content:"";display:table}.opc.wrapper .options.individual ol>.item .product:after{clear:both}.opc.wrapper .options.individual ol>.item .product .img{float:left;margin-right:20px}.opc.wrapper .options.individual ol>.item:last-child{border-bottom:0;padding-bottom:0}.opc.wrapper .options.individual .number{font-size:12px}.opc.wrapper .activate.message{display:inline-block;margin:10px 0}.opc.wrapper .data.table>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.opc.wrapper .data.table tbody tr:first-child td{border-top:1px solid #d1d1d1}.opc.wrapper .data.table .col.price,.opc.wrapper .data.table .col.qty{text-align:center;white-space:nowrap}.opc.wrapper .data.table .col.subtotal{text-align:right;white-space:nowrap}.opc.wrapper .data.table .amount{text-align:right}.opc.wrapper .data.table td{padding:7px 10px}.opc.wrapper .data.table tbody tr:last-child td{border-bottom:1px solid #d1d1d1}.opc.wrapper .action.primary.checkout{margin:0 0 20px}.opc.wrapper .hidden{display:none}.opc.wrapper .step.login.wrapper:before,.opc.wrapper .step.login.wrapper:after{content:"";display:table}.opc.wrapper .step.login.wrapper:after{clear:both}.opc.wrapper .step.login.wrapper .fieldset.guest{margin-top:20px}.opc.wrapper .step.login.wrapper .field.choice{margin-bottom:10px}.opc.wrapper .step.login.wrapper .field.choice:before{display:none}.block.minicart.empty{text-align:center;font-size:12px}.block.minicart .subtotal{border-top:1px solid #e8e8e8;padding-top:10px}.block.minicart .subtotal .amount{font-size:21px}.block.minicart .subtitle{margin-bottom:15px}.block.minicart>.content>.actions{margin-top:10px}.block.minicart>.content>.actions .secondary,.block.minicart>.content>.actions .primary{padding-right:20px;display:inline}.minicart.wrapper{float:right;order:3;display:inline-block;position:relative}.minicart.wrapper:before,.minicart.wrapper:after{content:"";display:table}.minicart.wrapper:after{clear:both}.minicart.wrapper .action.showcart{cursor:pointer;display:inline-block;text-decoration:none}.minicart.wrapper .action.showcart:before{font-family:"icons-blank-theme";content:'\e611';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.minicart.wrapper .action.showcart:hover:before{color:inherit}.minicart.wrapper .action.showcart:active:before{color:inherit}.minicart.wrapper .action.showcart.active{display:inline-block;text-decoration:none}.minicart.wrapper .action.showcart.active:before{font-family:"icons-blank-theme";content:'\e611';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.minicart.wrapper .action.showcart.active:hover:before{color:inherit}.minicart.wrapper .action.showcart.active:active:before{color:inherit}.minicart.wrapper .block.minicart{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.minicart.wrapper .block.minicart li{margin:0}.minicart.wrapper .block.minicart li:hover{cursor:pointer}.minicart.wrapper .block.minicart:before,.minicart.wrapper .block.minicart:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.minicart.wrapper .block.minicart:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.minicart.wrapper .block.minicart:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.minicart.wrapper.active{overflow:visible}.minicart.wrapper.active .block.minicart{display:block}.minicart.wrapper .action.showcart{white-space:nowrap}.minicart.wrapper .action.showcart .text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minicart.wrapper .action.showcart .counter.qty{overflow:hidden;margin:3px 0 0;padding:0 3px;clip:none;display:inline-block;white-space:normal;min-width:20px;max-width:2em;background:#ff5501;text-align:center;color:#fff;line-height:26px;height:26px;border-radius:2px}.minicart.wrapper .action.showcart .counter.qty.empty:before{content:"0"}.minicart.wrapper .block.minicart{right:-15px;width:380px;padding:15px 15px 15px}.minicart.wrapper .block.minicart>.title{display:none}.minicart.wrapper .block.minicart:before,.minicart.wrapper .block.minicart:after{left:auto;right:25px}.minicart.wrapper .block.minicart:before{right:26px}.minicart.wrapper .product.actions{text-align:right}.minicart.wrapper .product.actions .primary,.minicart.wrapper .product.actions .secondary{display:inline}.minicart.wrapper .pricing.details{display:table}.minicart.wrapper .pricing.details .rate,.minicart.wrapper .pricing.details .details.qty{display:table-row}.minicart.wrapper .pricing.details .value,.minicart.wrapper .pricing.details .label{padding-right:10px;display:table-cell}.minicart.wrapper .pricing.details .label:after{content:":"}.minicart.wrapper .action.edit{display:inline-block;text-decoration:none}.minicart.wrapper .action.edit>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minicart.wrapper .action.edit:before{font-family:"icons-blank-theme";content:'\e606';font-size:28px;line-height:28px;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.minicart.wrapper .action.edit:hover:before{color:#303030}.minicart.wrapper .action.edit:active:before{color:#303030}.minicart.wrapper .action.close{position:absolute;right:14px;top:6px;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.minicart.wrapper .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:33px;line-height:33px;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.minicart.wrapper .action.close:focus,.minicart.wrapper .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.minicart.wrapper .action.close:hover{background:0;border:0}.minicart.wrapper .action.close.disabled,.minicart.wrapper .action.close[disabled],fieldset[disabled] .minicart.wrapper .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.minicart.wrapper .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minilist{margin:0;padding:0;list-style-type:none;list-style-image:none}.minilist .item{border-top:1px solid #e8e8e8;padding:15px 0;z-index:1}.minilist .item>.product{display:flex}.minilist .item>.product:before,.minilist .item>.product:after{content:"";display:table}.minilist .item>.product:after{clear:both}.minilist .product.photo{margin-right:10px}.minilist .product.details{flex-grow:1}.minilist .action.delete{display:inline-block;text-decoration:none}.minilist .action.delete>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minilist .action.delete:before{font-family:"icons-blank-theme";content:'\e604';font-size:28px;line-height:28px;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.minilist .action.delete:hover:before{color:#303030}.minilist .action.delete:active:before{color:#303030}.login.container:before,.login.container:after{content:"";display:table}.login.container:after{clear:both}.login.container .block.login .actions.toolbar .primary{margin-right:30px}.login.container .block.login .actions.toolbar .secondary{float:left}.login.container .block.new .actions.toolbar{margin-top:25px}.login.container .block .title{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid #e8e8e8}.login.container .block .title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.login.container .fieldset:after{content:attr(data-hasrequired);display:block;font-size:12px;font-size:1.2rem;color:#e02b27;margin:10px 0 0;letter-spacing:normal;word-spacing:normal}.login.container .fieldset:after{margin:35px 0 0 25.8%}.login.container .fieldset>.field>.control{width:55%}.form.password.reset,.form.send.confirmation,.form.password.forget,.form.create.account{width:50%}.block.addresses.list ol.items.addresses:before,.block.addresses.list ol.items.addresses:after{content:"";display:table}.block.addresses.list ol.items.addresses:after{clear:both}.block.addresses.list ol.items.addresses li.item{margin-bottom:20px}.block.addresses.list ol.items.addresses li.item:nth-last-child(1),.block.addresses.list ol.items.addresses li.item:nth-last-child(2){margin-bottom:0}.downloadable.samples{margin-bottom:20px}.downloadable.samples dd{margin:0 0 10px}.field.downloads{margin:0 0 20px;border:0}.field.downloads:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.field.downloads.choice:before,.field.downloads.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.field.downloads>.control{float:none;width:auto}.field.downloads>.label{font-size:14px;font-size:1.4rem;font-weight:700}.field.downloads>.label+br{display:none}.field.downloads.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.field.downloads .nested .field{margin:5px 0}.field.downloads.choice>.label{display:inline}.field.downloads.choice>input{vertical-align:top}.field.downloads .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.field.downloads .fields.group>*{letter-spacing:normal;word-spacing:normal}.field.downloads .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.field.downloads .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.field.downloads .fields.group .field .control{float:none;width:auto}.field.downloads .fields.group.group-2 .field{width:50%!important;display:inline-block}.field.downloads .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.field.downloads .fields.group.group-4 .field{width:25%!important;display:inline-block}.field.downloads .fields.group.group-5 .field{width:20%!important;display:inline-block}.field.downloads .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.field.downloads .addon textarea,.field.downloads .addon select,.field.downloads .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.field.downloads .addon .addbefore,.field.downloads .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.field.downloads .addon .addbefore:disabled,.field.downloads .addon .addafter:disabled{opacity:.5}.field.downloads .addon .addbefore{float:left;order:1}.field.downloads .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.field.downloads .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.product.add.form .giftcard.form .field{margin:0 0 20px;border:0}.product.add.form .giftcard.form .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.product.add.form .giftcard.form .field.choice:before,.product.add.form .giftcard.form .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.product.add.form .giftcard.form .field>.control{float:none;width:auto}.product.add.form .giftcard.form .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.product.add.form .giftcard.form .field>.label+br{display:none}.product.add.form .giftcard.form .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.product.add.form .giftcard.form .field .nested .field{margin:5px 0}.product.add.form .giftcard.form .field.choice>.label{display:inline}.product.add.form .giftcard.form .field.choice>input{vertical-align:top}.product.add.form .giftcard.form .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.product.add.form .giftcard.form .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.product.add.form .giftcard.form .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.product.add.form .giftcard.form .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.product.add.form .giftcard.form .field .fields.group .field .control{float:none;width:auto}.product.add.form .giftcard.form .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.product.add.form .giftcard.form .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.product.add.form .giftcard.form .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.product.add.form .giftcard.form .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.product.add.form .giftcard.form .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.product.add.form .giftcard.form .field .addon textarea,.product.add.form .giftcard.form .field .addon select,.product.add.form .giftcard.form .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.product.add.form .giftcard.form .field .addon .addbefore,.product.add.form .giftcard.form .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.product.add.form .giftcard.form .field .addon .addbefore:disabled,.product.add.form .giftcard.form .field .addon .addafter:disabled{opacity:.5}.product.add.form .giftcard.form .field .addon .addbefore{float:left;order:1}.product.add.form .giftcard.form .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.product.add.form .giftcard.form .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.summary .block.giftcard .fieldset{padding-bottom:52px;position:relative}.cart.summary .block.giftcard .action.check{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem;margin-top:12px;bottom:0;left:0;position:absolute}.cart.summary .block.giftcard .field>.label{display:block;float:none;text-align:left;width:auto}.cart.summary .giftcard .field{display:table-cell;position:relative;vertical-align:bottom;width:99%;z-index:1}.cart.summary .giftcard .field div.mage-error{position:absolute}.cart.summary .giftcard .actions{display:table-cell;width:1%;white-space:nowrap;vertical-align:bottom}.cart.summary .action.add{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.form.giftcard.redeem .giftcard.ballance{margin-bottom:30px}.form.giftregistry.validation .fieldset.recipients .field .control{width:50%}.form.giftregistry.validation .fieldset.add-row{margin-top:45px;position:relative}.form.giftregistry.validation .fieldset.add-row .action.remove{line-height:normal;position:absolute;top:4px;margin-left:75.8%}.form.giftregistry.edit .actions.toolbar:not(:last-child){margin-bottom:40px}.table.data.grouped>thead>tr>th,.table.data.grouped>tbody>tr>th,.table.data.grouped>tfoot>tr>th,.table.data.grouped>thead>tr>td,.table.data.grouped>tbody>tr>td,.table.data.grouped>tfoot>tr>td{border-top:1px solid #d1d1d1}.table.data.grouped>caption+thead>tr:first-child>th,.table.data.grouped>colgroup+thead>tr:first-child>th,.table.data.grouped>thead:first-child>tr:first-child>th,.table.data.grouped>caption+thead>tr:first-child>td,.table.data.grouped>colgroup+thead>tr:first-child>td,.table.data.grouped>thead:first-child>tr:first-child>td{border-top:0}.table.data.grouped>tbody+tbody{border-top:1px solid #919191}.table.data.grouped td{vertical-align:middle}.table.data.grouped .product.name{font-weight:400}.table.data.grouped .price-box .price{font-weight:400;font-size:14px}.table.data.grouped .col.qty .stock.unavailable{margin:0;white-space:nowrap}.wishlist.split.button,.cart.table.wrapper .cart.items .split.button{display:inline-block;position:relative;vertical-align:top}.wishlist.split.button:before,.wishlist.split.button:after,.cart.table.wrapper .cart.items .split.button:before,.cart.table.wrapper .cart.items .split.button:after{content:"";display:table}.wishlist.split.button:after,.cart.table.wrapper .cart.items .split.button:after{clear:both}.wishlist.split.button .action.split,.cart.table.wrapper .cart.items .split.button .action.split{float:left;margin:0}.wishlist.split.button .action.toggle,.cart.table.wrapper .cart.items .split.button .action.toggle{float:right;margin:0}.wishlist.split.button button.action.split,.wishlist.split.button .cart.table.wrapper .cart.items .action.action.split,.cart.table.wrapper .cart.items .split.button button.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.wishlist.split.button button+.action.toggle,.wishlist.split.button .cart.table.wrapper .cart.items .action+.action.toggle,.cart.table.wrapper .cart.items .split.button button+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.wishlist.split.button .action.split,.cart.table.wrapper .cart.items .split.button .action.split{padding:0 5px}.wishlist.split.button .action.toggle,.cart.table.wrapper .cart.items .split.button .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.wishlist.split.button .action.toggle>span,.cart.table.wrapper .cart.items .split.button .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.wishlist.split.button .action.toggle:after,.cart.table.wrapper .cart.items .split.button .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.wishlist.split.button .action.toggle:hover:after,.cart.table.wrapper .cart.items .split.button .action.toggle:hover:after{color:inherit}.wishlist.split.button .action.toggle:active:after,.cart.table.wrapper .cart.items .split.button .action.toggle:active:after{color:inherit}.wishlist.split.button .action.toggle.active,.cart.table.wrapper .cart.items .split.button .action.toggle.active{display:inline-block;text-decoration:none}.wishlist.split.button .action.toggle.active>span,.cart.table.wrapper .cart.items .split.button .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.wishlist.split.button .action.toggle.active:after,.cart.table.wrapper .cart.items .split.button .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.wishlist.split.button .action.toggle.active:hover:after,.cart.table.wrapper .cart.items .split.button .action.toggle.active:hover:after{color:inherit}.wishlist.split.button .action.toggle.active:active:after,.cart.table.wrapper .cart.items .split.button .action.toggle.active:active:after{color:inherit}.wishlist.split.button .items,.cart.table.wrapper .cart.items .split.button .items{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.wishlist.split.button .items li,.cart.table.wrapper .cart.items .split.button .items li{margin:0;padding:3px 5px}.wishlist.split.button .items li:hover,.cart.table.wrapper .cart.items .split.button .items li:hover{background-color:#e8e8e8;cursor:pointer}.wishlist.split.button .items:before,.wishlist.split.button .items:after,.cart.table.wrapper .cart.items .split.button .items:before,.cart.table.wrapper .cart.items .split.button .items:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.wishlist.split.button .items:before,.cart.table.wrapper .cart.items .split.button .items:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.wishlist.split.button .items:after,.cart.table.wrapper .cart.items .split.button .items:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.wishlist.split.button.active,.cart.table.wrapper .cart.items .split.button.active{overflow:visible}.wishlist.split.button.active .items,.cart.table.wrapper .cart.items .split.button.active .items{display:block}.wishlist.split.button .items,.cart.table.wrapper .cart.items .split.button .items{top:100%;left:100%;margin-left:-36px}.product.info.main .wishlist.split.button .split,.product.info.main .wishlist.split.button .toggle,.product.info.main .cart.table.wrapper .cart.items .split.button .split,.product.info.main .cart.table.wrapper .cart.items .split.button .toggle{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.wishlist.window.popup{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.wishlist.window.popup .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.wishlist.window.popup .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.wishlist.window.popup .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.wishlist.window.popup .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.wishlist.window.popup .popup.actions .action.close:hover:before{color:inherit}.wishlist.window.popup .popup.actions .action.close:active:before{color:inherit}.wishlist.window.popup .popup.actions .action.close:focus,.wishlist.window.popup .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.wishlist.window.popup .popup.actions .action.close:hover{background:0;border:0}.wishlist.window.popup .popup.actions .action.close.disabled,.wishlist.window.popup .popup.actions .action.close[disabled],fieldset[disabled] .wishlist.window.popup .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.wishlist.window.popup.active{opacity:1}.wishlist.window.popup.active{display:block}.wishlist.window.popup .field{margin:0 0 20px;border:0}.wishlist.window.popup .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.wishlist.window.popup .field.choice:before,.wishlist.window.popup .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.wishlist.window.popup .field>.control{float:none;width:auto}.wishlist.window.popup .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.wishlist.window.popup .field>.label+br{display:none}.wishlist.window.popup .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.wishlist.window.popup .field .nested .field{margin:5px 0}.wishlist.window.popup .field.choice>.label{display:inline}.wishlist.window.popup .field.choice>input{vertical-align:top}.wishlist.window.popup .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.wishlist.window.popup .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.wishlist.window.popup .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.wishlist.window.popup .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.wishlist.window.popup .field .fields.group .field .control{float:none;width:auto}.wishlist.window.popup .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.wishlist.window.popup .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.wishlist.window.popup .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.wishlist.window.popup .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.wishlist.window.popup .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.wishlist.window.popup .field .addon textarea,.wishlist.window.popup .field .addon select,.wishlist.window.popup .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.wishlist.window.popup .field .addon .addbefore,.wishlist.window.popup .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.wishlist.window.popup .field .addon .addbefore:disabled,.wishlist.window.popup .field .addon .addafter:disabled{opacity:.5}.wishlist.window.popup .field .addon .addbefore{float:left;order:1}.wishlist.window.popup .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.wishlist.window.popup .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.wishlist.overlay{-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;transition:opacity .15s linear;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background-color:#000;opacity:0}.wishlist.overlay.active{opacity:.5;filter:alpha(opacity=50)}.cart.table.wrapper .cart.items .split.button .items{text-align:left}.cart.table.wrapper .cart.items .split.button .action.new{background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.cart.table.wrapper .cart.items .split.button .action.new:focus,.cart.table.wrapper .cart.items .split.button .action.new:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.cart.table.wrapper .cart.items .split.button .action.new:hover{background:0;border:0}.cart.table.wrapper .cart.items .split.button .action.new.disabled,.cart.table.wrapper .cart.items .split.button .action.new[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .split.button .action.new{cursor:not-allowed;pointer-events:none;opacity:.5}.form.wishlist.items .message.notice.msg-private{margin-bottom:20px}.block.wishlist.management .action.add.wishlist{float:right;margin-top:-8px}.block.wishlist.management .title .counter.qty{font-size:14px;margin-left:15px}.block.wishlist.management .content .subtitle{float:left}.block.wishlist.management .content .toolbar.wishlist{float:right;margin-top:5px}.block.newsletter{position:relative;z-index:1}.block.newsletter .fieldset{margin:0;padding:0;display:inline-block;vertical-align:top}.block.newsletter .control{display:inline-block;text-decoration:none;width:250px}.block.newsletter .control:before{font-family:"icons-blank-theme";content:'\e61d';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.newsletter .control:before{position:absolute}.block.newsletter input{padding-left:35px}.block.newsletter .title{display:none}.block.newsletter .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.newsletter .actions{display:inline-block;vertical-align:top}.block.add.review>.title{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.block.add.review fieldset{border:0;margin:0;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.block.add.review fieldset>*{letter-spacing:normal;word-spacing:normal}.block.add.review fieldset>.legend{margin:0 0 10px;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.block.add.review fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.block.add.review .legend{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.block.add.review .field.rating{display:table-row}.block.add.review .field.rating .label{display:table-cell;vertical-align:middle;padding:5px 0}.block.add.review .field.rating .control{display:table-cell;vertical-align:top}.block.add.review .form.actions{margin-left:25.8%}.block.reviews.list>.title{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.block.reviews.list .review.item{margin-bottom:40px}.block.reviews.list .review.title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.data.table.reviews .rating.summary{margin-top:-4px}.customer.review.view .review.title,.customer.review.view .ratings.summary.items,.customer.review.view .product.details{margin-bottom:20px}.product.reviews.summary{display:table;margin-left:-5px}.product.reviews.summary.empty{margin-left:0}.product.reviews.summary .rating.summary{display:table-cell;vertical-align:middle}.product.reviews.summary .reviews.actions{display:table-cell;vertical-align:middle;line-height:40px;font-size:11px}.product.reviews.summary .reviews.actions a{margin-right:5px}.order.details:before,.order.details:after{content:"";display:table}.order.details:after{clear:both}.order.details ul.items{clear:both;margin-bottom:20px}.order.details ul.items:before,.order.details ul.items:after{content:"";display:table}.order.details ul.items:after{clear:both}.order.details ul.items .item{float:left;margin-left:15px}.order.details ul.items .item:first-child{margin-left:0}.order.details .order.status{display:inline-block;font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem;margin-top:0}.order.details .order.date{margin-bottom:20px}.order.details .order.toolbar{float:right}.order.details .order.toolbar .action{margin-left:15px}.order.details .order.toolbar .action:first-child{margin-left:0}.order.details .order.subtitle.caption,.order.details .order.title{margin-bottom:20px}.order.details .order.subtitle.caption strong,.order.details .order.title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.order.details .order.subtitle.caption .action,.order.details .order.title .action{margin-left:15px}.form.send.friend .actions.toolbar{margin-top:10px}.form.send.friend .recipients .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;margin-left:25.8%}.form.send.friend .recipients .message{margin-left:25.8%}.action.mailto.friend{display:inline-block;text-decoration:none}.action.mailto.friend:before{font-family:"icons-blank-theme";content:'\e61d';font-size:28px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.page.header{background-color:none}.page.header .panel.wrapper{border-bottom:1px solid #e8e8e8}.page.header .header.panel{display:flex;flex-direction:row;justify-content:flex-start;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.page.header .header.panel:after{content:"";display:table;clear:both}.header.links{float:right;margin:0;padding:0;list-style-type:none;list-style-image:none;margin-left:auto}.header.links>li{display:inline-block;vertical-align:top}.header.links li{margin:0 0 0 15px}.header.content{padding-top:30px;display:flex;flex-direction:row;justify-content:flex-end;flex-wrap:wrap}.header.content:after{content:"";display:table;clear:both}.logo{float:left;margin:-15px auto 25px 0}.action.skip{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.switcher{float:left;margin-right:15px}.switcher .options{display:inline-block;position:relative}.switcher .options:before,.switcher .options:after{content:"";display:table}.switcher .options:after{clear:both}.switcher .options .action.switch{padding:0;cursor:pointer;display:inline-block;text-decoration:none}.switcher .options .action.switch>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.switcher .options .action.switch:after{font-family:"icons-blank-theme";content:'\e622';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.switcher .options .action.switch:hover:after{color:inherit}.switcher .options .action.switch:active:after{color:inherit}.switcher .options .action.switch.active{display:inline-block;text-decoration:none}.switcher .options .action.switch.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.switcher .options .action.switch.active:after{font-family:"icons-blank-theme";content:'\e621';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.switcher .options .action.switch.active:hover:after{color:inherit}.switcher .options .action.switch.active:active:after{color:inherit}.switcher .options ul{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.switcher .options ul li{margin:0;padding:8px}.switcher .options ul li:hover{background-color:#e8e8e8;cursor:pointer}.switcher .options ul:before,.switcher .options ul:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.switcher .options ul:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.switcher .options ul:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.switcher .options.active{overflow:visible}.switcher .options.active ul{display:block}.switcher li{margin:0;font-size:12px}.switcher strong{font-weight:400}.switcher .action.switch{background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.switcher .action.switch:focus,.switcher .action.switch:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.switcher .action.switch:hover{background:0;border:0}.switcher .action.switch.disabled,.switcher .action.switch[disabled],fieldset[disabled] .switcher .action.switch{cursor:not-allowed;pointer-events:none;opacity:.5}.switcher .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.message.global>.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.message.global p{margin:0}.message.global.noscript,.message.global.cookie{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#ffee9c;border-color:#d6ca8e;color:#333;margin:0}.message.global.noscript a,.message.global.cookie a{color:#1979c3}.message.global.noscript a:hover,.message.global.cookie a:hover{color:#006bb4}.message.global.noscript a:active,.message.global.cookie a:active{color:#ff5501}.message.global.cookie{position:fixed;bottom:0;left:0;right:0;z-index:3}.message.global.cookie .actions{margin-top:10px}.message.global.cookie .action.allow{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.message.global.cookie .action.allow:focus,.message.global.cookie .action.allow:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.message.global.cookie .action.allow:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.message.global.cookie .action.allow.disabled,.message.global.cookie .action.allow[disabled],fieldset[disabled] .message.global.cookie .action.allow{cursor:default;pointer-events:none;opacity:.5}.message.global.demo{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#ff0101;border-color:none;color:#fff;text-align:center}.message.global.demo a{color:#1979c3}.message.global.demo a:hover{color:#006bb4}.message.global.demo a:active{color:#ff5501}body{background-color:#fff}.footer.page{margin-top:25px;background-color:none}.footer.content{padding-top:25px;padding-bottom:25px;border-top:1px solid #d1d1d1}.footer.content ul{margin:0;padding:0 50px 0 0;list-style-type:none;list-style-image:none}.footer.content .links{display:inline-block;vertical-align:top}.footer.content .block{float:right}.footer .copyright:before{clear:both;margin-bottom:25px;content:"";display:block}.product.info.main .action.towishlist{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.column.sidebar .widget.block.addbysku .field{display:inline-block;vertical-align:top}.column.sidebar .widget.block.addbysku .fieldset{margin-bottom:0}.column.sidebar .widget.block.addbysku .fields{position:relative;margin-right:30px}.column.sidebar .widget.block.addbysku .field.sku{width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;padding-right:54px;margin-right:-54px}.column.sidebar .widget.block.addbysku .field.qty{width:50px}.column.sidebar .widget.block.addbysku .action.remove{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;display:inline-block;background:0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;position:absolute;right:-27px;top:23px}.column.sidebar .widget.block.addbysku .action.remove>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.column.sidebar .widget.block.addbysku .action.remove:before{font-family:"icons-blank-theme";content:'\e616';font-size:26px;line-height:inherit;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.column.sidebar .widget.block.addbysku .action.remove:hover:before{color:#303030}.column.sidebar .widget.block.addbysku .action.remove:active:before{color:#303030}.column.sidebar .widget.block.addbysku .action.remove:focus,.column.sidebar .widget.block.addbysku .action.remove:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.column.sidebar .widget.block.addbysku .action.remove:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.column.sidebar .widget.block.addbysku .action.remove.disabled,.column.sidebar .widget.block.addbysku .action.remove[disabled],fieldset[disabled] .column.sidebar .widget.block.addbysku .action.remove{cursor:default;pointer-events:none;opacity:.5}.column.sidebar .widget.block.addbysku .action.remove:visited{color:#800080;text-decoration:none}.column.sidebar .widget.block.addbysku .action.remove:hover{color:#006bb4;text-decoration:underline}.column.sidebar .widget.block.addbysku .action.remove:active{color:#ff5501;text-decoration:underline}.column.sidebar .widget.block.addbysku .action.remove:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.column.sidebar .widget.block.addbysku .action.remove:hover,.column.sidebar .widget.block.addbysku .action.remove:active,.column.sidebar .widget.block.addbysku .action.remove:focus{background:0;border:0;outline:0}.column.sidebar .widget.block.addbysku .action.remove.disabled,.column.sidebar .widget.block.addbysku .action.remove[disabled],fieldset[disabled] .column.sidebar .widget.block.addbysku .action.remove{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.column.sidebar .widget.block.addbysku .action.remove:hover,.column.sidebar .widget.block.addbysku .action.remove:active,.column.sidebar .widget.block.addbysku .action.remove:focus{box-shadow:none;text-decoration:none}.column.sidebar .widget.block.addbysku .actions.toolbar{position:relative;padding-top:50px;margin-left:0}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;display:inline-block;text-decoration:none;position:absolute;top:0;left:0;padding:0 3px}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:before{font-family:"icons-blank-theme";content:'\e61c';font-size:31px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:hover:before{color:inherit}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:active:before{color:inherit}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:focus,.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add.disabled,.column.sidebar .widget.block.addbysku .actions.toolbar .action.add[disabled],fieldset[disabled] .column.sidebar .widget.block.addbysku .actions.toolbar .action.add{cursor:default;pointer-events:none;opacity:.5}.block.widget.new .pager{margin:0 0 40px;padding:10px;background:#f0f0f0}.block.widget.new .pager .pages{text-align:center}.block.widget.new .pager .amount{float:right;margin:7px 0 0}.widget.widget-cms-link{display:block}.widget.widget-cms-hierarchy-link{display:block}@media only screen and (max-width: 768px){._rwd_columns,.columns,.columns{ flex-direction:column!important}._rwd_column,.layout-1 .column.main,.layout-3 .column.main,.layout-2-left .column.main,.layout-2-right .column.main,.layout-3 .column.left,.layout-2-left .column.left,.layout-2-right .column.left,.layout-3 .column.right,.layout-2-left .column.right,.layout-2-right .column.right,.layout-1 .column.main,.layout-3 .column.main,.layout-2-left .column.main,.layout-2-right .column.main,.layout-3 .column.left,.layout-2-left .column.left,.layout-2-right .column.left,.layout-3 .column.right,.layout-2-left .column.right,.layout-2-right .column.right,.layout-example-3 .column.main,.layout-example-3 .column.left,.layout-example-3 .column.right,.layout-example-3-1 .column.main,.layout-example-3-1 .column.left,.layout-example-3-1 .column.right{order:0!important;width:100%!important}._rwd_width,.navigation>ul,.breadcrumbs,.page.header .header.panel,.header.content,.footer.content,.page.main,.page.wrapper>.widget,.page.wrapper>.page.bottom,.block.category.event,.breadcrumbs,.message.global>.content,.example-breadcrumbs-1,.example-breadcrumbs-1,header.header,footer.footer,.page.main{min-width:0!important;max-width:auto!important}._rwd_floats{float:none!important}._rwd_margins,.actions.toolbar,.actions.toolbar .primary .action,.actions.toolbar .secondary .action,.login.container .fieldset:after{margin-left:0!important;margin-right:0!important}._rwd_width_float,.account .column.main .block .content .box,.fieldset>.field>.label,.fieldset .fields>.field>.label,.fieldset>.field>.control,.fieldset .fields>.field>.control,.fieldset>.field.choice:before,.fieldset .fields>.field.choice:before,.bundle.options.container .product.add.form .product.options.wrapper,.bundle.options.container .product.add.form .product.options.bottom,.bundle.options.container .product.add.form .block.bundle.summary,.column.main .product.info.main,.column.main .product.media,.column.main .box.tocart,.products.wrapper.list .item.product .price-box,.cart.summary,.cart.table.wrapper,.form.password.forget,.form.create.account{width:100%!important;float:none!important}._rwd_width_float_margins,.fieldset>.legend,.actions.toolbar .primary,.actions.toolbar .secondary,.login.container .block.customer{width:100%!important;float:none!important;margin-left:0!important;margin-right:0!important}.page.main>.page.title{margin-bottom:30px}.page.main>.page.title .title+.action{margin-top:0}.account .column.main{margin-bottom:30px}.account .column.main .block .content .box{margin-bottom:20px}.account .column.main .block .content .box:last-child{margin-bottom:0}.account .column.sidebar{margin-right:0}.button-responsive,.page.main>.page.title .title+.action,.actions.toolbar .primary .action,.actions.toolbar .secondary .action,.column.main .action.primary.tocart,.products.wrapper.list .item.product .product.actions .action.tocart{float:none;width:100%}h1{font-size:26px}.wrapper.table{width:100%;margin-bottom:20px;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.wrapper.table>table{margin-bottom:0}.wrapper.table>table>thead>tr>th,.wrapper.table>table>tbody>tr>th,.wrapper.table>table>tfoot>tr>th,.wrapper.table>table>thead>tr>td,.wrapper.table>table>tbody>tr>td,.wrapper.table>table>tfoot>tr>td{white-space:nowrap}.navigation{background:#f5f5f5;display:block;height:100%;left:-86%;overflow:auto;position:absolute;width:86%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}.navigation ul{margin:0;padding:0}.navigation .nav{-webkit-transition:left .3s linear 0;-moz-transition:left .3s linear 0;transition:left .3s linear 0;position:relative;overflow:hidden}.navigation .nav>.level0{font-size:16px;font-size:1.6rem;border-top:1px solid #d1d1d1;display:block;margin:0}.navigation .nav>.level0>a{display:block;line-height:inherit;padding:10px 35px 10px 16px}.navigation .nav>.level0.parent{display:block}.navigation .nav>.level0.parent:before{display:none}.navigation .nav>.level0.parent:after{opacity:1;height:auto}.navigation .nav>.level0.parent>a{display:block}.navigation .nav>.level0.parent>a:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .nav>.level0.parent>a.action.back:after{content:'\e617'}.navigation .nav>.level0.parent>a.action.back:after{content:'\e617'}.navigation .nav>.level0.parent .submenu{display:none;position:relative;width:100%;overflow-x:hidden;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0;font-weight:400}.navigation .nav>.level0.parent .submenu.opened{display:block}.navigation .nav>.level0.parent .submenu>ul{display:block;padding-top:0;padding-bottom:0}.navigation .nav>.level0.parent .submenu>ul li{margin:0}.navigation .nav>.level0.parent .submenu>ul a:hover>span{background:0}.navigation .nav>.level0.parent .submenu ul{background:#f5f5f5;box-shadow:none}.navigation .nav>.level0.parent .submenu:before,.navigation .nav>.level0.parent .submenu:after{display:none}.navigation .nav>.level0>a{display:block;line-height:inherit;padding:10px 35px 10px 16px}.navigation .nav .parent:after{display:none}.navigation .nav .parent>a{position:relative}.navigation .nav .parent>a:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .nav .parent>a.action.back:after{content:'\e617'}.navigation .nav .parent>a.action.back:after{content:'\e617'}.navigation .nav .parent .submenu{display:none;position:relative;width:100%;overflow-x:hidden;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}.navigation .nav .parent .submenu.opened{display:block}.navigation .nav .parent .submenu>ul{display:block;padding-top:0;padding-bottom:0}.navigation .nav .parent .submenu>ul li{margin:0}.navigation .nav .parent .submenu>ul a:hover>span{background:0}.navigation .submenu{background:0;display:none;position:relative;width:100%;overflow-x:hidden;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}.navigation .submenu.opened{display:block}.navigation .submenu>ul{display:block;padding-top:0;padding-bottom:0}.navigation .submenu>ul li{margin:0}.navigation .submenu>ul a:hover>span{background:0}.navigation .settings.panel>.title{font-weight:600;position:relative;padding:10px 20px;cursor:pointer;font-size:18px}.navigation .settings.panel>.title:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .settings.panel>.title.action.back:after{content:'\e617'}.navigation .settings.panel>.content{display:none;margin:0;padding:10px 20px}.navigation .settings.panel>.content .switcher{margin:0;padding:0;display:block}.navigation .settings.panel>.content .switcher:first-child{padding-bottom:0}.navigation .settings.panel>.content .switcher .label{display:block;font-weight:400;font-size:16px;font-size:1.6rem;padding:8px 0;position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.navigation .settings.panel>.content .switcher .options{display:block}.navigation .settings.panel>.content .switcher .options strong{display:block;position:relative;padding:8px 20px;cursor:pointer}.navigation .settings.panel>.content .switcher .options strong:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .settings.panel>.content .switcher .options strong.action.back:after{content:'\e617'}.navigation .settings.panel>.content .switcher .options button,.navigation .settings.panel>.content .switcher .options .cart.table.wrapper .cart.items .action{display:none}.navigation .settings.panel>.content .switcher .options ul{display:none;position:relative;margin:0;border:0;background:0}.navigation .settings.panel>.content .switcher .options ul li{font-size:14px;font-size:1.4rem;padding:0}.navigation .settings.panel>.content .switcher .options ul li a{display:block;color:#333;padding:8px 20px;text-decoration:none}.navigation .settings.panel>.content .switcher .options ul li a:hover{color:#333;text-decoration:none}.navigation .settings.panel>.content .switcher .options ul li:hover{background:0}.navigation .settings.panel>.content .switcher .options ul:before,.navigation .settings.panel>.content .switcher .options ul:after{display:none}.navigation .settings.panel>.content .switcher .options.active ul{box-shadow:none;display:block;margin:0}.navigation .settings.panel>.content .header.links li{display:block;margin:0}.navigation .settings.panel>.content .header.links li>a{display:block;font-size:16px;font-size:1.6rem;padding:8px 0}.navigation .settings.panel.active>.content{display:block}.nav>.parent>.submenu>.level0>li>a{font-weight:700}.header.links{padding:10px 20px}.header.links li{display:block;margin:0}.header.links li a{display:block;line-height:35px;color:#575757}.header.links li a:hover{color:#333;text-decoration:none}.header.links li.welcome{line-height:35px}.actions.toolbar .primary,.actions.toolbar .secondary{text-align:center;margin-bottom:10px}.actions.toolbar .primary .action,.actions.toolbar .secondary .action{margin-bottom:10px}.actions.toolbar .primary .action:last-child,.actions.toolbar .secondary .action:last-child{margin-bottom:0}.actions.toolbar .primary:last-child,.actions.toolbar .secondary:last-child{margin-bottom:0}.column.main .widget.block.addbysku .fields{margin-top:25px}.column.main .widget.block.addbysku .fields .action.remove{margin-left:0;right:0;top:-25px}.column.main .widget.block.addbysku .fields .action.remove+.field{clear:both}.bundle.options.container .product.add.form .block.bundle.summary{position:static}.column.main .wrapper.grid .products.list .item.product{width:50%}.products.list.items .actions>.secondary{display:none}.products.list.items .actions>.primary{display:block;float:none}.products.toolbar{display:block}.products.toolbar .settings,.products.toolbar .pages,.products.toolbar .pager{display:block;text-align:center;margin:0 0 10px}.products.toolbar .modes,.products.toolbar .sorter{display:inline-block;margin-bottom:10px}.products.toolbar .limiter .text{display:none}.products.wrapper.list .item.product{display:block;margin-bottom:30px}.products.wrapper.list .item.product .product{display:block}.products.wrapper.list .item.product .product.photo{display:block;width:auto}.products.wrapper.list .item.product .product.details{display:block;width:auto;text-align:center}.block.search{float:none;margin:0;padding:0;position:relative;width:100%;z-index:4}.block.search .action.search{display:none}.block.search .control{border-top:1px solid #d1d1d1;clear:both;margin:0 -90px -1px -20px;padding:0 20px}.block.search .label{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;text-decoration:none;display:inline-block;float:right}.block.search .label>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.search .label:before{font-family:"icons-blank-theme";content:'\e615';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.search .label:active,.block.search .label:focus{outline:0!important}.block.search .nested{left:-300%}.block.search input:focus{position:static;margin:15px 0}.block.search input{left:-300%;position:absolute}.minicart.wrapper{position:absolute;right:10px}.cart.summary,.cart.table.wrapper{position:relative}.cart.summary thead .col.price,.cart.table.wrapper thead .col.price,.cart.summary thead .col.subtotal,.cart.table.wrapper thead .col.subtotal{display:none}.cart.summary .col.price,.cart.table.wrapper .col.price,.cart.summary .col.subtotal,.cart.table.wrapper .col.subtotal{display:block;padding-top:3px;padding-bottom:1px;text-align:left}.cart.summary .col.price:before,.cart.table.wrapper .col.price:before,.cart.summary .col.subtotal:before,.cart.table.wrapper .col.subtotal:before{content:attr(data-th) ":";color:#7d7d7d;display:inline-block;font-size:12px;padding-left:5px}.cart.summary .col.qty,.cart.table.wrapper .col.qty{right:0;position:absolute;width:45px}.cart.summary .cart.items>.item.cart,.cart.table.wrapper .cart.items>.item.cart{display:block;position:relative}.cart.summary .item .col.item,.cart.table.wrapper .item .col.item{display:block;padding:25px 70px 10px 75px;position:relative;min-height:75px}.cart.summary .item .col.qty,.cart.table.wrapper .item .col.qty{top:0}.cart.summary .item.actions td,.cart.table.wrapper .item.actions td{padding-top:20px}.cart.summary .product.photo,.cart.table.wrapper .product.photo{display:block;max-width:60px;left:0;padding:0;position:absolute;top:15px;width:100%}.cart.summary .product.photo .container,.cart.table.wrapper .product.photo .container,.cart.summary .product.photo .container .image,.cart.table.wrapper .product.photo .container .image{max-width:100%;bottom:inherit!important}.cart.summary .actions.main,.cart.table.wrapper .actions.main{text-align:center}.cart.summary .action.update,.cart.table.wrapper .action.update,.cart.summary .action.continue,.cart.table.wrapper .action.continue,.cart.summary .action.clear,.cart.table.wrapper .action.clear{float:none;margin:0 auto 10px}.cart.summary .action.update,.cart.table.wrapper .action.update{display:block}.login.container .fieldset:after{text-align:center}.form.giftregistry.validation .fieldset.add-row .action.remove{float:right;position:static;margin-left:0}.form.giftregistry.validation .fieldset.add-row .action.remove+.field{clear:both}.footer.content .block.newsletter{float:none}.footer.content .block.newsletter .subscribe.form{display:flex}.footer.content .block.newsletter .fieldset,.footer.content .block.newsletter .control{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;width:90%}.footer.content .block.newsletter .actions{padding-left:10px;display:block;vertical-align:top}html.opened{overflow:hidden}body{width:100%;height:100%}body.opened{-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;height:100%;width:100%;overflow:hidden}body.opened .navigation{left:0;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.5);box-shadow:1px 1px 3px rgba(0,0,0,.5);-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}body.opened .page.wrapper{margin-right:-86%;cursor:pointer}.page.wrapper{position:relative;width:100%;float:right;margin:0;-webkit-transition:margin .3s ease-out 0;-moz-transition:margin .3s ease-out 0;transition:margin .3s ease-out 0}.logo{position:relative;z-index:5;float:left;max-width:50%;margin:0 0 10px 44px}.logo img{max-height:50px}.header.page{margin-bottom:20px;border-bottom:1px solid #d1d1d1}.header.content{padding-top:10px;position:relative;display:block;padding-right:90px}.header.content:after{content:"";display:table;clear:both}.header .switcher,.header .links,.header .panel{display:none}.action.toggle.nav{display:inline-block;text-decoration:none;display:block;position:absolute;top:12px;left:20px;font-size:0;z-index:14;cursor:pointer}.action.toggle.nav:before{font-family:"icons-blank-theme";content:'\e609';font-size:28px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.action.toggle.nav>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.copyright,.bugs{display:block;margin:20px 0}.block.widget.new .pager .amount{float:none;margin:0 0 7px;text-align:center}}.actions.toolbar:before,.actions.toolbar:after{content:"";display:table}.actions.toolbar:after{clear:both}.actions.toolbar .primary{float:left}.actions.toolbar .secondary{float:right}.actions.toolbar .primary,.actions.toolbar .secondary{display:inline-block}.actions.toolbar .primary a.action,.actions.toolbar .secondary a.action{display:inline-block}.actions.toolbar .primary .action{margin:0 5px 0 0}.actions.toolbar .secondary a.action{margin-top:6px}.example-actions-toolbar-1:before,.example-actions-toolbar-1:after{content:"";display:table}.example-actions-toolbar-1:after{clear:both}.example-actions-toolbar-1 .primary{float:left}.example-actions-toolbar-1 .secondary{float:right}.example-actions-toolbar-1 .primary,.example-actions-toolbar-1 .secondary{display:inline-block}.example-actions-toolbar-1 .primary a.action,.example-actions-toolbar-1 .secondary a.action{display:inline-block}.example-actions-toolbar-1 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-1 .secondary a.action{margin-top:6px}.example-actions-toolbar-2:before,.example-actions-toolbar-2:after{content:"";display:table}.example-actions-toolbar-2:after{clear:both}.example-actions-toolbar-2 .primary{float:left}.example-actions-toolbar-2 .secondary{float:right}.example-actions-toolbar-2 .primary,.example-actions-toolbar-2 .secondary{display:inline-block}.example-actions-toolbar-2 .primary a.action,.example-actions-toolbar-2 .secondary a.action{display:inline-block}.example-actions-toolbar-2 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-2 .secondary a.action{margin-top:6px}.example-actions-toolbar-3{text-align:left}.example-actions-toolbar-3:before,.example-actions-toolbar-3:after{content:"";display:table}.example-actions-toolbar-3:after{clear:both}.example-actions-toolbar-3 .primary{float:left}.example-actions-toolbar-3 .primary,.example-actions-toolbar-3 .secondary{display:inline-block}.example-actions-toolbar-3 .primary a.action,.example-actions-toolbar-3 .secondary a.action{display:inline-block}.example-actions-toolbar-3 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-3 .secondary a.action{margin-top:6px}.example-actions-toolbar-4{text-align:right}.example-actions-toolbar-4:before,.example-actions-toolbar-4:after{content:"";display:table}.example-actions-toolbar-4:after{clear:both}.example-actions-toolbar-4 .secondary{float:right}.example-actions-toolbar-4 .primary,.example-actions-toolbar-4 .secondary{display:inline-block}.example-actions-toolbar-4 .primary a.action,.example-actions-toolbar-4 .secondary a.action{display:inline-block}.example-actions-toolbar-4 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-4 .secondary a.action{margin-top:6px}.example-actions-toolbar-5{text-align:center}.example-actions-toolbar-5:before,.example-actions-toolbar-5:after{content:"";display:table}.example-actions-toolbar-5:after{clear:both}.example-actions-toolbar-5 .primary,.example-actions-toolbar-5 .secondary{vertical-align:top}.example-actions-toolbar-5 .primary,.example-actions-toolbar-5 .secondary{display:inline-block}.example-actions-toolbar-5 .primary a.action,.example-actions-toolbar-5 .secondary a.action{display:inline-block}.example-actions-toolbar-5 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-5 .secondary a.action{margin-top:6px}.example-actions-toolbar-6:before,.example-actions-toolbar-6:after{content:"";display:table}.example-actions-toolbar-6:after{clear:both}.example-actions-toolbar-6 .primary{float:right}.example-actions-toolbar-6 .secondary{float:left}.example-actions-toolbar-6 .primary,.example-actions-toolbar-6 .secondary{display:inline-block}.example-actions-toolbar-6 .primary a.action,.example-actions-toolbar-6 .secondary a.action{display:inline-block}.example-actions-toolbar-6 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-6 .secondary a.action{margin-top:6px}.example-actions-toolbar-7{text-align:left}.example-actions-toolbar-7:before,.example-actions-toolbar-7:after{content:"";display:table}.example-actions-toolbar-7:after{clear:both}.example-actions-toolbar-7 .secondary{float:left}.example-actions-toolbar-7 .primary,.example-actions-toolbar-7 .secondary{display:inline-block}.example-actions-toolbar-7 .primary a.action,.example-actions-toolbar-7 .secondary a.action{display:inline-block}.example-actions-toolbar-7 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-7 .secondary a.action{margin-top:6px}.example-actions-toolbar-8{text-align:right}.example-actions-toolbar-8:before,.example-actions-toolbar-8:after{content:"";display:table}.example-actions-toolbar-8:after{clear:both}.example-actions-toolbar-8 .primary{float:right}.example-actions-toolbar-8 .primary,.example-actions-toolbar-8 .secondary{display:inline-block}.example-actions-toolbar-8 .primary a.action,.example-actions-toolbar-8 .secondary a.action{display:inline-block}.example-actions-toolbar-8 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-8 .secondary a.action{margin-top:6px}.example-actions-toolbar-9{margin:10px;padding:10px}.example-actions-toolbar-9:before,.example-actions-toolbar-9:after{content:"";display:table}.example-actions-toolbar-9:after{clear:both}.example-actions-toolbar-9 .primary{float:left}.example-actions-toolbar-9 .secondary{float:right}.example-actions-toolbar-9 .primary,.example-actions-toolbar-9 .secondary{display:inline-block}.example-actions-toolbar-9 .primary a.action,.example-actions-toolbar-9 .secondary a.action{display:inline-block}.example-actions-toolbar-9 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-9 .secondary a.action{margin-top:6px}.example-actions-toolbar-10{text-align:left}.example-actions-toolbar-10:before,.example-actions-toolbar-10:after{content:"";display:table}.example-actions-toolbar-10:after{clear:both}.example-actions-toolbar-10 .primary{float:left}.example-actions-toolbar-10 .primary,.example-actions-toolbar-10 .secondary{display:inline-block}.example-actions-toolbar-10 .primary a.action,.example-actions-toolbar-10 .secondary a.action{display:inline-block}.example-actions-toolbar-10 .primary .action{margin:0 50px 0 0}.example-actions-toolbar-10 .secondary a.action{margin-top:6px}.example-actions-toolbar-11{text-align:left}.example-actions-toolbar-11:before,.example-actions-toolbar-11:after{content:"";display:table}.example-actions-toolbar-11:after{clear:both}.example-actions-toolbar-11 .primary{float:left}.example-actions-toolbar-11 .primary,.example-actions-toolbar-11 .secondary{display:inline-block}.example-actions-toolbar-11 .primary a.action,.example-actions-toolbar-11 .secondary a.action{display:inline-block}.example-actions-toolbar-11 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-11 .secondary .action{margin:0 50px 0 0}.example-actions-toolbar-11 .secondary a.action{margin-top:6px}.example-actions-toolbar-12:before,.example-actions-toolbar-12:after{content:"";display:table}.example-actions-toolbar-12:after{clear:both}.example-actions-toolbar-12 .primary{float:left}.example-actions-toolbar-12 .secondary{float:right}.example-actions-toolbar-12 .primary,.example-actions-toolbar-12 .secondary{display:inline-block}.example-actions-toolbar-12 .primary a.action,.example-actions-toolbar-12 .secondary a.action{display:inline-block}.example-actions-toolbar-12 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-12 .secondary a.action{margin-top:6px}@media only screen and (max-width: 768px){.example-actions-toolbar-12 .primary,.example-actions-toolbar-12 .secondary{ display:block;float:none}}.example-breadcrumbs-1{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.example-breadcrumbs-1 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-1 .items{font-size:12px;font-size:1.2rem;color:#a3a3a3;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-1 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-1 a{color:#333;text-decoration:none}.example-breadcrumbs-1 a:visited{color:#333;text-decoration:none}.example-breadcrumbs-1 a:hover{color:#333;text-decoration:underline}.example-breadcrumbs-1 a:active{color:#333;text-decoration:none}.example-breadcrumbs-1 strong{font-weight:400}.example-breadcrumbs-1 .item:not(:last-child):after{color:#a3a3a3;content:'>'}.example-breadcrumbs-1 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-1 .items{font-size:12px;font-size:1.2rem;color:#a3a3a3;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-1 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-1 a{color:#333;text-decoration:none}.example-breadcrumbs-1 a:visited{color:#333;text-decoration:none}.example-breadcrumbs-1 a:hover{color:#333;text-decoration:underline}.example-breadcrumbs-1 a:active{color:#333;text-decoration:none}.example-breadcrumbs-1 strong{font-weight:400}.example-breadcrumbs-1 .item:not(:last-child):after{color:#a3a3a3;content:'>'}.example-breadcrumbs-2 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-2 .items{font-size:12px;font-size:1.2rem;color:#1979c3;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-2 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-2 a{padding:3px 5px;display:inline-block;background-color:#ccc;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #f4f4f4 0, #ccc 100%);background-image:linear-gradient(to bottom, #f4f4f4 0, #ccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#cccccc', GradientType=0);border:1px solid #ccc;color:#333;text-decoration:none}.example-breadcrumbs-2 a:visited{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#333;text-decoration:none}.example-breadcrumbs-2 a:hover{background-color:#f4f4f4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #ccc 0, #f4f4f4 100%);background-image:linear-gradient(to bottom, #ccc 0, #f4f4f4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#f4f4f4', GradientType=0);color:#333;text-decoration:none}.example-breadcrumbs-2 a:active{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#333;text-decoration:none}.example-breadcrumbs-2 strong{background-color:#ff5501;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #f7b32e 0, #ff5501 100%);background-image:linear-gradient(to bottom, #f7b32e 0, #ff5501 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7b32e', endColorstr='#ff5501', GradientType=0);border:1px solid #d04b0a;padding:3px 5px;display:inline-block;font-weight:400}.example-breadcrumbs-2 .item:not(:last-child):after{color:#a3a3a3;content:''}.example-breadcrumbs-3 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-3 .items{font-size:12px;font-size:1.2rem;color:#333;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-3 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-3 a{padding:3px 5px;display:inline-block;background-color:#f4f4f4;color:#333;text-decoration:none}.example-breadcrumbs-3 a:visited{color:#333;text-decoration:none}.example-breadcrumbs-3 a:hover{background-color:#ccc;color:#333;text-decoration:none}.example-breadcrumbs-3 a:active{color:#333;text-decoration:none}.example-breadcrumbs-3 strong{background-color:#e7e7e7;padding:3px 5px;display:inline-block;font-weight:400}.example-breadcrumbs-3 .item:not(:last-child):after{color:#a3a3a3;content:''}.example-breadcrumbs-3 .item a{position:relative;margin:0 11px 0 0}.example-breadcrumbs-3 .item a:after{width:0;height:0;border:12px solid rgba(0,0,0,0);border-left-color:#f4f4f4;content:"";position:absolute;display:block;top:0;right:-23px}.example-breadcrumbs-3 .item a:hover:after{border-color:transparent transparent transparent #ccc}button,.cart.table.wrapper .cart.items .action{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;border-radius:3px}button:focus,button:active,.cart.table.wrapper .cart.items .action:focus,.cart.table.wrapper .cart.items .action:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}button:hover,.cart.table.wrapper .cart.items .action:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}button.disabled,button[disabled],fieldset[disabled] button,.cart.table.wrapper .cart.items .action.disabled,.cart.table.wrapper .cart.items .action[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .action{cursor:default;pointer-events:none;opacity:.5}button:active,button:focus,.cart.table.wrapper .cart.items .action:active,.cart.table.wrapper .cart.items .action:focus{box-shadow:inset 0 2px 1px rgba(0,0,0,.12)}.example-button-1.example-button-2{line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.example-button-1.example-button-3{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem;border-radius:0;color:#000}.example-button-1.example-button-3:hover,.example-button-1.example-button-3.active{color:#000}.example-button-10{background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.example-button-10>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-button-10:before{font-family:"icons-blank-theme";content:'\e611';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-button-10:hover:before{color:inherit}.example-button-10:active:before{color:inherit}.example-button-10:focus,.example-button-10:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-10:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-10.disabled,.example-button-10[disabled],fieldset[disabled] .example-button-10{cursor:default;pointer-events:none;opacity:.5}.example-button-10:focus,.example-button-10:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.example-button-10:hover{background:0;border:0}.example-button-10.disabled,.example-button-10[disabled],fieldset[disabled] .example-button-10{cursor:not-allowed;pointer-events:none;opacity:.5}.example-button-11{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;text-decoration:none}.example-button-11:before{font-family:"icons-blank-theme";content:'\e611';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-button-11:hover:before{color:inherit}.example-button-11:active:before{color:inherit}.example-button-11:focus,.example-button-11:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-11:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-11.disabled,.example-button-11[disabled],fieldset[disabled] .example-button-11{cursor:default;pointer-events:none;opacity:.5}.example-button-12{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;text-decoration:none}.example-button-12:after{font-family:"icons-blank-theme";content:'\e611';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-button-12:hover:after{color:inherit}.example-button-12:active:after{color:inherit}.example-button-12:focus,.example-button-12:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-12:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-12.disabled,.example-button-12[disabled],fieldset[disabled] .example-button-12{cursor:default;pointer-events:none;opacity:.5}.example-button-13{background-image:none;background-color:#f2f2f2;padding:0 15px;width:100px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle}.example-button-13:focus,.example-button-13:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-13:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-13.disabled,.example-button-13[disabled],fieldset[disabled] .example-button-13{cursor:default;pointer-events:none;opacity:.5}.example-button-4{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle}.example-button-4:focus,.example-button-4:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.example-button-4:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.example-button-4.disabled,.example-button-4[disabled],fieldset[disabled] .example-button-4{cursor:default;pointer-events:none;opacity:.5}.example-button-4:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.example-button-4.example-button-5{line-height:50px;padding:0 35px;font-size:18px;font-size:1.8rem}.example-button-4.example-button-6{line-height:22px;padding:0 14px;font-size:11px;font-size:1.1rem;color:#fff}.example-button-4.example-button-6:hover,.example-button-4.example-button-6.active{color:#fff}.example-button-7{background-image:none;background-color:#f2f2f2;background-color:#006bb4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #1979c3 0, #006bb4 100%);background-image:linear-gradient(to bottom, #1979c3 0, #006bb4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1979c3', endColorstr='#006bb4', GradientType=0);padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;border-radius:3px}.example-button-7:focus,.example-button-7:active{background-color:#e2e2e2;background-color:#006bb4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #006bb4 0, #006bb4 100%);background-image:linear-gradient(to bottom, #006bb4 0, #006bb4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006bb4', endColorstr='#006bb4', GradientType=0);border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.example-button-7:hover{background-color:#e2e2e2;background-color:#1979c3;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #006bb4 0, #1979c3 100%);background-image:linear-gradient(to bottom, #006bb4 0, #1979c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006bb4', endColorstr='#1979c3', GradientType=0);border:1px solid #006bb4;color:#fff}.example-button-7.disabled,.example-button-7[disabled],fieldset[disabled] .example-button-7{cursor:default;pointer-events:none;opacity:.5}.example-button-7:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.example-button-8{background:0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;font-weight:400}.example-button-8:visited{color:#800080;text-decoration:none}.example-button-8:hover{color:#006bb4;text-decoration:underline}.example-button-8:active{color:#ff5501;text-decoration:underline}.example-button-8:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-button-8:hover,.example-button-8:active,.example-button-8:focus{background:0;border:0;outline:0}.example-button-8.disabled,.example-button-8[disabled],fieldset[disabled] .example-button-8{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.example-button-8:active{box-shadow:none}.example-button-9{text-decoration:none;background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;margin:3px;border-radius:3px;font-weight:700}.example-button-9:hover,.example-button-9:active,.example-button-9:focus{text-decoration:none}.example-button-9:focus,.example-button-9:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-9:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-9.disabled,.example-button-9[disabled],fieldset[disabled] .example-button-9{cursor:default;pointer-events:none;opacity:.5}.example-button-9:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.example-dropdown-1{display:inline-block;position:relative}.example-dropdown-1:before,.example-dropdown-1:after{content:"";display:table}.example-dropdown-1:after{clear:both}.example-dropdown-1 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-1 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-1 .action.toggle:hover:after{color:inherit}.example-dropdown-1 .action.toggle:active:after{color:inherit}.example-dropdown-1 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-1 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-1 .action.toggle.active:hover:after{color:inherit}.example-dropdown-1 .action.toggle.active:active:after{color:inherit}.example-dropdown-1 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-1 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-1 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-1 ul.dropdown:before,.example-dropdown-1 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-1 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-1 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-1.active{overflow:visible}.example-dropdown-1.active ul.dropdown{display:block}.example-dropdown-2{display:inline-block;position:relative}.example-dropdown-2:before,.example-dropdown-2:after{content:"";display:table}.example-dropdown-2:after{clear:both}.example-dropdown-2 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-2 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-2 .action.toggle:hover:after{color:inherit}.example-dropdown-2 .action.toggle:active:after{color:inherit}.example-dropdown-2 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-2 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-2 .action.toggle.active:hover:after{color:inherit}.example-dropdown-2 .action.toggle.active:active:after{color:inherit}.example-dropdown-2 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-2 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-2 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-2 ul.dropdown:before,.example-dropdown-2 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-2 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-2 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-2.active{overflow:visible}.example-dropdown-2.active ul.dropdown{display:block}.example-dropdown-3{display:inline-block;position:relative}.example-dropdown-3:before,.example-dropdown-3:after{content:"";display:table}.example-dropdown-3:after{clear:both}.example-dropdown-3 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-3 .action.toggle:before{font-family:"icons-blank-theme";content:'\e61c';font-size:22px;line-height:1;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-3 .action.toggle:hover:before{color:red}.example-dropdown-3 .action.toggle:active:before{color:inherit}.example-dropdown-3 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-3 .action.toggle.active:before{font-family:"icons-blank-theme";content:'\e60f';font-size:22px;line-height:1;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-3 .action.toggle.active:hover:before{color:red}.example-dropdown-3 .action.toggle.active:active:before{color:inherit}.example-dropdown-3 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-3 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-3 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-3 ul.dropdown:before,.example-dropdown-3 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-3 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-3 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-3.active{overflow:visible}.example-dropdown-3.active ul.dropdown{display:block}.example-dropdown-5{display:inline-block;position:relative}.example-dropdown-5:before,.example-dropdown-5:after{content:"";display:table}.example-dropdown-5:after{clear:both}.example-dropdown-5 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-5 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:1;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-5 .action.toggle:hover:after{color:inherit}.example-dropdown-5 .action.toggle:active:after{color:inherit}.example-dropdown-5 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-5 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:1;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-5 .action.toggle.active:hover:after{color:inherit}.example-dropdown-5 .action.toggle.active:active:after{color:inherit}.example-dropdown-5 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#eef1f3;border:2px solid #ced1d4;position:absolute;z-index:100;min-width:100%;display:none}.example-dropdown-5 ul.dropdown li{margin:0;padding:10px;border-top:2px solid #e8eaed}.example-dropdown-5 ul.dropdown li:first-child{border:0}.example-dropdown-5 ul.dropdown li:hover{background-color:#d8e3e3;cursor:pointer}.example-dropdown-5.active{overflow:visible}.example-dropdown-5.active ul.dropdown{display:block}.example-dropdown-6{display:inline-block;position:relative}.example-dropdown-6:before,.example-dropdown-6:after{content:"";display:table}.example-dropdown-6:after{clear:both}.example-dropdown-6 .action.split{float:left;margin:0}.example-dropdown-6 .action.toggle{float:right;margin:0}.example-dropdown-6 button.action.split,.example-dropdown-6 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-6 button+.action.toggle,.example-dropdown-6 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-6 .action.split{padding:0 5px}.example-dropdown-6 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-6 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-6 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-6 .action.toggle:hover:after{color:inherit}.example-dropdown-6 .action.toggle:active:after{color:inherit}.example-dropdown-6 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-6 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-6 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-6 .action.toggle.active:hover:after{color:inherit}.example-dropdown-6 .action.toggle.active:active:after{color:inherit}.example-dropdown-6 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-6 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-6 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-6 ul.dropdown:before,.example-dropdown-6 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-6 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-6 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-6.active{overflow:visible}.example-dropdown-6.active ul.dropdown{display:block}.example-dropdown-6 ul.dropdown{top:100%;left:100%;margin-left:-36px}.split.example-dropdown-7{display:inline-block;position:relative}.split.example-dropdown-7:before,.split.example-dropdown-7:after{content:"";display:table}.split.example-dropdown-7:after{clear:both}.split.example-dropdown-7 .action.split{float:left;margin:0}.split.example-dropdown-7 .action.toggle{float:right;margin:0}.split.example-dropdown-7 .action.split{padding:0 5px}.split.example-dropdown-7 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.split.example-dropdown-7 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.split.example-dropdown-7 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.split.example-dropdown-7 .action.toggle:hover:after{color:inherit}.split.example-dropdown-7 .action.toggle:active:after{color:inherit}.split.example-dropdown-7 .action.toggle.active{display:inline-block;text-decoration:none}.split.example-dropdown-7 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.split.example-dropdown-7 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.split.example-dropdown-7 .action.toggle.active:hover:after{color:inherit}.split.example-dropdown-7 .action.toggle.active:active:after{color:inherit}.split.example-dropdown-7 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.split.example-dropdown-7 ul.dropdown li{margin:0;padding:3px 5px}.split.example-dropdown-7 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.split.example-dropdown-7 ul.dropdown:before,.split.example-dropdown-7 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.split.example-dropdown-7 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.split.example-dropdown-7 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.split.example-dropdown-7.active{overflow:visible}.split.example-dropdown-7.active ul.dropdown{display:block}.split.example-dropdown-7 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-8{display:inline-block;position:relative}.example-dropdown-8:before,.example-dropdown-8:after{content:"";display:table}.example-dropdown-8:after{clear:both}.example-dropdown-8 .action.split{float:left;margin:0}.example-dropdown-8 .action.toggle{float:right;margin:0}.example-dropdown-8 button.action.split,.example-dropdown-8 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-8 button+.action.toggle,.example-dropdown-8 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-8 .action.split{padding:0 5px}.example-dropdown-8 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-8 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-8 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-8 .action.toggle:hover:after{color:inherit}.example-dropdown-8 .action.toggle:active:after{color:inherit}.example-dropdown-8 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-8 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-8 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-8 .action.toggle.active:hover:after{color:inherit}.example-dropdown-8 .action.toggle.active:active:after{color:inherit}.example-dropdown-8 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-8 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-8 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-8 ul.dropdown:before,.example-dropdown-8 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-8 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-8 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-8.active{overflow:visible}.example-dropdown-8.active ul.dropdown{display:block}.example-dropdown-8 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-9{display:inline-block;position:relative}.example-dropdown-9 .action.split,.example-dropdown-9 .action.toggle{line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.example-dropdown-9:before,.example-dropdown-9:after{content:"";display:table}.example-dropdown-9:after{clear:both}.example-dropdown-9 .action.split{float:left;margin:0}.example-dropdown-9 .action.toggle{float:right;margin:0}.example-dropdown-9 button.action.split,.example-dropdown-9 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-9 button+.action.toggle,.example-dropdown-9 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-9 .action.split{padding:0 5px}.example-dropdown-9 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-9 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-9 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-9 .action.toggle:hover:after{color:inherit}.example-dropdown-9 .action.toggle:active:after{color:inherit}.example-dropdown-9 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-9 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-9 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-9 .action.toggle.active:hover:after{color:inherit}.example-dropdown-9 .action.toggle.active:active:after{color:inherit}.example-dropdown-9 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-9 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-9 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-9 ul.dropdown:before,.example-dropdown-9 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-9 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-9 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-9.active{overflow:visible}.example-dropdown-9.active ul.dropdown{display:block}.example-dropdown-9 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-10{display:inline-block;position:relative}.example-dropdown-10 .action.split,.example-dropdown-10 .action.toggle{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.example-dropdown-10:before,.example-dropdown-10:after{content:"";display:table}.example-dropdown-10:after{clear:both}.example-dropdown-10 .action.split{float:left;margin:0}.example-dropdown-10 .action.toggle{float:right;margin:0}.example-dropdown-10 button.action.split,.example-dropdown-10 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-10 button+.action.toggle,.example-dropdown-10 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-10 .action.split{padding:0 5px}.example-dropdown-10 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-10 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-10 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-10 .action.toggle:hover:after{color:inherit}.example-dropdown-10 .action.toggle:active:after{color:inherit}.example-dropdown-10 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-10 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-10 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-10 .action.toggle.active:hover:after{color:inherit}.example-dropdown-10 .action.toggle.active:active:after{color:inherit}.example-dropdown-10 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-10 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-10 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-10 ul.dropdown:before,.example-dropdown-10 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-10 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-10 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-10.active{overflow:visible}.example-dropdown-10.active ul.dropdown{display:block}.example-dropdown-10 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-11{display:inline-block;position:relative}.example-dropdown-11:before,.example-dropdown-11:after{content:"";display:table}.example-dropdown-11:after{clear:both}.example-dropdown-11 .action.split{float:right;margin:0}.example-dropdown-11 .action.toggle{float:left;margin:0}.example-dropdown-11 button.action.split,.example-dropdown-11 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-11 button+.action.toggle,.example-dropdown-11 .cart.table.wrapper .cart.items .action+.action.toggle{border-right:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-11 .action.split{padding:0 5px}.example-dropdown-11 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-11 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-11 .action.toggle:before{font-family:"icons-blank-theme";content:'\e61c';font-size:22px;line-height:inherit;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-11 .action.toggle:hover:before{color:red}.example-dropdown-11 .action.toggle:active:before{color:inherit}.example-dropdown-11 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-11 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-11 .action.toggle.active:before{font-family:"icons-blank-theme";content:'\e60f';font-size:22px;line-height:inherit;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-11 .action.toggle.active:hover:before{color:red}.example-dropdown-11 .action.toggle.active:active:before{color:inherit}.example-dropdown-11 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-11 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-11 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-11 ul.dropdown:before,.example-dropdown-11 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-11 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-11 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-11.active{overflow:visible}.example-dropdown-11.active ul.dropdown{display:block}.example-dropdown-11 ul.dropdown{top:100%;left:0}.example-dropdown-12{display:inline-block;position:relative}.example-dropdown-12:before,.example-dropdown-12:after{content:"";display:table}.example-dropdown-12:after{clear:both}.example-dropdown-12 .action.split{float:left;margin:0}.example-dropdown-12 .action.toggle{float:right;margin:0}.example-dropdown-12 button.action.split,.example-dropdown-12 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-12 button+.action.toggle,.example-dropdown-12 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-12 .action.split{padding:0 5px}.example-dropdown-12 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-12 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-12 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-12 .action.toggle:hover:after{color:inherit}.example-dropdown-12 .action.toggle:active:after{color:inherit}.example-dropdown-12 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-12 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-12 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-12 .action.toggle.active:hover:after{color:inherit}.example-dropdown-12 .action.toggle.active:active:after{color:inherit}.example-dropdown-12 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#eef1f3;border:2px solid #ced1d4;position:absolute;z-index:100;min-width:100%;display:none}.example-dropdown-12 ul.dropdown li{margin:0;padding:10px;border-top:2px solid #e8eaed}.example-dropdown-12 ul.dropdown li:first-child{border:0}.example-dropdown-12 ul.dropdown li:hover{background-color:#d8e3e3;cursor:pointer}.example-dropdown-12.active{overflow:visible}.example-dropdown-12.active ul.dropdown{display:block}.example-dropdown-12 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-form-1 .example-form-1-fieldset{border:0;margin:0 0 40px;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.example-form-1 .example-form-1-fieldset>*{letter-spacing:normal;word-spacing:normal}.example-form-1 .example-form-1-fieldset>.legend{margin:0 0 25px 25.8%;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.example-form-1 .example-form-1-fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.example-form-1 .example-form-1-fieldset:after{content:attr(data-hasrequired);display:block;font-size:12px;font-size:1.2rem;color:#e02b27;margin:10px 0 0;letter-spacing:normal;word-spacing:normal}.example-form-1 .example-form-1-fieldset>.field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 0 29px;border:0}.example-form-1 .example-form-1-fieldset>.field:before,.example-form-1 .example-form-1-fieldset>.field:after{content:"";display:table}.example-form-1 .example-form-1-fieldset>.field:after{clear:both}.example-form-1 .example-form-1-fieldset>.field:not(.choice)>.label{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.example-form-1 .example-form-1-fieldset>.field>.description{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.example-form-1 .example-form-1-fieldset>.field.choice:before,.example-form-1 .example-form-1-fieldset>.field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:1px;float:left;width:25.8%;padding:6px 15px 0 0}.example-form-1 .example-form-1-fieldset>.field>.control{float:left;width:74.2%}.example-form-1 .example-form-1-fieldset>.field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.example-form-1 .example-form-1-fieldset>.field>.label+br{display:none}.example-form-1 .example-form-1-fieldset>.field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.example-form-1 .example-form-1-fieldset>.field .nested .field{margin:5px 0}.example-form-1 .example-form-1-fieldset>.field.choice>.label{display:inline}.example-form-1 .example-form-1-fieldset>.field.choice>input{vertical-align:top}.example-form-1 .example-form-1-fieldset>.field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.example-form-1 .example-form-1-fieldset>.field .fields.group>*{letter-spacing:normal;word-spacing:normal}.example-form-1 .example-form-1-fieldset>.field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.example-form-1 .example-form-1-fieldset>.field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.example-form-1 .example-form-1-fieldset>.field .fields.group .field .control{float:none;width:auto}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-2 .field{width:50%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-4 .field{width:25%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-5 .field{width:20%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.example-form-1 .example-form-1-fieldset>.field .addon textarea,.example-form-1 .example-form-1-fieldset>.field .addon select,.example-form-1 .example-form-1-fieldset>.field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.example-form-1 .example-form-1-fieldset>.field .addon .addbefore,.example-form-1 .example-form-1-fieldset>.field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.example-form-1 .example-form-1-fieldset>.field .addon .addbefore:disabled,.example-form-1 .example-form-1-fieldset>.field .addon .addafter:disabled{opacity:.5}.example-form-1 .example-form-1-fieldset>.field .addon .addbefore{float:left;order:1}.example-form-1 .example-form-1-fieldset>.field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.example-form-1 .example-form-1-fieldset>.field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-form-2 .example-form-2-fieldset{border:0;margin:0 0 40px;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.example-form-2 .example-form-2-fieldset>*{letter-spacing:normal;word-spacing:normal}.example-form-2 .example-form-2-fieldset>.legend{margin:0 0 25px 25.8%;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.example-form-2 .example-form-2-fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.example-form-2 .example-form-2-fieldset>.field{margin:0 0 20px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:inline-block;padding:0 20px 0 0;width:50%;vertical-align:top;border:0}.example-form-2 .example-form-2-fieldset>.field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.example-form-2 .example-form-2-fieldset>.field.choice:before,.example-form-2 .example-form-2-fieldset>.field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.example-form-2 .example-form-2-fieldset>.field>.control{float:none;width:auto}.example-form-2 .example-form-2-fieldset>.field .nested .field{width:100%}.example-form-2 .example-form-2-fieldset>.field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.example-form-2 .example-form-2-fieldset>.field>.label+br{display:none}.example-form-2 .example-form-2-fieldset>.field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.example-form-2 .example-form-2-fieldset>.field .nested .field{margin:5px 0}.example-form-2 .example-form-2-fieldset>.field.choice>.label{display:inline}.example-form-2 .example-form-2-fieldset>.field.choice>input{vertical-align:top}.example-form-2 .example-form-2-fieldset>.field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.example-form-2 .example-form-2-fieldset>.field .fields.group>*{letter-spacing:normal;word-spacing:normal}.example-form-2 .example-form-2-fieldset>.field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.example-form-2 .example-form-2-fieldset>.field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.example-form-2 .example-form-2-fieldset>.field .fields.group .field .control{float:none;width:auto}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-2 .field{width:50%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-4 .field{width:25%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-5 .field{width:20%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.example-form-2 .example-form-2-fieldset>.field .addon textarea,.example-form-2 .example-form-2-fieldset>.field .addon select,.example-form-2 .example-form-2-fieldset>.field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.example-form-2 .example-form-2-fieldset>.field .addon .addbefore,.example-form-2 .example-form-2-fieldset>.field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.example-form-2 .example-form-2-fieldset>.field .addon .addbefore:disabled,.example-form-2 .example-form-2-fieldset>.field .addon .addafter:disabled{opacity:.5}.example-form-2 .example-form-2-fieldset>.field .addon .addbefore{float:left;order:1}.example-form-2 .example-form-2-fieldset>.field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.example-form-2 .example-form-2-fieldset>.field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}input[type="text"],input[type="password"],input[type="url"],input[type="tel"],input[type="search"],input[type="number"],input[type="datetime"],input[type="email"]{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;margin-bottom:20px}input[type="text"]:disabled,input[type="password"]:disabled,input[type="url"]:disabled,input[type="tel"]:disabled,input[type="search"]:disabled,input[type="number"]:disabled,input[type="datetime"]:disabled,input[type="email"]:disabled{opacity:.5}select{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:5px 10px 4px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;margin-bottom:20px}select:disabled{opacity:.5}select[multiple="multiple"]{height:auto;margin-bottom:20px}textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:auto;width:100%;padding:10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;resize:vertical}textarea:disabled{opacity:.5}input[type="checkbox"]{vertical-align:top;margin:2px 5px 0 0}input[type="checkbox"]:disabled{opacity:.5}input[type="radio"]{vertical-align:top;margin:2px 5px 0 0}input[type="radio"]:disabled{opacity:.5}input.text-example-2,select.select-example-2{height:42px}input.text-example-2,select.select-example-2,textarea.textarea-example-2{margin:0 0 50px 0;padding:5px 25px}input.text-example-1,select.select-example-1,textarea.textarea-example-1{border-color:#24adb2;background-color:#fffced}input.text-example-1:focus,select.select-example-1:focus,textarea.textarea-example-1:focus{border-color:#00f;color:#008000}input.text-example-1:disabled,select.select-example-1:disabled,textarea.textarea-example-1:disabled{color:red}input.text-example-1::-moz-placeholder,textarea.textarea-example-1::-moz-placeholder{color:#a9a9a9}input.text-example-1::-webkit-input-placeholder,textarea.textarea-example-1::-webkit-input-placeholder{color:#a9a9a9}input.text-example-1:-ms-input-placeholder,textarea.textarea-example-1:-ms-input-placeholder{color:#a9a9a9}input.checkbox-example-1,input.radio-example-1{margin:15px}input.text-example-3,select.select-example-3{height:42px;width:50%}textarea.textarea-example-3{width:50%}.number-example::-webkit-inner-spin-button,.number-example::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.search-example{-webkit-appearance:none}.search-example::-webkit-search-cancel-button,.search-example::-webkit-search-decoration,.search-example::-webkit-search-results-button,.search-example::-webkit-search-results-decoration{-webkit-appearance:none}input.mage-error,textarea.mage-error,select.mage-error{border-color:#ed8380}input+div.mage-error,textarea+div.mage-error,select+div.mage-error{font-size:12px;font-size:1.2rem;color:#e02b27;margin:3px 0 0}input.text-example-6.mage-error,input.text-example-7.mage-error{border-color:#ed8380}input.text-example-6+div.mage-error,input.text-example-7+div.mage-error{font-size:12px;font-size:1.2rem;color:#e02b27;margin:3px 0 0;display:inline-block;text-decoration:none}input.text-example-6+div.mage-error:before,input.text-example-7+div.mage-error:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;color:#e02b27;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}input.text-example-8.mage-error,input.text-example-9.mage-error{border-color:#f47a1f;background-color:#ffead8;color:#71360d}input.text-example-8.valid,input.text-example-9.valid{border-color:#17ad67;background-color:#c9f5e3;color:#0a864d}input.text-example-8+div.mage-error,input.text-example-9+div.mage-error{color:#831fe0}.example-icon-1{display:inline-block}.example-icon-1:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-2{display:inline-block}.example-icon-2:after{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:-26px 0;background-repeat:no-repeat;margin:''}.example-icon-3{display:inline-block}.example-icon-3>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-icon-3:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:-156px -52px;background-repeat:no-repeat;margin:''}.example-icon-4{display:inline-block;text-decoration:none}.example-icon-4:before{font-family:"icons-blank-theme";content:'\e606';font-size:24px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-5{display:inline-block;text-decoration:none}.example-icon-5:after{font-family:"icons-blank-theme";content:'\e605';font-size:24px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-6{display:inline-block;text-decoration:none}.example-icon-6>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-icon-6:before{font-family:"icons-blank-theme";content:'\e61b';font-size:24px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-7{display:inline-block}.example-icon-7:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-8{display:inline-block}.example-icon-8:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-8:before{background-position:-182px 0}.example-icon-9{display:inline-block}.example-icon-9:after{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-9:after{background-position:-52px -26px}.example-icon-10{display:inline-block}.example-icon-10:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-10:before{background-position:-104px 0}.example-icon-11{display:inline-block}.example-icon-11:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-11:before{width:30px;height:30px}.example-icon-11:after{width:30px;height:30px}.example-icon-11:before{background-color:#f1f1f1}.example-icon-12{display:inline-block;text-decoration:none}.example-icon-12:before{font-family:"icons-blank-theme";content:'\e612';font-size:28px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-13{display:inline-block;text-decoration:none}.example-icon-13:before{font-family:"icons-blank-theme";content:'\e612';font-size:inherit;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-13:before{font-size:26px;line-height:inherit}.example-icon-14{display:inline-block;text-decoration:none}.example-icon-14:before{font-family:"icons-blank-theme";content:'\e61d';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-14>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.icons-image-list{list-style:none;padding:0}.icons-image-list li{float:left;width:33%}.icons-image-list li>span{display:inline-block}.icons-image-list li>span:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.icons-image-list li .icon-search:before{background-position:0 0}.icons-image-list li .icon-cart:before{background-position:-26px 0}.icons-image-list li .icon-arrow-down:before{background-position:-52px 0}.icons-image-list li .icon-arrow-up:before{background-position:-78px 0}.icons-image-list li .icon-grid:before{background-position:-104px 0}.icons-image-list li .icon-list:before{background-position:-130px 0}.icons-image-list li .icon-remove:before{background-position:-156px 0}.icons-image-list li .icon-star:before{background-position:-182px 0}.icons-image-list li .icon-pointer-down:before{background-position:-208px 0}.icons-image-list li .icon-pointer-up:before{background-position:-234px 0}.icons-image-list li .icon-pointer-left:before{background-position:-260px 0}.icons-image-list li .icon-pointer-right:before{background-position:-286px 0}.icons-image-list li .icon-compare-empty:before{background-position:0 -26px}.icons-image-list li .icon-compare-full:before{background-position:-26px -26px}.icons-image-list li .icon-wishlist-empty:before{background-position:-52px -26px}.icons-image-list li .icon-wishlist-full:before{background-position:-78px -26px}.icons-image-list li .icon-update:before{background-position:-104px -26px}.icons-image-list li .icon-collapse:before{background-position:-130px -26px}.icons-image-list li .icon-expand:before{background-position:-156px -26px}.icons-image-list li .icon-menu:before{background-position:-182px -26px}.icons-image-list li .icon-prev:before{background-position:-208px -26px}.icons-image-list li .icon-next:before{background-position:-234px -26px}.icons-image-list li .icon-settings:before{background-position:-260px -26px}.icons-image-list li .icon-info:before{background-position:-286px -26px}.icons-image-list li .icon-checkmark:before{background-position:0 -52px}.icons-image-list li .icon-calendar:before{background-position:-26px -52px}.icons-image-list li .icon-comment:before{background-position:-52px -52px}.icons-image-list li .icon-comment-reflected:before{background-position:-78px -52px}.icons-image-list li .icon-envelope:before{background-position:-104px -52px}.icons-image-list li .icon-warning:before{background-position:-130px -52px}.icons-image-list li .icon-trash:before{background-position:-156px -52px}.icons-image-list li .icon-flag:before{background-position:-182px -52px}.icons-image-list li .icon-location:before{background-position:-208px -52px}.icons-image-list li .icon-up:before{background-position:-234px -52px}.icons-image-list li .icon-down:before{background-position:-260px -52px}.icons-font-list{list-style:none;padding:0}.icons-font-list li{float:left;width:25%;margin-bottom:35px;text-align:center}.icons-font-list li>span{display:inline-block;text-decoration:none}.icons-font-list li>span:before{font-family:"icons-blank-theme";content:'';font-size:34px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.icons-font-list li>span:before{content:attr(data-icon);margin:0 auto;display:block}.loader{position:fixed;left:0;top:0;right:0;bottom:0;background-color:rgba(255,255,255,.5);z-index:9999}.loader:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:rgba(0,0,0,0);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat;border-radius:5px;content:'';position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;width:160px;height:160px}.loading{position:relative}.loading:before{content:'';position:absolute;left:0;top:0;right:0;bottom:0;background-color:rgba(255,255,255,.5);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat}.example-message-info{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400}.example-message-info a{color:#1979c3}.example-message-info a:hover{color:#006bb4}.example-message-info a:active{color:#006bb4}.example-message-warning{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400}.example-message-warning a{color:#1979c3}.example-message-warning a:hover{color:#006bb4}.example-message-warning a:active{color:#006bb4}.example-message-error{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fae5e5;border-color:none;color:#e02b27}.example-message-error a{color:#1979c3}.example-message-error a:hover{color:#006bb4}.example-message-error a:active{color:#006bb4}.example-message-success{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#e5efe5;border-color:none;color:#006400}.example-message-success a{color:#1979c3}.example-message-success a:hover{color:#006bb4}.example-message-success a:active{color:#006bb4}.example-message-notice{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400}.example-message-notice a{color:#1979c3}.example-message-notice a:hover{color:#006bb4}.example-message-notice a:active{color:#006bb4}.example-message-1{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.example-message-1 a{color:#1979c3}.example-message-1 a:hover{color:#006bb4}.example-message-1 a:active{color:#006bb4}.example-message-1>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.example-message-2{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fae5e5;border-color:none;color:#e02b27;position:relative;padding-right:40px}.example-message-2 a{color:#1979c3}.example-message-2 a:hover{color:#006bb4}.example-message-2 a:active{color:#006bb4}.example-message-2:before{content:'';position:absolute;width:30px;text-align:center;top:0;height:100%;display:block;padding:0;background:#b30000}.example-message-2>:first-child:before{content:'';position:absolute;overflow:hidden;top:50%;margin-top:-5px}.example-message-2>:first-child:after{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;top:50%;text-align:center;width:30px}.example-message-2:before{right:0;border-radius:0}.example-message-2>:first-child:before{width:0;height:0;border:5px solid rgba(0,0,0,0);border-right-color:#b30000;right:30px}.example-message-2>:first-child:after{right:0}.example-message-3{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#e5efe5;border-color:none;color:#006400;position:relative;padding-left:40px}.example-message-3 a{color:#1979c3}.example-message-3 a:hover{color:#006bb4}.example-message-3 a:active{color:#006bb4}.example-message-3:before{content:'';position:absolute;width:30px;text-align:center;top:0;height:100%;display:block;padding:0;background:#006400}.example-message-3>:first-child:before{content:'';position:absolute;overflow:hidden;top:50%;margin-top:-5px}.example-message-3>:first-child:after{font-family:"icons-blank-theme";content:'\e610';font-size:28px;line-height:28px;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;top:50%;text-align:center;width:30px}.example-message-3:before{left:0;border-radius:0}.example-message-3>:first-child:before{width:0;height:0;border:5px solid rgba(0,0,0,0);border-left-color:#006400;left:30px}.example-message-3>:first-child:after{left:0}.example-message-4{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fc0;border-color:#ffa500;color:#000;position:relative;padding-left:40px;border-width:4px;border-radius:10px}.example-message-4 a{color:#00f}.example-message-4 a:hover{color:#009}.example-message-4 a:active{color:#006}.example-message-4:before{content:'';position:absolute;width:30px;text-align:center;top:0;height:100%;display:block;padding:0;background:#green}.example-message-4>:first-child:before{content:'';position:absolute;overflow:hidden;top:50%;margin-top:-5px}.example-message-4>:first-child:after{font-family:"icons-blank-theme";content:'\e606';font-size:28px;line-height:28px;color:#000;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;top:50%;text-align:center;width:30px}.example-message-4:before{left:0;border-radius:0}.example-message-4>:first-child:before{width:0;height:0;border:5px solid rgba(0,0,0,0);border-left-color:#green;left:30px}.example-message-4>:first-child:after{left:0}header.header{background-color:rgba(255,0,0,.2)}.column.main{background-color:rgba(255,255,0,.2)}.column.left{background-color:rgba(0,255,255,.2)}.column.right{background-color:rgba(0,0,255,.2)}footer.footer{background-color:rgba(0,0,0,.2)}.columns{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap}.columns:after{content:" ";display:block;height:0;clear:both;overlow:hidden;visibility:hidden}.columns>.column{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;min-height:10px}.layout-1 .column.main{width:100%;order:2}.layout-3 .column.main{width:66.66666667%;display:inline-block;order:2}.layout-2-left .column.main{width:83.33333333%;float:right;order:2}.layout-2-right .column.main{width:83.33333333%;float:left;order:1}.layout-3 .column.left{width:16.66666667%;float:left;order:1}.layout-2-left .column.left{width:16.66666667%;float:left;order:1}.layout-2-right .column.left{width:16.66666667%;float:left;order:1}.layout-3 .column.right{width:16.66666667%;float:right;order:3}.layout-2-left .column.right{width:16.66666667%;float:right;order:2}.layout-2-right .column.right{width:16.66666667%;float:right;order:2}.layout-example-3 .column.main{width:60%;display:inline-block;order:2}.layout-example-3 .column.left{width:20%;float:left;order:1}.layout-example-3 .column.right{width:20%;float:right;order:3}.layout-example-3-1 .column.main{width:60%;float:left;order:1}.layout-example-3-1 .column.left{width:20%;display:inline-block;order:2}.layout-example-3-1 .column.right{width:20%;float:right;order:3}header.header,footer.footer,.page.main{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.pages>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.pages .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.pages .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages a.page{padding:0 10px;color:#1979c3;display:inline-block;text-decoration:none}.pages a.page:visited{color:#800080}.pages a.page:hover{color:#006bb4;text-decoration:none}.pages a.page:active{color:#ff5501}.pages strong.page{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#333;display:inline-block;font-weight:700}.pages .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.pages .action:visited{color:#7d7d7d}.pages .action:hover{color:#7d7d7d;text-decoration:none}.pages .action:active{color:#7d7d7d}.pages .action.next{display:inline-block;text-decoration:none}.pages .action.next:visited:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.next:hover:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.previous{display:inline-block;text-decoration:none}.pages .action.previous:visited:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.pages .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.previous:hover:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.example-pages-1>.label{display:inline-block;font-weight:400;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal}.example-pages-1>.label:after{content:':'}.example-pages-1 .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.example-pages-1 .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 3px;display:inline-block}.example-pages-1 .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-1 a.page{background-color:#ccc;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #f4f4f4 0, #ccc 100%);background-image:linear-gradient(to bottom, #f4f4f4 0, #ccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#cccccc', GradientType=0);border:1px solid #b3b3b3;padding:0 10px;color:#333;display:inline-block;text-decoration:none}.example-pages-1 a.page:visited{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#800080}.example-pages-1 a.page:hover{background-color:#f4f4f4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #ccc 0, #f4f4f4 100%);background-image:linear-gradient(to bottom, #ccc 0, #f4f4f4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#f4f4f4', GradientType=0);border:1px solid #999;color:#333;text-decoration:none}.example-pages-1 a.page:active{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#ff5501}.example-pages-1 strong.page{background-color:#1979c3;border:1px solid #135d96;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#f7b32e;display:inline-block;font-weight:700}.example-pages-1 .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.example-pages-1 .action:visited{color:#7d7d7d}.example-pages-1 .action:hover{color:#ff5501;text-decoration:none}.example-pages-1 .action:active{color:#7d7d7d}.example-pages-1 .action.next{display:inline-block;text-decoration:none}.example-pages-1 .action.next:visited:before{color:#7d7d7d}.example-pages-1 .action.next:active:before{color:#7d7d7d}.example-pages-1 .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-1 .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:30px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-1 .action.next:hover:before{color:#ff5501}.example-pages-1 .action.next:active:before{color:#7d7d7d}.example-pages-1 .action.previous{display:inline-block;text-decoration:none}.example-pages-1 .action.previous:visited:before{color:#7d7d7d}.example-pages-1 .action.previous:active:before{color:#7d7d7d}.example-pages-1 .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-1 .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:30px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-1 .action.previous:hover:before{color:#ff5501}.example-pages-1 .action.previous:active:before{color:#7d7d7d}.example-pages-2>.label{display:inline-block;font-weight:400;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal}.example-pages-2>.label:after{content:':'}.example-pages-2 .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.example-pages-2 .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.example-pages-2 .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-2 a.page{padding:0 10px;color:#1979c3;display:inline-block;text-decoration:none}.example-pages-2 a.page:visited{color:#800080}.example-pages-2 a.page:hover{color:#006bb4;text-decoration:none}.example-pages-2 a.page:active{color:#ff5501}.example-pages-2 strong.page{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#333;display:inline-block;font-weight:700}.example-pages-2 .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.example-pages-2 .action:visited{color:#7d7d7d}.example-pages-2 .action:hover{color:#7d7d7d;text-decoration:none}.example-pages-2 .action:active{color:#7d7d7d}.example-pages-3>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.example-pages-3 .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.example-pages-3 .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 a.page{background-color:#1979c3;padding:0 10px;color:#fff;display:inline-block;text-decoration:none}.example-pages-3 a.page:visited{background-color:#800080;color:#fff}.example-pages-3 a.page:hover{background-color:#006bb4;color:#fff;text-decoration:none}.example-pages-3 a.page:active{background-color:#ff5501;color:#fff}.example-pages-3 strong.page{background-color:#800080;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#fff;display:inline-block;font-weight:700}.example-pages-3 .action{background-color:#1979c3;border:1px solid #d1d1d1;padding:0;color:#fff;display:inline-block;text-decoration:none}.example-pages-3 .action:visited{background-color:#800080;color:#7d7d7d}.example-pages-3 .action:hover{background-color:#006bb4;color:#fff;text-decoration:none}.example-pages-3 .action:active{background-color:#ff5501;color:#fff}.example-pages-3 .action.next{display:inline-block;text-decoration:none}.example-pages-3 .action.next:visited:before{color:#7d7d7d}.example-pages-3 .action.next:active:before{color:#fff}.example-pages-3 .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:32px;line-height:inherit;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-3 .action.next:hover:before{color:#fff}.example-pages-3 .action.next:active:before{color:#fff}.example-pages-3 .action.previous{display:inline-block;text-decoration:none}.example-pages-3 .action.previous:visited:before{color:#7d7d7d}.example-pages-3 .action.previous:active:before{color:#fff}.example-pages-3 .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-3 .action.previous:hover:before{color:#fff}.example-pages-3 .action.previous:active:before{color:#fff}.window.popup.popup-example{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example .popup.actions .action.close:focus,.window.popup.popup-example .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example .popup.actions .action.close.disabled,.window.popup.popup-example .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example.active{opacity:1}.window.popup.popup-example-1{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-1 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-1 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-1 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-1 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-1 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-1 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-1 .popup.actions .action.close:focus,.window.popup.popup-example-1 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-1 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-1 .popup.actions .action.close.disabled,.window.popup.popup-example-1 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-1 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-1.active{opacity:1}.window.overlay{-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;transition:opacity .15s linear;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background-color:#000;opacity:0}.window.overlay.active{opacity:.5;filter:alpha(opacity=50)}.window.popup.popup-example-2{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;overflow-y:auto;max-height:200px;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-2 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-2 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-2 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-2 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-2 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-2 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-2 .popup.actions .action.close:focus,.window.popup.popup-example-2 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-2 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-2 .popup.actions .action.close.disabled,.window.popup.popup-example-2 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-2 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-2.active{opacity:1}.window.popup.popup-example-3{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-3 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-3 .popup.content{overflow-y:auto;max-height:200px}.window.popup.popup-example-3 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-3 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-3 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-3 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-3 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-3 .popup.actions .action.close:focus,.window.popup.popup-example-3 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-3 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-3 .popup.actions .action.close.disabled,.window.popup.popup-example-3 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-3 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-3.active{opacity:1}.window.popup.popup-example-4{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-4 .popup.header{margin:0 0 25px}.window.popup.popup-example-4 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-4 .popup.content{margin:0 0 20px}.window.popup.popup-example-4 .popup.footer{margin:0 20px}.window.popup.popup-example-4 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-4 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-4 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-4 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-4 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-4 .popup.actions .action.close:focus,.window.popup.popup-example-4 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-4 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-4 .popup.actions .action.close.disabled,.window.popup.popup-example-4 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-4 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-4.active{opacity:1}.window.popup.popup-example-5{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-5 .popup.header .title{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.window.popup.popup-example-5 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-5 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-5 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-5 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-5 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-5 .popup.actions .action.close:focus,.window.popup.popup-example-5 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-5 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-5 .popup.actions .action.close.disabled,.window.popup.popup-example-5 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-5 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-5.active{opacity:1}.window.popup.popup-example-6{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-6 .popup.footer .actions.toolbar{text-align:left}.window.popup.popup-example-6 .popup.footer .actions.toolbar:before,.window.popup.popup-example-6 .popup.footer .actions.toolbar:after{content:"";display:table}.window.popup.popup-example-6 .popup.footer .actions.toolbar:after{clear:both}.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary{float:left}.window.popup.popup-example-6 .popup.footer .actions.toolbar .primary,.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary{display:inline-block}.window.popup.popup-example-6 .popup.footer .actions.toolbar .primary a.action,.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary a.action{display:inline-block}.window.popup.popup-example-6 .popup.footer .actions.toolbar .primary .action{margin:0 5px 0 0}.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary a.action{margin-top:6px}.window.popup.popup-example-6 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-6 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-6 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-6 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-6 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-6 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-6 .popup.actions .action.close:focus,.window.popup.popup-example-6 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-6 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-6 .popup.actions .action.close.disabled,.window.popup.popup-example-6 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-6 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-6.active{opacity:1}.window.popup.popup-example-7{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-7 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-7 .popup.actions .action.close{position:absolute;top:10px;right:10px}.window.popup.popup-example-7.active{opacity:1}.window.popup.popup-example-8{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-8 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-8 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-8 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e613';font-size:30px;line-height:inherit;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:0}.window.popup.popup-example-8 .popup.actions .action.close:hover:before{color:#008000}.window.popup.popup-example-8 .popup.actions .action.close:active:before{color:#00f}.window.popup.popup-example-8 .popup.actions .action.close:focus,.window.popup.popup-example-8 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-8 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-8 .popup.actions .action.close.disabled,.window.popup.popup-example-8 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-8 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-8.active{opacity:1}.window.popup.popup-example-9{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-9 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-9 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-9 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-9 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-9 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-9 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-9 .popup.actions .action.close:focus,.window.popup.popup-example-9 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-9 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-9 .popup.actions .action.close.disabled,.window.popup.popup-example-9 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-9 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-9.active{opacity:1}.window.overlay.example-overlay-1.active{-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;transition:opacity .15s linear;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background-color:#0f5293;opacity:0}.window.overlay.example-overlay-1.active.active{opacity:.8;filter:alpha(opacity=50)}.example-ratings-1{overflow:hidden}.example-ratings-1:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.example-ratings-1 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-1 input[type="radio"]:focus+label:before,.example-ratings-1 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-1 label{position:absolute;display:block;cursor:pointer}.example-ratings-1 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-1 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.example-ratings-1 label:hover:before{opacity:1}.example-ratings-1 label:hover~label:before{opacity:0}.example-ratings-1 .rating-5{z-index:2}.example-ratings-1 .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-1 .rating-4{z-index:3}.example-ratings-1 .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.example-ratings-1 .rating-3{z-index:4}.example-ratings-1 .rating-3:before{content:'\e605' '\e605' '\e605'}.example-ratings-1 .rating-2{z-index:5}.example-ratings-1 .rating-2:before{content:'\e605' '\e605'}.example-ratings-1 .rating-1{z-index:6}.example-ratings-1 .rating-1:before{content:'\e605'}.example-ratings-2{overflow:hidden}.example-ratings-2:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.example-ratings-2 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-2 input[type="radio"]:focus+label:before,.example-ratings-2 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-2 label{position:absolute;display:block;cursor:pointer}.example-ratings-2 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-2 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.example-ratings-2 label:hover:before{opacity:1}.example-ratings-2 label:hover~label:before{opacity:0}.example-ratings-2 .rating-8{z-index:2}.example-ratings-2 .rating-8:before{content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-7{z-index:3}.example-ratings-2 .rating-7:before{content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-6{z-index:4}.example-ratings-2 .rating-6:before{content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-5{z-index:5}.example-ratings-2 .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-4{z-index:6}.example-ratings-2 .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-3{z-index:7}.example-ratings-2 .rating-3:before{content:'\e605' '\e605' '\e605'}.example-ratings-2 .rating-2{z-index:8}.example-ratings-2 .rating-2:before{content:'\e605' '\e605'}.example-ratings-2 .rating-1{z-index:9}.example-ratings-2 .rating-1:before{content:'\e605'}.example-ratings-3{overflow:hidden}.example-ratings-3:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#aff5e3;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.example-ratings-3 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-3 input[type="radio"]:focus+label:before,.example-ratings-3 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-3 label{position:absolute;display:block;cursor:pointer}.example-ratings-3 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-3 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#0a6767;opacity:0}.example-ratings-3 label:hover:before{opacity:1}.example-ratings-3 label:hover~label:before{opacity:0}.example-ratings-3 .rating-5{z-index:2}.example-ratings-3 .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-3 .rating-4{z-index:3}.example-ratings-3 .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.example-ratings-3 .rating-3{z-index:4}.example-ratings-3 .rating-3:before{content:'\e605' '\e605' '\e605'}.example-ratings-3 .rating-2{z-index:5}.example-ratings-3 .rating-2:before{content:'\e605' '\e605'}.example-ratings-3 .rating-1{z-index:6}.example-ratings-3 .rating-1:before{content:'\e605'}.example-ratings-4{overflow:hidden}.example-ratings-4:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e600' '\e600' '\e600' '\e600' '\e600';position:absolute;z-index:1;display:block}.example-ratings-4 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-4 input[type="radio"]:focus+label:before,.example-ratings-4 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-4 label{position:absolute;display:block;cursor:pointer}.example-ratings-4 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-4 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.example-ratings-4 label:hover:before{opacity:1}.example-ratings-4 label:hover~label:before{opacity:0}.example-ratings-4 .rating-5{z-index:2}.example-ratings-4 .rating-5:before{content:'\e600' '\e600' '\e600' '\e600' '\e600'}.example-ratings-4 .rating-4{z-index:3}.example-ratings-4 .rating-4:before{content:'\e600' '\e600' '\e600' '\e600'}.example-ratings-4 .rating-3{z-index:4}.example-ratings-4 .rating-3:before{content:'\e600' '\e600' '\e600'}.example-ratings-4 .rating-2{z-index:5}.example-ratings-4 .rating-2:before{content:'\e600' '\e600'}.example-ratings-4 .rating-1{z-index:6}.example-ratings-4 .rating-1:before{content:'\e600'}.exapmle-ratings-5 .control.rating.vote{overflow:hidden}.exapmle-ratings-5 .control.rating.vote:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.exapmle-ratings-5 .control.rating.vote input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.exapmle-ratings-5 .control.rating.vote input[type="radio"]:focus+label:before,.exapmle-ratings-5 .control.rating.vote input[type="radio"]:checked+label:before{opacity:1}.exapmle-ratings-5 .control.rating.vote label{position:absolute;display:block;cursor:pointer}.exapmle-ratings-5 .control.rating.vote label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.exapmle-ratings-5 .control.rating.vote label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.exapmle-ratings-5 .control.rating.vote label:hover:before{opacity:1}.exapmle-ratings-5 .control.rating.vote label:hover~label:before{opacity:0}.exapmle-ratings-5 .control.rating.vote .rating-5{z-index:2}.exapmle-ratings-5 .control.rating.vote .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-4{z-index:3}.exapmle-ratings-5 .control.rating.vote .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-3{z-index:4}.exapmle-ratings-5 .control.rating.vote .rating-3:before{content:'\e605' '\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-2{z-index:5}.exapmle-ratings-5 .control.rating.vote .rating-2:before{content:'\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-1{z-index:6}.exapmle-ratings-5 .control.rating.vote .rating-1:before{content:'\e605'}.example-rating-summary-1{overflow:hidden}.example-rating-summary-1 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-1 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-1 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-1 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-1 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-2{overflow:hidden}.example-rating-summary-2 .rating.result{width:154px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-2 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-2 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-2 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-2 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-3{overflow:hidden}.example-rating-summary-3 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-3 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#aff5e3}.example-rating-summary-3 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-3 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#0a6767}.example-rating-summary-3 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-4{overflow:hidden}.example-rating-summary-4 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-4 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e600' '\e600' '\e600' '\e600' '\e600';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-4 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-4 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e600' '\e600' '\e600' '\e600' '\e600';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-4 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-5{overflow:hidden}.example-rating-summary-5 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-5 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-5 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-5 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-5 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-5 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-6 .rating.summary{overflow:hidden}.example-rating-summary-6 .rating.summary .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-6 .rating.summary .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-6 .rating.summary .rating.result>span{display:block;overflow:hidden}.example-rating-summary-6 .rating.summary .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-6 .rating.summary .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-7{overflow:hidden}.example-rating-summary-7 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-7 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-7 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-7 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-7 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-7 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-sections-1{position:relative;z-index:1}.example-sections-1:before,.example-sections-1:after{content:"";display:table}.example-sections-1:after{clear:both}.example-sections-1>.item.title{float:left}.example-sections-1>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-1>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-1>.item.content:before,.example-sections-1>.item.content:after{content:"";display:table}.example-sections-1>.item.content:after{clear:both}.example-sections-1>.item.content.active{display:block}.example-sections-1>.item.title{margin:0 5px 0 0}.example-sections-1>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.example-sections-1>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-1>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.example-sections-1>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-1>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-1>.item.title:not(.disabled)>.switch:focus,.example-sections-1>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-1>.item.title:not(.disabled)>.switch:active,.example-sections-1>.item.title.active>.switch,.example-sections-1>.item.title.active>.switch:focus,.example-sections-1>.item.title.active>.switch:hover{background-color:#fff;color:#333}.example-sections-1>.item.title.active>.switch{padding-bottom:6px}.example-sections-1>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border:1px solid #d1d1d1}.example-sections-2{position:relative;z-index:1}.example-sections-2:before,.example-sections-2:after{content:"";display:table}.example-sections-2:after{clear:both}.example-sections-2>.item.title{float:left}.example-sections-2>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-2>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-2>.item.content:before,.example-sections-2>.item.content:after{content:"";display:table}.example-sections-2>.item.content:after{clear:both}.example-sections-2>.item.content.active{display:block}.example-sections-2>.item.title{margin:0 5px 0 0}.example-sections-2>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.example-sections-2>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-2>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.example-sections-2>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-2>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-2>.item.title:not(.disabled)>.switch:focus,.example-sections-2>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-2>.item.title:not(.disabled)>.switch:active,.example-sections-2>.item.title.active>.switch,.example-sections-2>.item.title.active>.switch:focus,.example-sections-2>.item.title.active>.switch:hover{background-color:#fff;color:#333}.example-sections-2>.item.title.active>.switch{padding-bottom:6px}.example-sections-2>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border-top:1px solid #d1d1d1}.example-sections-3{margin:0;padding:0}.example-sections-3>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.example-sections-3>.item.title>.switch{display:block}.example-sections-3>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.example-sections-3>.item.content:before,.example-sections-3>.item.content:after{content:"";display:table}.example-sections-3>.item.content:after{clear:both}.example-sections-3>.item.content.active{display:block}.example-sections-3>.item.title{margin:0 0 5px}.example-sections-3>.item.title>.switch{border:1px solid #d1d1d1;background-color:#f0f0f0;font-size:18px;font-size:1.8rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:40px;color:#7d7d7d;text-decoration:none;height:40px;padding:5px 20px 5px 20px}.example-sections-3>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-3>.item.title>.switch:hover{color:#7d7d7d;text-decoration:#7d7d7d}.example-sections-3>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-3>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-3>.item.title:not(.disabled)>.switch:focus,.example-sections-3>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-3>.item.title:not(.disabled)>.switch:active,.example-sections-3>.item.title.active>.switch,.example-sections-3>.item.title.active>.switch:focus,.example-sections-3>.item.title.active>.switch:hover{background-color:#fff;padding-bottom:5px}.example-sections-3>.item.content{margin:0;padding:20px 20px 20px 20px;background-color:#fff;border:1px solid #d1d1d1}@media only screen and (max-width: 99999px){.example-sections-4{ position:relative;z-index:1}.example-sections-4:before,.example-sections-4:after{content:"";display:table}.example-sections-4:after{clear:both}.example-sections-4>.item.title{float:left}.example-sections-4>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-4>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-4>.item.content:before,.example-sections-4>.item.content:after{content:"";display:table}.example-sections-4>.item.content:after{clear:both}.example-sections-4>.item.content.active{display:block}.example-sections-4>.item.title{margin:0 5px 0 0}.example-sections-4>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.example-sections-4>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-4>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.example-sections-4>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-4>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-4>.item.title:not(.disabled)>.switch:focus,.example-sections-4>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-4>.item.title:not(.disabled)>.switch:active,.example-sections-4>.item.title.active>.switch,.example-sections-4>.item.title.active>.switch:focus,.example-sections-4>.item.title.active>.switch:hover{background-color:#fff;color:#333}.example-sections-4>.item.title.active>.switch{padding-bottom:6px}.example-sections-4>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border:1px solid #d1d1d1}}@media only screen and (max-width: 768px){.example-sections-4{ margin:0;padding:0}.example-sections-4>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.example-sections-4>.item.title>.switch{display:block}.example-sections-4>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.example-sections-4>.item.content:before,.example-sections-4>.item.content:after{content:"";display:table}.example-sections-4>.item.content:after{clear:both}.example-sections-4>.item.content.active{display:block}.example-sections-4>.item.title{margin:0 0 5px}.example-sections-4>.item.title>.switch{border:1px solid #d1d1d1;background-color:#f0f0f0;font-size:18px;font-size:1.8rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:40px;color:#7d7d7d;text-decoration:none;height:40px;padding:5px 20px 5px 20px}.example-sections-4>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-4>.item.title>.switch:hover{color:#7d7d7d;text-decoration:#7d7d7d}.example-sections-4>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-4>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-4>.item.title:not(.disabled)>.switch:focus,.example-sections-4>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-4>.item.title:not(.disabled)>.switch:active,.example-sections-4>.item.title.active>.switch,.example-sections-4>.item.title.active>.switch:focus,.example-sections-4>.item.title.active>.switch:hover{background-color:#fff;padding-bottom:5px}.example-sections-4>.item.content{margin:0;padding:20px 20px 20px 20px;background-color:#fff;border:1px solid #d1d1d1}}.example-sections-5{position:relative;z-index:1}.example-sections-5:before,.example-sections-5:after{content:"";display:table}.example-sections-5:after{clear:both}.example-sections-5>.item.title{float:left}.example-sections-5>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-5>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-5>.item.content:before,.example-sections-5>.item.content:after{content:"";display:table}.example-sections-5>.item.content:after{clear:both}.example-sections-5>.item.content.active{display:block}.example-sections-6{margin:0;padding:0}.example-sections-6>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.example-sections-6>.item.title>.switch{display:block}.example-sections-6>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.example-sections-6>.item.content:before,.example-sections-6>.item.content:after{content:"";display:table}.example-sections-6>.item.content:after{clear:both}.example-sections-6>.item.content.active{display:block}.example-table-1{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-1 th{text-align:left}.example-table-1>tbody>tr>th,.example-table-1>tfoot>tr>th,.example-table-1>tbody>tr>td,.example-table-1>tfoot>tr>td{vertical-align:top}.example-table-1>thead>tr>th,.example-table-1>thead>tr>td{vertical-align:bottom}.example-table-1>thead>tr>th,.example-table-1>tbody>tr>th,.example-table-1>tfoot>tr>th,.example-table-1>thead>tr>td,.example-table-1>tbody>tr>td,.example-table-1>tfoot>tr>td{padding:3px 10px}.example-table-2>thead>tr>td,.example-table-2>tbody>tr>td,.example-table-2>tfoot>tr>td{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}.example-table-2>thead>tr>th,.example-table-2>tbody>tr>th,.example-table-2>tfoot>tr>th{font-size:14px;font-size:1.4rem;color:#111;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;font-style:normal;line-height:1.42857143}.example-table-3{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-3 th{text-align:left}.example-table-3>tbody>tr>th,.example-table-3>tfoot>tr>th,.example-table-3>tbody>tr>td,.example-table-3>tfoot>tr>td{vertical-align:top}.example-table-3>thead>tr>th,.example-table-3>thead>tr>td{vertical-align:bottom}.example-table-3>thead>tr>th,.example-table-3>tbody>tr>th,.example-table-3>tfoot>tr>th,.example-table-3>thead>tr>td,.example-table-3>tbody>tr>td,.example-table-3>tfoot>tr>td{padding:3px 10px}.example-table-3>caption{font-size:18px;font-size:1.8rem;color:red;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143;text-align:left;margin-top:20px;margin-bottom:10px}.example-table-4{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-4 th{text-align:left}.example-table-4>tbody>tr>th,.example-table-4>tfoot>tr>th,.example-table-4>tbody>tr>td,.example-table-4>tfoot>tr>td{vertical-align:top}.example-table-4>thead>tr>th,.example-table-4>thead>tr>td{vertical-align:bottom}.example-table-4>thead>tr>th,.example-table-4>tbody>tr>th,.example-table-4>tfoot>tr>th,.example-table-4>thead>tr>td,.example-table-4>tbody>tr>td,.example-table-4>tfoot>tr>td{padding:3px 10px}.example-table-4>thead>tr>td,.example-table-4>tbody>tr>td,.example-table-4>tfoot>tr>td{padding:15px 25px 5px 0}.example-table-4>thead>tr>th,.example-table-4>tbody>tr>th,.example-table-4>tfoot>tr>th{padding:15px 25px 10px 0}.example-table-5{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;background-color:#fff}.example-table-5 th{text-align:left}.example-table-5>tbody>tr>th,.example-table-5>tfoot>tr>th,.example-table-5>tbody>tr>td,.example-table-5>tfoot>tr>td{vertical-align:top}.example-table-5>thead>tr>th,.example-table-5>thead>tr>td{vertical-align:bottom}.example-table-5>thead>tr>th,.example-table-5>tbody>tr>th,.example-table-5>tfoot>tr>th,.example-table-5>thead>tr>td,.example-table-5>tbody>tr>td,.example-table-5>tfoot>tr>td{padding:3px 10px}.example-table-5>thead{background-color:#ff0}.example-table-5>tfoot{background-color:#008000}.example-table-5>tbody>tr>td{background-color:#ffc0cb}.example-table-5>tbody>tr>th{background-color:#ffa500}.example-table-6{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:1px solid #d1d1d1}.example-table-6 th{text-align:left}.example-table-6>tbody>tr>th,.example-table-6>tfoot>tr>th,.example-table-6>tbody>tr>td,.example-table-6>tfoot>tr>td{vertical-align:top}.example-table-6>thead>tr>th,.example-table-6>thead>tr>td{vertical-align:bottom}.example-table-6>thead>tr>th,.example-table-6>tbody>tr>th,.example-table-6>tfoot>tr>th,.example-table-6>thead>tr>td,.example-table-6>tbody>tr>td,.example-table-6>tfoot>tr>td{padding:3px 10px}.example-table-6>thead>tr>th,.example-table-6>tbody>tr>th,.example-table-6>tfoot>tr>th,.example-table-6>thead>tr>td,.example-table-6>tbody>tr>td,.example-table-6>tfoot>tr>td{border:1px solid #d1d1d1}.example-table-7{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-7 th{text-align:left}.example-table-7>tbody>tr>th,.example-table-7>tfoot>tr>th,.example-table-7>tbody>tr>td,.example-table-7>tfoot>tr>td{vertical-align:top}.example-table-7>thead>tr>th,.example-table-7>thead>tr>td{vertical-align:bottom}.example-table-7>thead>tr>th,.example-table-7>tbody>tr>th,.example-table-7>tfoot>tr>th,.example-table-7>thead>tr>td,.example-table-7>tbody>tr>td,.example-table-7>tfoot>tr>td{padding:3px 10px}.example-table-7>thead>tr>th,.example-table-7>tbody>tr>th,.example-table-7>tfoot>tr>th,.example-table-7>thead>tr>td,.example-table-7>tbody>tr>td,.example-table-7>tfoot>tr>td{border-top:1px solid #d1d1d1}.example-table-7>caption+thead>tr:first-child>th,.example-table-7>colgroup+thead>tr:first-child>th,.example-table-7>thead:first-child>tr:first-child>th,.example-table-7>caption+thead>tr:first-child>td,.example-table-7>colgroup+thead>tr:first-child>td,.example-table-7>thead:first-child>tr:first-child>td{border-top:0}.example-table-7>tbody+tbody{border-top:1px solid #919191}.example-table-8{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-8 th{text-align:left}.example-table-8>tbody>tr>th,.example-table-8>tfoot>tr>th,.example-table-8>tbody>tr>td,.example-table-8>tfoot>tr>td{vertical-align:top}.example-table-8>thead>tr>th,.example-table-8>thead>tr>td{vertical-align:bottom}.example-table-8>thead>tr>th,.example-table-8>tbody>tr>th,.example-table-8>tfoot>tr>th,.example-table-8>thead>tr>td,.example-table-8>tbody>tr>td,.example-table-8>tfoot>tr>td{padding:3px 10px}.example-table-8>thead>tr>th,.example-table-8>tbody>tr>th,.example-table-8>tfoot>tr>th,.example-table-8>thead>tr>td,.example-table-8>tbody>tr>td,.example-table-8>tfoot>tr>td{border-left:1px solid #d1d1d1}.example-table-8>thead>tr>th:first-child,.example-table-8>tbody>tr>th:first-child,.example-table-8>tfoot>tr>th:first-child,.example-table-8>thead>tr>td:first-child,.example-table-8>tbody>tr>td:first-child,.example-table-8>tfoot>tr>td:first-child{border-left:0}.example-table-9{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:0}.example-table-9 th{text-align:left}.example-table-9>tbody>tr>th,.example-table-9>tfoot>tr>th,.example-table-9>tbody>tr>td,.example-table-9>tfoot>tr>td{vertical-align:top}.example-table-9>thead>tr>th,.example-table-9>thead>tr>td{vertical-align:bottom}.example-table-9>thead>tr>th,.example-table-9>tbody>tr>th,.example-table-9>tfoot>tr>th,.example-table-9>thead>tr>td,.example-table-9>tbody>tr>td,.example-table-9>tfoot>tr>td{padding:3px 10px}.example-table-9>thead>tr>th,.example-table-9>tbody>tr>th,.example-table-9>tfoot>tr>th,.example-table-9>thead>tr>td,.example-table-9>tbody>tr>td,.example-table-9>tfoot>tr>td{border:0}.example-table-9>thead>tr>th,.example-table-9>thead>tr>td{border-bottom:1px solid #d1d1d1}.example-table-10{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:0}.example-table-10 th{text-align:left}.example-table-10>tbody>tr>th,.example-table-10>tfoot>tr>th,.example-table-10>tbody>tr>td,.example-table-10>tfoot>tr>td{vertical-align:top}.example-table-10>thead>tr>th,.example-table-10>thead>tr>td{vertical-align:bottom}.example-table-10>thead>tr>th,.example-table-10>tbody>tr>th,.example-table-10>tfoot>tr>th,.example-table-10>thead>tr>td,.example-table-10>tbody>tr>td,.example-table-10>tfoot>tr>td{padding:3px 10px}.example-table-10>thead>tr>th,.example-table-10>tbody>tr>th,.example-table-10>tfoot>tr>th,.example-table-10>thead>tr>td,.example-table-10>tbody>tr>td,.example-table-10>tfoot>tr>td{border:0}.example-table-11{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-11 th{text-align:left}.example-table-11>tbody>tr>th,.example-table-11>tfoot>tr>th,.example-table-11>tbody>tr>td,.example-table-11>tfoot>tr>td{vertical-align:top}.example-table-11>thead>tr>th,.example-table-11>thead>tr>td{vertical-align:bottom}.example-table-11>thead>tr>th,.example-table-11>tbody>tr>th,.example-table-11>tfoot>tr>th,.example-table-11>thead>tr>td,.example-table-11>tbody>tr>td,.example-table-11>tfoot>tr>td{padding:3px 10px}.example-table-11>tbody>tr:nth-child(even)>td,.example-table-11>tbody>tr:nth-child(even)>th{background-color:#fc0;color:#000}.example-table-12{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-12 th{text-align:left}.example-table-12>tbody>tr>th,.example-table-12>tfoot>tr>th,.example-table-12>tbody>tr>td,.example-table-12>tfoot>tr>td{vertical-align:top}.example-table-12>thead>tr>th,.example-table-12>thead>tr>td{vertical-align:bottom}.example-table-12>thead>tr>th,.example-table-12>tbody>tr>th,.example-table-12>tfoot>tr>th,.example-table-12>thead>tr>td,.example-table-12>tbody>tr>td,.example-table-12>tfoot>tr>td{padding:3px 10px}.example-table-12>tbody>tr:nth-child(even):hover>td,.example-table-12>tbody>tr:nth-child(even):hover>th{background-color:#f0f0f0}.example-table-12>tbody>tr:nth-child(odd):hover>td,.example-table-12>tbody>tr:nth-child(odd):hover>th{background-color:#f0f0f0}.example-table-13{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:1px solid #d1d1d1}.example-table-13 th{text-align:left}.example-table-13>tbody>tr>th,.example-table-13>tfoot>tr>th,.example-table-13>tbody>tr>td,.example-table-13>tfoot>tr>td{vertical-align:top}.example-table-13>thead>tr>th,.example-table-13>thead>tr>td{vertical-align:bottom}.example-table-13>thead>tr>th,.example-table-13>tbody>tr>th,.example-table-13>tfoot>tr>th,.example-table-13>thead>tr>td,.example-table-13>tbody>tr>td,.example-table-13>tfoot>tr>td{padding:3px 10px}.example-table-13>thead>tr>th,.example-table-13>tbody>tr>th,.example-table-13>tfoot>tr>th,.example-table-13>thead>tr>td,.example-table-13>tbody>tr>td,.example-table-13>tfoot>tr>td{border:1px solid #d1d1d1}.example-table-13>tbody>tr:nth-child(odd)>td,.example-table-13>tbody>tr:nth-child(odd)>th{background-color:#fff;color:#333}.example-table-13>tbody>tr:nth-child(even):hover>td,.example-table-13>tbody>tr:nth-child(even):hover>th{background-color:#f0f0f0}.example-table-13>tbody>tr:nth-child(odd):hover>td,.example-table-13>tbody>tr:nth-child(odd):hover>th{background-color:#f0f0f0}@media only screen and (max-width: 768px){.example-table-14{ width:100%;margin-bottom:20px;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.example-table-14>table{margin-bottom:0}.example-table-14>table>thead>tr>th,.example-table-14>table>tbody>tr>th,.example-table-14>table>tfoot>tr>th,.example-table-14>table>thead>tr>td,.example-table-14>table>tbody>tr>td,.example-table-14>table>tfoot>tr>td{white-space:nowrap}}.example-table-15{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:1px solid #d1d1d1}.example-table-15 th{text-align:left}.example-table-15>tbody>tr>th,.example-table-15>tfoot>tr>th,.example-table-15>tbody>tr>td,.example-table-15>tfoot>tr>td{vertical-align:top}.example-table-15>thead>tr>th,.example-table-15>thead>tr>td{vertical-align:bottom}.example-table-15>thead>tr>th,.example-table-15>tbody>tr>th,.example-table-15>tfoot>tr>th,.example-table-15>thead>tr>td,.example-table-15>tbody>tr>td,.example-table-15>tfoot>tr>td{padding:3px 10px}.example-table-15>thead>tr>th,.example-table-15>tbody>tr>th,.example-table-15>tfoot>tr>th,.example-table-15>thead>tr>td,.example-table-15>tbody>tr>td,.example-table-15>tfoot>tr>td{border:1px solid #d1d1d1}.example-table-15>tbody>tr:nth-child(odd)>td,.example-table-15>tbody>tr:nth-child(odd)>th{background-color:#fff;color:#333}.example-table-15>tbody>tr:nth-child(even):hover>td,.example-table-15>tbody>tr:nth-child(even):hover>th{background-color:#f0f0f0}.example-table-15>tbody>tr:nth-child(odd):hover>td,.example-table-15>tbody>tr:nth-child(odd):hover>th{background-color:#f0f0f0}@media only screen and (max-width: 768px){.example-table-15{ border:0;background-color:#fc0}.example-table-15>tbody>tr:nth-child(odd)>td,.example-table-15>tbody>tr:nth-child(odd)>th{background-color:#fc0;color:#333}.example-table-15>tbody>tr:nth-child(even):hover>td,.example-table-15>tbody>tr:nth-child(even):hover>th{background-color:#fc0}.example-table-15>tbody>tr:nth-child(odd):hover>td,.example-table-15>tbody>tr:nth-child(odd):hover>th{background-color:#fc0}.example-table-15>thead>tr>th{display:none}.example-table-15>tbody>tr td,.example-table-15>tbody>tr th{display:block;padding:1.5px 10px;border-bottom:0}.example-table-15>tbody>tr td:before,.example-table-15>tbody>tr th:before{content:attr(data-th) ":";display:inline-block;padding-right:10px;font-size:14px;font-size:1.4rem;color:#111;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;font-style:normal;line-height:1.42857143}.example-table-15>tbody>tr>td{background-color:#fc0}.example-table-15>tfoot>tr td,.example-table-15>tfoot>tr th{display:block}.example-table-15>tbody>tr>th{background-color:#ffa500!important}}.example-tooltip-bottom{position:relative;display:inline-block}.example-tooltip-bottom .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;top:100%;left:0;margin-top:5px}.example-tooltip-bottom .tooltip-content:after,.example-tooltip-bottom .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-bottom .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-bottom .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-bottom .tooltip-content:after,.example-tooltip-bottom .tooltip-content:before{bottom:100%}.example-tooltip-bottom .tooltip-content:after{border-bottom-color:#fff;margin-left:-5px;left:15px}.example-tooltip-bottom .tooltip-content:before{border-bottom-color:#bbb;margin-left:-6px;left:15px}.example-tooltip-bottom>:first-child{cursor:help}.example-tooltip-bottom>:first-child:hover+.tooltip-content,.example-tooltip-bottom>:first-child:focus+.tooltip-content,.example-tooltip-bottom:hover>.tooltip-content{display:block}.example-tooltip-left{position:relative;display:inline-block}.example-tooltip-left .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;right:100%;top:0;margin-right:5px}.example-tooltip-left .tooltip-content:after,.example-tooltip-left .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-left .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-left .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-left .tooltip-content:after,.example-tooltip-left .tooltip-content:before{left:100%}.example-tooltip-left .tooltip-content:after{border-left-color:#fff;margin-top:-5px;top:15px}.example-tooltip-left .tooltip-content:before{border-left-color:#bbb;margin-top:-6px;top:15px}.example-tooltip-left>:first-child{cursor:help}.example-tooltip-left>:first-child:hover+.tooltip-content,.example-tooltip-left>:first-child:focus+.tooltip-content,.example-tooltip-left:hover>.tooltip-content{display:block}.example-tooltip-right{position:relative;display:inline-block}.example-tooltip-right .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;left:100%;top:0;margin-left:5px}.example-tooltip-right .tooltip-content:after,.example-tooltip-right .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-right .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-right .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-right .tooltip-content:after,.example-tooltip-right .tooltip-content:before{right:100%}.example-tooltip-right .tooltip-content:after{border-right-color:#fff;margin-top:-5px;top:15px}.example-tooltip-right .tooltip-content:before{border-right-color:#bbb;margin-top:-6px;top:15px}.example-tooltip-right>:first-child{cursor:help}.example-tooltip-right>:first-child:hover+.tooltip-content,.example-tooltip-right>:first-child:focus+.tooltip-content,.example-tooltip-right:hover>.tooltip-content{display:block}.example-tooltip-top{position:relative;display:inline-block}.example-tooltip-top .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;bottom:100%;left:0;margin-bottom:5px}.example-tooltip-top .tooltip-content:after,.example-tooltip-top .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-top .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-top .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-top .tooltip-content:after,.example-tooltip-top .tooltip-content:before{top:100%}.example-tooltip-top .tooltip-content:after{border-top-color:#fff;margin-left:-5px;left:15px}.example-tooltip-top .tooltip-content:before{border-top-color:#bbb;margin-left:-6px;left:15px}.example-tooltip-top>:first-child{cursor:help}.example-tooltip-top>:first-child:hover+.tooltip-content,.example-tooltip-top>:first-child:focus+.tooltip-content,.example-tooltip-top:hover>.tooltip-content{display:block}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}p{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}abbr[title]{cursor:help;border-bottom:1px dotted #d1d1d1}b,strong{font-weight:700}em,i{font-style:italic}mark{background-color:#f0f0f0;color:#000}small,.small{font-size:12px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #d1d1d1}sub,sup{font-size:71.42857143000001%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dfn{font-style:italic}h1{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}h3{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}h4{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h5{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h6{font-size:10px;font-size:1rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-size:71.42857143000001%;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1}a,.alink{color:#1979c3;text-decoration:none}a:visited,.alink:visited{color:#800080;text-decoration:none}a:hover,.alink:hover{color:#006bb4;text-decoration:underline}a:active,.alink:active{color:#ff5501;text-decoration:underline}a:focus,.alink:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}ul,ol{margin-top:0;margin-top:0rem;margin-bottom:25px;margin-bottom:2.5rem}ul>li,ol>li{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}dl{margin-top:0;margin-bottom:20px}dt{font-weight:700;margin-top:0;margin-bottom:5px}dd{margin-top:0;margin-bottom:10px}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,'Courier New',monospace}code{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0;white-space:nowrap}kbd{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0}pre{background-color:#f0f0f0;border:1px solid #d1d1d1;color:#111;display:block;font-size:12px;font-size:1.2rem;margin:0 0 10px;line-height:1.42857143;padding:10px;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}blockquote{padding:0;margin:0 0 20px 40px;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:italic;line-height:1.42857143;border-left:0 solid #d1d1d1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{color:#333;display:block;font-size:10px;font-size:1rem;line-height:1.42857143}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote cite{font-style:normal}blockquote:before,blockquote:after{content:""}q{quotes:none}q:before,q:after{content:'';content:none}cite{font-style:normal}.example{font-size:25px;font-size:2.5rem}.example-word-wrap{-ms-word-break:break-all;word-break:break-all;word-break:break-word;word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto;background:#ccc;width:120px}.example-text-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#ccc;width:120px}.example-text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.example-hyphens{word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}.example-hyphens-none{word-wrap:break-word;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}.example-typography{font-size:30px;font-size:3rem;color:#fc0;font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-weight:500;font-style:italic;line-height:1.2}.example-list-reset-styles{margin:0;padding:0;list-style-type:none;list-style-image:none}.example-list-inline{margin:0;padding:0;list-style-type:none;list-style-image:none}.example-list-inline>li{display:inline-block;vertical-align:top}.example-link-default{color:#1979c3;text-decoration:none}.example-link-default:visited{color:#800080;text-decoration:none}.example-link-default:hover{color:#006bb4;text-decoration:underline}.example-link-default:active{color:#ff5501;text-decoration:underline}.example-link-default:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-link{color:#008000;text-decoration:none}.example-link:visited{color:#800080;text-decoration:none}.example-link:hover{color:#ffa500;text-decoration:none}.example-link:active{color:#ff5501;text-decoration:underline}.example-link:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-heading{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.example-heading-2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}p{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}abbr[title]{cursor:help;border-bottom:1px dotted #d1d1d1}b,strong{font-weight:700}em,i{font-style:italic}mark{background-color:#f0f0f0;color:#000}small,.small{font-size:12px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #d1d1d1}sub,sup{font-size:71.42857143000001%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dfn{font-style:italic}h1{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}h3{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}h4{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h5{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h6{font-size:10px;font-size:1rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-size:71.42857143000001%;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1}a,.alink{color:#1979c3;text-decoration:none}a:visited,.alink:visited{color:#800080;text-decoration:none}a:hover,.alink:hover{color:#006bb4;text-decoration:underline}a:active,.alink:active{color:#ff5501;text-decoration:underline}a:focus,.alink:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}ul,ol{margin-top:0;margin-top:0rem;margin-bottom:25px;margin-bottom:2.5rem}ul>li,ol>li{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}dl{margin-top:0;margin-bottom:20px}dt{font-weight:700;margin-top:0;margin-bottom:5px}dd{margin-top:0;margin-bottom:10px}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,'Courier New',monospace}code{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0;white-space:nowrap}kbd{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0}pre{background-color:#f0f0f0;border:1px solid #d1d1d1;color:#111;display:block;font-size:12px;font-size:1.2rem;margin:0 0 10px;line-height:1.42857143;padding:10px;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}blockquote{padding:0;margin:0 0 20px 40px;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:italic;line-height:1.42857143;border-left:0 solid #d1d1d1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{color:#333;display:block;font-size:10px;font-size:1rem;line-height:1.42857143}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote cite{font-style:normal}blockquote:before,blockquote:after{content:""}q{quotes:none}q:before,q:after{content:'';content:none}cite{font-style:normal}body{padding:15px;background-image:none}</style></head><body><nav class="bar top cf"><div class="container"><a href="index.html" class="brand">Magento UI library</a><ul class="menu"><li><a href="#" data-toggle="dropdown-1" unselectable="on" class="dropdown-toggle">files</a><ul id="dropdown-1" hidden class="dropdown"><li><a href="actions-toolbar.html">actions-toolbar</a></li><li><a href="breadcrumbs.html">breadcrumbs</a></li><li><a href="buttons.html">buttons</a></li><li><a href="docs.html">docs</a></li><li><a href="dropdowns.html">dropdowns</a></li><li><a href="forms.html">forms</a></li><li><a href="icons.html">icons</a></li><li><a href="layout.html">layout</a></li><li><a href="lib.html">lib</a></li><li><a href="loaders.html">loaders</a></li><li><a href="messages.html">messages</a></li><li><a href="navigation.html">navigation</a></li><li><a href="pages.html">pages</a></li><li><a href="popups.html">popups</a></li><li><a href="rating.html">rating</a></li><li><a href="resets.html">resets</a></li><li><a href="sections.html">sections</a></li><li><a href="tables.html">tables</a></li><li><a href="tooltips.html">tooltips</a></li><li><a href="typography.html">typography</a></li><li><a href="variables.html">variables</a></li></ul></li></ul><div class="nav"><button title="Table of Contents" data-toggle="nav-toc"><svg viewBox="0 0 512 512" height="22" width="22" class="icon"><path d="M108.9,403.1V462H50v-58.9H108.9z M108.9,285.4H50v58.9h58.9V285.4zM108.9,50H50v58.9h58.9V50z M108.9,167.7H50v58.9h58.9V167.7z M167.7,344.3H462v-58.9H167.7V344.3zM167.7,50v58.9H462V50H167.7z M167.7,462H462v-58.9H167.7V462z M167.7,226.6H462v-58.9H167.7V226.6z"></path></svg></button><input type="search" placeholder="Search" class="search"></div></div></nav><section class="container"><article id="forms-mixins" class="section"><div class="docs"><a href="#forms-mixins" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="forms-mixins">Forms mixins</h1> -<p> Magento UI library provides a set of mixins for forms elements customization. You can customize your forms globally by configuring global variables, or you can customize every form separately using appropriate mixin.</p> -</div></article><article id="global-forms-elements-customization" class="section"><div class="docs"><a href="#global-forms-elements-customization" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="global-forms-elements-customization">Global forms elements customization</h1> -<p> The <code>.form-element-all()</code> mixin is used to set default styles for all form elements in the theme. To configure these elements global variables are used.</p> -</div></article><article id="fieldsets-fields-customization" class="section"><div class="docs"><a href="#fieldsets-fields-customization" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="fieldsets-fields-customization">Fieldsets & fields customization</h1> -<p> The <code>.form-fieldset()</code> mixin is used to customize form fieldset borders and legend.</p> -<p> The <code>.form-field()</code> mixin is used to customize form elements.</p> -<p> The <code>.form-hasrequired()</code> mixin is used to show and customize "required fields" message if the form or fieldset has required fields and a <code>data-hasrequired</code> attribute.</p> -<p> Using these mixins you can customize your forms. By default these mixins use global variables.</p> -<h2 id="simple-form-with-required-fields-message">Simple form with "required fields" message</h2> -<textarea class="preview-code" spellcheck="false"> <form class="example-form-1"> - <fieldset class="example-form-1-fieldset" data-hasrequired="* Required Fields"> - <legend class="legend"><span>Login Information</span></legend><br> - - <div class="field password required"> - <label for="password" class="label"><span>Password</span></label> - - <div class="control"> - <input type="password" name="password" id="password" title="Password"> - </div> - </div> - - <div class="field confirmation required"> - <label for="confirmation" class="label"><span>Confirm Password</span></label> - - <div class="control"> - <input type="password" name="confirmation" title="Confirm Password" id="confirmation"> - </div> - </div> - - <div class="field password required"> - <label for="password2" class="label"><span>Password</span></label> - - <div class="control"> - <input type="password" name="password2" id="password2" title="Password"> - </div> - </div> - - <div class="field textarea"> - <label for="textarea2" class="label"><span>Textarea</span></label> - - <div class="control"> - <textarea rows="3" cols="5" id="textarea2" name="textarea2"></textarea> - <div class="note">Please enter your message here</div> - </div> - </div> - - <div class="field file"> - <label for="file2" class="label"><span>File field</span></label> - - <div class="control"> - <input type="file" id="file2" value="" name="file2"> - <div class="note">Please choose your picture here</div> - </div> - </div> - - <div class="field choice"> - <input type="radio" id="radio2" checked="" value="1" name="radio2"> - - <label for="radio2" class="label"><span>Radiobutton choice</span></label> - </div> - - <div class="field choice"> - <input type="checkbox" id="checkbox2" value="1" name="checkbox2"> - - <label for="checkbox2" class="label"><span>Checkbox choice</span></label> - </div> - - <div class="field region"> - <label for="select2" class="label"><span>Select</span></label> - - <div class="control"> - <select name="select2" id="select2"> - <option value="">Please select</option> - <option value="5">5</option> - <option value="10">10</option> - <option value="15">15</option> - <option value="20">20</option> - </select> - </div> - </div> - - <div class="field multiselect"> - <label for="multiselect2" class="label"><span>Multiple select</span></label> - - <div class="control"> - <select name="multiselect2" id="multiselect2" multiple="multiple"> - <option value="Option 1">Option 1</option> - <option value="Option 2">Option 2</option> - <option value="Option 3">Option 3</option> - <option value="Option 4">Option 4</option> - <option value="Option 5">Option 5</option> - <option value="Option 6">Option 6</option> - <option value="Option 7">Option 7</option> - </select> - </div> - </div> - </fieldset> - </form></textarea><h2 id="form-with-fields-in-2-columns">Form with fields in 2 columns</h2> -<textarea class="preview-code" spellcheck="false"> <form class="example-form-2" action="#" method="post"> - <fieldset class="example-form-2-fieldset"> - <legend class="legend"><span>Personal Information</span></legend><br> - - <div class="field name firstname required"> - <label class="label" for="firstname"><span>First Name</span></label> - - <div class="control"> - <input type="text" id="firstname" name="firstname" value="" title="First Name"> - </div> - </div> - - <div class="field name lastname required"> - <label class="label" for="lastname"><span>Last Name</span></label> - - <div class="control"> - <input type="text" id="lastname" name="lastname" value="" title="Last Name"> - </div> - </div> - - <div class="field required"> - <label for="email_address" class="label"><span>Email Address</span></label> - - <div class="control"> - <input type="email" name="email" id="email_address" value="" title="Email Address"> - </div> - </div> - - <div class="field textarea"> - <label for="textarea" class="label"><span>Textarea</span></label> - - <div class="control"> - <textarea rows="3" cols="5" id="textarea" name="textarea"></textarea> - <div class="note">Please enter your message here</div> - </div> - </div> - - <div class="field file"> - <label for="file" class="label"><span>File field</span></label> - - <div class="control"> - <input type="file" id="file" value="" name="file"> - <div class="note">Please choose your picture here</div> - </div> - </div> - - <div class="field choice"> - <input type="radio" id="radio" checked="" value="1" name="radio"> - - <label for="radio" class="label"><span>Radiobutton choice</span></label> - </div> - - <div class="field choice"> - <input type="checkbox" id="checkbox" value="1" name="checkbox"> - - <label for="checkbox" class="label"><span>Checkbox choice</span></label> - </div> - - <div class="field region"> - <label for="select" class="label"><span>Select</span></label> - - <div class="control"> - <select name="select" id="select"> - <option value="">Please select</option> - <option value="5">5</option> - <option value="10">10</option> - <option value="15">15</option> - <option value="20">20</option> - </select> - </div> - </div> - - <div class="field multiselect"> - <label for="multiselect" class="label"><span>Multiple select</span></label> - - <div class="control"> - <select name="multiselect" id="multiselect" multiple="multiple"> - <option value="Option 1">Option 1</option> - <option value="Option 2">Option 2</option> - <option value="Option 3">Option 3</option> - <option value="Option 4">Option 4</option> - <option value="Option 5">Option 5</option> - <option value="Option 6">Option 6</option> - <option value="Option 7">Option 7</option> - </select> - </div> - </div> - </fieldset> - </form></textarea> +<!DOCTYPE html><html><head><title>forms | Magento UI library +</title><meta charset="utf-8"><style>*{-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;border:0}body{padding:60px 0 40px;background-color:hsl(207,10%,90%);color:hsl(207,5%,30%)}.container{max-width:1300px;margin:0 auto;padding:0 20px}.section{position:relative;margin-bottom:20px}.docs{position:relative;z-index:2;width:68%;min-height:200px;background-color:hsl(207,0%,100%);background-clip:padding-box;border:1px solid hsla(207,5%,5%,.1);border-radius:5px;box-shadow:0 0 3px hsla(207,5%,5%,.1)}.code{position:absolute;top:5px;bottom:5px;right:0;z-index:1;width:33%;padding:10px 10px 10px 20px;border-radius:0 5px 5px 0;border:1px solid hsla(207,20%,10%,.1);background-color:hsla(207,20%,95%,.9);background-clip:padding-box;opacity:.5;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s}.code:hover{opacity:1}.preview{background:hsl(207,0%,100%);border-top:1px solid hsl(207,30%,95%);position:relative;z-index:1}.preview-code+.preview{margin-top:0;border-top:0}.preview iframe{display:block;width:100%;height:100%;overflow:hidden}.preview-code{position:relative;z-index:2;display:block;width:100%;color:hsl(207,9%,37%);max-height:200px;padding:10px 20px;overflow-y:auto;background:hsl(207,30%,95%);border:1px solid hsl(207,30%,85%);border-left:0;border-right;box-shadow:inset 0 1px 2px hsla(207,30%,10%,.1);line-height:1.1!important;resize:none}.preview-code:focus{outline:0;background:hsl(207,30%,97%);box-shadow:inset 0 1px 2px hsla(207,30%,10%,.1),0 0 5px hsla(207,75%,75%,.9)}.preview-code:last-child{border-bottom:0;border-radius:0 0 5px 5px}.resizeable{padding:15px;overflow:auto;background:hsl(207,0%,100%);box-shadow:0 0 2px hsla(207,10%,20%,.2);resize:both}.preview-code,pre{white-space:pre-wrap;word-wrap:break-word;overflow-y:auto}.code pre{height:100%;margin-top:0}.bar{position:fixed;left:0;right:0;z-index:1010;min-height:40px;line-height:40px;background-image:-webkit-linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92));background-image:-moz-linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92));background-image:-o-linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92));background-image:linear-gradient(hsla(207,10%,35%,.97),hsla(207,5%,25%,.92))}.bar.top{top:0;box-shadow:0 1px 2px hsla(207,5%,0%,.2)}.bar.bottom{bottom:0;box-shadow:0 -1px 2px hsla(207,5%,0%,.2)}.bar ul{margin:0!important}.bar li{display:block;list-style:none}.bar .icon path{fill:hsla(27,10%,75%,.75)}.docs .icon path{fill:hsla(207,10%,75%,.5)}.docs .permalink:hover .icon path{fill:hsl(207,10%,75%)}.bar button{color:hsla(27,10%,75%,.75)}.bar button:hover .icon path,.bar button.is-active .icon path{fill:hsl(27,10%,85%)}.bar button:hover,.bar button.is-active{color:hsl(27,10%,85%)}.bar .icon{vertical-align:middle;display:inline-block}.bar,.bar a,.bar a:visited{color:hsl(27,10%,85%);text-shadow:1px 1px 0 hsla(27,5%,0%,.5)}.bar a:hover,.bar a.is-active{color:hsl(27,10%,95%);text-shadow:1px 1px 0 hsla(27,5%,0%,1);text-decoration:none}.brand{float:left;margin-right:20px;font-weight:700;font-size:16px;text-decoration:none}.brand,a.brand,a.brand:visited{color:hsl(27,5%,5%);text-shadow:1px 1px 0 hsla(27,5%,100%,.2)}.brand:hover,a.brand:hover{color:hsl(27,5%,0%);text-shadow:1px 1px 0 hsla(27,5%,100%,.3);text-decoration:none}.menu{font-size:12px}.menu>li{float:left;position:relative}.menu a{display:block;margin-right:15px}.dropdown-toggle{position:relative;padding-right:15px}.dropdown-toggle:after{display:block;position:absolute;right:0;top:18px;content:'';border:4px solid;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent}.nav-results,.dropdown{position:absolute;z-index:1020;top:32px;left:-16px;width:175px;max-height:500px;padding:10px 0;overflow-y:auto;word-wrap:break-word;font-size:11px;line-height:20px;background-color:hsla(207,10%,25%,.97);border:1px solid hsla(207,5%,70%,.3);border-radius:3px;box-shadow:0 0 3px hsla(207,5%,0%,.2)}.toc-list{width:200px}.nav-results{right:0;width:200px;left:auto;padding:5px 0}.nav-results-filename{display:block;font-size:10px;opacity:.75}.nav-results a{display:block;line-height:15px;padding:5px 10px}.nav-results li:not([hidden])~li a{border-top:1px solid hsla(27,10%,90%,.1)}.dropdown a{padding:0 15px}.dropdown li:hover{background-color:hsl(207,10%,22%)}.nav{float:right;position:relative}.nav input[type="search"]{padding:2px 4px;color:#fff;width:150px;border:1px solid hsla(207,5%,0%,.3);background:hsla(207,12%,40%,.9);box-shadow:inset 1px 1px 3px hsla(207,5%,0%,.05),1px 1px 0 hsla(207,5%,100%,.05);border-radius:10px;-webkit-appearance:textfield}.nav input[type="search"]:focus{outline:0;background:hsla(207,7%,45%,.9)}.settings{text-align:center}.bar button{display:inline-block;vertical-align:middle;padding:0 5px;margin:0 3px;background:transparent}.bar button:first-child{margin-left:0}.settings .auto{line-height:32px;font-size:11px;font-weight:700;letter-spacing:-1px;text-shadow:none;text-transform:uppercase}body{font-family:sans-serif;font-size:14px;line-height:1.618}.docs pre,p,ol,ul,dl,figure,blockquote,table{margin-left:20px;margin-right:20px}.preview,.docs pre,p,ol,ul,dl,figure,blockquote,table{margin-top:10px}ul ul,ol ol,ul ol,ol ul,blockquote p:last-child{margin-top:0}ul,ol{padding-left:1.5em}p:last-child,ol:last-child,ul:last-child,dl:last-child{margin-bottom:20px}hr,h1,h2,h3,h4,h5,h6{margin:1em 20px .5em}h1:first-of-type{margin-top:20px}h1,h2,h3,h4,h5,h6{line-height:1.2;color:hsl(207,10%,50%)}h1 a,h1 a:hover,h1 a:visited{color:inherit;text-decoration:inherit}h1{font-size:3.052em;font-weight:400;color:hsl(207,10%,45%)}h2{font-size:1.953em}h3{font-size:1.536em}h1,h2,h3{letter-spacing:-.025em}h4{font-size:1.25em}h5{font-size:1em;text-transform:uppercase}h6{font-size:1em}.permalink{position:absolute;top:15px;right:15px}a{color:hsl(207,90%,50%);text-decoration:none}a:hover{color:hsl(207,95%,40%);text-decoration:underline}a:visited{color:hsl(207,100%,35%)}.preview-code,pre,code,var{font-style:normal;font-family:"Ubuntu Mono","Andale Mono","DejaVu Sans Mono","Monaco","Bitstream Vera Sans Mono","Consolas","Lucida Console",monospace;font-size:12px}.docs pre,code,var{padding:.1em 3px;background:hsla(207,5%,0%,.025);border:1px solid hsla(207,5%,0%,.05);border-radius:3px}.code pre{line-height:1.1!important}pre code{padding:0;background:transparent;border:0}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}[unselectable="on"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[hidden]{display:none!important}small{font-size:85%;opacity:.9}.docs .vars_list{width:100%}.docs .vars_list th,.docs .vars_list td{width:33%}.docs pre th{text-align:left}.docs pre table{border-collapse:collapse;margin:0}.docs th,.docs td{border:0;padding:9px 10px 9px 0;vertical-align:top}.docs tr th:last-child,.docs tr td:last-child{padding-right:0}.docs pre th{font-weight:400}.docs pre th.vars_head{border-bottom:1px solid #e5e5e5;color:#707070;white-space:nowrap}.docs pre th.vars_section{border-bottom:1px solid #e5e5e5;color:#333;font-size:18px;padding-top:30px}.vars_value{color:#338bb8}.docs li p{margin:0 0 20px}.dropdown a{text-transform:capitalize}#default-button #default-button-big+.preview+.preview-code{display:block}#actions-toolbar-alignment .preview-code,#reverse-primary-and-secondary-blocks .preview-code,#actions-toolbar-indents-customizations .preview-code,#actionstoolbarclearfloats-mixin .preview-code,#responsive-actions-toolbar .preview-code,#button-with-gradient-background .preview-code,#primary-button .preview-code,#button-as-an-icon .preview-code,#button-with-an-icon-on-the-left-or-right-side-of-the-text .preview-code,#button-with-fixed-width .preview-code,#button-as-a-link .preview-code,#link-as-a-button .preview-code,#buttonstyled-breadcrumbs-with-gradient-background-border-and-no-separating-symbol .preview-code,#breadcrumbs-with-solid-background .preview-code,#pagination-without-label-with-solid-background .preview-code,#pagination-with-label-and-text-previousnext-links .preview-code,#pagination-with-label-and-gradient-background-on-links .preview-code,#fixed-height-popup .preview-code,#fixed-content-height-popup .preview-code,#margins-for-header-content-and-footer-block-in-popup .preview-code,#popup-titles-with-styled-as-theme-headings .preview-code,#popup-action-toolbar .preview-code,#popup-close-button-without-an-icon .preview-code,#modify-icon-of-popup-close-button .preview-code,#modify-overlay-styles .preview-code,#rating-summary-multiple-ratings .preview-code,#rating-summary-hide-label .preview-code,#rating-summary-icons-symbol .preview-code,#rating-summary-icons-color .preview-code,#rating-summary-set-number-of-icons .preview-code,#rating-summary .preview-code,#rating-with-vote-icon-symbol .preview-code,#rating-with-vote-setup-icons-colors .preview-code,#rating-with-vote-setup-number-of-icons .preview-code,#tabs-with-content-top-border .preview-code,#accordion-mixin-variables .preview-code,#tabs-base .preview-code,#accordion-base .preview-code,#warning-message .preview-code,#error-message .preview-code,#success-message .preview-code,#notice-message .preview-code,#message-with-inner-icon .preview-code,#message-with-lateral-icon .preview-code,#custom-message-style .preview-code,#modify-dropdown-list-styles .preview-code,#dropdown-with-icon-customization .preview-code,#split-button-button-styling .preview-code,#split-button-icon-customization .preview-code,#split-button-dropdown-list-customization .preview-code,#table-cells-resize .preview-code,#table-caption .preview-code,#table-typography .preview-code,#table-background-customization .preview-code,#table-borders-customization .preview-code,#table-without-borders .preview-code,#table-with-horizontal-borders .preview-code,#table-with-vertical-borders .preview-code,#striped-table .preview-code,#responsive-table-technics-1 .preview-code,#responsive-table-technics-2 .preview-code,#fontsize-mixin .preview-code,#word-breaking-mixin .preview-code,#word-breaking-mixin .preview-code,#text-overflow-mixin .preview-code,#text-hide .preview-code,#hyphens .preview-code,#font-style-and-color .preview-code,#reset-list-styles .preview-code,#inlineblock-list-item-styling .preview-code,#link-styling-mixin .preview-code,#heading-styling-mixin .preview-code,#icon-with-image-or-sprite .preview-code,#change-the-size-of-font-icon .preview-code,#sprite-and-font-icons-for-blank-theme .preview-code,#icon-position-for-an-icon-with-image-or-sprite .preview-code{display:none}article[id$="-variables"] .docs,#resets .docs,#ratings .docs,#tabs-and-accordions .docs,#messages .docs,#dropdown-and-split-buttons-mixins .docs,#font-face-mixin .docs,#layout .docs,#forms-mixins .docs,#including-magento-ui-library-to-your-theme .docs,#global-forms-elements-customization .docs,#page-layouts .docs,#layout-column .docs,#layout-width .docs,#mobile-off-canvas-navigation .docs,#desktop-navigation .docs{width:100%}article[id$="-variables"] .code{display:none}article[id$="-variables"] .docs pre{background:#fff;border:0;margin-top:0}</style><script type="text/preview">(function(){"use strict";var a=function(a){return Array.prototype.slice.call(a)},b=document.getElementsByTagName("body")[0],c=["link","visited","hover","active","focus","target","enabled","disabled","checked"],d=new RegExp(":(("+c.join(")|(")+"))","gi"),e=a(document.styleSheets).map(function(b){return a(b.cssRules).filter(function(a){return a.selectorText&&a.selectorText.match(d)}).map(function(a){return a.cssText.replace(d,".\\3A $1")}).join("")}).join("");if(e.length){var f=document.createElement("style");f.innerText=e;var g=document.getElementsByTagName("style")[0];g.parentNode.insertBefore(f,g)}var h=function(){var a=window.getComputedStyle(b,null);return function(){if(b.childElementCount===0)return b.offsetHeight;var c=b.getElementsByTagName("*"),d=[];for(var e=0,f=c.length;e<f;e++)d.push(c[e].offsetTop+c[e].offsetHeight+parseInt(window.getComputedStyle(c[e],null).getPropertyValue("margin-bottom")));var g=Math.max.apply(Math,d);return g+=parseInt(a.getPropertyValue("padding-bottom"),10),Math.max(g,b.offsetHeight)}}(),i={getHeight:function(){window.parent.postMessage({height:h()},"*")}};window.addEventListener("message",function(a){if(a.data==null)return;typeof a.data=="string"&&i[a.data]()},!1)})(),function(){var a=["../../jquery/jquery.js","../../mage/terms.js","../../mage/dropdowns.js","../../jquery/jquery.popups.js","../../js/mui.js"];for(var b=0,c=a.length;b<c;b++){var d=document.createElement("script");d.type="text/javascript",d.async=!1,d.src=a[b];var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(d,e)}}()</script><style type="text/preview">body{margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}p{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}abbr[title]{cursor:help;border-bottom:1px dotted #d1d1d1}b,strong{font-weight:700}em,i{font-style:italic}mark{background-color:#f0f0f0;color:#000}small,.small{font-size:12px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #d1d1d1}sub,sup{font-size:71.42857143000001%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dfn{font-style:italic}h1{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}h3{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}h4{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h5{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h6{font-size:10px;font-size:1rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-size:71.42857143000001%;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1}a,.alink{color:#1979c3;text-decoration:none}a:visited,.alink:visited{color:#800080;text-decoration:none}a:hover,.alink:hover{color:#006bb4;text-decoration:underline}a:active,.alink:active{color:#ff5501;text-decoration:underline}a:focus,.alink:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}ul,ol{margin-top:0;margin-top:0rem;margin-bottom:25px;margin-bottom:2.5rem}ul>li,ol>li{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}dl{margin-top:0;margin-bottom:20px}dt{font-weight:700;margin-top:0;margin-bottom:5px}dd{margin-top:0;margin-bottom:10px}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,'Courier New',monospace}code{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0;white-space:nowrap}kbd{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0}pre{background-color:#f0f0f0;border:1px solid #d1d1d1;color:#111;display:block;font-size:12px;font-size:1.2rem;margin:0 0 10px;line-height:1.42857143;padding:10px;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}blockquote{padding:0;margin:0 0 20px 40px;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:italic;line-height:1.42857143;border-left:0 solid #d1d1d1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{color:#333;display:block;font-size:10px;font-size:1rem;line-height:1.42857143}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote cite{font-style:normal}blockquote:before,blockquote:after{content:""}q{quotes:none}q:before,q:after{content:'';content:none}cite{font-style:normal}table{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}table th{text-align:left}table>tbody>tr>th,table>tfoot>tr>th,table>tbody>tr>td,table>tfoot>tr>td{vertical-align:top}table>thead>tr>th,table>thead>tr>td{vertical-align:bottom}table>thead>tr>th,table>tbody>tr>th,table>tfoot>tr>th,table>thead>tr>td,table>tbody>tr>td,table>tfoot>tr>td{padding:3px 10px}button,.cart.table.wrapper .cart.items .action{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle}button:focus,button:active,.cart.table.wrapper .cart.items .action:focus,.cart.table.wrapper .cart.items .action:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}button:hover,.cart.table.wrapper .cart.items .action:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}button.disabled,button[disabled],fieldset[disabled] button,.cart.table.wrapper .cart.items .action.disabled,.cart.table.wrapper .cart.items .action[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .action{cursor:default;pointer-events:none;opacity:.5}button::-moz-focus-inner,.cart.table.wrapper .cart.items .action::-moz-focus-inner{border:0;padding:0}input[type="text"],input[type="password"],input[type="url"],input[type="tel"],input[type="search"],input[type="number"],input[type="datetime"],input[type="email"]{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline}input[type="text"]:disabled,input[type="password"]:disabled,input[type="url"]:disabled,input[type="tel"]:disabled,input[type="search"]:disabled,input[type="number"]:disabled,input[type="datetime"]:disabled,input[type="email"]:disabled{opacity:.5}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type="search"]{-webkit-appearance:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{-webkit-appearance:none}select{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:5px 10px 4px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline}select:disabled{opacity:.5}select[multiple="multiple"]{height:auto}textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:auto;width:100%;padding:10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;resize:vertical}textarea:disabled{opacity:.5}input[type="checkbox"]{vertical-align:top;margin:2px 5px 0 0}input[type="checkbox"]:disabled{opacity:.5}input[type="radio"]{vertical-align:top;margin:2px 5px 0 0}input[type="radio"]:disabled{opacity:.5}input.mage-error,select.mage-error,textarea.mage-error{border-color:#ed8380}input+div.mage-error,select+div.mage-error,textarea+div.mage-error{font-size:12px;font-size:1.2rem;color:#e02b27;margin:3px 0 0}input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;*overflow:visible}input::-moz-focus-inner{border:0;padding:0}address{font-style:normal}@font-face{font-family:'icons-blank-theme';src:url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot');src:url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/Blank-Theme-Icons/Blank-Theme-Icons.svg#icons-blank-theme') format('svg');font-weight:400;font-style:normal}.truncated.full.value{display:none}.truncated.full.value.show{display:block}.layout-2-left.account .column.sidebar{width:22.3%}.layout-2-left.account .column.main{width:77.7%}.account .messages{margin-bottom:20px}.account .column.main h2{margin-top:0}.account .column.main .products.toolbar{background:transparent;margin-bottom:20px}.account .column.main .block:not(.widget) .title{margin-bottom:15px}.account .column.main .block:not(.widget) .title>strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.account .column.main .block:not(.widget) .title>.action{margin-left:15px}.account .column.main .block:not(.widget) .subtitle{display:inline-block;margin:5px 0 10px}.account .column.main .block:not(.widget) .subtitle>span{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.account .column.main .block:not(.widget) .subtitle>.action{font-weight:400;margin-left:15px}.account .column.main .block:not(.widget) .content:before,.account .column.main .block:not(.widget) .content:after{content:"";display:table}.account .column.main .block:not(.widget) .content:after{clear:both}.account .column.main .block:not(.widget) .content p:last-child{margin-bottom:0}.account .column.main .block:not(.widget) .content .box{margin-bottom:20px}.account .block.account.nav{background:#f5f5f5;padding:15px 0}.account .block.account.nav .title{padding:0 18px;margin-bottom:25px}.account .block.account.nav .title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.account .block.account.nav .nav.items{padding:0;margin:0}.account .block.account.nav .nav.items .nav.item{margin:2px 0 0;padding:0 18px 0 15px;line-height:30px;border-left:3px solid transparent}.account .block.account.nav .nav.items .nav.item:first-child{margin-top:0}.account .block.account.nav .nav.items .nav.item.current{border-color:#ff5501}.account .block.account.nav .nav.items .nav.item.current strong{font-weight:400}.account .wrapper.table{margin-bottom:20px}.account .wrapper.table:last-child{margin-bottom:0}.account .wrapper.table .data.table{border:0;margin-bottom:0}.account .wrapper.table .data.table>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.account .wrapper.table .data.table>thead>tr>th,.account .wrapper.table .data.table>tbody>tr>th,.account .wrapper.table .data.table>tfoot>tr>th,.account .wrapper.table .data.table>thead>tr>td,.account .wrapper.table .data.table>tbody>tr>td,.account .wrapper.table .data.table>tfoot>tr>td{border:0}.account .wrapper.table .data.table>thead>tr>th,.account .wrapper.table .data.table>thead>tr>td{border-bottom:1px solid #d1d1d1}.account .wrapper.table .data.table .col.actions .action{margin-right:15px}.account .wrapper.table .data.table .col.actions .action:last-child{margin-left:0}.page.main>.page.title{margin-bottom:40px}.page.main>.page.title .title{display:inline-block}.page.main>.page.title .title+.action{float:right;margin-top:33px}.block:last-child{margin:0}.block .title{margin-bottom:10px}.block .title strong{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.column.main .block .title strong{font-size:18px}.widget ol,.block ol,.widget ul,.block ul{margin:0;padding:0;list-style-type:none;list-style-image:none}.widget ol li,.block ol li,.widget ul li,.block ul li{margin-bottom:6px}.widget ol strong,.block ol strong,.widget ul strong,.block ul strong{font-weight:400}.block.compare .item{position:relative}.block.compare .item .product.name{margin-left:22px}.block.compare .item .action.delete{position:absolute;left:-6px;top:0}.block.reorder .item .checkbox{position:relative;top:2px;vertical-align:baseline}.block.wishlist .item.product{margin-bottom:14px}.block.wishlist .item.product>.product{position:relative}.block.wishlist .item.product>.product .product.photo{position:absolute;left:0;top:0}.block.wishlist .item.product>.product .product.details{margin:0 25px 0 64px}.block.wishlist .price-box{display:block;margin:7px 0}.block.wishlist .actions{margin:7px 0}.block.wishlist .actions .action.delete{position:absolute;right:0;top:0}.block.wishlist .actions a.action.tocart{display:inline-block;text-decoration:none}.block.wishlist .actions a.action.tocart:hover,.block.wishlist .actions a.action.tocart:active,.block.wishlist .actions a.action.tocart:focus{text-decoration:none}.block.wishlist .actions .action.tocart{width:112px;padding:0 7px}.block.wishlist .text,.block.compare .text{margin-right:8px}.block.wishlist .counter.qty,.block.compare .counter.qty{color:#999;font-size:12px;white-space:nowrap}.block.reorder .actions.toolbar,.block.compare .actions.toolbar{margin:17px 0;max-width:178px}.column.sidebar .block.reorder .subtitle,.column.sidebar .block.wishlist .subtitle{display:none}.product-list-item,.bundle.options.container .block.bundle.summary .bundle.items,.block.filter .items,.prices.tier.items,.cart .checkout.methods,.opc.wrapper>.opc,.order.details ul.items,.products.list.items{margin:0;padding:0;list-style-type:none;list-style-image:none}.product-list-item>li,.bundle.options.container .block.bundle.summary .bundle.items>li,.block.filter .items>li,.prices.tier.items>li,.cart .checkout.methods>li,.opc.wrapper>.opc>li,.order.details ul.items>li,.products.list.items>li{margin:0}.block.wishlist .actions .action.tocart,.product-list-item .action.tocart,.actions.toolbar .primary .action,.cart .action.primary,.opc.wrapper .action.continue,.opc.wrapper .action.primary.checkout,.minicart.wrapper .action.checkout,.products.list.items .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;border-radius:3px}.action-primary:focus,.action-primary:active,.block.wishlist .actions .action.tocart:focus,.block.wishlist .actions .action.tocart:active,.product-list-item .action.tocart:focus,.product-list-item .action.tocart:active,.actions.toolbar .primary .action:focus,.actions.toolbar .primary .action:active,.cart .action.primary:focus,.cart .action.primary:active,.opc.wrapper .action.continue:focus,.opc.wrapper .action.continue:active,.opc.wrapper .action.primary.checkout:focus,.opc.wrapper .action.primary.checkout:active,.minicart.wrapper .action.checkout:focus,.minicart.wrapper .action.checkout:active,.products.list.items .action.tocart:focus,.products.list.items .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.action-primary:hover,.block.wishlist .actions .action.tocart:hover,.product-list-item .action.tocart:hover,.actions.toolbar .primary .action:hover,.cart .action.primary:hover,.opc.wrapper .action.continue:hover,.opc.wrapper .action.primary.checkout:hover,.minicart.wrapper .action.checkout:hover,.products.list.items .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.action-primary.disabled,.action-primary[disabled],fieldset[disabled] .action-primary,.block.wishlist .actions .action.tocart.disabled,.block.wishlist .actions .action.tocart[disabled],fieldset[disabled] .block.wishlist .actions .action.tocart,.product-list-item .action.tocart.disabled,.product-list-item .action.tocart[disabled],fieldset[disabled] .product-list-item .action.tocart,.actions.toolbar .primary .action.disabled,.actions.toolbar .primary .action[disabled],fieldset[disabled] .actions.toolbar .primary .action,.cart .action.primary.disabled,.cart .action.primary[disabled],fieldset[disabled] .cart .action.primary,.opc.wrapper .action.continue.disabled,.opc.wrapper .action.continue[disabled],fieldset[disabled] .opc.wrapper .action.continue,.opc.wrapper .action.primary.checkout.disabled,.opc.wrapper .action.primary.checkout[disabled],fieldset[disabled] .opc.wrapper .action.primary.checkout,.minicart.wrapper .action.checkout.disabled,.minicart.wrapper .action.checkout[disabled],fieldset[disabled] .minicart.wrapper .action.checkout,.products.list.items .action.tocart.disabled,.products.list.items .action.tocart[disabled],fieldset[disabled] .products.list.items .action.tocart{cursor:default;pointer-events:none;opacity:.5}.product.info.main .action.tocompare,.product.info.main .action.towishlist{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;display:inline-block;text-decoration:none;border-radius:3px}.action-link-button:focus,.action-link-button:active,.product.info.main .action.tocompare:focus,.product.info.main .action.tocompare:active,.product.info.main .action.towishlist:focus,.product.info.main .action.towishlist:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.action-link-button:hover,.product.info.main .action.tocompare:hover,.product.info.main .action.towishlist:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.action-link-button.disabled,.action-link-button[disabled],fieldset[disabled] .action-link-button,.product.info.main .action.tocompare.disabled,.product.info.main .action.tocompare[disabled],fieldset[disabled] .product.info.main .action.tocompare,.product.info.main .action.towishlist.disabled,.product.info.main .action.towishlist[disabled],fieldset[disabled] .product.info.main .action.towishlist{cursor:default;pointer-events:none;opacity:.5}.action-link-button:hover,.action-link-button:active,.action-link-button:focus,.product.info.main .action.tocompare:hover,.product.info.main .action.tocompare:active,.product.info.main .action.tocompare:focus,.product.info.main .action.towishlist:hover,.product.info.main .action.towishlist:active,.product.info.main .action.towishlist:focus{text-decoration:none}.products.list.items .product.item{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative;vertical-align:top}.products.list.items .img.container{max-width:100%;margin-bottom:20px}.products.list.items .img.container>.image{max-width:100%;height:auto}.products.list.items .name{font-weight:400;display:block}.product-list-item .name>a,.products.list.items .name>a{color:#333;text-decoration:none}.product-list-item .name>a:visited,.products.list.items .name>a:visited{color:#333;text-decoration:none}.product-list-item .name>a:hover,.products.list.items .name>a:hover{color:#333;text-decoration:underline}.product-list-item .name>a:active,.products.list.items .name>a:active{color:#333;text-decoration:underline}.product-list-item .name>a:focus,.products.list.items .name>a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.products.list.items .price-box{margin-top:10px}.products.list.items .price-box .price{font-weight:700}.products.list.items .actions{text-align:left}.product-list-item .actions:before,.product-list-item .actions:after,.products.list.items .actions:before,.products.list.items .actions:after{content:"";display:table}.product-list-item .actions:after,.products.list.items .actions:after{clear:both}.product-list-item .actions .primary,.products.list.items .actions .primary{float:left}.product-list-item .actions .primary,.product-list-item .actions .secondary,.products.list.items .actions .primary,.products.list.items .actions .secondary{display:inline-block}.product-list-item .actions .primary .action,.product-list-item .actions .secondary .action,.products.list.items .actions .primary .action,.products.list.items .actions .secondary .action{margin:10px 0 0}.product-list-item .actions .primary a.action,.product-list-item .actions .secondary a.action,.products.list.items .actions .primary a.action,.products.list.items .actions .secondary a.action{display:inline-block}.product-list-item .actions .primary .action,.products.list.items .actions .primary .action{margin:10px 5px 0 0}.product-list-item .actions .secondary a.action,.products.list.items .actions .secondary a.action{margin-top:10px}.products.list.items .action.towishlist{display:inline-block;text-decoration:none}.product-list-item .action.towishlist>span,.products.list.items .action.towishlist>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product-list-item .action.towishlist:before,.products.list.items .action.towishlist:before{font-family:"icons-blank-theme";content:'\e601';font-size:28px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:baseline;text-align:center}.product-list-item .action.towishlist>span,.products.list.items .action.towishlist>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.list.items .action.tocompare{display:inline-block;text-decoration:none}.product-list-item .action.tocompare>span,.products.list.items .action.tocompare>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product-list-item .action.tocompare:before,.products.list.items .action.tocompare:before{font-family:"icons-blank-theme";content:'\e61f';font-size:28px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:baseline;text-align:center}.cart.table.wrapper .item.options dt:after,.opc.wrapper .data.table dt:after{content:':'}.cart.table.wrapper .item.options dt,.opc.wrapper .data.table dt{float:left;clear:left;margin:0 10px 5px 0}.cart.table.wrapper .item.options dd,.opc.wrapper .data.table dd{display:inline-block;margin:0 0 5px}.column.main .block.addbysku .fields .action.remove,.form.giftregistry.validation .fieldset.add-row .action.remove,.form.send.friend .action.delete{display:inline-block;text-decoration:none}.action-remove:before,.column.main .block.addbysku .fields .action.remove:before,.form.giftregistry.validation .fieldset.add-row .action.remove:before,.form.send.friend .action.delete:before{font-family:"icons-blank-theme";content:'\e616';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.account .column.main .block:not(.widget) .content .box,.opc.wrapper .step.login.wrapper .block,.login.container .block,.block.addresses.list ol.items.addresses li.item,.order.details .block{width:48.8%}.account .column.main .block:not(.widget) .content .box:nth-child(odd),.opc.wrapper .step.login.wrapper .block:nth-child(odd),.login.container .block:nth-child(odd),.block.addresses.list ol.items.addresses li.item:nth-child(odd),.order.details .block:nth-child(odd){float:left;clear:left}.account .column.main .block:not(.widget) .content .box:nth-child(even),.opc.wrapper .step.login.wrapper .block:nth-child(even),.login.container .block:nth-child(even),.block.addresses.list ol.items.addresses li.item:nth-child(even),.order.details .block:nth-child(even){float:right}.opc.wrapper .step.login.wrapper .block>.title{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid #e8e8e8}.opc.wrapper .step.login.wrapper .block>.title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.dropdown.giftregisty,.dropdown.wishlist{line-height:normal;display:inline-block;position:relative}.dropdown-simple:before,.dropdown-simple:after,.dropdown.giftregisty:before,.dropdown.giftregisty:after,.dropdown.wishlist:before,.dropdown.wishlist:after{content:"";display:table}.dropdown-simple:after,.dropdown.giftregisty:after,.dropdown.wishlist:after{clear:both}.dropdown-simple .action.toggle,.dropdown.giftregisty .action.toggle,.dropdown.wishlist .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.dropdown-simple .action.toggle:after,.dropdown.giftregisty .action.toggle:after,.dropdown.wishlist .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.dropdown-simple .action.toggle:hover:after,.dropdown.giftregisty .action.toggle:hover:after,.dropdown.wishlist .action.toggle:hover:after{color:inherit}.dropdown-simple .action.toggle:active:after,.dropdown.giftregisty .action.toggle:active:after,.dropdown.wishlist .action.toggle:active:after{color:inherit}.dropdown-simple .action.toggle.active,.dropdown.giftregisty .action.toggle.active,.dropdown.wishlist .action.toggle.active{display:inline-block;text-decoration:none}.dropdown-simple .action.toggle.active:after,.dropdown.giftregisty .action.toggle.active:after,.dropdown.wishlist .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.dropdown-simple .action.toggle.active:hover:after,.dropdown.giftregisty .action.toggle.active:hover:after,.dropdown.wishlist .action.toggle.active:hover:after{color:inherit}.dropdown-simple .action.toggle.active:active:after,.dropdown.giftregisty .action.toggle.active:active:after,.dropdown.wishlist .action.toggle.active:active:after{color:inherit}.dropdown-simple ul.dropdown,.dropdown.giftregisty ul.dropdown,.dropdown.wishlist ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.dropdown-simple ul.dropdown li,.dropdown.giftregisty ul.dropdown li,.dropdown.wishlist ul.dropdown li{margin:0;padding:3px 5px}.dropdown-simple ul.dropdown li:hover,.dropdown.giftregisty ul.dropdown li:hover,.dropdown.wishlist ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.dropdown-simple ul.dropdown:before,.dropdown-simple ul.dropdown:after,.dropdown.giftregisty ul.dropdown:before,.dropdown.giftregisty ul.dropdown:after,.dropdown.wishlist ul.dropdown:before,.dropdown.wishlist ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.dropdown-simple ul.dropdown:before,.dropdown.giftregisty ul.dropdown:before,.dropdown.wishlist ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.dropdown-simple ul.dropdown:after,.dropdown.giftregisty ul.dropdown:after,.dropdown.wishlist ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.dropdown-simple.active,.dropdown.giftregisty.active,.dropdown.wishlist.active{overflow:visible}.dropdown-simple.active ul.dropdown,.dropdown.giftregisty.active ul.dropdown,.dropdown.wishlist.active ul.dropdown{display:block}.dropdown.giftregisty ul.items.dropdown,.dropdown.wishlist ul.items.dropdown{min-width:155px}.column.main .block.addbysku .fields .field .control .qty,.data.table.giftregistry .field.qty .qty,.table.data.grouped .col.qty .control.qty .qty,.data.table.wishlist .box.tocart .qty{width:50px;text-align:center}.block,.widget.banners,div.widget.product.link,div.widget.category.link,.widget.widget-cms-link,.widget.widget-cms-hierarchy-link{margin-bottom:40px}.column.sidebar .widget.block.addbysku .field,.column.sidebar .widget.block.addbysku .fields .field,.block.widget.giftregistry .field,.block.widget.giftregistry .fields .field,.widget.block.wishlist.find .field,.widget.block.wishlist.find .fields .field,.widget.block.orders.returns .field,.widget.block.orders.returns .fields .field{margin:0 0 10px;border:0}.form-fields-for-widgets .field:not(.choice)>.label,.form-fields-for-widgets .fields .field:not(.choice)>.label,.column.sidebar .widget.block.addbysku .field:not(.choice)>.label,.column.sidebar .widget.block.addbysku .fields .field:not(.choice)>.label,.block.widget.giftregistry .field:not(.choice)>.label,.block.widget.giftregistry .fields .field:not(.choice)>.label,.widget.block.wishlist.find .field:not(.choice)>.label,.widget.block.wishlist.find .fields .field:not(.choice)>.label,.widget.block.orders.returns .field:not(.choice)>.label,.widget.block.orders.returns .fields .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.form-fields-for-widgets .field.choice:before,.form-fields-for-widgets .fields .field.choice:before,.form-fields-for-widgets .field.no-label:before,.form-fields-for-widgets .fields .field.no-label:before,.column.sidebar .widget.block.addbysku .field.choice:before,.column.sidebar .widget.block.addbysku .fields .field.choice:before,.column.sidebar .widget.block.addbysku .field.no-label:before,.column.sidebar .widget.block.addbysku .fields .field.no-label:before,.block.widget.giftregistry .field.choice:before,.block.widget.giftregistry .fields .field.choice:before,.block.widget.giftregistry .field.no-label:before,.block.widget.giftregistry .fields .field.no-label:before,.widget.block.wishlist.find .field.choice:before,.widget.block.wishlist.find .fields .field.choice:before,.widget.block.wishlist.find .field.no-label:before,.widget.block.wishlist.find .fields .field.no-label:before,.widget.block.orders.returns .field.choice:before,.widget.block.orders.returns .fields .field.choice:before,.widget.block.orders.returns .field.no-label:before,.widget.block.orders.returns .fields .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.form-fields-for-widgets .field>.control,.form-fields-for-widgets .fields .field>.control,.column.sidebar .widget.block.addbysku .field>.control,.column.sidebar .widget.block.addbysku .fields .field>.control,.block.widget.giftregistry .field>.control,.block.widget.giftregistry .fields .field>.control,.widget.block.wishlist.find .field>.control,.widget.block.wishlist.find .fields .field>.control,.widget.block.orders.returns .field>.control,.widget.block.orders.returns .fields .field>.control{float:none;width:auto}.form-fields-for-widgets .field>.label,.form-fields-for-widgets .fields .field>.label,.column.sidebar .widget.block.addbysku .field>.label,.column.sidebar .widget.block.addbysku .fields .field>.label,.block.widget.giftregistry .field>.label,.block.widget.giftregistry .fields .field>.label,.widget.block.wishlist.find .field>.label,.widget.block.wishlist.find .fields .field>.label,.widget.block.orders.returns .field>.label,.widget.block.orders.returns .fields .field>.label{font-size:14px;font-size:1.4rem;font-weight:400}.form-fields-for-widgets .field>.label+br,.form-fields-for-widgets .fields .field>.label+br,.column.sidebar .widget.block.addbysku .field>.label+br,.column.sidebar .widget.block.addbysku .fields .field>.label+br,.block.widget.giftregistry .field>.label+br,.block.widget.giftregistry .fields .field>.label+br,.widget.block.wishlist.find .field>.label+br,.widget.block.wishlist.find .fields .field>.label+br,.widget.block.orders.returns .field>.label+br,.widget.block.orders.returns .fields .field>.label+br{display:none}.form-fields-for-widgets .field.required>.label:after,.form-fields-for-widgets .fields .field.required>.label:after,.column.sidebar .widget.block.addbysku .field.required>.label:after,.column.sidebar .widget.block.addbysku .fields .field.required>.label:after,.block.widget.giftregistry .field.required>.label:after,.block.widget.giftregistry .fields .field.required>.label:after,.widget.block.wishlist.find .field.required>.label:after,.widget.block.wishlist.find .fields .field.required>.label:after,.widget.block.orders.returns .field.required>.label:after,.widget.block.orders.returns .fields .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.form-fields-for-widgets .field .nested .field,.form-fields-for-widgets .fields .field .nested .field,.column.sidebar .widget.block.addbysku .field .nested .field,.column.sidebar .widget.block.addbysku .fields .field .nested .field,.block.widget.giftregistry .field .nested .field,.block.widget.giftregistry .fields .field .nested .field,.widget.block.wishlist.find .field .nested .field,.widget.block.wishlist.find .fields .field .nested .field,.widget.block.orders.returns .field .nested .field,.widget.block.orders.returns .fields .field .nested .field{margin:5px 0}.form-fields-for-widgets .field.choice>.label,.form-fields-for-widgets .fields .field.choice>.label,.column.sidebar .widget.block.addbysku .field.choice>.label,.column.sidebar .widget.block.addbysku .fields .field.choice>.label,.block.widget.giftregistry .field.choice>.label,.block.widget.giftregistry .fields .field.choice>.label,.widget.block.wishlist.find .field.choice>.label,.widget.block.wishlist.find .fields .field.choice>.label,.widget.block.orders.returns .field.choice>.label,.widget.block.orders.returns .fields .field.choice>.label{display:inline}.form-fields-for-widgets .field.choice>input,.form-fields-for-widgets .fields .field.choice>input,.column.sidebar .widget.block.addbysku .field.choice>input,.column.sidebar .widget.block.addbysku .fields .field.choice>input,.block.widget.giftregistry .field.choice>input,.block.widget.giftregistry .fields .field.choice>input,.widget.block.wishlist.find .field.choice>input,.widget.block.wishlist.find .fields .field.choice>input,.widget.block.orders.returns .field.choice>input,.widget.block.orders.returns .fields .field.choice>input{vertical-align:top}.form-fields-for-widgets .field .fields.group,.form-fields-for-widgets .fields .field .fields.group,.column.sidebar .widget.block.addbysku .field .fields.group,.column.sidebar .widget.block.addbysku .fields .field .fields.group,.block.widget.giftregistry .field .fields.group,.block.widget.giftregistry .fields .field .fields.group,.widget.block.wishlist.find .field .fields.group,.widget.block.wishlist.find .fields .field .fields.group,.widget.block.orders.returns .field .fields.group,.widget.block.orders.returns .fields .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.form-fields-for-widgets .field .fields.group>*,.form-fields-for-widgets .fields .field .fields.group>*,.column.sidebar .widget.block.addbysku .field .fields.group>*,.column.sidebar .widget.block.addbysku .fields .field .fields.group>*,.block.widget.giftregistry .field .fields.group>*,.block.widget.giftregistry .fields .field .fields.group>*,.widget.block.wishlist.find .field .fields.group>*,.widget.block.wishlist.find .fields .field .fields.group>*,.widget.block.orders.returns .field .fields.group>*,.widget.block.orders.returns .fields .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.form-fields-for-widgets .field .fields.group .field,.form-fields-for-widgets .fields .field .fields.group .field,.column.sidebar .widget.block.addbysku .field .fields.group .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group .field,.block.widget.giftregistry .field .fields.group .field,.block.widget.giftregistry .fields .field .fields.group .field,.widget.block.wishlist.find .field .fields.group .field,.widget.block.wishlist.find .fields .field .fields.group .field,.widget.block.orders.returns .field .fields.group .field,.widget.block.orders.returns .fields .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.form-fields-for-widgets .field .fields.group .field .label,.form-fields-for-widgets .fields .field .fields.group .field .label,.column.sidebar .widget.block.addbysku .field .fields.group .field .label,.column.sidebar .widget.block.addbysku .fields .field .fields.group .field .label,.block.widget.giftregistry .field .fields.group .field .label,.block.widget.giftregistry .fields .field .fields.group .field .label,.widget.block.wishlist.find .field .fields.group .field .label,.widget.block.wishlist.find .fields .field .fields.group .field .label,.widget.block.orders.returns .field .fields.group .field .label,.widget.block.orders.returns .fields .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.form-fields-for-widgets .field .fields.group .field .control,.form-fields-for-widgets .fields .field .fields.group .field .control,.column.sidebar .widget.block.addbysku .field .fields.group .field .control,.column.sidebar .widget.block.addbysku .fields .field .fields.group .field .control,.block.widget.giftregistry .field .fields.group .field .control,.block.widget.giftregistry .fields .field .fields.group .field .control,.widget.block.wishlist.find .field .fields.group .field .control,.widget.block.wishlist.find .fields .field .fields.group .field .control,.widget.block.orders.returns .field .fields.group .field .control,.widget.block.orders.returns .fields .field .fields.group .field .control{float:none;width:auto}.form-fields-for-widgets .field .fields.group.group-2 .field,.form-fields-for-widgets .fields .field .fields.group.group-2 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-2 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-2 .field,.block.widget.giftregistry .field .fields.group.group-2 .field,.block.widget.giftregistry .fields .field .fields.group.group-2 .field,.widget.block.wishlist.find .field .fields.group.group-2 .field,.widget.block.wishlist.find .fields .field .fields.group.group-2 .field,.widget.block.orders.returns .field .fields.group.group-2 .field,.widget.block.orders.returns .fields .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.form-fields-for-widgets .field .fields.group.group-3 .field,.form-fields-for-widgets .fields .field .fields.group.group-3 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-3 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-3 .field,.block.widget.giftregistry .field .fields.group.group-3 .field,.block.widget.giftregistry .fields .field .fields.group.group-3 .field,.widget.block.wishlist.find .field .fields.group.group-3 .field,.widget.block.wishlist.find .fields .field .fields.group.group-3 .field,.widget.block.orders.returns .field .fields.group.group-3 .field,.widget.block.orders.returns .fields .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.form-fields-for-widgets .field .fields.group.group-4 .field,.form-fields-for-widgets .fields .field .fields.group.group-4 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-4 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-4 .field,.block.widget.giftregistry .field .fields.group.group-4 .field,.block.widget.giftregistry .fields .field .fields.group.group-4 .field,.widget.block.wishlist.find .field .fields.group.group-4 .field,.widget.block.wishlist.find .fields .field .fields.group.group-4 .field,.widget.block.orders.returns .field .fields.group.group-4 .field,.widget.block.orders.returns .fields .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.form-fields-for-widgets .field .fields.group.group-5 .field,.form-fields-for-widgets .fields .field .fields.group.group-5 .field,.column.sidebar .widget.block.addbysku .field .fields.group.group-5 .field,.column.sidebar .widget.block.addbysku .fields .field .fields.group.group-5 .field,.block.widget.giftregistry .field .fields.group.group-5 .field,.block.widget.giftregistry .fields .field .fields.group.group-5 .field,.widget.block.wishlist.find .field .fields.group.group-5 .field,.widget.block.wishlist.find .fields .field .fields.group.group-5 .field,.widget.block.orders.returns .field .fields.group.group-5 .field,.widget.block.orders.returns .fields .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.form-fields-for-widgets .field .addon,.form-fields-for-widgets .fields .field .addon,.column.sidebar .widget.block.addbysku .field .addon,.column.sidebar .widget.block.addbysku .fields .field .addon,.block.widget.giftregistry .field .addon,.block.widget.giftregistry .fields .field .addon,.widget.block.wishlist.find .field .addon,.widget.block.wishlist.find .fields .field .addon,.widget.block.orders.returns .field .addon,.widget.block.orders.returns .fields .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.form-fields-for-widgets .field .addon textarea,.form-fields-for-widgets .fields .field .addon textarea,.form-fields-for-widgets .field .addon select,.form-fields-for-widgets .fields .field .addon select,.form-fields-for-widgets .field .addon input,.form-fields-for-widgets .fields .field .addon input,.column.sidebar .widget.block.addbysku .field .addon textarea,.column.sidebar .widget.block.addbysku .fields .field .addon textarea,.column.sidebar .widget.block.addbysku .field .addon select,.column.sidebar .widget.block.addbysku .fields .field .addon select,.column.sidebar .widget.block.addbysku .field .addon input,.column.sidebar .widget.block.addbysku .fields .field .addon input,.block.widget.giftregistry .field .addon textarea,.block.widget.giftregistry .fields .field .addon textarea,.block.widget.giftregistry .field .addon select,.block.widget.giftregistry .fields .field .addon select,.block.widget.giftregistry .field .addon input,.block.widget.giftregistry .fields .field .addon input,.widget.block.wishlist.find .field .addon textarea,.widget.block.wishlist.find .fields .field .addon textarea,.widget.block.wishlist.find .field .addon select,.widget.block.wishlist.find .fields .field .addon select,.widget.block.wishlist.find .field .addon input,.widget.block.wishlist.find .fields .field .addon input,.widget.block.orders.returns .field .addon textarea,.widget.block.orders.returns .fields .field .addon textarea,.widget.block.orders.returns .field .addon select,.widget.block.orders.returns .fields .field .addon select,.widget.block.orders.returns .field .addon input,.widget.block.orders.returns .fields .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.form-fields-for-widgets .field .addon .addbefore,.form-fields-for-widgets .fields .field .addon .addbefore,.form-fields-for-widgets .field .addon .addafter,.form-fields-for-widgets .fields .field .addon .addafter,.column.sidebar .widget.block.addbysku .field .addon .addbefore,.column.sidebar .widget.block.addbysku .fields .field .addon .addbefore,.column.sidebar .widget.block.addbysku .field .addon .addafter,.column.sidebar .widget.block.addbysku .fields .field .addon .addafter,.block.widget.giftregistry .field .addon .addbefore,.block.widget.giftregistry .fields .field .addon .addbefore,.block.widget.giftregistry .field .addon .addafter,.block.widget.giftregistry .fields .field .addon .addafter,.widget.block.wishlist.find .field .addon .addbefore,.widget.block.wishlist.find .fields .field .addon .addbefore,.widget.block.wishlist.find .field .addon .addafter,.widget.block.wishlist.find .fields .field .addon .addafter,.widget.block.orders.returns .field .addon .addbefore,.widget.block.orders.returns .fields .field .addon .addbefore,.widget.block.orders.returns .field .addon .addafter,.widget.block.orders.returns .fields .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.form-fields-for-widgets .field .addon .addbefore:disabled,.form-fields-for-widgets .fields .field .addon .addbefore:disabled,.form-fields-for-widgets .field .addon .addafter:disabled,.form-fields-for-widgets .fields .field .addon .addafter:disabled,.column.sidebar .widget.block.addbysku .field .addon .addbefore:disabled,.column.sidebar .widget.block.addbysku .fields .field .addon .addbefore:disabled,.column.sidebar .widget.block.addbysku .field .addon .addafter:disabled,.column.sidebar .widget.block.addbysku .fields .field .addon .addafter:disabled,.block.widget.giftregistry .field .addon .addbefore:disabled,.block.widget.giftregistry .fields .field .addon .addbefore:disabled,.block.widget.giftregistry .field .addon .addafter:disabled,.block.widget.giftregistry .fields .field .addon .addafter:disabled,.widget.block.wishlist.find .field .addon .addbefore:disabled,.widget.block.wishlist.find .fields .field .addon .addbefore:disabled,.widget.block.wishlist.find .field .addon .addafter:disabled,.widget.block.wishlist.find .fields .field .addon .addafter:disabled,.widget.block.orders.returns .field .addon .addbefore:disabled,.widget.block.orders.returns .fields .field .addon .addbefore:disabled,.widget.block.orders.returns .field .addon .addafter:disabled,.widget.block.orders.returns .fields .field .addon .addafter:disabled{opacity:.5}.form-fields-for-widgets .field .addon .addbefore,.form-fields-for-widgets .fields .field .addon .addbefore,.column.sidebar .widget.block.addbysku .field .addon .addbefore,.column.sidebar .widget.block.addbysku .fields .field .addon .addbefore,.block.widget.giftregistry .field .addon .addbefore,.block.widget.giftregistry .fields .field .addon .addbefore,.widget.block.wishlist.find .field .addon .addbefore,.widget.block.wishlist.find .fields .field .addon .addbefore,.widget.block.orders.returns .field .addon .addbefore,.widget.block.orders.returns .fields .field .addon .addbefore{float:left;order:1}.form-fields-for-widgets .field .note,.form-fields-for-widgets .fields .field .note,.column.sidebar .widget.block.addbysku .field .note,.column.sidebar .widget.block.addbysku .fields .field .note,.block.widget.giftregistry .field .note,.block.widget.giftregistry .fields .field .note,.widget.block.wishlist.find .field .note,.widget.block.wishlist.find .fields .field .note,.widget.block.orders.returns .field .note,.widget.block.orders.returns .fields .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.form-fields-for-widgets .field .note:before,.form-fields-for-widgets .fields .field .note:before,.column.sidebar .widget.block.addbysku .field .note:before,.column.sidebar .widget.block.addbysku .fields .field .note:before,.block.widget.giftregistry .field .note:before,.block.widget.giftregistry .fields .field .note:before,.widget.block.wishlist.find .field .note:before,.widget.block.wishlist.find .fields .field .note:before,.widget.block.orders.returns .field .note:before,.widget.block.orders.returns .fields .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.compare .item .action.delete,.block.wishlist .actions .action.delete,.data.comparison .cell.remove .action.delete{display:inline-block;text-decoration:none}.remove-button-for-blocks>span,.block.compare .item .action.delete>span,.block.wishlist .actions .action.delete>span,.data.comparison .cell.remove .action.delete>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.remove-button-for-blocks:before,.block.compare .item .action.delete:before,.block.wishlist .actions .action.delete:before,.data.comparison .cell.remove .action.delete:before{font-family:"icons-blank-theme";content:'\e616';font-size:26px;line-height:15px;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.remove-button-for-blocks:hover:before,.block.compare .item .action.delete:hover:before,.block.wishlist .actions .action.delete:hover:before,.data.comparison .cell.remove .action.delete:hover:before{color:#303030}.remove-button-for-blocks:active:before,.block.compare .item .action.delete:active:before,.block.wishlist .actions .action.delete:active:before,.data.comparison .cell.remove .action.delete:active:before{color:#303030}.block.compare .product.name a,.block.viewed.links .product.name a,.block.reorder .product.name a,.block.compared.links .product.name a,.block.wishlist .product.name a,.data.comparison .product.name a,.widget.product.link a{color:#303030;text-decoration:none}.product-link:visited,.block.compare .product.name a:visited,.block.viewed.links .product.name a:visited,.block.reorder .product.name a:visited,.block.compared.links .product.name a:visited,.block.wishlist .product.name a:visited,.data.comparison .product.name a:visited,.widget.product.link a:visited{color:#303030;text-decoration:none}.product-link:hover,.block.compare .product.name a:hover,.block.viewed.links .product.name a:hover,.block.reorder .product.name a:hover,.block.compared.links .product.name a:hover,.block.wishlist .product.name a:hover,.data.comparison .product.name a:hover,.widget.product.link a:hover{color:#303030;text-decoration:underline}.product-link:active,.block.compare .product.name a:active,.block.viewed.links .product.name a:active,.block.reorder .product.name a:active,.block.compared.links .product.name a:active,.block.wishlist .product.name a:active,.data.comparison .product.name a:active,.widget.product.link a:active{color:#303030;text-decoration:underline}.product-link:focus,.block.compare .product.name a:focus,.block.viewed.links .product.name a:focus,.block.reorder .product.name a:focus,.block.compared.links .product.name a:focus,.block.wishlist .product.name a:focus,.data.comparison .product.name a:focus,.widget.product.link a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.form.new.agreement .actions.toolbar,.opc.wrapper .form.shipping.methods .actions.toolbar,.opc.wrapper .form.payments .actions.toolbar,.form.giftregistry.items .actions.toolbar,.form.wishlist.items .actions.toolbar{margin-left:0}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/light/opensans-300.svg#Open Sans') format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/regular/opensans-400.svg#Open Sans') format('svg');font-weight:400;font-style:normal}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/semibold/opensans-600.svg#Open Sans') format('svg');font-weight:600;font-style:normal}@font-face{font-family:'Open Sans';src:url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.eot');src:url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.eot?#iefix') format('embedded-opentype'),url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.woff') format('woff'),url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.ttf') format('truetype'),url('http://magento2.loc/pub/lib/fonts/opensans/bold/opensans-700.svg#Open Sans') format('svg');font-weight:700;font-style:normal}.navigation>ul,.breadcrumbs,.page.header .header.panel,.header.content,.footer.content,.page.main,.page.wrapper>.widget,.page.wrapper>.page.bottom,.block.category.event{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.columns{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap}.columns:after{content:" ";display:block;height:0;clear:both;overlow:hidden;visibility:hidden}.columns>.column{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;padding-bottom:40px}.column.main{min-height:300px}.layout-1 .column.main{width:100%;order:2}.layout-3 .column.main{width:66.66666667%;display:inline-block;order:2}.layout-2-left .column.main{width:83.33333333%;float:right;order:2}.layout-2-right .column.main{width:83.33333333%;float:left;order:1}.column.left{padding-right:2%}.layout-3 .column.left{width:16.66666667%;float:left;order:1}.layout-2-left .column.left{width:16.66666667%;float:left;order:1}.layout-2-right .column.left{width:16.66666667%;float:left;order:1}.column.right{padding-left:2%}.layout-3 .column.right{width:16.66666667%;float:right;order:3}.layout-2-left .column.right{width:16.66666667%;float:right;order:2}.layout-2-right .column.right{width:16.66666667%;float:right;order:2}.message.info{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.message.info a{color:#1979c3}.message.info a:hover{color:#006bb4}.message.info a:active{color:#006bb4}.message.info>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.error{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fae5e5;border-color:none;color:#e02b27;position:relative;padding-left:40px}.message.error a{color:#1979c3}.message.error a:hover{color:#006bb4}.message.error a:active{color:#006bb4}.message.error>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#b30000;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.warning{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.message.warning a{color:#1979c3}.message.warning a:hover{color:#006bb4}.message.warning a:active{color:#006bb4}.message.warning>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.notice{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.message.notice a{color:#1979c3}.message.notice a:hover{color:#006bb4}.message.notice a:active{color:#006bb4}.message.notice>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.message.success{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#e5efe5;border-color:none;color:#006400;position:relative;padding-left:40px}.message.success a{color:#1979c3}.message.success a:hover{color:#006bb4}.message.success a:active{color:#006bb4}.message.success>:first-child:before{font-family:"icons-blank-theme";content:'\e610';font-size:28px;line-height:28px;color:#006400;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.navigation{background:#e8e8e8;margin:0;padding:0;list-style-type:none;list-style-image:none;position:relative;z-index:2}.navigation>li{display:inline-block;vertical-align:top}.navigation:empty{display:none}.navigation .level0{display:inline-block;position:relative;vertical-align:top;margin:0 10px 0 0}.navigation .level0:last-child{margin-right:0;padding-right:0}.navigation .level0>.level-top{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;color:#575757;line-height:53px;padding:0 12px;display:inline-block;position:relative}.navigation .level0>.level-top:hover{color:#333}.navigation .level0.active>.level-top{color:#333}.navigation .level0.parent>.submenu:before,.navigation .level0.parent>.submenu:after{content:'';overflow:hidden;display:block;position:absolute;top:-20px}.navigation .level0.parent>.submenu:before{left:20px;color:#fff;z-index:4;width:0;height:0;border:10px solid rgba(0,0,0,0);border-bottom-color:#fff}.navigation .level0.parent>.submenu:after{left:19px;color:#d1d1d1;z-index:3;width:0;height:0;border:11px solid rgba(0,0,0,0);border-bottom-color:#d1d1d1}.navigation .level0.parent:hover>.submenu{overflow:visible!important}.navigation .level0.hover>.submenu,.navigation .level0:hover>.submenu{z-index:2}.navigation .level0.more{position:relative;display:inline-block;text-decoration:none}.navigation .level0.more:after{font-family:"icons-blank-theme";content:'\e607';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.navigation .level0.more:before{display:none}.navigation .level0.more:after{border-radius:4px 4px 0 0;cursor:pointer;padding:8px 12px;position:relative;z-index:1}.navigation .level0>.submenu{display:none;min-width:230px;position:absolute;left:0;top:100%;z-index:1}.navigation .level0>.submenu>ul{background:#fff;border:1px solid #d1d1d1;box-shadow:0 5px 5px rgba(0,0,0,.19);padding:15px 0;position:relative;margin:0}.navigation .level0>.submenu>ul>li{display:block;margin:0;position:relative}.navigation .level0>.submenu>ul>li a{display:block;line-height:normal;padding:8px 20px;color:#575757}.navigation .level0>.submenu>ul>li a:hover{background:#e8e8e8;color:#333;text-decoration:none}.navigation .level0>.submenu .submenu ul{padding-left:0}.navigation .level0>.submenu .submenu ul li{margin:0}.navigation .level0>.submenu .submenu ul a{padding-left:40px}.navigation{margin:0 0 30px}.navigation>ul>.level0{font-weight:700}.navigation>ul>.level0>a,.navigation>ul>.level0 .action.back>a{text-decoration:none;text-transform:uppercase}.load.indicator{position:fixed;left:0;top:0;right:0;bottom:0;background-color:rgba(255,255,255,.5);z-index:9999;position:absolute}.load.indicator:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:rgba(0,0,0,0);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat;border-radius:5px;content:'';position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;width:160px;height:160px}.load.indicator:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:rgba(0,0,0,0);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat;border-radius:5px;content:'';position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;width:160px;height:160px}.load.indicator>span{display:none}.fieldset{border:0;margin:0 0 40px;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.fieldset .legend+.fieldset,.fieldset .legend+div{clear:both}.fieldset>*{letter-spacing:normal;word-spacing:normal}.fieldset>.legend{margin:0 0 25px 25.8%;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.fieldset:last-child{margin-bottom:0}.fieldset>.field,.fieldset .fields>.field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 0 29px;border:0}.fieldset>.field:last-child,.fieldset .fields>.field:last-child{margin-bottom:0}.fieldset>.field.no-label>.label,.fieldset .fields>.field.no-label>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.fieldset>.field .label,.fieldset .fields>.field .label{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.fieldset>.field:before,.fieldset .fields>.field:before,.fieldset>.field:after,.fieldset .fields>.field:after{content:"";display:table}.fieldset>.field:after,.fieldset .fields>.field:after{clear:both}.fieldset>.field:not(.choice)>.label,.fieldset .fields>.field:not(.choice)>.label{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.fieldset>.field>.description,.fieldset .fields>.field>.description{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.fieldset>.field.choice:before,.fieldset .fields>.field.choice:before,.fieldset>.field.no-label:before,.fieldset .fields>.field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:1px;float:left;width:25.8%;padding:6px 15px 0 0}.fieldset>.field>.control,.fieldset .fields>.field>.control{float:left;width:74.2%}.fieldset>.field>.label,.fieldset .fields>.field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.fieldset>.field>.label+br,.fieldset .fields>.field>.label+br{display:none}.fieldset>.field.required>.label:after,.fieldset .fields>.field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.fieldset>.field .nested .field,.fieldset .fields>.field .nested .field{margin:5px 0}.fieldset>.field.choice>.label,.fieldset .fields>.field.choice>.label{display:inline}.fieldset>.field.choice>input,.fieldset .fields>.field.choice>input{vertical-align:top}.fieldset>.field .fields.group,.fieldset .fields>.field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.fieldset>.field .fields.group>*,.fieldset .fields>.field .fields.group>*{letter-spacing:normal;word-spacing:normal}.fieldset>.field .fields.group .field,.fieldset .fields>.field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.fieldset>.field .fields.group .field .label,.fieldset .fields>.field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.fieldset>.field .fields.group .field .control,.fieldset .fields>.field .fields.group .field .control{float:none;width:auto}.fieldset>.field .fields.group.group-2 .field,.fieldset .fields>.field .fields.group.group-2 .field{width:50%!important;display:inline-block}.fieldset>.field .fields.group.group-3 .field,.fieldset .fields>.field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.fieldset>.field .fields.group.group-4 .field,.fieldset .fields>.field .fields.group.group-4 .field{width:25%!important;display:inline-block}.fieldset>.field .fields.group.group-5 .field,.fieldset .fields>.field .fields.group.group-5 .field{width:20%!important;display:inline-block}.fieldset>.field .addon,.fieldset .fields>.field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.fieldset>.field .addon textarea,.fieldset .fields>.field .addon textarea,.fieldset>.field .addon select,.fieldset .fields>.field .addon select,.fieldset>.field .addon input,.fieldset .fields>.field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.fieldset>.field .addon .addbefore,.fieldset .fields>.field .addon .addbefore,.fieldset>.field .addon .addafter,.fieldset .fields>.field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.fieldset>.field .addon .addbefore:disabled,.fieldset .fields>.field .addon .addbefore:disabled,.fieldset>.field .addon .addafter:disabled,.fieldset .fields>.field .addon .addafter:disabled{opacity:.5}.fieldset>.field .addon .addbefore,.fieldset .fields>.field .addon .addbefore{float:left;order:1}.fieldset>.field .note,.fieldset .fields>.field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.fieldset>.field .note:before,.fieldset .fields>.field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.fieldset>.field.choice .label,.fieldset .fields>.field.choice .label{font-weight:400}.field .tooltip{position:relative;display:inline-block}.field .tooltip .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;left:100%;top:0;margin-left:5px}.field .tooltip .tooltip-content:after,.field .tooltip .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.field .tooltip .tooltip-content:after{border-color:transparent;border-width:5px}.field .tooltip .tooltip-content:before{border-color:transparent;border-width:6px}.field .tooltip .tooltip-content:after,.field .tooltip .tooltip-content:before{right:100%}.field .tooltip .tooltip-content:after{border-right-color:#fff;margin-top:-5px;top:15px}.field .tooltip .tooltip-content:before{border-right-color:#bbb;margin-top:-6px;top:15px}.field .tooltip>:first-child{cursor:help}.field .tooltip>:first-child:hover+.tooltip-content,.field .tooltip>:first-child:focus+.tooltip-content,.field .tooltip:hover>.tooltip-content{display:block}.field .tooltip .tooltip-content{min-width:200px;white-space:normal}input:focus~.tooltip .tooltip-content,select:focus~.tooltip .tooltip-content{display:block}button,.cart.table.wrapper .cart.items .action{border-radius:3px}button:active,button:focus,.cart.table.wrapper .cart.items .action:active,.cart.table.wrapper .cart.items .action:focus{box-shadow:inset 0 2px 1px rgba(0,0,0,.12)}@media only screen and (max-width: 99999px){.product.data.items{ position:relative;z-index:1}.product.data.items:before,.product.data.items:after{content:"";display:table}.product.data.items:after{clear:both}.product.data.items>.item.title{float:left}.product.data.items>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.product.data.items>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.product.data.items>.item.content:before,.product.data.items>.item.content:after{content:"";display:table}.product.data.items>.item.content:after{clear:both}.product.data.items>.item.content.active{display:block}.product.data.items>.item.title{margin:0 5px 0 0}.product.data.items>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.product.data.items>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.product.data.items>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.product.data.items>.item.title>.switch:active{color:#333;text-decoration:none}.product.data.items>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.product.data.items>.item.title:not(.disabled)>.switch:focus,.product.data.items>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.product.data.items>.item.title:not(.disabled)>.switch:active,.product.data.items>.item.title.active>.switch,.product.data.items>.item.title.active>.switch:focus,.product.data.items>.item.title.active>.switch:hover{background-color:#fff;color:#333}.product.data.items>.item.title.active>.switch{padding-bottom:6px}.product.data.items>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border-top:1px solid #d1d1d1}}@media only screen and (max-width: 768px){.product.data.items{ margin:0;padding:0}.product.data.items>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.product.data.items>.item.title>.switch{display:block}.product.data.items>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.product.data.items>.item.content:before,.product.data.items>.item.content:after{content:"";display:table}.product.data.items>.item.content:after{clear:both}.product.data.items>.item.content.active{display:block}.product.data.items>.item.title{margin:0 0 5px}.product.data.items>.item.title>.switch{border:1px solid #d1d1d1;background-color:#f0f0f0;font-size:18px;font-size:1.8rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:40px;color:#7d7d7d;text-decoration:none;height:40px;padding:5px 20px 5px 20px}.product.data.items>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.product.data.items>.item.title>.switch:hover{color:#7d7d7d;text-decoration:#7d7d7d}.product.data.items>.item.title>.switch:active{color:#333;text-decoration:none}.product.data.items>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.product.data.items>.item.title:not(.disabled)>.switch:focus,.product.data.items>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.product.data.items>.item.title:not(.disabled)>.switch:active,.product.data.items>.item.title.active>.switch,.product.data.items>.item.title.active>.switch:focus,.product.data.items>.item.title.active>.switch:hover{background-color:#fff;padding-bottom:5px}.product.data.items>.item.content{margin:0;padding:20px 20px 20px 20px;background-color:#fff;border:1px solid #d1d1d1}}.pages>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.pages .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.pages .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages a.page{padding:0 10px;color:#1979c3;display:inline-block;text-decoration:none}.pages a.page:visited{color:#800080}.pages a.page:hover{color:#006bb4;text-decoration:none}.pages a.page:active{color:#ff5501}.pages strong.page{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#333;display:inline-block;font-weight:700}.pages .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.pages .action:visited{color:#7d7d7d}.pages .action:hover{color:#7d7d7d;text-decoration:none}.pages .action:active{color:#7d7d7d}.pages .action.next{display:inline-block;text-decoration:none}.pages .action.next:visited:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.next:hover:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.previous{display:inline-block;text-decoration:none}.pages .action.previous:visited:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.pages .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.previous:hover:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.rating.summary{overflow:hidden}.rating.summary .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.rating.summary .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.rating.summary .rating.result>span{display:block;overflow:hidden}.rating.summary .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.rating.summary .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product.reviews.summary .label,.data.table.reviews .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.control.rating.vote{overflow:hidden}.control.rating.vote:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.control.rating.vote input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.control.rating.vote input[type="radio"]:focus+label:before,.control.rating.vote input[type="radio"]:checked+label:before{opacity:1}.control.rating.vote label{position:absolute;display:block;cursor:pointer}.control.rating.vote label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.control.rating.vote label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.control.rating.vote label:hover:before{opacity:1}.control.rating.vote label:hover~label:before{opacity:0}.control.rating.vote .rating-5{z-index:2}.control.rating.vote .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.control.rating.vote .rating-4{z-index:3}.control.rating.vote .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.control.rating.vote .rating-3{z-index:4}.control.rating.vote .rating-3:before{content:'\e605' '\e605' '\e605'}.control.rating.vote .rating-2{z-index:5}.control.rating.vote .rating-2:before{content:'\e605' '\e605'}.control.rating.vote .rating-1{z-index:6}.control.rating.vote .rating-1:before{content:'\e605'}.actions.toolbar:before,.actions.toolbar:after{content:"";display:table}.actions.toolbar:after{clear:both}.actions.toolbar .primary{float:left}.actions.toolbar .secondary{float:right}.actions.toolbar .primary,.actions.toolbar .secondary{display:inline-block}.actions.toolbar .primary a.action,.actions.toolbar .secondary a.action{display:inline-block}.actions.toolbar .primary .action{margin:0 5px 0 0}.actions.toolbar .secondary a.action{margin-top:6px}.actions.toolbar .primary a.action{display:inline-block;text-decoration:none}.actions.toolbar .primary a.action:hover,.actions.toolbar .primary a.action:active,.actions.toolbar .primary a.action:focus{text-decoration:none}.actions.toolbar .secondary a.action:visited{color:#1979c3}.form .actions.toolbar{margin-left:25.8%}.breadcrumbs{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.breadcrumbs .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.breadcrumbs .items{font-size:12px;font-size:1.2rem;color:#a3a3a3;margin:0;padding:0;list-style-type:none;list-style-image:none}.breadcrumbs .items>li{display:inline-block;vertical-align:top}.breadcrumbs a{color:#333;text-decoration:none}.breadcrumbs a:visited{color:#333;text-decoration:none}.breadcrumbs a:hover{color:#333;text-decoration:underline}.breadcrumbs a:active{color:#333;text-decoration:none}.breadcrumbs strong{font-weight:400}.breadcrumbs .item:not(:last-child):after{color:#a3a3a3;content:'>'}.paypal.after:after{content:"- " attr(data-label) " -";display:block;margin:0 5px 10px;text-transform:uppercase}.paypal.before:before{content:"- " attr(data-label) " -";display:block;margin:10px 5px;text-align:center;text-transform:uppercase}.column.main .block.addbysku .title{margin-bottom:30px}.column.main .block.addbysku .fields{position:relative;margin-bottom:45px}.column.main .block.addbysku .fields:last-child{margin-bottom:0}.column.main .block.addbysku .fields .field .control{width:50%}.column.main .block.addbysku .fields .action.remove{background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;line-height:normal;position:absolute;top:4px;margin-left:75.8%}.column.main .block.addbysku .fields .action.remove:focus,.column.main .block.addbysku .fields .action.remove:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.column.main .block.addbysku .fields .action.remove:hover{background:0;border:0}.column.main .block.addbysku .fields .action.remove.disabled,.column.main .block.addbysku .fields .action.remove[disabled],fieldset[disabled] .column.main .block.addbysku .fields .action.remove{cursor:not-allowed;pointer-events:none;opacity:.5}.column.main .block.addbysku .actions.toolbar .secondary{float:left}.column.main .block.addbysku .field .note{display:block}.column.main .block.addbysku .field .note p:first-child{display:inline-block}.actions.bundle{margin:10px 0}.actions.bundle .action.primary.customize{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.actions.bundle .action.primary.customize:focus,.actions.bundle .action.primary.customize:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.actions.bundle .action.primary.customize:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.actions.bundle .action.primary.customize.disabled,.actions.bundle .action.primary.customize[disabled],fieldset[disabled] .actions.bundle .action.primary.customize{cursor:default;pointer-events:none;opacity:.5}.bundle.options.container{clear:both;margin-bottom:40px}.bundle.options.container .legend.title{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.bundle.options.container .product.add.form{display:none}.bundle.options.container .field.option{margin:0 0 20px;border:0}.bundle.options.container .field.option:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.bundle.options.container .field.option.choice:before,.bundle.options.container .field.option.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.bundle.options.container .field.option>.control{float:none;width:auto}.bundle.options.container .field.option>.label{font-size:14px;font-size:1.4rem;font-weight:700}.bundle.options.container .field.option>.label+br{display:none}.bundle.options.container .field.option.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.bundle.options.container .field.option .nested .field{margin:5px 0}.bundle.options.container .field.option.choice>.label{display:inline}.bundle.options.container .field.option.choice>input{vertical-align:top}.bundle.options.container .field.option .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.bundle.options.container .field.option .fields.group>*{letter-spacing:normal;word-spacing:normal}.bundle.options.container .field.option .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.bundle.options.container .field.option .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.bundle.options.container .field.option .fields.group .field .control{float:none;width:auto}.bundle.options.container .field.option .fields.group.group-2 .field{width:50%!important;display:inline-block}.bundle.options.container .field.option .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.bundle.options.container .field.option .fields.group.group-4 .field{width:25%!important;display:inline-block}.bundle.options.container .field.option .fields.group.group-5 .field{width:20%!important;display:inline-block}.bundle.options.container .field.option .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.bundle.options.container .field.option .addon textarea,.bundle.options.container .field.option .addon select,.bundle.options.container .field.option .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.bundle.options.container .field.option .addon .addbefore,.bundle.options.container .field.option .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.bundle.options.container .field.option .addon .addbefore:disabled,.bundle.options.container .field.option .addon .addafter:disabled{opacity:.5}.bundle.options.container .field.option .addon .addbefore{float:left;order:1}.bundle.options.container .field.option .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.bundle.options.container .field.option .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.bundle.options.container .input-text.qty{width:50px}.bundle.options.container .product.options.wrapper{float:left;width:57%;margin-bottom:30px}.layout-2-left .bundle.options.container .product.options.wrapper,.layout-2-right .bundle.options.container .product.options.wrapper{width:48%}.layout-3 .bundle.options.container .product.options.wrapper{width:48%}.bundle.options.container .product.options.bottom{width:57%;clear:both}.layout-2-left .bundle.options.container .product.options.bottom,.layout-2-right .bundle.options.container .product.options.bottom{width:48%}.layout-3 .bundle.options.container .product.options.bottom{width:48%}.bundle.options.container .price-box .price{font-weight:700;font-size:18px}.bundle.options.container .block.bundle.summary{float:right;position:relative;width:40%;padding:10px 20px;background:#e8e8e8;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.layout-2-left .bundle.options.container .block.bundle.summary,.layout-2-right .bundle.options.container .block.bundle.summary{width:48%}.layout-3 .bundle.options.container .block.bundle.summary{width:48%}.bundle.options.container .block.bundle.summary>.title>strong{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.bundle.options.container .block.bundle.summary .bundle.summary{margin-top:30px}.bundle.options.container .block.bundle.summary .bundle.summary>.subtitle{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block}.bundle.options.container .block.bundle.summary .bundle.items>li{margin-bottom:10px}.bundle.options.container .block.bundle.summary .tocart .actions{margin:10px 0}.bundle.options.container .block.bundle.summary .tocart .action.primary{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.bundle.options.container .block.bundle.summary .tocart .action.primary:focus,.bundle.options.container .block.bundle.summary .tocart .action.primary:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.bundle.options.container .block.bundle.summary .tocart .action.primary:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.bundle.options.container .block.bundle.summary .tocart .action.primary.disabled,.bundle.options.container .block.bundle.summary .tocart .action.primary[disabled],fieldset[disabled] .bundle.options.container .block.bundle.summary .tocart .action.primary{cursor:default;pointer-events:none;opacity:.5}.bundle.options.container .block.bundle.summary .addto.links .action{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;margin-bottom:5px}.bundle.options.container .block.bundle.summary .addto.links .action:focus,.bundle.options.container .block.bundle.summary .addto.links .action:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.bundle.options.container .block.bundle.summary .addto.links .action:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.bundle.options.container .block.bundle.summary .addto.links .action.disabled,.bundle.options.container .block.bundle.summary .addto.links .action[disabled],fieldset[disabled] .bundle.options.container .block.bundle.summary .addto.links .action{cursor:default;pointer-events:none;opacity:.5}.bundle.options.container p.required{color:#e02b27}.layout-1 .products.grid .item.product{width:20%}.layout-2-left .products.grid .item.product{width:25%}.layout-2-right .products.grid .item.product{width:25%}.layout-3 .products.grid .item.product{width:33.33333333%}.old-price,.old.price{text-decoration:line-through}.actual.price{font-weight:700}.products.wrapper.grid .item.product{padding:0 20px 20px;margin:0 0 30px}.products.wrapper.list .item.product{margin-bottom:80px}.products.wrapper.list .item.product>.product{display:table;width:100%;table-layout:fixed}.products.wrapper.list .item.product .product.photo{display:table-cell;vertical-align:top;width:30%;padding-right:35px}.products.wrapper.list .item.product .product.details{display:table-cell;vertical-align:top}.products.wrapper.list .item.product .product.name{font-size:18px;margin-bottom:20px}.products.wrapper.list .item.product .price-box{width:30%;margin-right:2%;float:left}.products.wrapper.list .item.product .product.description{margin-top:30px;color:#111}.products.toolbar{display:table;width:100%;padding:10px;background:#f0f0f0;margin-bottom:40px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.products.toolbar .settings{display:table-cell;vertical-align:middle;text-align:left}.products.toolbar .pager{display:table-cell;vertical-align:middle;text-align:right}.products.toolbar .pages{display:table-cell;vertical-align:middle}.products.toolbar .modes{display:inline;margin-right:20px}.products.toolbar .modes .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .modes .mode{border:1px solid #d1d1d1;width:37px;text-align:center;color:#7d7d7d}.products.toolbar .modes .mode>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .modes .mode.active{background:#e5e5e5;color:#c7c7c7}.products.toolbar .modes .mode+.mode{margin-left:-4px;border-left:0}.products.toolbar .modes .mode.grid{display:inline-block;text-decoration:none}.products.toolbar .modes .mode.grid:before{font-family:"icons-blank-theme";content:'\e60d';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .modes .mode.list{display:inline-block;text-decoration:none}.products.toolbar .modes .mode.list:before{font-family:"icons-blank-theme";content:'\e60b';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .sorter{display:inline}.products.toolbar .sorter select{width:auto}.products.toolbar .sorter .action.sort.asc{display:inline-block;text-decoration:none}.products.toolbar .sorter .action.sort.asc:before{font-family:"icons-blank-theme";content:'\e614';font-size:27px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .sorter .action.sort.asc>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .sorter .action.sort.desc{display:inline-block;text-decoration:none}.products.toolbar .sorter .action.sort.desc:before{font-family:"icons-blank-theme";content:'\e613';font-size:27px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.products.toolbar .sorter .action.sort.desc>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.products.toolbar .limiter{display:inline;margin-left:20px}.products.toolbar .limiter select{width:auto}.products.toolbar .amount{display:inline}.block.filter .subtitle{display:block;font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.block.filter .options{margin:0}.block.filter .options>dt{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.block.filter .options>dd{margin:0 0 30px}.block.filter .options .count{color:#7d7d7d}.block.filter .options .count:before{content:"("}.block.filter .options .count:after{content:")"}.block.filter .filtered .item{position:relative;padding-left:25px}.block.filter .filtered .item .label{font-weight:700}.block.filter .filtered .item .action.remove{position:absolute;top:-4px;left:0;display:inline-block;text-decoration:none}.block.filter .filtered .item .action.remove:before{font-family:"icons-blank-theme";content:'\e616';font-size:28px;line-height:1;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.filter .filtered .item .action.remove>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.filter .filtered+.actions{margin-bottom:30px}.layout-1 .product.info.main{width:40%;float:right}.layout-1 .product.media{float:left;width:57%}.layout-2-left .product.info.main,.layout-2-right .product.info.main{width:48%;float:right}.layout-2-left .product.media,.layout-2-right .product.media{float:left;width:50%}.layout-3 .product.info.main{width:48%;float:right}.layout-3 .product.media{float:left;width:50%}.product.media .photo.image{display:block;max-width:100%;height:auto}.product.media .notice{margin:10px 0;color:#7d7d7d;font-size:12px;font-size:1.2rem}.product.media .product.thumbs{margin:20px 0 30px}.product.media .items.thumbs{margin:0;padding:0;list-style-type:none;list-style-image:none}.product.media .items.thumbs>li{display:inline-block;vertical-align:top}.product.media .items.thumbs .active{display:block;line-height:1;outline:1px solid #ff5501}.product.info.detailed{clear:both}.product.info.detailed .table.additional.attributes{width:auto}.product.info.detailed .table.additional.attributes>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.product.info.detailed .table.additional.attributes>thead>tr>td,.product.info.detailed .table.additional.attributes>tbody>tr>td,.product.info.detailed .table.additional.attributes>tfoot>tr>td{padding:1.5px 5px 10px 5px}.product.info.detailed .table.additional.attributes>thead>tr>th,.product.info.detailed .table.additional.attributes>tbody>tr>th,.product.info.detailed .table.additional.attributes>tfoot>tr>th{padding:1.5px 30px 10px 0}.product.info.main .stock.available,.product.info.main .stock.unavailable{display:inline-block;vertical-align:top;margin-bottom:5px;margin-right:20px}.product.info.main .product.attibute.sku{display:inline-block;vertical-align:top;margin-bottom:10px;color:#7d7d7d}.product.info.main .product.attibute.sku>.value{display:inline-block;vertical-align:top}.product.info.main .product.attibute.overview{margin:20px 0}.product.info.main .product.alert{margin:10px 0}.product.info.main .product.options.wrapper .field{margin:0 0 20px;border:0}.product.info.main .product.options.wrapper .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.product.info.main .product.options.wrapper .field.choice:before,.product.info.main .product.options.wrapper .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.product.info.main .product.options.wrapper .field>.control{float:none;width:auto}.product.info.main .product.options.wrapper .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.product.info.main .product.options.wrapper .field>.label+br{display:none}.product.info.main .product.options.wrapper .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.product.info.main .product.options.wrapper .field .nested .field{margin:5px 0}.product.info.main .product.options.wrapper .field.choice>.label{display:inline}.product.info.main .product.options.wrapper .field.choice>input{vertical-align:top}.product.info.main .product.options.wrapper .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.product.info.main .product.options.wrapper .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.product.info.main .product.options.wrapper .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.product.info.main .product.options.wrapper .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.product.info.main .product.options.wrapper .field .fields.group .field .control{float:none;width:auto}.product.info.main .product.options.wrapper .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.product.info.main .product.options.wrapper .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.product.info.main .product.options.wrapper .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.product.info.main .product.options.wrapper .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.product.info.main .product.options.wrapper .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.product.info.main .product.options.wrapper .field .addon textarea,.product.info.main .product.options.wrapper .field .addon select,.product.info.main .product.options.wrapper .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.product.info.main .product.options.wrapper .field .addon .addbefore,.product.info.main .product.options.wrapper .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.product.info.main .product.options.wrapper .field .addon .addbefore:disabled,.product.info.main .product.options.wrapper .field .addon .addafter:disabled{opacity:.5}.product.info.main .product.options.wrapper .field .addon .addbefore{float:left;order:1}.product.info.main .product.options.wrapper .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.product.info.main .product.options.wrapper .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.product.info.main .price-box .price{font-weight:700;font-size:18px}.product.info.main .box.tocart{display:table;margin:20px 0}.product.info.main .box.tocart .field.qty{display:table-cell;vertical-align:bottom;padding-right:15px}.product.info.main .box.tocart .input-text.qty{height:52px;width:52px;text-align:center}.product.info.main .box.tocart .actions{display:table-cell;vertical-align:bottom}.product.info.main .box.tocart .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.product.info.main .box.tocart .action.tocart:focus,.product.info.main .box.tocart .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.product.info.main .box.tocart .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.product.info.main .box.tocart .action.tocart.disabled,.product.info.main .box.tocart .action.tocart[disabled],fieldset[disabled] .product.info.main .box.tocart .action.tocart{cursor:default;pointer-events:none;opacity:.5}.product.info.main .addto{margin:20px 0}.product.info.main .action.tocompare{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.prices.tier.items{background:#f5f5f5;padding:10px 15px;margin:10px 0}.minimal-price-link,.price-excluding-tax,.price-including-tax{white-space:nowrap;display:inline-block}.map.popup{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-top:10px;margin-left:0;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear;position:absolute}.map.popup .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.map.popup .popup.content{margin:10px 0 0}.map.popup .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.map.popup .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.map.popup .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.map.popup .popup.actions .action.close:hover:before{color:inherit}.map.popup .popup.actions .action.close:active:before{color:inherit}.map.popup .popup.actions .action.close:focus,.map.popup .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.map.popup .popup.actions .action.close:hover{background:0;border:0}.map.popup .popup.actions .action.close.disabled,.map.popup .popup.actions .action.close[disabled],fieldset[disabled] .map.popup .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.map.popup.active{opacity:1}.map.popup .form.map.checkout{float:right}.map.popup .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.map.popup .action.tocart:focus,.map.popup .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.map.popup .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.map.popup .action.tocart.disabled,.map.popup .action.tocart[disabled],fieldset[disabled] .map.popup .action.tocart{cursor:default;pointer-events:none;opacity:.5}body.catalog-product-compare-index .action.print{float:right;margin:15px 0}.comparison.wrapper{clear:both;position:relative;z-index:1;margin-bottom:50px}.comparison.container{overflow-x:auto}.data.comparison{table-layout:fixed;margin-bottom:0}.data.comparison caption,.data.comparison .cell.label.remove,.data.comparison .cell.label.product{font:0/0 a}.data.comparison .cell.label{font-weight:700;border-right:1px solid #e5e5e5}.data.comparison .cell.label .attribute.label{display:block;width:100%;word-break:break-all}.data.comparison .cell{width:140px;padding:15px;vertical-align:top}.data.comparison .cell .attibute.value{width:100%;overflow:hidden}.data.comparison .cell.product.info,.data.comparison .cell.product.label{border-bottom:1px solid #e5e5e5}.data.comparison .cell.attribute{font-size:13px}.data.comparison .cell.attribute img{max-width:100%;height:auto}.data.comparison td:last-child{border-right:1px solid #e5e5e5}.data.comparison .product.photo{text-align:center;display:block;margin:0 auto 15px}.data.comparison .product.photo .img.photo.container{display:inline-block!important}.data.comparison .actions,.data.comparison .price-box,.data.comparison .product.rating,.data.comparison .product.name{display:block;margin:15px 0}.data.comparison .action.tocart{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.data.comparison .action.tocart:focus,.data.comparison .action.tocart:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.data.comparison .action.tocart:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.data.comparison .action.tocart.disabled,.data.comparison .action.tocart[disabled],fieldset[disabled] .data.comparison .action.tocart{cursor:default;pointer-events:none;opacity:.5}.data.comparison .addto.links{margin-top:15px}.data.comparison .addto.links .action.split,.data.comparison .addto.links .action.toggle{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.data.comparison .addto.links .action.toggle{padding:0}.data.comparison .cell.remove{padding-top:0;padding-bottom:0;text-align:right}.comparison.headings{position:absolute;z-index:2;top:0;left:0;width:auto;background:#fff}.block.event{clear:both}.block.event.category{margin-top:10px;margin-bottom:25px}.block.event.category .content{padding:15px;text-align:center;min-height:67px}.block.event .ticker li{display:none;margin:0 3px}.block.event .ticker .value{font-size:21px}.block.event .ticker .label{display:block;font-size:12px}.block.event .dates .start,.block.event .dates .end{display:inline-block}.block.event .dates .date{font-size:21px}.block.event .dates .start:after{content:"\2013";margin:0 10px;display:inline-block}.block.event .content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;position:relative}.block.event .content:before,.block.event .content:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid;pointer-events:none}.block.event .content:before{bottom:-30px;left:50%;margin-left:-15px;z-index:99;border:solid 15px}.block.event .content:after{bottom:-32px;left:50%;margin-left:-16px;z-index:98;border:solid 16px}.block.event .content .subtitle{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block;margin-top:0}.block.event.open .content,.block.event .open .content{background:#feebe5;border:1px solid #f99d84;color:#da370a}.block.event.open .content:before,.block.event .open .content:before{border-color:#feebe5 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.open .content:after,.block.event .open .content:after{border-color:#f99d84 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.upcoming .content,.block.event .upcoming .content{background:#daf2fa;border:1px solid #81d2ed;color:#1b92ba}.block.event.upcoming .content:before,.block.event .upcoming .content:before{border-color:#daf2fa rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.upcoming .content:after,.block.event .upcoming .content:after{border-color:#81d2ed rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.closed .content,.block.event .closed .content{background:#f7f7f7;border:1px solid #c3c3c3;color:#777}.block.event.closed .content:before,.block.event .closed .content:before{border-color:#f7f7f7 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.block.event.closed .content:after,.block.event .closed .content:after{border-color:#c3c3c3 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.columns .block.event{position:relative;z-index:2}.block.event .panel{position:relative;overflow:hidden;z-index:2}.block.event .panel>.slider{white-space:nowrap}.block.event .panel>.slider .item{display:inline-block;text-align:center;white-space:normal;vertical-align:top;width:16.35%}.sidebar .block.event .panel>.slider .item{width:100%}.block.event .panel>.slider .item img{max-width:100%}.block.event .panel>.slider .item>.event .content{border-left:0;border-right:0;padding:15px 0;min-height:156px}.block.event .panel>.slider .item>.event .subtitle{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block;margin-top:0}.block.event .panel>.slider .item>.event .dates .start,.block.event .panel>.slider .item>.event .dates .end{display:block}.block.event .panel>.slider .item>.event .dates .start:after{display:block}.block.event .panel>.slider .item>.event .dates .date{font-size:14px;font-weight:600}.block.event .panel>.slider .item>.event .dates .time{font-size:10px}.block.event .panel>.slider .item>.event .action.event{margin-top:15px;display:inline-block}.block.event .panel>.slider .item .action.show{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:block;padding:0}.block.event .panel>.slider .item .action.show .category.name{display:inline-block;padding:30px 10px 0}.block.event .action.slider{cursor:pointer;position:absolute;z-index:3;top:50%;margin-top:-15px}.block.event .action.slider.backward,.block.event .action.slider.forward{width:20px;overflow:hidden;opacity:.5;display:inline-block;text-decoration:none}.block.event .action.slider.backward>span,.block.event .action.slider.forward>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.event .action.slider.backward:before,.block.event .action.slider.forward:before{font-family:"icons-blank-theme";content:'\e617';font-size:80px;line-height:30px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.event .action.slider.backward:before,.block.event .action.slider.forward:before{margin-left:-30px}.block.event .action.slider.backward{left:0}.block.event .action.slider.forward{right:0}.block.event .action.slider.forward:before{content:'\e608'}.block.event .action.slider.inactive{cursor:default;display:none}.block.event .action.slider:hover{opacity:1}.block.search{float:right;padding-left:15px;position:relative;width:250px;z-index:1}.block.search input{padding-right:35px}.block.search .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.search .title{display:none}.block.search .action.search{position:absolute;right:10px;top:0;z-index:1;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.block.search .action.search>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.search .action.search:before{font-family:"icons-blank-theme";content:'\e615';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.block.search .action.search:hover:before{color:inherit}.block.search .action.search:active:before{color:inherit}.block.search .action.search:focus,.block.search .action.search:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.block.search .action.search:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.block.search .action.search.disabled,.block.search .action.search[disabled],fieldset[disabled] .block.search .action.search{cursor:default;pointer-events:none;opacity:.5}.block.search .action.search:focus,.block.search .action.search:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.block.search .action.search:hover{background:0;border:0}.block.search .action.search.disabled,.block.search .action.search[disabled],fieldset[disabled] .block.search .action.search{cursor:not-allowed;pointer-events:none;opacity:.5}.block.search .nested{padding-top:5px;position:absolute}.cart.container:before,.cart.container:after{content:"";display:table}.cart.container:after{clear:both}.cart.summary{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:right;width:23%;background:#f5f5f5;margin-bottom:25px;padding:1px 15px 25px}.cart.summary>.title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;display:block}.cart.summary .block{margin-bottom:0}.cart.summary .block>.title{display:inline-block;text-decoration:none;border-top:1px solid #d1d1d1;cursor:pointer;display:block;font-weight:600;line-height:36px;margin-bottom:0;padding:0 20px 0 5px;position:relative}.cart.summary .block>.title:after{font-family:"icons-blank-theme";content:'\e622';font-size:30px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.summary .block>.title:after{position:absolute;right:0;top:0}.cart.summary .block>.title.active:after{content:'\e617'}.cart.summary .block>.title strong{font-weight:400}.cart.summary .block .content{display:none}.cart.summary .block.active .content{display:block}.cart.summary .block .item.options{margin-left:0}.cart.summary .block.discount .field>.label{display:block;float:none;text-align:left;width:auto}.cart.summary .fieldset{margin:15px 0 25px 5px}.cart.summary .field{margin:0 0 10px;border:0}.cart.summary .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.cart.summary .field.choice:before,.cart.summary .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.cart.summary .field>.control{float:none;width:auto}.cart.summary .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.cart.summary .field>.label+br{display:none}.cart.summary .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.cart.summary .field .nested .field{margin:5px 0}.cart.summary .field.choice>.label{display:inline}.cart.summary .field.choice>input{vertical-align:top}.cart.summary .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.cart.summary .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.cart.summary .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.cart.summary .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.cart.summary .field .fields.group .field .control{float:none;width:auto}.cart.summary .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.cart.summary .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.cart.summary .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.cart.summary .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.cart.summary .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.cart.summary .field .addon textarea,.cart.summary .field .addon select,.cart.summary .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.cart.summary .field .addon .addbefore,.cart.summary .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.cart.summary .field .addon .addbefore:disabled,.cart.summary .field .addon .addafter:disabled{opacity:.5}.cart.summary .field .addon .addbefore{float:left;order:1}.cart.summary .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.cart.summary .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.summary .field.note{font-size:12px}.cart.summary .field.postcode,.cart.summary .coupon .field{display:table-cell;position:relative;vertical-align:bottom;width:99%;z-index:1}.cart.summary .field.postcode div.mage-error,.cart.summary .coupon .field div.mage-error{position:absolute}.cart.summary .control{float:none;width:auto}.cart.summary .estimate .actions,.cart.summary .coupon .actions{display:table-cell;width:1%;white-space:nowrap;vertical-align:bottom}.cart.summary .action.quote,.cart.summary .action.apply,.cart.summary .action.cancel{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.cart.totals{border-top:1px solid #d1d1d1;padding-top:10px}.cart.totals .mark{padding-left:4px}.cart.totals .amount{padding-right:4px;text-align:right}.cart.totals .grand .mark,.cart.totals .grand .amount{padding-top:25px}.cart.totals .grand .mark strong{font-weight:400}.cart.totals .msrp{margin-bottom:10px}.cart .checkout.methods{text-align:center}.cart .action.primary{line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin-bottom:20px;width:100%}.cart.table.wrapper{float:left;width:73%}.cart.table.wrapper .cart.items>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.cart.table.wrapper .cart.items .action{display:inline-block;text-decoration:none;margin-left:10px}.cart.table.wrapper .cart.items .action:hover,.cart.table.wrapper .cart.items .action:active,.cart.table.wrapper .cart.items .action:focus{text-decoration:none}.cart.table.wrapper .cart.items .action.help.map{background:0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;font-weight:400}.cart.table.wrapper .cart.items .action.help.map:visited{color:#800080;text-decoration:none}.cart.table.wrapper .cart.items .action.help.map:hover{color:#006bb4;text-decoration:underline}.cart.table.wrapper .cart.items .action.help.map:active{color:#ff5501;text-decoration:underline}.cart.table.wrapper .cart.items .action.help.map:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.cart.table.wrapper .cart.items .action.help.map:hover,.cart.table.wrapper .cart.items .action.help.map:active,.cart.table.wrapper .cart.items .action.help.map:focus{background:0;border:0;outline:0}.cart.table.wrapper .cart.items .action.help.map.disabled,.cart.table.wrapper .cart.items .action.help.map[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .action.help.map{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.cart.table.wrapper .cart.items thead+.cart.item{border-top:1px solid #d1d1d1}.cart.table.wrapper .cart.items>.item.cart{border-bottom:1px solid #d1d1d1}.cart.table.wrapper .item .col{padding-top:27px}.cart.table.wrapper .item .col.qty{padding-top:20px}.cart.table.wrapper .item .col.qty .input-text{width:3.3em}.cart.table.wrapper .item.actions td{padding-bottom:17px;text-align:right}.cart.table.wrapper .col.price,.cart.table.wrapper .col.qty,.cart.table.wrapper .col.qty .qty,.cart.table.wrapper .col.subtotal{white-space:nowrap;text-align:center}.cart.table.wrapper .product.photo{display:table-cell;padding-right:20px;vertical-align:top;width:1%}.cart.table.wrapper .product.details{display:table-cell;vertical-align:top;width:99%}.cart.table.wrapper .item.options{font-size:12px;margin-top:10px}.cart.table.wrapper .action.continue{background-image:none;background-color:#f2f2f2;padding:0 15px 0 5px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;display:inline-block;text-decoration:none;border-radius:3px;font-weight:700}.cart.table.wrapper .action.continue:hover,.cart.table.wrapper .action.continue:active,.cart.table.wrapper .action.continue:focus{text-decoration:none}.cart.table.wrapper .action.continue:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.cart.table.wrapper .action.continue:hover:before{color:inherit}.cart.table.wrapper .action.continue:active:before{color:inherit}.cart.table.wrapper .action.continue:focus,.cart.table.wrapper .action.continue:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.cart.table.wrapper .action.continue:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.cart.table.wrapper .action.continue.disabled,.cart.table.wrapper .action.continue[disabled],fieldset[disabled] .cart.table.wrapper .action.continue{cursor:default;pointer-events:none;opacity:.5}.cart.table.wrapper .action.continue:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.cart.table.wrapper .action.update{display:inline-block;text-decoration:none;float:right;padding-left:5px}.cart.table.wrapper .action.update:before{font-family:"icons-blank-theme";content:'\e603';font-size:32px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.table.wrapper .action.clear{float:right;margin-right:10px}.block.crosssell{margin-top:70px}.block.crosssell .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.block.crosssell .title strong{font-weight:400}.block.crosssell .item.product{margin:0 0 30px;padding:0 15px 0 0;width:20%}.block.progress.onepage{background:#f5f5f5;margin-bottom:30px;padding:1px 15px 5px}.block.progress.onepage>.title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;margin-bottom:20px}.block.progress.onepage>.title strong{font-weight:400}.block.progress.onepage .content dd.complete{margin:0 0 15px}.block.progress.onepage .content dd.complete .content{margin:0}.block.progress.onepage .content .action,.block.progress.onepage .content .payment.method .title{font-weight:400}.block.progress.onepage .content .data.table{font-size:12px}.opc.wrapper .section.allow>.title{cursor:pointer}.opc.wrapper .step.title{line-height:50px;border-bottom:1px solid #d1d1d1}.opc.wrapper .step.title h2,.opc.wrapper .step.title .number{display:inline-block;font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.opc.wrapper .step.title .number:after{content:"."}.opc.wrapper .step.content{padding:20px 25px 40px;position:relative}.opc.wrapper .step.content .addresses .control{margin:20px 0 30px}.opc.wrapper .step.content .fieldset{margin-bottom:0}.opc.wrapper .step.content .form:after{content:attr(data-hasrequired);display:block;font-size:12px;font-size:1.2rem;color:#e02b27;margin:10px 0 0;letter-spacing:normal;word-spacing:normal}.opc.wrapper .step.content .form:after{text-align:right}.opc.wrapper .step.content .form>.choice{margin-left:25.8%;margin-top:29px}.opc.wrapper .step.content .actions{margin-top:40px}.opc.wrapper .items.methods .content{margin-left:20px}.opc.wrapper .items.methods img{vertical-align:middle}.opc.wrapper .items.methods .field.month{padding-right:10px}.opc.wrapper .items.methods.payment .content{margin-bottom:0}.opc.wrapper .items.methods.payment .content .fieldset{padding:15px 0}.opc.wrapper .items.methods.payment .content .label{font-weight:400}.opc.wrapper .fieldset.gift.message>legend{margin-left:0;padding:0}.opc.wrapper .fieldset.gift.message .field.choice{font-weight:400;margin-left:20px}.opc.wrapper .fieldset.gift.message .field.choice:before{display:none}.opc.wrapper .fieldset.gift.message .block.items{background:#f5f5f5;display:block;padding:20px 30px;margin-bottom:0}.opc.wrapper .fieldset.gift.message .block.items>dt{margin-top:10px;margin-bottom:0}.opc.wrapper .fieldset.gift.message .block.items .block.message{margin-bottom:10px}.opc.wrapper .fieldset.gift.message .block.items .options.individual{margin-left:20px}.opc.wrapper .options.individual{margin-top:10px}.opc.wrapper .options.individual ol>.item{border-bottom:1px solid #d1d1d1;padding-bottom:10px;margin-bottom:20px}.opc.wrapper .options.individual ol>.item .product{margin-bottom:10px}.opc.wrapper .options.individual ol>.item .product:before,.opc.wrapper .options.individual ol>.item .product:after{content:"";display:table}.opc.wrapper .options.individual ol>.item .product:after{clear:both}.opc.wrapper .options.individual ol>.item .product .img{float:left;margin-right:20px}.opc.wrapper .options.individual ol>.item:last-child{border-bottom:0;padding-bottom:0}.opc.wrapper .options.individual .number{font-size:12px}.opc.wrapper .activate.message{display:inline-block;margin:10px 0}.opc.wrapper .data.table>caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.opc.wrapper .data.table tbody tr:first-child td{border-top:1px solid #d1d1d1}.opc.wrapper .data.table .col.price,.opc.wrapper .data.table .col.qty{text-align:center;white-space:nowrap}.opc.wrapper .data.table .col.subtotal{text-align:right;white-space:nowrap}.opc.wrapper .data.table .amount{text-align:right}.opc.wrapper .data.table td{padding:7px 10px}.opc.wrapper .data.table tbody tr:last-child td{border-bottom:1px solid #d1d1d1}.opc.wrapper .action.primary.checkout{margin:0 0 20px}.opc.wrapper .hidden{display:none}.opc.wrapper .step.login.wrapper:before,.opc.wrapper .step.login.wrapper:after{content:"";display:table}.opc.wrapper .step.login.wrapper:after{clear:both}.opc.wrapper .step.login.wrapper .fieldset.guest{margin-top:20px}.opc.wrapper .step.login.wrapper .field.choice{margin-bottom:10px}.opc.wrapper .step.login.wrapper .field.choice:before{display:none}.block.minicart.empty{text-align:center;font-size:12px}.block.minicart .subtotal{border-top:1px solid #e8e8e8;padding-top:10px}.block.minicart .subtotal .amount{font-size:21px}.block.minicart .subtitle{margin-bottom:15px}.block.minicart>.content>.actions{margin-top:10px}.block.minicart>.content>.actions .secondary,.block.minicart>.content>.actions .primary{padding-right:20px;display:inline}.minicart.wrapper{float:right;order:3;display:inline-block;position:relative}.minicart.wrapper:before,.minicart.wrapper:after{content:"";display:table}.minicart.wrapper:after{clear:both}.minicart.wrapper .action.showcart{cursor:pointer;display:inline-block;text-decoration:none}.minicart.wrapper .action.showcart:before{font-family:"icons-blank-theme";content:'\e611';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.minicart.wrapper .action.showcart:hover:before{color:inherit}.minicart.wrapper .action.showcart:active:before{color:inherit}.minicart.wrapper .action.showcart.active{display:inline-block;text-decoration:none}.minicart.wrapper .action.showcart.active:before{font-family:"icons-blank-theme";content:'\e611';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.minicart.wrapper .action.showcart.active:hover:before{color:inherit}.minicart.wrapper .action.showcart.active:active:before{color:inherit}.minicart.wrapper .block.minicart{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.minicart.wrapper .block.minicart li{margin:0}.minicart.wrapper .block.minicart li:hover{cursor:pointer}.minicart.wrapper .block.minicart:before,.minicart.wrapper .block.minicart:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.minicart.wrapper .block.minicart:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.minicart.wrapper .block.minicart:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.minicart.wrapper.active{overflow:visible}.minicart.wrapper.active .block.minicart{display:block}.minicart.wrapper .action.showcart{white-space:nowrap}.minicart.wrapper .action.showcart .text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minicart.wrapper .action.showcart .counter.qty{overflow:hidden;margin:3px 0 0;padding:0 3px;clip:none;display:inline-block;white-space:normal;min-width:20px;max-width:2em;background:#ff5501;text-align:center;color:#fff;line-height:26px;height:26px;border-radius:2px}.minicart.wrapper .action.showcart .counter.qty.empty:before{content:"0"}.minicart.wrapper .block.minicart{right:-15px;width:380px;padding:15px 15px 15px}.minicart.wrapper .block.minicart>.title{display:none}.minicart.wrapper .block.minicart:before,.minicart.wrapper .block.minicart:after{left:auto;right:25px}.minicart.wrapper .block.minicart:before{right:26px}.minicart.wrapper .product.actions{text-align:right}.minicart.wrapper .product.actions .primary,.minicart.wrapper .product.actions .secondary{display:inline}.minicart.wrapper .pricing.details{display:table}.minicart.wrapper .pricing.details .rate,.minicart.wrapper .pricing.details .details.qty{display:table-row}.minicart.wrapper .pricing.details .value,.minicart.wrapper .pricing.details .label{padding-right:10px;display:table-cell}.minicart.wrapper .pricing.details .label:after{content:":"}.minicart.wrapper .action.edit{display:inline-block;text-decoration:none}.minicart.wrapper .action.edit>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minicart.wrapper .action.edit:before{font-family:"icons-blank-theme";content:'\e606';font-size:28px;line-height:28px;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.minicart.wrapper .action.edit:hover:before{color:#303030}.minicart.wrapper .action.edit:active:before{color:#303030}.minicart.wrapper .action.close{position:absolute;right:14px;top:6px;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.minicart.wrapper .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:33px;line-height:33px;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.minicart.wrapper .action.close:focus,.minicart.wrapper .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.minicart.wrapper .action.close:hover{background:0;border:0}.minicart.wrapper .action.close.disabled,.minicart.wrapper .action.close[disabled],fieldset[disabled] .minicart.wrapper .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.minicart.wrapper .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minilist{margin:0;padding:0;list-style-type:none;list-style-image:none}.minilist .item{border-top:1px solid #e8e8e8;padding:15px 0;z-index:1}.minilist .item>.product{display:flex}.minilist .item>.product:before,.minilist .item>.product:after{content:"";display:table}.minilist .item>.product:after{clear:both}.minilist .product.photo{margin-right:10px}.minilist .product.details{flex-grow:1}.minilist .action.delete{display:inline-block;text-decoration:none}.minilist .action.delete>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.minilist .action.delete:before{font-family:"icons-blank-theme";content:'\e604';font-size:28px;line-height:28px;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.minilist .action.delete:hover:before{color:#303030}.minilist .action.delete:active:before{color:#303030}.login.container:before,.login.container:after{content:"";display:table}.login.container:after{clear:both}.login.container .block.login .actions.toolbar .primary{margin-right:30px}.login.container .block.login .actions.toolbar .secondary{float:left}.login.container .block.new .actions.toolbar{margin-top:25px}.login.container .block .title{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid #e8e8e8}.login.container .block .title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.login.container .fieldset:after{content:attr(data-hasrequired);display:block;font-size:12px;font-size:1.2rem;color:#e02b27;margin:10px 0 0;letter-spacing:normal;word-spacing:normal}.login.container .fieldset:after{margin:35px 0 0 25.8%}.login.container .fieldset>.field>.control{width:55%}.form.password.reset,.form.send.confirmation,.form.password.forget,.form.create.account{width:50%}.block.addresses.list ol.items.addresses:before,.block.addresses.list ol.items.addresses:after{content:"";display:table}.block.addresses.list ol.items.addresses:after{clear:both}.block.addresses.list ol.items.addresses li.item{margin-bottom:20px}.block.addresses.list ol.items.addresses li.item:nth-last-child(1),.block.addresses.list ol.items.addresses li.item:nth-last-child(2){margin-bottom:0}.downloadable.samples{margin-bottom:20px}.downloadable.samples dd{margin:0 0 10px}.field.downloads{margin:0 0 20px;border:0}.field.downloads:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.field.downloads.choice:before,.field.downloads.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.field.downloads>.control{float:none;width:auto}.field.downloads>.label{font-size:14px;font-size:1.4rem;font-weight:700}.field.downloads>.label+br{display:none}.field.downloads.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.field.downloads .nested .field{margin:5px 0}.field.downloads.choice>.label{display:inline}.field.downloads.choice>input{vertical-align:top}.field.downloads .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.field.downloads .fields.group>*{letter-spacing:normal;word-spacing:normal}.field.downloads .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.field.downloads .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.field.downloads .fields.group .field .control{float:none;width:auto}.field.downloads .fields.group.group-2 .field{width:50%!important;display:inline-block}.field.downloads .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.field.downloads .fields.group.group-4 .field{width:25%!important;display:inline-block}.field.downloads .fields.group.group-5 .field{width:20%!important;display:inline-block}.field.downloads .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.field.downloads .addon textarea,.field.downloads .addon select,.field.downloads .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.field.downloads .addon .addbefore,.field.downloads .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.field.downloads .addon .addbefore:disabled,.field.downloads .addon .addafter:disabled{opacity:.5}.field.downloads .addon .addbefore{float:left;order:1}.field.downloads .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.field.downloads .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.product.add.form .giftcard.form .field{margin:0 0 20px;border:0}.product.add.form .giftcard.form .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.product.add.form .giftcard.form .field.choice:before,.product.add.form .giftcard.form .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.product.add.form .giftcard.form .field>.control{float:none;width:auto}.product.add.form .giftcard.form .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.product.add.form .giftcard.form .field>.label+br{display:none}.product.add.form .giftcard.form .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.product.add.form .giftcard.form .field .nested .field{margin:5px 0}.product.add.form .giftcard.form .field.choice>.label{display:inline}.product.add.form .giftcard.form .field.choice>input{vertical-align:top}.product.add.form .giftcard.form .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.product.add.form .giftcard.form .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.product.add.form .giftcard.form .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.product.add.form .giftcard.form .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.product.add.form .giftcard.form .field .fields.group .field .control{float:none;width:auto}.product.add.form .giftcard.form .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.product.add.form .giftcard.form .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.product.add.form .giftcard.form .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.product.add.form .giftcard.form .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.product.add.form .giftcard.form .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.product.add.form .giftcard.form .field .addon textarea,.product.add.form .giftcard.form .field .addon select,.product.add.form .giftcard.form .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.product.add.form .giftcard.form .field .addon .addbefore,.product.add.form .giftcard.form .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.product.add.form .giftcard.form .field .addon .addbefore:disabled,.product.add.form .giftcard.form .field .addon .addafter:disabled{opacity:.5}.product.add.form .giftcard.form .field .addon .addbefore{float:left;order:1}.product.add.form .giftcard.form .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.product.add.form .giftcard.form .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.cart.summary .block.giftcard .fieldset{padding-bottom:52px;position:relative}.cart.summary .block.giftcard .action.check{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem;margin-top:12px;bottom:0;left:0;position:absolute}.cart.summary .block.giftcard .field>.label{display:block;float:none;text-align:left;width:auto}.cart.summary .giftcard .field{display:table-cell;position:relative;vertical-align:bottom;width:99%;z-index:1}.cart.summary .giftcard .field div.mage-error{position:absolute}.cart.summary .giftcard .actions{display:table-cell;width:1%;white-space:nowrap;vertical-align:bottom}.cart.summary .action.add{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}.form.giftcard.redeem .giftcard.ballance{margin-bottom:30px}.form.giftregistry.validation .fieldset.recipients .field .control{width:50%}.form.giftregistry.validation .fieldset.add-row{margin-top:45px;position:relative}.form.giftregistry.validation .fieldset.add-row .action.remove{line-height:normal;position:absolute;top:4px;margin-left:75.8%}.form.giftregistry.edit .actions.toolbar:not(:last-child){margin-bottom:40px}.table.data.grouped>thead>tr>th,.table.data.grouped>tbody>tr>th,.table.data.grouped>tfoot>tr>th,.table.data.grouped>thead>tr>td,.table.data.grouped>tbody>tr>td,.table.data.grouped>tfoot>tr>td{border-top:1px solid #d1d1d1}.table.data.grouped>caption+thead>tr:first-child>th,.table.data.grouped>colgroup+thead>tr:first-child>th,.table.data.grouped>thead:first-child>tr:first-child>th,.table.data.grouped>caption+thead>tr:first-child>td,.table.data.grouped>colgroup+thead>tr:first-child>td,.table.data.grouped>thead:first-child>tr:first-child>td{border-top:0}.table.data.grouped>tbody+tbody{border-top:1px solid #919191}.table.data.grouped td{vertical-align:middle}.table.data.grouped .product.name{font-weight:400}.table.data.grouped .price-box .price{font-weight:400;font-size:14px}.table.data.grouped .col.qty .stock.unavailable{margin:0;white-space:nowrap}.wishlist.split.button,.cart.table.wrapper .cart.items .split.button{display:inline-block;position:relative;vertical-align:top}.wishlist.split.button:before,.wishlist.split.button:after,.cart.table.wrapper .cart.items .split.button:before,.cart.table.wrapper .cart.items .split.button:after{content:"";display:table}.wishlist.split.button:after,.cart.table.wrapper .cart.items .split.button:after{clear:both}.wishlist.split.button .action.split,.cart.table.wrapper .cart.items .split.button .action.split{float:left;margin:0}.wishlist.split.button .action.toggle,.cart.table.wrapper .cart.items .split.button .action.toggle{float:right;margin:0}.wishlist.split.button button.action.split,.wishlist.split.button .cart.table.wrapper .cart.items .action.action.split,.cart.table.wrapper .cart.items .split.button button.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.wishlist.split.button button+.action.toggle,.wishlist.split.button .cart.table.wrapper .cart.items .action+.action.toggle,.cart.table.wrapper .cart.items .split.button button+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.wishlist.split.button .action.split,.cart.table.wrapper .cart.items .split.button .action.split{padding:0 5px}.wishlist.split.button .action.toggle,.cart.table.wrapper .cart.items .split.button .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.wishlist.split.button .action.toggle>span,.cart.table.wrapper .cart.items .split.button .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.wishlist.split.button .action.toggle:after,.cart.table.wrapper .cart.items .split.button .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.wishlist.split.button .action.toggle:hover:after,.cart.table.wrapper .cart.items .split.button .action.toggle:hover:after{color:inherit}.wishlist.split.button .action.toggle:active:after,.cart.table.wrapper .cart.items .split.button .action.toggle:active:after{color:inherit}.wishlist.split.button .action.toggle.active,.cart.table.wrapper .cart.items .split.button .action.toggle.active{display:inline-block;text-decoration:none}.wishlist.split.button .action.toggle.active>span,.cart.table.wrapper .cart.items .split.button .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.wishlist.split.button .action.toggle.active:after,.cart.table.wrapper .cart.items .split.button .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.wishlist.split.button .action.toggle.active:hover:after,.cart.table.wrapper .cart.items .split.button .action.toggle.active:hover:after{color:inherit}.wishlist.split.button .action.toggle.active:active:after,.cart.table.wrapper .cart.items .split.button .action.toggle.active:active:after{color:inherit}.wishlist.split.button .items,.cart.table.wrapper .cart.items .split.button .items{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.wishlist.split.button .items li,.cart.table.wrapper .cart.items .split.button .items li{margin:0;padding:3px 5px}.wishlist.split.button .items li:hover,.cart.table.wrapper .cart.items .split.button .items li:hover{background-color:#e8e8e8;cursor:pointer}.wishlist.split.button .items:before,.wishlist.split.button .items:after,.cart.table.wrapper .cart.items .split.button .items:before,.cart.table.wrapper .cart.items .split.button .items:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.wishlist.split.button .items:before,.cart.table.wrapper .cart.items .split.button .items:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.wishlist.split.button .items:after,.cart.table.wrapper .cart.items .split.button .items:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.wishlist.split.button.active,.cart.table.wrapper .cart.items .split.button.active{overflow:visible}.wishlist.split.button.active .items,.cart.table.wrapper .cart.items .split.button.active .items{display:block}.wishlist.split.button .items,.cart.table.wrapper .cart.items .split.button .items{top:100%;left:100%;margin-left:-36px}.product.info.main .wishlist.split.button .split,.product.info.main .wishlist.split.button .toggle,.product.info.main .cart.table.wrapper .cart.items .split.button .split,.product.info.main .cart.table.wrapper .cart.items .split.button .toggle{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.wishlist.window.popup{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.wishlist.window.popup .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.wishlist.window.popup .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.wishlist.window.popup .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.wishlist.window.popup .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.wishlist.window.popup .popup.actions .action.close:hover:before{color:inherit}.wishlist.window.popup .popup.actions .action.close:active:before{color:inherit}.wishlist.window.popup .popup.actions .action.close:focus,.wishlist.window.popup .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.wishlist.window.popup .popup.actions .action.close:hover{background:0;border:0}.wishlist.window.popup .popup.actions .action.close.disabled,.wishlist.window.popup .popup.actions .action.close[disabled],fieldset[disabled] .wishlist.window.popup .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.wishlist.window.popup.active{opacity:1}.wishlist.window.popup.active{display:block}.wishlist.window.popup .field{margin:0 0 20px;border:0}.wishlist.window.popup .field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.wishlist.window.popup .field.choice:before,.wishlist.window.popup .field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.wishlist.window.popup .field>.control{float:none;width:auto}.wishlist.window.popup .field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.wishlist.window.popup .field>.label+br{display:none}.wishlist.window.popup .field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.wishlist.window.popup .field .nested .field{margin:5px 0}.wishlist.window.popup .field.choice>.label{display:inline}.wishlist.window.popup .field.choice>input{vertical-align:top}.wishlist.window.popup .field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.wishlist.window.popup .field .fields.group>*{letter-spacing:normal;word-spacing:normal}.wishlist.window.popup .field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.wishlist.window.popup .field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.wishlist.window.popup .field .fields.group .field .control{float:none;width:auto}.wishlist.window.popup .field .fields.group.group-2 .field{width:50%!important;display:inline-block}.wishlist.window.popup .field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.wishlist.window.popup .field .fields.group.group-4 .field{width:25%!important;display:inline-block}.wishlist.window.popup .field .fields.group.group-5 .field{width:20%!important;display:inline-block}.wishlist.window.popup .field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.wishlist.window.popup .field .addon textarea,.wishlist.window.popup .field .addon select,.wishlist.window.popup .field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.wishlist.window.popup .field .addon .addbefore,.wishlist.window.popup .field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.wishlist.window.popup .field .addon .addbefore:disabled,.wishlist.window.popup .field .addon .addafter:disabled{opacity:.5}.wishlist.window.popup .field .addon .addbefore{float:left;order:1}.wishlist.window.popup .field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.wishlist.window.popup .field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.wishlist.overlay{-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;transition:opacity .15s linear;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background-color:#000;opacity:0}.wishlist.overlay.active{opacity:.5;filter:alpha(opacity=50)}.cart.table.wrapper .cart.items .split.button .items{text-align:left}.cart.table.wrapper .cart.items .split.button .action.new{background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.cart.table.wrapper .cart.items .split.button .action.new:focus,.cart.table.wrapper .cart.items .split.button .action.new:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.cart.table.wrapper .cart.items .split.button .action.new:hover{background:0;border:0}.cart.table.wrapper .cart.items .split.button .action.new.disabled,.cart.table.wrapper .cart.items .split.button .action.new[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .split.button .action.new{cursor:not-allowed;pointer-events:none;opacity:.5}.form.wishlist.items .message.notice.msg-private{margin-bottom:20px}.block.wishlist.management .action.add.wishlist{float:right;margin-top:-8px}.block.wishlist.management .title .counter.qty{font-size:14px;margin-left:15px}.block.wishlist.management .content .subtitle{float:left}.block.wishlist.management .content .toolbar.wishlist{float:right;margin-top:5px}.block.newsletter{position:relative;z-index:1}.block.newsletter .fieldset{margin:0;padding:0;display:inline-block;vertical-align:top}.block.newsletter .control{display:inline-block;text-decoration:none;width:250px}.block.newsletter .control:before{font-family:"icons-blank-theme";content:'\e61d';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.newsletter .control:before{position:absolute}.block.newsletter input{padding-left:35px}.block.newsletter .title{display:none}.block.newsletter .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.newsletter .actions{display:inline-block;vertical-align:top}.block.add.review>.title{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.block.add.review fieldset{border:0;margin:0;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.block.add.review fieldset>*{letter-spacing:normal;word-spacing:normal}.block.add.review fieldset>.legend{margin:0 0 10px;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.block.add.review fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.block.add.review .legend{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.block.add.review .field.rating{display:table-row}.block.add.review .field.rating .label{display:table-cell;vertical-align:middle;padding:5px 0}.block.add.review .field.rating .control{display:table-cell;vertical-align:top}.block.add.review .form.actions{margin-left:25.8%}.block.reviews.list>.title{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}.block.reviews.list .review.item{margin-bottom:40px}.block.reviews.list .review.title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.data.table.reviews .rating.summary{margin-top:-4px}.customer.review.view .review.title,.customer.review.view .ratings.summary.items,.customer.review.view .product.details{margin-bottom:20px}.product.reviews.summary{display:table;margin-left:-5px}.product.reviews.summary.empty{margin-left:0}.product.reviews.summary .rating.summary{display:table-cell;vertical-align:middle}.product.reviews.summary .reviews.actions{display:table-cell;vertical-align:middle;line-height:40px;font-size:11px}.product.reviews.summary .reviews.actions a{margin-right:5px}.order.details:before,.order.details:after{content:"";display:table}.order.details:after{clear:both}.order.details ul.items{clear:both;margin-bottom:20px}.order.details ul.items:before,.order.details ul.items:after{content:"";display:table}.order.details ul.items:after{clear:both}.order.details ul.items .item{float:left;margin-left:15px}.order.details ul.items .item:first-child{margin-left:0}.order.details .order.status{display:inline-block;font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem;margin-top:0}.order.details .order.date{margin-bottom:20px}.order.details .order.toolbar{float:right}.order.details .order.toolbar .action{margin-left:15px}.order.details .order.toolbar .action:first-child{margin-left:0}.order.details .order.subtitle.caption,.order.details .order.title{margin-bottom:20px}.order.details .order.subtitle.caption strong,.order.details .order.title strong{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.order.details .order.subtitle.caption .action,.order.details .order.title .action{margin-left:15px}.form.send.friend .actions.toolbar{margin-top:10px}.form.send.friend .recipients .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem;margin-left:25.8%}.form.send.friend .recipients .message{margin-left:25.8%}.action.mailto.friend{display:inline-block;text-decoration:none}.action.mailto.friend:before{font-family:"icons-blank-theme";content:'\e61d';font-size:28px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.page.header{background-color:none}.page.header .panel.wrapper{border-bottom:1px solid #e8e8e8}.page.header .header.panel{display:flex;flex-direction:row;justify-content:flex-start;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.page.header .header.panel:after{content:"";display:table;clear:both}.header.links{float:right;margin:0;padding:0;list-style-type:none;list-style-image:none;margin-left:auto}.header.links>li{display:inline-block;vertical-align:top}.header.links li{margin:0 0 0 15px}.header.content{padding-top:30px;display:flex;flex-direction:row;justify-content:flex-end;flex-wrap:wrap}.header.content:after{content:"";display:table;clear:both}.logo{float:left;margin:-15px auto 25px 0}.action.skip{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.switcher{float:left;margin-right:15px}.switcher .options{display:inline-block;position:relative}.switcher .options:before,.switcher .options:after{content:"";display:table}.switcher .options:after{clear:both}.switcher .options .action.switch{padding:0;cursor:pointer;display:inline-block;text-decoration:none}.switcher .options .action.switch>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.switcher .options .action.switch:after{font-family:"icons-blank-theme";content:'\e622';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.switcher .options .action.switch:hover:after{color:inherit}.switcher .options .action.switch:active:after{color:inherit}.switcher .options .action.switch.active{display:inline-block;text-decoration:none}.switcher .options .action.switch.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.switcher .options .action.switch.active:after{font-family:"icons-blank-theme";content:'\e621';font-size:22px;line-height:22px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.switcher .options .action.switch.active:hover:after{color:inherit}.switcher .options .action.switch.active:active:after{color:inherit}.switcher .options ul{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.switcher .options ul li{margin:0;padding:8px}.switcher .options ul li:hover{background-color:#e8e8e8;cursor:pointer}.switcher .options ul:before,.switcher .options ul:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.switcher .options ul:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.switcher .options ul:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.switcher .options.active{overflow:visible}.switcher .options.active ul{display:block}.switcher li{margin:0;font-size:12px}.switcher strong{font-weight:400}.switcher .action.switch{background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.switcher .action.switch:focus,.switcher .action.switch:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.switcher .action.switch:hover{background:0;border:0}.switcher .action.switch.disabled,.switcher .action.switch[disabled],fieldset[disabled] .switcher .action.switch{cursor:not-allowed;pointer-events:none;opacity:.5}.switcher .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.message.global>.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.message.global p{margin:0}.message.global.noscript,.message.global.cookie{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#ffee9c;border-color:#d6ca8e;color:#333;margin:0}.message.global.noscript a,.message.global.cookie a{color:#1979c3}.message.global.noscript a:hover,.message.global.cookie a:hover{color:#006bb4}.message.global.noscript a:active,.message.global.cookie a:active{color:#ff5501}.message.global.cookie{position:fixed;bottom:0;left:0;right:0;z-index:3}.message.global.cookie .actions{margin-top:10px}.message.global.cookie .action.allow{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.message.global.cookie .action.allow:focus,.message.global.cookie .action.allow:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.message.global.cookie .action.allow:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.message.global.cookie .action.allow.disabled,.message.global.cookie .action.allow[disabled],fieldset[disabled] .message.global.cookie .action.allow{cursor:default;pointer-events:none;opacity:.5}.message.global.demo{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#ff0101;border-color:none;color:#fff;text-align:center}.message.global.demo a{color:#1979c3}.message.global.demo a:hover{color:#006bb4}.message.global.demo a:active{color:#ff5501}body{background-color:#fff}.footer.page{margin-top:25px;background-color:none}.footer.content{padding-top:25px;padding-bottom:25px;border-top:1px solid #d1d1d1}.footer.content ul{margin:0;padding:0 50px 0 0;list-style-type:none;list-style-image:none}.footer.content .links{display:inline-block;vertical-align:top}.footer.content .block{float:right}.footer .copyright:before{clear:both;margin-bottom:25px;content:"";display:block}.product.info.main .action.towishlist{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.column.sidebar .widget.block.addbysku .field{display:inline-block;vertical-align:top}.column.sidebar .widget.block.addbysku .fieldset{margin-bottom:0}.column.sidebar .widget.block.addbysku .fields{position:relative;margin-right:30px}.column.sidebar .widget.block.addbysku .field.sku{width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;padding-right:54px;margin-right:-54px}.column.sidebar .widget.block.addbysku .field.qty{width:50px}.column.sidebar .widget.block.addbysku .action.remove{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;display:inline-block;background:0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;position:absolute;right:-27px;top:23px}.column.sidebar .widget.block.addbysku .action.remove>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.column.sidebar .widget.block.addbysku .action.remove:before{font-family:"icons-blank-theme";content:'\e616';font-size:26px;line-height:inherit;color:#303030;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.column.sidebar .widget.block.addbysku .action.remove:hover:before{color:#303030}.column.sidebar .widget.block.addbysku .action.remove:active:before{color:#303030}.column.sidebar .widget.block.addbysku .action.remove:focus,.column.sidebar .widget.block.addbysku .action.remove:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.column.sidebar .widget.block.addbysku .action.remove:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.column.sidebar .widget.block.addbysku .action.remove.disabled,.column.sidebar .widget.block.addbysku .action.remove[disabled],fieldset[disabled] .column.sidebar .widget.block.addbysku .action.remove{cursor:default;pointer-events:none;opacity:.5}.column.sidebar .widget.block.addbysku .action.remove:visited{color:#800080;text-decoration:none}.column.sidebar .widget.block.addbysku .action.remove:hover{color:#006bb4;text-decoration:underline}.column.sidebar .widget.block.addbysku .action.remove:active{color:#ff5501;text-decoration:underline}.column.sidebar .widget.block.addbysku .action.remove:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.column.sidebar .widget.block.addbysku .action.remove:hover,.column.sidebar .widget.block.addbysku .action.remove:active,.column.sidebar .widget.block.addbysku .action.remove:focus{background:0;border:0;outline:0}.column.sidebar .widget.block.addbysku .action.remove.disabled,.column.sidebar .widget.block.addbysku .action.remove[disabled],fieldset[disabled] .column.sidebar .widget.block.addbysku .action.remove{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.column.sidebar .widget.block.addbysku .action.remove:hover,.column.sidebar .widget.block.addbysku .action.remove:active,.column.sidebar .widget.block.addbysku .action.remove:focus{box-shadow:none;text-decoration:none}.column.sidebar .widget.block.addbysku .actions.toolbar{position:relative;padding-top:50px;margin-left:0}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;display:inline-block;text-decoration:none;position:absolute;top:0;left:0;padding:0 3px}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:before{font-family:"icons-blank-theme";content:'\e61c';font-size:31px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:hover:before{color:inherit}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:active:before{color:inherit}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:focus,.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.column.sidebar .widget.block.addbysku .actions.toolbar .action.add.disabled,.column.sidebar .widget.block.addbysku .actions.toolbar .action.add[disabled],fieldset[disabled] .column.sidebar .widget.block.addbysku .actions.toolbar .action.add{cursor:default;pointer-events:none;opacity:.5}.block.widget.new .pager{margin:0 0 40px;padding:10px;background:#f0f0f0}.block.widget.new .pager .pages{text-align:center}.block.widget.new .pager .amount{float:right;margin:7px 0 0}.widget.widget-cms-link{display:block}.widget.widget-cms-hierarchy-link{display:block}@media only screen and (max-width: 768px){._rwd_columns,.columns,.columns{ flex-direction:column!important}._rwd_column,.layout-1 .column.main,.layout-3 .column.main,.layout-2-left .column.main,.layout-2-right .column.main,.layout-3 .column.left,.layout-2-left .column.left,.layout-2-right .column.left,.layout-3 .column.right,.layout-2-left .column.right,.layout-2-right .column.right,.layout-1 .column.main,.layout-3 .column.main,.layout-2-left .column.main,.layout-2-right .column.main,.layout-3 .column.left,.layout-2-left .column.left,.layout-2-right .column.left,.layout-3 .column.right,.layout-2-left .column.right,.layout-2-right .column.right,.layout-example-3 .column.main,.layout-example-3 .column.left,.layout-example-3 .column.right,.layout-example-3-1 .column.main,.layout-example-3-1 .column.left,.layout-example-3-1 .column.right{order:0!important;width:100%!important}._rwd_width,.navigation>ul,.breadcrumbs,.page.header .header.panel,.header.content,.footer.content,.page.main,.page.wrapper>.widget,.page.wrapper>.page.bottom,.block.category.event,.breadcrumbs,.message.global>.content,.example-breadcrumbs-1,.example-breadcrumbs-1,header.header,footer.footer,.page.main{min-width:0!important;max-width:auto!important}._rwd_floats{float:none!important}._rwd_margins,.actions.toolbar,.actions.toolbar .primary .action,.actions.toolbar .secondary .action,.login.container .fieldset:after{margin-left:0!important;margin-right:0!important}._rwd_width_float,.account .column.main .block .content .box,.fieldset>.field>.label,.fieldset .fields>.field>.label,.fieldset>.field>.control,.fieldset .fields>.field>.control,.fieldset>.field.choice:before,.fieldset .fields>.field.choice:before,.bundle.options.container .product.add.form .product.options.wrapper,.bundle.options.container .product.add.form .product.options.bottom,.bundle.options.container .product.add.form .block.bundle.summary,.column.main .product.info.main,.column.main .product.media,.column.main .box.tocart,.products.wrapper.list .item.product .price-box,.cart.summary,.cart.table.wrapper,.form.password.forget,.form.create.account{width:100%!important;float:none!important}._rwd_width_float_margins,.fieldset>.legend,.actions.toolbar .primary,.actions.toolbar .secondary,.login.container .block.customer{width:100%!important;float:none!important;margin-left:0!important;margin-right:0!important}.page.main>.page.title{margin-bottom:30px}.page.main>.page.title .title+.action{margin-top:0}.account .column.main{margin-bottom:30px}.account .column.main .block .content .box{margin-bottom:20px}.account .column.main .block .content .box:last-child{margin-bottom:0}.account .column.sidebar{margin-right:0}.button-responsive,.page.main>.page.title .title+.action,.actions.toolbar .primary .action,.actions.toolbar .secondary .action,.column.main .action.primary.tocart,.products.wrapper.list .item.product .product.actions .action.tocart{float:none;width:100%}h1{font-size:26px}.wrapper.table{width:100%;margin-bottom:20px;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.wrapper.table>table{margin-bottom:0}.wrapper.table>table>thead>tr>th,.wrapper.table>table>tbody>tr>th,.wrapper.table>table>tfoot>tr>th,.wrapper.table>table>thead>tr>td,.wrapper.table>table>tbody>tr>td,.wrapper.table>table>tfoot>tr>td{white-space:nowrap}.navigation{background:#f5f5f5;display:block;height:100%;left:-86%;overflow:auto;position:absolute;width:86%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}.navigation ul{margin:0;padding:0}.navigation .nav{-webkit-transition:left .3s linear 0;-moz-transition:left .3s linear 0;transition:left .3s linear 0;position:relative;overflow:hidden}.navigation .nav>.level0{font-size:16px;font-size:1.6rem;border-top:1px solid #d1d1d1;display:block;margin:0}.navigation .nav>.level0>a{display:block;line-height:inherit;padding:10px 35px 10px 16px}.navigation .nav>.level0.parent{display:block}.navigation .nav>.level0.parent:before{display:none}.navigation .nav>.level0.parent:after{opacity:1;height:auto}.navigation .nav>.level0.parent>a{display:block}.navigation .nav>.level0.parent>a:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .nav>.level0.parent>a.action.back:after{content:'\e617'}.navigation .nav>.level0.parent>a.action.back:after{content:'\e617'}.navigation .nav>.level0.parent .submenu{display:none;position:relative;width:100%;overflow-x:hidden;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0;font-weight:400}.navigation .nav>.level0.parent .submenu.opened{display:block}.navigation .nav>.level0.parent .submenu>ul{display:block;padding-top:0;padding-bottom:0}.navigation .nav>.level0.parent .submenu>ul li{margin:0}.navigation .nav>.level0.parent .submenu>ul a:hover>span{background:0}.navigation .nav>.level0.parent .submenu ul{background:#f5f5f5;box-shadow:none}.navigation .nav>.level0.parent .submenu:before,.navigation .nav>.level0.parent .submenu:after{display:none}.navigation .nav>.level0>a{display:block;line-height:inherit;padding:10px 35px 10px 16px}.navigation .nav .parent:after{display:none}.navigation .nav .parent>a{position:relative}.navigation .nav .parent>a:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .nav .parent>a.action.back:after{content:'\e617'}.navigation .nav .parent>a.action.back:after{content:'\e617'}.navigation .nav .parent .submenu{display:none;position:relative;width:100%;overflow-x:hidden;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}.navigation .nav .parent .submenu.opened{display:block}.navigation .nav .parent .submenu>ul{display:block;padding-top:0;padding-bottom:0}.navigation .nav .parent .submenu>ul li{margin:0}.navigation .nav .parent .submenu>ul a:hover>span{background:0}.navigation .submenu{background:0;display:none;position:relative;width:100%;overflow-x:hidden;-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}.navigation .submenu.opened{display:block}.navigation .submenu>ul{display:block;padding-top:0;padding-bottom:0}.navigation .submenu>ul li{margin:0}.navigation .submenu>ul a:hover>span{background:0}.navigation .settings.panel>.title{font-weight:600;position:relative;padding:10px 20px;cursor:pointer;font-size:18px}.navigation .settings.panel>.title:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .settings.panel>.title.action.back:after{content:'\e617'}.navigation .settings.panel>.content{display:none;margin:0;padding:10px 20px}.navigation .settings.panel>.content .switcher{margin:0;padding:0;display:block}.navigation .settings.panel>.content .switcher:first-child{padding-bottom:0}.navigation .settings.panel>.content .switcher .label{display:block;font-weight:400;font-size:16px;font-size:1.6rem;padding:8px 0;position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.navigation .settings.panel>.content .switcher .options{display:block}.navigation .settings.panel>.content .switcher .options strong{display:block;position:relative;padding:8px 20px;cursor:pointer}.navigation .settings.panel>.content .switcher .options strong:after{color:inherit;content:'\e622';display:block;font-family:'icons-blank-theme';font-size:34px;font-weight:400;border:0;top:0;right:5px;left:auto;height:34px;overflow:hidden;opacity:1;position:absolute;width:auto}.navigation .settings.panel>.content .switcher .options strong.action.back:after{content:'\e617'}.navigation .settings.panel>.content .switcher .options button,.navigation .settings.panel>.content .switcher .options .cart.table.wrapper .cart.items .action{display:none}.navigation .settings.panel>.content .switcher .options ul{display:none;position:relative;margin:0;border:0;background:0}.navigation .settings.panel>.content .switcher .options ul li{font-size:14px;font-size:1.4rem;padding:0}.navigation .settings.panel>.content .switcher .options ul li a{display:block;color:#333;padding:8px 20px;text-decoration:none}.navigation .settings.panel>.content .switcher .options ul li a:hover{color:#333;text-decoration:none}.navigation .settings.panel>.content .switcher .options ul li:hover{background:0}.navigation .settings.panel>.content .switcher .options ul:before,.navigation .settings.panel>.content .switcher .options ul:after{display:none}.navigation .settings.panel>.content .switcher .options.active ul{box-shadow:none;display:block;margin:0}.navigation .settings.panel>.content .header.links li{display:block;margin:0}.navigation .settings.panel>.content .header.links li>a{display:block;font-size:16px;font-size:1.6rem;padding:8px 0}.navigation .settings.panel.active>.content{display:block}.nav>.parent>.submenu>.level0>li>a{font-weight:700}.header.links{padding:10px 20px}.header.links li{display:block;margin:0}.header.links li a{display:block;line-height:35px;color:#575757}.header.links li a:hover{color:#333;text-decoration:none}.header.links li.welcome{line-height:35px}.actions.toolbar .primary,.actions.toolbar .secondary{text-align:center;margin-bottom:10px}.actions.toolbar .primary .action,.actions.toolbar .secondary .action{margin-bottom:10px}.actions.toolbar .primary .action:last-child,.actions.toolbar .secondary .action:last-child{margin-bottom:0}.actions.toolbar .primary:last-child,.actions.toolbar .secondary:last-child{margin-bottom:0}.column.main .widget.block.addbysku .fields{margin-top:25px}.column.main .widget.block.addbysku .fields .action.remove{margin-left:0;right:0;top:-25px}.column.main .widget.block.addbysku .fields .action.remove+.field{clear:both}.bundle.options.container .product.add.form .block.bundle.summary{position:static}.column.main .wrapper.grid .products.list .item.product{width:50%}.products.list.items .actions>.secondary{display:none}.products.list.items .actions>.primary{display:block;float:none}.products.toolbar{display:block}.products.toolbar .settings,.products.toolbar .pages,.products.toolbar .pager{display:block;text-align:center;margin:0 0 10px}.products.toolbar .modes,.products.toolbar .sorter{display:inline-block;margin-bottom:10px}.products.toolbar .limiter .text{display:none}.products.wrapper.list .item.product{display:block;margin-bottom:30px}.products.wrapper.list .item.product .product{display:block}.products.wrapper.list .item.product .product.photo{display:block;width:auto}.products.wrapper.list .item.product .product.details{display:block;width:auto;text-align:center}.block.search{float:none;margin:0;padding:0;position:relative;width:100%;z-index:4}.block.search .action.search{display:none}.block.search .control{border-top:1px solid #d1d1d1;clear:both;margin:0 -90px -1px -20px;padding:0 20px}.block.search .label{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;text-decoration:none;display:inline-block;float:right}.block.search .label>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.block.search .label:before{font-family:"icons-blank-theme";content:'\e615';font-size:35px;line-height:33px;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.block.search .label:active,.block.search .label:focus{outline:0!important}.block.search .nested{left:-300%}.block.search input:focus{position:static;margin:15px 0}.block.search input{left:-300%;position:absolute}.minicart.wrapper{position:absolute;right:10px}.cart.summary,.cart.table.wrapper{position:relative}.cart.summary thead .col.price,.cart.table.wrapper thead .col.price,.cart.summary thead .col.subtotal,.cart.table.wrapper thead .col.subtotal{display:none}.cart.summary .col.price,.cart.table.wrapper .col.price,.cart.summary .col.subtotal,.cart.table.wrapper .col.subtotal{display:block;padding-top:3px;padding-bottom:1px;text-align:left}.cart.summary .col.price:before,.cart.table.wrapper .col.price:before,.cart.summary .col.subtotal:before,.cart.table.wrapper .col.subtotal:before{content:attr(data-th) ":";color:#7d7d7d;display:inline-block;font-size:12px;padding-left:5px}.cart.summary .col.qty,.cart.table.wrapper .col.qty{right:0;position:absolute;width:45px}.cart.summary .cart.items>.item.cart,.cart.table.wrapper .cart.items>.item.cart{display:block;position:relative}.cart.summary .item .col.item,.cart.table.wrapper .item .col.item{display:block;padding:25px 70px 10px 75px;position:relative;min-height:75px}.cart.summary .item .col.qty,.cart.table.wrapper .item .col.qty{top:0}.cart.summary .item.actions td,.cart.table.wrapper .item.actions td{padding-top:20px}.cart.summary .product.photo,.cart.table.wrapper .product.photo{display:block;max-width:60px;left:0;padding:0;position:absolute;top:15px;width:100%}.cart.summary .product.photo .container,.cart.table.wrapper .product.photo .container,.cart.summary .product.photo .container .image,.cart.table.wrapper .product.photo .container .image{max-width:100%;bottom:inherit!important}.cart.summary .actions.main,.cart.table.wrapper .actions.main{text-align:center}.cart.summary .action.update,.cart.table.wrapper .action.update,.cart.summary .action.continue,.cart.table.wrapper .action.continue,.cart.summary .action.clear,.cart.table.wrapper .action.clear{float:none;margin:0 auto 10px}.cart.summary .action.update,.cart.table.wrapper .action.update{display:block}.login.container .fieldset:after{text-align:center}.form.giftregistry.validation .fieldset.add-row .action.remove{float:right;position:static;margin-left:0}.form.giftregistry.validation .fieldset.add-row .action.remove+.field{clear:both}.footer.content .block.newsletter{float:none}.footer.content .block.newsletter .subscribe.form{display:flex}.footer.content .block.newsletter .fieldset,.footer.content .block.newsletter .control{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;width:90%}.footer.content .block.newsletter .actions{padding-left:10px;display:block;vertical-align:top}html.opened{overflow:hidden}body{width:100%;height:100%}body.opened{-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;height:100%;width:100%;overflow:hidden}body.opened .navigation{left:0;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.5);box-shadow:1px 1px 3px rgba(0,0,0,.5);-webkit-transition:left .3s ease-out 0;-moz-transition:left .3s ease-out 0;transition:left .3s ease-out 0}body.opened .page.wrapper{margin-right:-86%;cursor:pointer}.page.wrapper{position:relative;width:100%;float:right;margin:0;-webkit-transition:margin .3s ease-out 0;-moz-transition:margin .3s ease-out 0;transition:margin .3s ease-out 0}.logo{position:relative;z-index:5;float:left;max-width:50%;margin:0 0 10px 44px}.logo img{max-height:50px}.header.page{margin-bottom:20px;border-bottom:1px solid #d1d1d1}.header.content{padding-top:10px;position:relative;display:block;padding-right:90px}.header.content:after{content:"";display:table;clear:both}.header .switcher,.header .links,.header .panel{display:none}.action.toggle.nav{display:inline-block;text-decoration:none;display:block;position:absolute;top:12px;left:20px;font-size:0;z-index:14;cursor:pointer}.action.toggle.nav:before{font-family:"icons-blank-theme";content:'\e609';font-size:28px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.action.toggle.nav>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.copyright,.bugs{display:block;margin:20px 0}.block.widget.new .pager .amount{float:none;margin:0 0 7px;text-align:center}}.actions.toolbar:before,.actions.toolbar:after{content:"";display:table}.actions.toolbar:after{clear:both}.actions.toolbar .primary{float:left}.actions.toolbar .secondary{float:right}.actions.toolbar .primary,.actions.toolbar .secondary{display:inline-block}.actions.toolbar .primary a.action,.actions.toolbar .secondary a.action{display:inline-block}.actions.toolbar .primary .action{margin:0 5px 0 0}.actions.toolbar .secondary a.action{margin-top:6px}.example-actions-toolbar-1:before,.example-actions-toolbar-1:after{content:"";display:table}.example-actions-toolbar-1:after{clear:both}.example-actions-toolbar-1 .primary{float:left}.example-actions-toolbar-1 .secondary{float:right}.example-actions-toolbar-1 .primary,.example-actions-toolbar-1 .secondary{display:inline-block}.example-actions-toolbar-1 .primary a.action,.example-actions-toolbar-1 .secondary a.action{display:inline-block}.example-actions-toolbar-1 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-1 .secondary a.action{margin-top:6px}.example-actions-toolbar-2:before,.example-actions-toolbar-2:after{content:"";display:table}.example-actions-toolbar-2:after{clear:both}.example-actions-toolbar-2 .primary{float:left}.example-actions-toolbar-2 .secondary{float:right}.example-actions-toolbar-2 .primary,.example-actions-toolbar-2 .secondary{display:inline-block}.example-actions-toolbar-2 .primary a.action,.example-actions-toolbar-2 .secondary a.action{display:inline-block}.example-actions-toolbar-2 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-2 .secondary a.action{margin-top:6px}.example-actions-toolbar-3{text-align:left}.example-actions-toolbar-3:before,.example-actions-toolbar-3:after{content:"";display:table}.example-actions-toolbar-3:after{clear:both}.example-actions-toolbar-3 .primary{float:left}.example-actions-toolbar-3 .primary,.example-actions-toolbar-3 .secondary{display:inline-block}.example-actions-toolbar-3 .primary a.action,.example-actions-toolbar-3 .secondary a.action{display:inline-block}.example-actions-toolbar-3 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-3 .secondary a.action{margin-top:6px}.example-actions-toolbar-4{text-align:right}.example-actions-toolbar-4:before,.example-actions-toolbar-4:after{content:"";display:table}.example-actions-toolbar-4:after{clear:both}.example-actions-toolbar-4 .secondary{float:right}.example-actions-toolbar-4 .primary,.example-actions-toolbar-4 .secondary{display:inline-block}.example-actions-toolbar-4 .primary a.action,.example-actions-toolbar-4 .secondary a.action{display:inline-block}.example-actions-toolbar-4 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-4 .secondary a.action{margin-top:6px}.example-actions-toolbar-5{text-align:center}.example-actions-toolbar-5:before,.example-actions-toolbar-5:after{content:"";display:table}.example-actions-toolbar-5:after{clear:both}.example-actions-toolbar-5 .primary,.example-actions-toolbar-5 .secondary{vertical-align:top}.example-actions-toolbar-5 .primary,.example-actions-toolbar-5 .secondary{display:inline-block}.example-actions-toolbar-5 .primary a.action,.example-actions-toolbar-5 .secondary a.action{display:inline-block}.example-actions-toolbar-5 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-5 .secondary a.action{margin-top:6px}.example-actions-toolbar-6:before,.example-actions-toolbar-6:after{content:"";display:table}.example-actions-toolbar-6:after{clear:both}.example-actions-toolbar-6 .primary{float:right}.example-actions-toolbar-6 .secondary{float:left}.example-actions-toolbar-6 .primary,.example-actions-toolbar-6 .secondary{display:inline-block}.example-actions-toolbar-6 .primary a.action,.example-actions-toolbar-6 .secondary a.action{display:inline-block}.example-actions-toolbar-6 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-6 .secondary a.action{margin-top:6px}.example-actions-toolbar-7{text-align:left}.example-actions-toolbar-7:before,.example-actions-toolbar-7:after{content:"";display:table}.example-actions-toolbar-7:after{clear:both}.example-actions-toolbar-7 .secondary{float:left}.example-actions-toolbar-7 .primary,.example-actions-toolbar-7 .secondary{display:inline-block}.example-actions-toolbar-7 .primary a.action,.example-actions-toolbar-7 .secondary a.action{display:inline-block}.example-actions-toolbar-7 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-7 .secondary a.action{margin-top:6px}.example-actions-toolbar-8{text-align:right}.example-actions-toolbar-8:before,.example-actions-toolbar-8:after{content:"";display:table}.example-actions-toolbar-8:after{clear:both}.example-actions-toolbar-8 .primary{float:right}.example-actions-toolbar-8 .primary,.example-actions-toolbar-8 .secondary{display:inline-block}.example-actions-toolbar-8 .primary a.action,.example-actions-toolbar-8 .secondary a.action{display:inline-block}.example-actions-toolbar-8 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-8 .secondary a.action{margin-top:6px}.example-actions-toolbar-9{margin:10px;padding:10px}.example-actions-toolbar-9:before,.example-actions-toolbar-9:after{content:"";display:table}.example-actions-toolbar-9:after{clear:both}.example-actions-toolbar-9 .primary{float:left}.example-actions-toolbar-9 .secondary{float:right}.example-actions-toolbar-9 .primary,.example-actions-toolbar-9 .secondary{display:inline-block}.example-actions-toolbar-9 .primary a.action,.example-actions-toolbar-9 .secondary a.action{display:inline-block}.example-actions-toolbar-9 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-9 .secondary a.action{margin-top:6px}.example-actions-toolbar-10{text-align:left}.example-actions-toolbar-10:before,.example-actions-toolbar-10:after{content:"";display:table}.example-actions-toolbar-10:after{clear:both}.example-actions-toolbar-10 .primary{float:left}.example-actions-toolbar-10 .primary,.example-actions-toolbar-10 .secondary{display:inline-block}.example-actions-toolbar-10 .primary a.action,.example-actions-toolbar-10 .secondary a.action{display:inline-block}.example-actions-toolbar-10 .primary .action{margin:0 50px 0 0}.example-actions-toolbar-10 .secondary a.action{margin-top:6px}.example-actions-toolbar-11{text-align:left}.example-actions-toolbar-11:before,.example-actions-toolbar-11:after{content:"";display:table}.example-actions-toolbar-11:after{clear:both}.example-actions-toolbar-11 .primary{float:left}.example-actions-toolbar-11 .primary,.example-actions-toolbar-11 .secondary{display:inline-block}.example-actions-toolbar-11 .primary a.action,.example-actions-toolbar-11 .secondary a.action{display:inline-block}.example-actions-toolbar-11 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-11 .secondary .action{margin:0 50px 0 0}.example-actions-toolbar-11 .secondary a.action{margin-top:6px}.example-actions-toolbar-12:before,.example-actions-toolbar-12:after{content:"";display:table}.example-actions-toolbar-12:after{clear:both}.example-actions-toolbar-12 .primary{float:left}.example-actions-toolbar-12 .secondary{float:right}.example-actions-toolbar-12 .primary,.example-actions-toolbar-12 .secondary{display:inline-block}.example-actions-toolbar-12 .primary a.action,.example-actions-toolbar-12 .secondary a.action{display:inline-block}.example-actions-toolbar-12 .primary .action{margin:0 5px 0 0}.example-actions-toolbar-12 .secondary a.action{margin-top:6px}@media only screen and (max-width: 768px){.example-actions-toolbar-12 .primary,.example-actions-toolbar-12 .secondary{ display:block;float:none}}.example-breadcrumbs-1{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.example-breadcrumbs-1 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-1 .items{font-size:12px;font-size:1.2rem;color:#a3a3a3;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-1 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-1 a{color:#333;text-decoration:none}.example-breadcrumbs-1 a:visited{color:#333;text-decoration:none}.example-breadcrumbs-1 a:hover{color:#333;text-decoration:underline}.example-breadcrumbs-1 a:active{color:#333;text-decoration:none}.example-breadcrumbs-1 strong{font-weight:400}.example-breadcrumbs-1 .item:not(:last-child):after{color:#a3a3a3;content:'>'}.example-breadcrumbs-1 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-1 .items{font-size:12px;font-size:1.2rem;color:#a3a3a3;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-1 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-1 a{color:#333;text-decoration:none}.example-breadcrumbs-1 a:visited{color:#333;text-decoration:none}.example-breadcrumbs-1 a:hover{color:#333;text-decoration:underline}.example-breadcrumbs-1 a:active{color:#333;text-decoration:none}.example-breadcrumbs-1 strong{font-weight:400}.example-breadcrumbs-1 .item:not(:last-child):after{color:#a3a3a3;content:'>'}.example-breadcrumbs-2 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-2 .items{font-size:12px;font-size:1.2rem;color:#1979c3;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-2 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-2 a{padding:3px 5px;display:inline-block;background-color:#ccc;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #f4f4f4 0, #ccc 100%);background-image:linear-gradient(to bottom, #f4f4f4 0, #ccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#cccccc', GradientType=0);border:1px solid #ccc;color:#333;text-decoration:none}.example-breadcrumbs-2 a:visited{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#333;text-decoration:none}.example-breadcrumbs-2 a:hover{background-color:#f4f4f4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #ccc 0, #f4f4f4 100%);background-image:linear-gradient(to bottom, #ccc 0, #f4f4f4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#f4f4f4', GradientType=0);color:#333;text-decoration:none}.example-breadcrumbs-2 a:active{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#333;text-decoration:none}.example-breadcrumbs-2 strong{background-color:#ff5501;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #f7b32e 0, #ff5501 100%);background-image:linear-gradient(to bottom, #f7b32e 0, #ff5501 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7b32e', endColorstr='#ff5501', GradientType=0);border:1px solid #d04b0a;padding:3px 5px;display:inline-block;font-weight:400}.example-breadcrumbs-2 .item:not(:last-child):after{color:#a3a3a3;content:''}.example-breadcrumbs-3 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-breadcrumbs-3 .items{font-size:12px;font-size:1.2rem;color:#333;margin:0;padding:0;list-style-type:none;list-style-image:none}.example-breadcrumbs-3 .items>li{display:inline-block;vertical-align:top}.example-breadcrumbs-3 a{padding:3px 5px;display:inline-block;background-color:#f4f4f4;color:#333;text-decoration:none}.example-breadcrumbs-3 a:visited{color:#333;text-decoration:none}.example-breadcrumbs-3 a:hover{background-color:#ccc;color:#333;text-decoration:none}.example-breadcrumbs-3 a:active{color:#333;text-decoration:none}.example-breadcrumbs-3 strong{background-color:#e7e7e7;padding:3px 5px;display:inline-block;font-weight:400}.example-breadcrumbs-3 .item:not(:last-child):after{color:#a3a3a3;content:''}.example-breadcrumbs-3 .item a{position:relative;margin:0 11px 0 0}.example-breadcrumbs-3 .item a:after{width:0;height:0;border:12px solid rgba(0,0,0,0);border-left-color:#f4f4f4;content:"";position:absolute;display:block;top:0;right:-23px}.example-breadcrumbs-3 .item a:hover:after{border-color:transparent transparent transparent #ccc}button,.cart.table.wrapper .cart.items .action{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;border-radius:3px}button:focus,button:active,.cart.table.wrapper .cart.items .action:focus,.cart.table.wrapper .cart.items .action:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}button:hover,.cart.table.wrapper .cart.items .action:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}button.disabled,button[disabled],fieldset[disabled] button,.cart.table.wrapper .cart.items .action.disabled,.cart.table.wrapper .cart.items .action[disabled],fieldset[disabled] .cart.table.wrapper .cart.items .action{cursor:default;pointer-events:none;opacity:.5}button:active,button:focus,.cart.table.wrapper .cart.items .action:active,.cart.table.wrapper .cart.items .action:focus{box-shadow:inset 0 2px 1px rgba(0,0,0,.12)}.example-button-1.example-button-2{line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.example-button-1.example-button-3{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem;border-radius:0;color:#000}.example-button-1.example-button-3:hover,.example-button-1.example-button-3.active{color:#000}.example-button-10{background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400}.example-button-10>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-button-10:before{font-family:"icons-blank-theme";content:'\e611';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-button-10:hover:before{color:inherit}.example-button-10:active:before{color:inherit}.example-button-10:focus,.example-button-10:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-10:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-10.disabled,.example-button-10[disabled],fieldset[disabled] .example-button-10{cursor:default;pointer-events:none;opacity:.5}.example-button-10:focus,.example-button-10:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.example-button-10:hover{background:0;border:0}.example-button-10.disabled,.example-button-10[disabled],fieldset[disabled] .example-button-10{cursor:not-allowed;pointer-events:none;opacity:.5}.example-button-11{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;text-decoration:none}.example-button-11:before{font-family:"icons-blank-theme";content:'\e611';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-button-11:hover:before{color:inherit}.example-button-11:active:before{color:inherit}.example-button-11:focus,.example-button-11:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-11:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-11.disabled,.example-button-11[disabled],fieldset[disabled] .example-button-11{cursor:default;pointer-events:none;opacity:.5}.example-button-12{background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;display:inline-block;text-decoration:none}.example-button-12:after{font-family:"icons-blank-theme";content:'\e611';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-button-12:hover:after{color:inherit}.example-button-12:active:after{color:inherit}.example-button-12:focus,.example-button-12:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-12:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-12.disabled,.example-button-12[disabled],fieldset[disabled] .example-button-12{cursor:default;pointer-events:none;opacity:.5}.example-button-13{background-image:none;background-color:#f2f2f2;padding:0 15px;width:100px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle}.example-button-13:focus,.example-button-13:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-13:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-13.disabled,.example-button-13[disabled],fieldset[disabled] .example-button-13{cursor:default;pointer-events:none;opacity:.5}.example-button-4{background-image:none;background-color:#1979c3;padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle}.example-button-4:focus,.example-button-4:active{background-color:#006bb4;border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.example-button-4:hover{background-color:#006bb4;border:1px solid #006bb4;color:#fff}.example-button-4.disabled,.example-button-4[disabled],fieldset[disabled] .example-button-4{cursor:default;pointer-events:none;opacity:.5}.example-button-4:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.example-button-4.example-button-5{line-height:50px;padding:0 35px;font-size:18px;font-size:1.8rem}.example-button-4.example-button-6{line-height:22px;padding:0 14px;font-size:11px;font-size:1.1rem;color:#fff}.example-button-4.example-button-6:hover,.example-button-4.example-button-6.active{color:#fff}.example-button-7{background-image:none;background-color:#f2f2f2;background-color:#006bb4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #1979c3 0, #006bb4 100%);background-image:linear-gradient(to bottom, #1979c3 0, #006bb4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1979c3', endColorstr='#006bb4', GradientType=0);padding:0 15px;color:#fff;border:1px solid #1979c3;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:3px;vertical-align:middle;border-radius:3px}.example-button-7:focus,.example-button-7:active{background-color:#e2e2e2;background-color:#006bb4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #006bb4 0, #006bb4 100%);background-image:linear-gradient(to bottom, #006bb4 0, #006bb4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006bb4', endColorstr='#006bb4', GradientType=0);border:1px solid #006bb4;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#fff}.example-button-7:hover{background-color:#e2e2e2;background-color:#1979c3;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #006bb4 0, #1979c3 100%);background-image:linear-gradient(to bottom, #006bb4 0, #1979c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#006bb4', endColorstr='#1979c3', GradientType=0);border:1px solid #006bb4;color:#fff}.example-button-7.disabled,.example-button-7[disabled],fieldset[disabled] .example-button-7{cursor:default;pointer-events:none;opacity:.5}.example-button-7:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.example-button-8{background:0;border:0;display:inline;line-height:1.42857143;margin:0;padding:0;color:#1979c3;text-decoration:none;font-weight:400}.example-button-8:visited{color:#800080;text-decoration:none}.example-button-8:hover{color:#006bb4;text-decoration:underline}.example-button-8:active{color:#ff5501;text-decoration:underline}.example-button-8:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-button-8:hover,.example-button-8:active,.example-button-8:focus{background:0;border:0;outline:0}.example-button-8.disabled,.example-button-8[disabled],fieldset[disabled] .example-button-8{color:#1979c3;text-decoration:underline;cursor:default;pointer-events:none;opacity:.5}.example-button-8:active{box-shadow:none}.example-button-9{text-decoration:none;background-image:none;background-color:#f2f2f2;padding:0 15px;color:#333;border:1px solid #cdcdcd;cursor:pointer;display:inline-block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;line-height:30px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0;vertical-align:middle;margin:3px;border-radius:3px;font-weight:700}.example-button-9:hover,.example-button-9:active,.example-button-9:focus{text-decoration:none}.example-button-9:focus,.example-button-9:active{background-color:#e2e2e2;border:1px solid #cdcdcd;outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;color:#333}.example-button-9:hover{background-color:#e2e2e2;border:1px solid #cdcdcd;color:#555}.example-button-9.disabled,.example-button-9[disabled],fieldset[disabled] .example-button-9{cursor:default;pointer-events:none;opacity:.5}.example-button-9:active{box-shadow:inset 0 3px 1px rgba(0,0,0,.29)}.example-dropdown-1{display:inline-block;position:relative}.example-dropdown-1:before,.example-dropdown-1:after{content:"";display:table}.example-dropdown-1:after{clear:both}.example-dropdown-1 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-1 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-1 .action.toggle:hover:after{color:inherit}.example-dropdown-1 .action.toggle:active:after{color:inherit}.example-dropdown-1 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-1 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-1 .action.toggle.active:hover:after{color:inherit}.example-dropdown-1 .action.toggle.active:active:after{color:inherit}.example-dropdown-1 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-1 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-1 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-1 ul.dropdown:before,.example-dropdown-1 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-1 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-1 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-1.active{overflow:visible}.example-dropdown-1.active ul.dropdown{display:block}.example-dropdown-2{display:inline-block;position:relative}.example-dropdown-2:before,.example-dropdown-2:after{content:"";display:table}.example-dropdown-2:after{clear:both}.example-dropdown-2 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-2 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-2 .action.toggle:hover:after{color:inherit}.example-dropdown-2 .action.toggle:active:after{color:inherit}.example-dropdown-2 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-2 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-2 .action.toggle.active:hover:after{color:inherit}.example-dropdown-2 .action.toggle.active:active:after{color:inherit}.example-dropdown-2 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-2 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-2 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-2 ul.dropdown:before,.example-dropdown-2 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-2 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-2 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-2.active{overflow:visible}.example-dropdown-2.active ul.dropdown{display:block}.example-dropdown-3{display:inline-block;position:relative}.example-dropdown-3:before,.example-dropdown-3:after{content:"";display:table}.example-dropdown-3:after{clear:both}.example-dropdown-3 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-3 .action.toggle:before{font-family:"icons-blank-theme";content:'\e61c';font-size:22px;line-height:1;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-3 .action.toggle:hover:before{color:red}.example-dropdown-3 .action.toggle:active:before{color:inherit}.example-dropdown-3 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-3 .action.toggle.active:before{font-family:"icons-blank-theme";content:'\e60f';font-size:22px;line-height:1;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-3 .action.toggle.active:hover:before{color:red}.example-dropdown-3 .action.toggle.active:active:before{color:inherit}.example-dropdown-3 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-3 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-3 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-3 ul.dropdown:before,.example-dropdown-3 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-3 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-3 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-3.active{overflow:visible}.example-dropdown-3.active ul.dropdown{display:block}.example-dropdown-5{display:inline-block;position:relative}.example-dropdown-5:before,.example-dropdown-5:after{content:"";display:table}.example-dropdown-5:after{clear:both}.example-dropdown-5 .action.toggle{cursor:pointer;display:inline-block;text-decoration:none}.example-dropdown-5 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:1;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-5 .action.toggle:hover:after{color:inherit}.example-dropdown-5 .action.toggle:active:after{color:inherit}.example-dropdown-5 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-5 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:1;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-5 .action.toggle.active:hover:after{color:inherit}.example-dropdown-5 .action.toggle.active:active:after{color:inherit}.example-dropdown-5 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#eef1f3;border:2px solid #ced1d4;position:absolute;z-index:100;min-width:100%;display:none}.example-dropdown-5 ul.dropdown li{margin:0;padding:10px;border-top:2px solid #e8eaed}.example-dropdown-5 ul.dropdown li:first-child{border:0}.example-dropdown-5 ul.dropdown li:hover{background-color:#d8e3e3;cursor:pointer}.example-dropdown-5.active{overflow:visible}.example-dropdown-5.active ul.dropdown{display:block}.example-dropdown-6{display:inline-block;position:relative}.example-dropdown-6:before,.example-dropdown-6:after{content:"";display:table}.example-dropdown-6:after{clear:both}.example-dropdown-6 .action.split{float:left;margin:0}.example-dropdown-6 .action.toggle{float:right;margin:0}.example-dropdown-6 button.action.split,.example-dropdown-6 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-6 button+.action.toggle,.example-dropdown-6 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-6 .action.split{padding:0 5px}.example-dropdown-6 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-6 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-6 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-6 .action.toggle:hover:after{color:inherit}.example-dropdown-6 .action.toggle:active:after{color:inherit}.example-dropdown-6 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-6 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-6 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-6 .action.toggle.active:hover:after{color:inherit}.example-dropdown-6 .action.toggle.active:active:after{color:inherit}.example-dropdown-6 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-6 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-6 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-6 ul.dropdown:before,.example-dropdown-6 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-6 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-6 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-6.active{overflow:visible}.example-dropdown-6.active ul.dropdown{display:block}.example-dropdown-6 ul.dropdown{top:100%;left:100%;margin-left:-36px}.split.example-dropdown-7{display:inline-block;position:relative}.split.example-dropdown-7:before,.split.example-dropdown-7:after{content:"";display:table}.split.example-dropdown-7:after{clear:both}.split.example-dropdown-7 .action.split{float:left;margin:0}.split.example-dropdown-7 .action.toggle{float:right;margin:0}.split.example-dropdown-7 .action.split{padding:0 5px}.split.example-dropdown-7 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.split.example-dropdown-7 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.split.example-dropdown-7 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.split.example-dropdown-7 .action.toggle:hover:after{color:inherit}.split.example-dropdown-7 .action.toggle:active:after{color:inherit}.split.example-dropdown-7 .action.toggle.active{display:inline-block;text-decoration:none}.split.example-dropdown-7 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.split.example-dropdown-7 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.split.example-dropdown-7 .action.toggle.active:hover:after{color:inherit}.split.example-dropdown-7 .action.toggle.active:active:after{color:inherit}.split.example-dropdown-7 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.split.example-dropdown-7 ul.dropdown li{margin:0;padding:3px 5px}.split.example-dropdown-7 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.split.example-dropdown-7 ul.dropdown:before,.split.example-dropdown-7 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.split.example-dropdown-7 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.split.example-dropdown-7 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.split.example-dropdown-7.active{overflow:visible}.split.example-dropdown-7.active ul.dropdown{display:block}.split.example-dropdown-7 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-8{display:inline-block;position:relative}.example-dropdown-8:before,.example-dropdown-8:after{content:"";display:table}.example-dropdown-8:after{clear:both}.example-dropdown-8 .action.split{float:left;margin:0}.example-dropdown-8 .action.toggle{float:right;margin:0}.example-dropdown-8 button.action.split,.example-dropdown-8 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-8 button+.action.toggle,.example-dropdown-8 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-8 .action.split{padding:0 5px}.example-dropdown-8 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-8 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-8 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-8 .action.toggle:hover:after{color:inherit}.example-dropdown-8 .action.toggle:active:after{color:inherit}.example-dropdown-8 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-8 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-8 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-8 .action.toggle.active:hover:after{color:inherit}.example-dropdown-8 .action.toggle.active:active:after{color:inherit}.example-dropdown-8 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-8 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-8 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-8 ul.dropdown:before,.example-dropdown-8 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-8 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-8 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-8.active{overflow:visible}.example-dropdown-8.active ul.dropdown{display:block}.example-dropdown-8 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-9{display:inline-block;position:relative}.example-dropdown-9 .action.split,.example-dropdown-9 .action.toggle{line-height:50px;padding:0 17px;font-size:18px;font-size:1.8rem}.example-dropdown-9:before,.example-dropdown-9:after{content:"";display:table}.example-dropdown-9:after{clear:both}.example-dropdown-9 .action.split{float:left;margin:0}.example-dropdown-9 .action.toggle{float:right;margin:0}.example-dropdown-9 button.action.split,.example-dropdown-9 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-9 button+.action.toggle,.example-dropdown-9 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-9 .action.split{padding:0 5px}.example-dropdown-9 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-9 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-9 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-9 .action.toggle:hover:after{color:inherit}.example-dropdown-9 .action.toggle:active:after{color:inherit}.example-dropdown-9 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-9 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-9 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-9 .action.toggle.active:hover:after{color:inherit}.example-dropdown-9 .action.toggle.active:active:after{color:inherit}.example-dropdown-9 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-9 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-9 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-9 ul.dropdown:before,.example-dropdown-9 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-9 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-9 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-9.active{overflow:visible}.example-dropdown-9.active ul.dropdown{display:block}.example-dropdown-9 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-10{display:inline-block;position:relative}.example-dropdown-10 .action.split,.example-dropdown-10 .action.toggle{line-height:22px;padding:0 8px;font-size:11px;font-size:1.1rem}.example-dropdown-10:before,.example-dropdown-10:after{content:"";display:table}.example-dropdown-10:after{clear:both}.example-dropdown-10 .action.split{float:left;margin:0}.example-dropdown-10 .action.toggle{float:right;margin:0}.example-dropdown-10 button.action.split,.example-dropdown-10 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-10 button+.action.toggle,.example-dropdown-10 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-10 .action.split{padding:0 5px}.example-dropdown-10 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-10 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-10 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-10 .action.toggle:hover:after{color:inherit}.example-dropdown-10 .action.toggle:active:after{color:inherit}.example-dropdown-10 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-10 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-10 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-10 .action.toggle.active:hover:after{color:inherit}.example-dropdown-10 .action.toggle.active:active:after{color:inherit}.example-dropdown-10 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-10 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-10 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-10 ul.dropdown:before,.example-dropdown-10 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-10 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-10 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-10.active{overflow:visible}.example-dropdown-10.active ul.dropdown{display:block}.example-dropdown-10 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-dropdown-11{display:inline-block;position:relative}.example-dropdown-11:before,.example-dropdown-11:after{content:"";display:table}.example-dropdown-11:after{clear:both}.example-dropdown-11 .action.split{float:right;margin:0}.example-dropdown-11 .action.toggle{float:left;margin:0}.example-dropdown-11 button.action.split,.example-dropdown-11 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-11 button+.action.toggle,.example-dropdown-11 .cart.table.wrapper .cart.items .action+.action.toggle{border-right:0;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-11 .action.split{padding:0 5px}.example-dropdown-11 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-11 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-11 .action.toggle:before{font-family:"icons-blank-theme";content:'\e61c';font-size:22px;line-height:inherit;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-11 .action.toggle:hover:before{color:red}.example-dropdown-11 .action.toggle:active:before{color:inherit}.example-dropdown-11 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-11 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-11 .action.toggle.active:before{font-family:"icons-blank-theme";content:'\e60f';font-size:22px;line-height:inherit;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-11 .action.toggle.active:hover:before{color:red}.example-dropdown-11 .action.toggle.active:active:before{color:inherit}.example-dropdown-11 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#fff;border:1px solid #bbb;position:absolute;z-index:100;min-width:100%;display:none;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);margin-top:4px}.example-dropdown-11 ul.dropdown li{margin:0;padding:3px 5px}.example-dropdown-11 ul.dropdown li:hover{background-color:#e8e8e8;cursor:pointer}.example-dropdown-11 ul.dropdown:before,.example-dropdown-11 ul.dropdown:after{content:"";position:absolute;display:block;width:0;height:0;border-bottom-style:solid}.example-dropdown-11 ul.dropdown:before{top:-12px;left:10px;z-index:99;border:solid 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff rgba(0,0,0,0)}.example-dropdown-11 ul.dropdown:after{top:-14px;left:9px;z-index:98;border:solid 7px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #bbb rgba(0,0,0,0)}.example-dropdown-11.active{overflow:visible}.example-dropdown-11.active ul.dropdown{display:block}.example-dropdown-11 ul.dropdown{top:100%;left:0}.example-dropdown-12{display:inline-block;position:relative}.example-dropdown-12:before,.example-dropdown-12:after{content:"";display:table}.example-dropdown-12:after{clear:both}.example-dropdown-12 .action.split{float:left;margin:0}.example-dropdown-12 .action.toggle{float:right;margin:0}.example-dropdown-12 button.action.split,.example-dropdown-12 .cart.table.wrapper .cart.items .action.action.split{-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}.example-dropdown-12 button+.action.toggle,.example-dropdown-12 .cart.table.wrapper .cart.items .action+.action.toggle{border-left:0;-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-left-radius:0}.example-dropdown-12 .action.split{padding:0 5px}.example-dropdown-12 .action.toggle{padding:0 5px;display:inline-block;text-decoration:none}.example-dropdown-12 .action.toggle>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-12 .action.toggle:after{font-family:"icons-blank-theme";content:'\e607';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-12 .action.toggle:hover:after{color:inherit}.example-dropdown-12 .action.toggle:active:after{color:inherit}.example-dropdown-12 .action.toggle.active{display:inline-block;text-decoration:none}.example-dropdown-12 .action.toggle.active>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-dropdown-12 .action.toggle.active:after{font-family:"icons-blank-theme";content:'\e618';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.example-dropdown-12 .action.toggle.active:hover:after{color:inherit}.example-dropdown-12 .action.toggle.active:active:after{color:inherit}.example-dropdown-12 ul.dropdown{margin:0;padding:0;list-style-type:none;list-style-image:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:#eef1f3;border:2px solid #ced1d4;position:absolute;z-index:100;min-width:100%;display:none}.example-dropdown-12 ul.dropdown li{margin:0;padding:10px;border-top:2px solid #e8eaed}.example-dropdown-12 ul.dropdown li:first-child{border:0}.example-dropdown-12 ul.dropdown li:hover{background-color:#d8e3e3;cursor:pointer}.example-dropdown-12.active{overflow:visible}.example-dropdown-12.active ul.dropdown{display:block}.example-dropdown-12 ul.dropdown{top:100%;left:100%;margin-left:-36px}.example-form-1 .example-form-1-fieldset{border:0;margin:0 0 40px;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.example-form-1 .example-form-1-fieldset>*{letter-spacing:normal;word-spacing:normal}.example-form-1 .example-form-1-fieldset>.legend{margin:0 0 25px 25.8%;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.example-form-1 .example-form-1-fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.example-form-1 .example-form-1-fieldset:after{content:attr(data-hasrequired);display:block;font-size:12px;font-size:1.2rem;color:#e02b27;margin:10px 0 0;letter-spacing:normal;word-spacing:normal}.example-form-1 .example-form-1-fieldset>.field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 0 29px;border:0}.example-form-1 .example-form-1-fieldset>.field:before,.example-form-1 .example-form-1-fieldset>.field:after{content:"";display:table}.example-form-1 .example-form-1-fieldset>.field:after{clear:both}.example-form-1 .example-form-1-fieldset>.field:not(.choice)>.label{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.example-form-1 .example-form-1-fieldset>.field>.description{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:25.8%;text-align:right;padding:6px 15px 0 0}.example-form-1 .example-form-1-fieldset>.field.choice:before,.example-form-1 .example-form-1-fieldset>.field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:1px;float:left;width:25.8%;padding:6px 15px 0 0}.example-form-1 .example-form-1-fieldset>.field>.control{float:left;width:74.2%}.example-form-1 .example-form-1-fieldset>.field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.example-form-1 .example-form-1-fieldset>.field>.label+br{display:none}.example-form-1 .example-form-1-fieldset>.field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.example-form-1 .example-form-1-fieldset>.field .nested .field{margin:5px 0}.example-form-1 .example-form-1-fieldset>.field.choice>.label{display:inline}.example-form-1 .example-form-1-fieldset>.field.choice>input{vertical-align:top}.example-form-1 .example-form-1-fieldset>.field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.example-form-1 .example-form-1-fieldset>.field .fields.group>*{letter-spacing:normal;word-spacing:normal}.example-form-1 .example-form-1-fieldset>.field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.example-form-1 .example-form-1-fieldset>.field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.example-form-1 .example-form-1-fieldset>.field .fields.group .field .control{float:none;width:auto}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-2 .field{width:50%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-4 .field{width:25%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .fields.group.group-5 .field{width:20%!important;display:inline-block}.example-form-1 .example-form-1-fieldset>.field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.example-form-1 .example-form-1-fieldset>.field .addon textarea,.example-form-1 .example-form-1-fieldset>.field .addon select,.example-form-1 .example-form-1-fieldset>.field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.example-form-1 .example-form-1-fieldset>.field .addon .addbefore,.example-form-1 .example-form-1-fieldset>.field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.example-form-1 .example-form-1-fieldset>.field .addon .addbefore:disabled,.example-form-1 .example-form-1-fieldset>.field .addon .addafter:disabled{opacity:.5}.example-form-1 .example-form-1-fieldset>.field .addon .addbefore{float:left;order:1}.example-form-1 .example-form-1-fieldset>.field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.example-form-1 .example-form-1-fieldset>.field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-form-2 .example-form-2-fieldset{border:0;margin:0 0 40px;padding:0;letter-spacing:-.31em;word-spacing:-.43em}.example-form-2 .example-form-2-fieldset>*{letter-spacing:normal;word-spacing:normal}.example-form-2 .example-form-2-fieldset>.legend{margin:0 0 25px 25.8%;padding:0;font-size:20px;font-size:2rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;width:74.2%}.example-form-2 .example-form-2-fieldset>.legend+br{display:block;visibility:hidden;height:0;overflow:hidden;clear:both}.example-form-2 .example-form-2-fieldset>.field{margin:0 0 20px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:inline-block;padding:0 20px 0 0;width:50%;vertical-align:top;border:0}.example-form-2 .example-form-2-fieldset>.field:not(.choice)>.label{display:inline-block;width:auto;float:none;text-align:left;margin:0 0 5px}.example-form-2 .example-form-2-fieldset>.field.choice:before,.example-form-2 .example-form-2-fieldset>.field.no-label:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;content:" ";height:auto;float:none;width:auto;padding:0}.example-form-2 .example-form-2-fieldset>.field>.control{float:none;width:auto}.example-form-2 .example-form-2-fieldset>.field .nested .field{width:100%}.example-form-2 .example-form-2-fieldset>.field>.label{font-size:14px;font-size:1.4rem;font-weight:700}.example-form-2 .example-form-2-fieldset>.field>.label+br{display:none}.example-form-2 .example-form-2-fieldset>.field.required>.label:after{content:'*';font-size:12px;font-size:1.2rem;color:#e02b27;margin:0 0 0 5px}.example-form-2 .example-form-2-fieldset>.field .nested .field{margin:5px 0}.example-form-2 .example-form-2-fieldset>.field.choice>.label{display:inline}.example-form-2 .example-form-2-fieldset>.field.choice>input{vertical-align:top}.example-form-2 .example-form-2-fieldset>.field .fields.group{display:flex;letter-spacing:-.31em;*letter-spacing:normal;word-spacing:-.43em;margin-right:- 20px}.example-form-2 .example-form-2-fieldset>.field .fields.group>*{letter-spacing:normal;word-spacing:normal}.example-form-2 .example-form-2-fieldset>.field .fields.group .field{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;vertical-align:top;margin:0!important}.example-form-2 .example-form-2-fieldset>.field .fields.group .field .label{width:auto;float:none;text-align:left;padding-right:0}.example-form-2 .example-form-2-fieldset>.field .fields.group .field .control{float:none;width:auto}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-2 .field{width:50%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-3 .field{width:33.3%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-4 .field{width:25%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .fields.group.group-5 .field{width:20%!important;display:inline-block}.example-form-2 .example-form-2-fieldset>.field .addon{display:inline-flex;flex-wrap:nowrap;padding:0;width:100%}.example-form-2 .example-form-2-fieldset>.field .addon textarea,.example-form-2 .example-form-2-fieldset>.field .addon select,.example-form-2 .example-form-2-fieldset>.field .addon input{order:2;box-shadow:none;display:inline-block;margin:0;width:auto;flex-basis:100%}.example-form-2 .example-form-2-fieldset>.field .addon .addbefore,.example-form-2 .example-form-2-fieldset>.field .addon .addafter{order:3;display:inline-block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;width:auto;white-space:nowrap;vertical-align:middle}.example-form-2 .example-form-2-fieldset>.field .addon .addbefore:disabled,.example-form-2 .example-form-2-fieldset>.field .addon .addafter:disabled{opacity:.5}.example-form-2 .example-form-2-fieldset>.field .addon .addbefore{float:left;order:1}.example-form-2 .example-form-2-fieldset>.field .note{font-size:12px;font-size:1.2rem;margin:3px 0 0;padding:0;display:inline-block;text-decoration:none}.example-form-2 .example-form-2-fieldset>.field .note:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}input[type="text"],input[type="password"],input[type="url"],input[type="tel"],input[type="search"],input[type="number"],input[type="datetime"],input[type="email"]{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:0 10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;margin-bottom:20px}input[type="text"]:disabled,input[type="password"]:disabled,input[type="url"]:disabled,input[type="tel"]:disabled,input[type="search"]:disabled,input[type="number"]:disabled,input[type="datetime"]:disabled,input[type="email"]:disabled{opacity:.5}select{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:32px;width:100%;padding:5px 10px 4px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;margin-bottom:20px}select:disabled{opacity:.5}select[multiple="multiple"]{height:auto;margin-bottom:20px}textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #c2c2c2;border-radius:1px;height:auto;width:100%;padding:10px;font-size:14px;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;line-height:1.42857143;font-style:normal;color:#333;background-clip:padding-box;vertical-align:baseline;resize:vertical}textarea:disabled{opacity:.5}input[type="checkbox"]{vertical-align:top;margin:2px 5px 0 0}input[type="checkbox"]:disabled{opacity:.5}input[type="radio"]{vertical-align:top;margin:2px 5px 0 0}input[type="radio"]:disabled{opacity:.5}input.text-example-2,select.select-example-2{height:42px}input.text-example-2,select.select-example-2,textarea.textarea-example-2{margin:0 0 50px 0;padding:5px 25px}input.text-example-1,select.select-example-1,textarea.textarea-example-1{border-color:#24adb2;background-color:#fffced}input.text-example-1:focus,select.select-example-1:focus,textarea.textarea-example-1:focus{border-color:#00f;color:#008000}input.text-example-1:disabled,select.select-example-1:disabled,textarea.textarea-example-1:disabled{color:red}input.text-example-1::-moz-placeholder,textarea.textarea-example-1::-moz-placeholder{color:#a9a9a9}input.text-example-1::-webkit-input-placeholder,textarea.textarea-example-1::-webkit-input-placeholder{color:#a9a9a9}input.text-example-1:-ms-input-placeholder,textarea.textarea-example-1:-ms-input-placeholder{color:#a9a9a9}input.checkbox-example-1,input.radio-example-1{margin:15px}input.text-example-3,select.select-example-3{height:42px;width:50%}textarea.textarea-example-3{width:50%}.number-example::-webkit-inner-spin-button,.number-example::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.search-example{-webkit-appearance:none}.search-example::-webkit-search-cancel-button,.search-example::-webkit-search-decoration,.search-example::-webkit-search-results-button,.search-example::-webkit-search-results-decoration{-webkit-appearance:none}input.mage-error,textarea.mage-error,select.mage-error{border-color:#ed8380}input+div.mage-error,textarea+div.mage-error,select+div.mage-error{font-size:12px;font-size:1.2rem;color:#e02b27;margin:3px 0 0}input.text-example-6.mage-error,input.text-example-7.mage-error{border-color:#ed8380}input.text-example-6+div.mage-error,input.text-example-7+div.mage-error{font-size:12px;font-size:1.2rem;color:#e02b27;margin:3px 0 0;display:inline-block;text-decoration:none}input.text-example-6+div.mage-error:before,input.text-example-7+div.mage-error:before{font-family:"icons-blank-theme";content:'\e618';font-size:24px;line-height:12px;color:#e02b27;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}input.text-example-8.mage-error,input.text-example-9.mage-error{border-color:#f47a1f;background-color:#ffead8;color:#71360d}input.text-example-8.valid,input.text-example-9.valid{border-color:#17ad67;background-color:#c9f5e3;color:#0a864d}input.text-example-8+div.mage-error,input.text-example-9+div.mage-error{color:#831fe0}.example-icon-1{display:inline-block}.example-icon-1:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-2{display:inline-block}.example-icon-2:after{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:-26px 0;background-repeat:no-repeat;margin:''}.example-icon-3{display:inline-block}.example-icon-3>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-icon-3:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:-156px -52px;background-repeat:no-repeat;margin:''}.example-icon-4{display:inline-block;text-decoration:none}.example-icon-4:before{font-family:"icons-blank-theme";content:'\e606';font-size:24px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-5{display:inline-block;text-decoration:none}.example-icon-5:after{font-family:"icons-blank-theme";content:'\e605';font-size:24px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-6{display:inline-block;text-decoration:none}.example-icon-6>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-icon-6:before{font-family:"icons-blank-theme";content:'\e61b';font-size:24px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-7{display:inline-block}.example-icon-7:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-8{display:inline-block}.example-icon-8:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-8:before{background-position:-182px 0}.example-icon-9{display:inline-block}.example-icon-9:after{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-9:after{background-position:-52px -26px}.example-icon-10{display:inline-block}.example-icon-10:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-10:before{background-position:-104px 0}.example-icon-11{display:inline-block}.example-icon-11:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.example-icon-11:before{width:30px;height:30px}.example-icon-11:after{width:30px;height:30px}.example-icon-11:before{background-color:#f1f1f1}.example-icon-12{display:inline-block;text-decoration:none}.example-icon-12:before{font-family:"icons-blank-theme";content:'\e612';font-size:28px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-13{display:inline-block;text-decoration:none}.example-icon-13:before{font-family:"icons-blank-theme";content:'\e612';font-size:inherit;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-13:before{font-size:26px;line-height:inherit}.example-icon-14{display:inline-block;text-decoration:none}.example-icon-14:before{font-family:"icons-blank-theme";content:'\e61d';font-size:26px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.example-icon-14>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.icons-image-list{list-style:none;padding:0}.icons-image-list li{float:left;width:33%}.icons-image-list li>span{display:inline-block}.icons-image-list li>span:before{content:'';display:inline-block;width:26px;height:26px;line-height:26px;vertical-align:middle;background-image:url('http://magento2.loc/pub/lib/images/blank-theme-icons.png');background-position:0 0;background-repeat:no-repeat;margin:''}.icons-image-list li .icon-search:before{background-position:0 0}.icons-image-list li .icon-cart:before{background-position:-26px 0}.icons-image-list li .icon-arrow-down:before{background-position:-52px 0}.icons-image-list li .icon-arrow-up:before{background-position:-78px 0}.icons-image-list li .icon-grid:before{background-position:-104px 0}.icons-image-list li .icon-list:before{background-position:-130px 0}.icons-image-list li .icon-remove:before{background-position:-156px 0}.icons-image-list li .icon-star:before{background-position:-182px 0}.icons-image-list li .icon-pointer-down:before{background-position:-208px 0}.icons-image-list li .icon-pointer-up:before{background-position:-234px 0}.icons-image-list li .icon-pointer-left:before{background-position:-260px 0}.icons-image-list li .icon-pointer-right:before{background-position:-286px 0}.icons-image-list li .icon-compare-empty:before{background-position:0 -26px}.icons-image-list li .icon-compare-full:before{background-position:-26px -26px}.icons-image-list li .icon-wishlist-empty:before{background-position:-52px -26px}.icons-image-list li .icon-wishlist-full:before{background-position:-78px -26px}.icons-image-list li .icon-update:before{background-position:-104px -26px}.icons-image-list li .icon-collapse:before{background-position:-130px -26px}.icons-image-list li .icon-expand:before{background-position:-156px -26px}.icons-image-list li .icon-menu:before{background-position:-182px -26px}.icons-image-list li .icon-prev:before{background-position:-208px -26px}.icons-image-list li .icon-next:before{background-position:-234px -26px}.icons-image-list li .icon-settings:before{background-position:-260px -26px}.icons-image-list li .icon-info:before{background-position:-286px -26px}.icons-image-list li .icon-checkmark:before{background-position:0 -52px}.icons-image-list li .icon-calendar:before{background-position:-26px -52px}.icons-image-list li .icon-comment:before{background-position:-52px -52px}.icons-image-list li .icon-comment-reflected:before{background-position:-78px -52px}.icons-image-list li .icon-envelope:before{background-position:-104px -52px}.icons-image-list li .icon-warning:before{background-position:-130px -52px}.icons-image-list li .icon-trash:before{background-position:-156px -52px}.icons-image-list li .icon-flag:before{background-position:-182px -52px}.icons-image-list li .icon-location:before{background-position:-208px -52px}.icons-image-list li .icon-up:before{background-position:-234px -52px}.icons-image-list li .icon-down:before{background-position:-260px -52px}.icons-font-list{list-style:none;padding:0}.icons-font-list li{float:left;width:25%;margin-bottom:35px;text-align:center}.icons-font-list li>span{display:inline-block;text-decoration:none}.icons-font-list li>span:before{font-family:"icons-blank-theme";content:'';font-size:34px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center}.icons-font-list li>span:before{content:attr(data-icon);margin:0 auto;display:block}.loader{position:fixed;left:0;top:0;right:0;bottom:0;background-color:rgba(255,255,255,.5);z-index:9999}.loader:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;background-color:rgba(0,0,0,0);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat;border-radius:5px;content:'';position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;width:160px;height:160px}.loading{position:relative}.loading:before{content:'';position:absolute;left:0;top:0;right:0;bottom:0;background-color:rgba(255,255,255,.5);background-image:url('http://magento2.loc/pub/lib/images/loader-2.gif');background-position:50% 50%;background-repeat:no-repeat}.example-message-info{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400}.example-message-info a{color:#1979c3}.example-message-info a:hover{color:#006bb4}.example-message-info a:active{color:#006bb4}.example-message-warning{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400}.example-message-warning a{color:#1979c3}.example-message-warning a:hover{color:#006bb4}.example-message-warning a:active{color:#006bb4}.example-message-error{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fae5e5;border-color:none;color:#e02b27}.example-message-error a{color:#1979c3}.example-message-error a:hover{color:#006bb4}.example-message-error a:active{color:#006bb4}.example-message-success{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#e5efe5;border-color:none;color:#006400}.example-message-success a{color:#1979c3}.example-message-success a:hover{color:#006bb4}.example-message-success a:active{color:#006bb4}.example-message-notice{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400}.example-message-notice a{color:#1979c3}.example-message-notice a:hover{color:#006bb4}.example-message-notice a:active{color:#006bb4}.example-message-1{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fdf0d5;border-color:none;color:#6f4400;position:relative;padding-left:40px}.example-message-1 a{color:#1979c3}.example-message-1 a:hover{color:#006bb4}.example-message-1 a:active{color:#006bb4}.example-message-1>:first-child:before{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#c07600;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;left:0;top:50%;text-align:center;width:40px}.example-message-2{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fae5e5;border-color:none;color:#e02b27;position:relative;padding-right:40px}.example-message-2 a{color:#1979c3}.example-message-2 a:hover{color:#006bb4}.example-message-2 a:active{color:#006bb4}.example-message-2:before{content:'';position:absolute;width:30px;text-align:center;top:0;height:100%;display:block;padding:0;background:#b30000}.example-message-2>:first-child:before{content:'';position:absolute;overflow:hidden;top:50%;margin-top:-5px}.example-message-2>:first-child:after{font-family:"icons-blank-theme";content:'\e602';font-size:28px;line-height:28px;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;top:50%;text-align:center;width:30px}.example-message-2:before{right:0;border-radius:0}.example-message-2>:first-child:before{width:0;height:0;border:5px solid rgba(0,0,0,0);border-right-color:#b30000;right:30px}.example-message-2>:first-child:after{right:0}.example-message-3{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#e5efe5;border-color:none;color:#006400;position:relative;padding-left:40px}.example-message-3 a{color:#1979c3}.example-message-3 a:hover{color:#006bb4}.example-message-3 a:active{color:#006bb4}.example-message-3:before{content:'';position:absolute;width:30px;text-align:center;top:0;height:100%;display:block;padding:0;background:#006400}.example-message-3>:first-child:before{content:'';position:absolute;overflow:hidden;top:50%;margin-top:-5px}.example-message-3>:first-child:after{font-family:"icons-blank-theme";content:'\e610';font-size:28px;line-height:28px;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;top:50%;text-align:center;width:30px}.example-message-3:before{left:0;border-radius:0}.example-message-3>:first-child:before{width:0;height:0;border:5px solid rgba(0,0,0,0);border-left-color:#006400;left:30px}.example-message-3>:first-child:after{left:0}.example-message-4{display:block;margin:0 0 10px;padding:10px 20px;border-radius:0;font-size:13px;font-size:1.3rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.2em;background:#fc0;border-color:#ffa500;color:#000;position:relative;padding-left:40px;border-width:4px;border-radius:10px}.example-message-4 a{color:#00f}.example-message-4 a:hover{color:#009}.example-message-4 a:active{color:#006}.example-message-4:before{content:'';position:absolute;width:30px;text-align:center;top:0;height:100%;display:block;padding:0;background:#green}.example-message-4>:first-child:before{content:'';position:absolute;overflow:hidden;top:50%;margin-top:-5px}.example-message-4>:first-child:after{font-family:"icons-blank-theme";content:'\e606';font-size:28px;line-height:28px;color:#000;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;margin:-14px 0 0;position:absolute;top:50%;text-align:center;width:30px}.example-message-4:before{left:0;border-radius:0}.example-message-4>:first-child:before{width:0;height:0;border:5px solid rgba(0,0,0,0);border-left-color:#green;left:30px}.example-message-4>:first-child:after{left:0}header.header{background-color:rgba(255,0,0,.2)}.column.main{background-color:rgba(255,255,0,.2)}.column.left{background-color:rgba(0,255,255,.2)}.column.right{background-color:rgba(0,0,255,.2)}footer.footer{background-color:rgba(0,0,0,.2)}.columns{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:wrap}.columns:after{content:" ";display:block;height:0;clear:both;overlow:hidden;visibility:hidden}.columns>.column{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;min-height:10px}.layout-1 .column.main{width:100%;order:2}.layout-3 .column.main{width:66.66666667%;display:inline-block;order:2}.layout-2-left .column.main{width:83.33333333%;float:right;order:2}.layout-2-right .column.main{width:83.33333333%;float:left;order:1}.layout-3 .column.left{width:16.66666667%;float:left;order:1}.layout-2-left .column.left{width:16.66666667%;float:left;order:1}.layout-2-right .column.left{width:16.66666667%;float:left;order:1}.layout-3 .column.right{width:16.66666667%;float:right;order:3}.layout-2-left .column.right{width:16.66666667%;float:right;order:2}.layout-2-right .column.right{width:16.66666667%;float:right;order:2}.layout-example-3 .column.main{width:60%;display:inline-block;order:2}.layout-example-3 .column.left{width:20%;float:left;order:1}.layout-example-3 .column.right{width:20%;float:right;order:3}.layout-example-3-1 .column.main{width:60%;float:left;order:1}.layout-example-3-1 .column.left{width:20%;display:inline-block;order:2}.layout-example-3-1 .column.right{width:20%;float:right;order:3}header.header,footer.footer,.page.main{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;margin:0 auto;padding-left:20px;padding-right:20px;width:auto;min-width:1000px;max-width:1280px}.pages>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.pages .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.pages .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages a.page{padding:0 10px;color:#1979c3;display:inline-block;text-decoration:none}.pages a.page:visited{color:#800080}.pages a.page:hover{color:#006bb4;text-decoration:none}.pages a.page:active{color:#ff5501}.pages strong.page{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#333;display:inline-block;font-weight:700}.pages .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.pages .action:visited{color:#7d7d7d}.pages .action:hover{color:#7d7d7d;text-decoration:none}.pages .action:active{color:#7d7d7d}.pages .action.next{display:inline-block;text-decoration:none}.pages .action.next:visited:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.next:hover:before{color:#7d7d7d}.pages .action.next:active:before{color:#7d7d7d}.pages .action.previous{display:inline-block;text-decoration:none}.pages .action.previous:visited:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.pages .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.pages .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.pages .action.previous:hover:before{color:#7d7d7d}.pages .action.previous:active:before{color:#7d7d7d}.example-pages-1>.label{display:inline-block;font-weight:400;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal}.example-pages-1>.label:after{content:':'}.example-pages-1 .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.example-pages-1 .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 3px;display:inline-block}.example-pages-1 .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-1 a.page{background-color:#ccc;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #f4f4f4 0, #ccc 100%);background-image:linear-gradient(to bottom, #f4f4f4 0, #ccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4', endColorstr='#cccccc', GradientType=0);border:1px solid #b3b3b3;padding:0 10px;color:#333;display:inline-block;text-decoration:none}.example-pages-1 a.page:visited{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#800080}.example-pages-1 a.page:hover{background-color:#f4f4f4;background-repeat:repeat-x;background-image:-webkit-linear-gradient(top, #ccc 0, #f4f4f4 100%);background-image:linear-gradient(to bottom, #ccc 0, #f4f4f4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#f4f4f4', GradientType=0);border:1px solid #999;color:#333;text-decoration:none}.example-pages-1 a.page:active{background-color:'';background-repeat:repeat-x;background-image:-webkit-linear-gradient(top,'' 0,'' 100%);background-image:linear-gradient(to bottom,'' 0,'' 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='''', endColorstr='''', GradientType=0);color:#ff5501}.example-pages-1 strong.page{background-color:#1979c3;border:1px solid #135d96;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#f7b32e;display:inline-block;font-weight:700}.example-pages-1 .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.example-pages-1 .action:visited{color:#7d7d7d}.example-pages-1 .action:hover{color:#ff5501;text-decoration:none}.example-pages-1 .action:active{color:#7d7d7d}.example-pages-1 .action.next{display:inline-block;text-decoration:none}.example-pages-1 .action.next:visited:before{color:#7d7d7d}.example-pages-1 .action.next:active:before{color:#7d7d7d}.example-pages-1 .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-1 .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:30px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-1 .action.next:hover:before{color:#ff5501}.example-pages-1 .action.next:active:before{color:#7d7d7d}.example-pages-1 .action.previous{display:inline-block;text-decoration:none}.example-pages-1 .action.previous:visited:before{color:#7d7d7d}.example-pages-1 .action.previous:active:before{color:#7d7d7d}.example-pages-1 .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-1 .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:30px;line-height:inherit;color:#7d7d7d;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-1 .action.previous:hover:before{color:#ff5501}.example-pages-1 .action.previous:active:before{color:#7d7d7d}.example-pages-2>.label{display:inline-block;font-weight:400;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal}.example-pages-2>.label:after{content:':'}.example-pages-2 .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.example-pages-2 .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.example-pages-2 .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-2 a.page{padding:0 10px;color:#1979c3;display:inline-block;text-decoration:none}.example-pages-2 a.page:visited{color:#800080}.example-pages-2 a.page:hover{color:#006bb4;text-decoration:none}.example-pages-2 a.page:active{color:#ff5501}.example-pages-2 strong.page{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#333;display:inline-block;font-weight:700}.example-pages-2 .action{border:1px solid #d1d1d1;padding:0;color:#7d7d7d;display:inline-block;text-decoration:none}.example-pages-2 .action:visited{color:#7d7d7d}.example-pages-2 .action:hover{color:#7d7d7d;text-decoration:none}.example-pages-2 .action:active{color:#7d7d7d}.example-pages-3>.label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 .items{font-size:0;line-height:0;letter-spacing:-1px;white-space:nowrap;margin:0;padding:0;list-style-type:none;list-style-image:none;display:inline-block;font-weight:400}.example-pages-3 .item{font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;margin:0 1px;display:inline-block}.example-pages-3 .item .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 a.page{background-color:#1979c3;padding:0 10px;color:#fff;display:inline-block;text-decoration:none}.example-pages-3 a.page:visited{background-color:#800080;color:#fff}.example-pages-3 a.page:hover{background-color:#006bb4;color:#fff;text-decoration:none}.example-pages-3 a.page:active{background-color:#ff5501;color:#fff}.example-pages-3 strong.page{background-color:#800080;font-size:1.2rem;font-size:12px;line-height:32px;letter-spacing:normal;padding:0 10px;color:#fff;display:inline-block;font-weight:700}.example-pages-3 .action{background-color:#1979c3;border:1px solid #d1d1d1;padding:0;color:#fff;display:inline-block;text-decoration:none}.example-pages-3 .action:visited{background-color:#800080;color:#7d7d7d}.example-pages-3 .action:hover{background-color:#006bb4;color:#fff;text-decoration:none}.example-pages-3 .action:active{background-color:#ff5501;color:#fff}.example-pages-3 .action.next{display:inline-block;text-decoration:none}.example-pages-3 .action.next:visited:before{color:#7d7d7d}.example-pages-3 .action.next:active:before{color:#fff}.example-pages-3 .action.next>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 .action.next:before{font-family:"icons-blank-theme";content:'\e608';font-size:32px;line-height:inherit;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-3 .action.next:hover:before{color:#fff}.example-pages-3 .action.next:active:before{color:#fff}.example-pages-3 .action.previous{display:inline-block;text-decoration:none}.example-pages-3 .action.previous:visited:before{color:#7d7d7d}.example-pages-3 .action.previous:active:before{color:#fff}.example-pages-3 .action.previous>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-pages-3 .action.previous:before{font-family:"icons-blank-theme";content:'\e617';font-size:32px;line-height:inherit;color:#fff;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center}.example-pages-3 .action.previous:hover:before{color:#fff}.example-pages-3 .action.previous:active:before{color:#fff}.window.popup.popup-example{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example .popup.actions .action.close:focus,.window.popup.popup-example .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example .popup.actions .action.close.disabled,.window.popup.popup-example .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example.active{opacity:1}.window.popup.popup-example-1{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-1 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-1 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-1 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-1 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-1 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-1 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-1 .popup.actions .action.close:focus,.window.popup.popup-example-1 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-1 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-1 .popup.actions .action.close.disabled,.window.popup.popup-example-1 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-1 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-1.active{opacity:1}.window.overlay{-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;transition:opacity .15s linear;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background-color:#000;opacity:0}.window.overlay.active{opacity:.5;filter:alpha(opacity=50)}.window.popup.popup-example-2{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;overflow-y:auto;max-height:200px;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-2 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-2 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-2 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-2 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-2 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-2 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-2 .popup.actions .action.close:focus,.window.popup.popup-example-2 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-2 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-2 .popup.actions .action.close.disabled,.window.popup.popup-example-2 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-2 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-2.active{opacity:1}.window.popup.popup-example-3{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-3 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-3 .popup.content{overflow-y:auto;max-height:200px}.window.popup.popup-example-3 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-3 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-3 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-3 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-3 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-3 .popup.actions .action.close:focus,.window.popup.popup-example-3 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-3 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-3 .popup.actions .action.close.disabled,.window.popup.popup-example-3 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-3 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-3.active{opacity:1}.window.popup.popup-example-4{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-4 .popup.header{margin:0 0 25px}.window.popup.popup-example-4 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-4 .popup.content{margin:0 0 20px}.window.popup.popup-example-4 .popup.footer{margin:0 20px}.window.popup.popup-example-4 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-4 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-4 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-4 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-4 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-4 .popup.actions .action.close:focus,.window.popup.popup-example-4 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-4 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-4 .popup.actions .action.close.disabled,.window.popup.popup-example-4 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-4 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-4.active{opacity:1}.window.popup.popup-example-5{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-5 .popup.header .title{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.window.popup.popup-example-5 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-5 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-5 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-5 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-5 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-5 .popup.actions .action.close:focus,.window.popup.popup-example-5 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-5 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-5 .popup.actions .action.close.disabled,.window.popup.popup-example-5 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-5 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-5.active{opacity:1}.window.popup.popup-example-6{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-6 .popup.footer .actions.toolbar{text-align:left}.window.popup.popup-example-6 .popup.footer .actions.toolbar:before,.window.popup.popup-example-6 .popup.footer .actions.toolbar:after{content:"";display:table}.window.popup.popup-example-6 .popup.footer .actions.toolbar:after{clear:both}.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary{float:left}.window.popup.popup-example-6 .popup.footer .actions.toolbar .primary,.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary{display:inline-block}.window.popup.popup-example-6 .popup.footer .actions.toolbar .primary a.action,.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary a.action{display:inline-block}.window.popup.popup-example-6 .popup.footer .actions.toolbar .primary .action{margin:0 5px 0 0}.window.popup.popup-example-6 .popup.footer .actions.toolbar .secondary a.action{margin-top:6px}.window.popup.popup-example-6 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-6 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-6 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-6 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-6 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-6 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-6 .popup.actions .action.close:focus,.window.popup.popup-example-6 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-6 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-6 .popup.actions .action.close.disabled,.window.popup.popup-example-6 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-6 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-6.active{opacity:1}.window.popup.popup-example-7{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-7 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-7 .popup.actions .action.close{position:absolute;top:10px;right:10px}.window.popup.popup-example-7.active{opacity:1}.window.popup.popup-example-8{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-8 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-8 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-8 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e613';font-size:30px;line-height:inherit;color:red;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:middle;text-align:center;margin:0}.window.popup.popup-example-8 .popup.actions .action.close:hover:before{color:#008000}.window.popup.popup-example-8 .popup.actions .action.close:active:before{color:#00f}.window.popup.popup-example-8 .popup.actions .action.close:focus,.window.popup.popup-example-8 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-8 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-8 .popup.actions .action.close.disabled,.window.popup.popup-example-8 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-8 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-8.active{opacity:1}.window.popup.popup-example-9{width:380px;background-color:#fff;padding:22px;border:1px solid #aeaeae;-webkit-box-shadow:0 3px 3px rgba(0,0,0,.15);-moz-box-shadow:0 3px 3px rgba(0,0,0,.15);box-shadow:0 3px 3px rgba(0,0,0,.15);display:none;position:fixed;top:20%;left:50%;margin-left:-212px;z-index:1001;opacity:0;-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear;transition:opacity .3s linear}.window.popup.popup-example-9 .popup.header .title{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}.window.popup.popup-example-9 .popup.actions .action.close{position:absolute;display:inline-block;background-image:none;background:0;border:0;margin:0;padding:0;-moz-box-sizing:content-box;box-shadow:none;text-shadow:none;text-decoration:none;line-height:inherit;font-weight:400;top:10px;right:10px}.window.popup.popup-example-9 .popup.actions .action.close>span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.window.popup.popup-example-9 .popup.actions .action.close:before{font-family:"icons-blank-theme";content:'\e616';font-size:22px;line-height:inherit;color:inherit;overflow:hidden;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;display:inline-block;vertical-align:top;text-align:center;margin:0}.window.popup.popup-example-9 .popup.actions .action.close:hover:before{color:inherit}.window.popup.popup-example-9 .popup.actions .action.close:active:before{color:inherit}.window.popup.popup-example-9 .popup.actions .action.close:focus,.window.popup.popup-example-9 .popup.actions .action.close:active{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;background:0;border:0}.window.popup.popup-example-9 .popup.actions .action.close:hover{background:0;border:0}.window.popup.popup-example-9 .popup.actions .action.close.disabled,.window.popup.popup-example-9 .popup.actions .action.close[disabled],fieldset[disabled] .window.popup.popup-example-9 .popup.actions .action.close{cursor:not-allowed;pointer-events:none;opacity:.5}.window.popup.popup-example-9.active{opacity:1}.window.overlay.example-overlay-1.active{-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;transition:opacity .15s linear;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;background-color:#0f5293;opacity:0}.window.overlay.example-overlay-1.active.active{opacity:.8;filter:alpha(opacity=50)}.example-ratings-1{overflow:hidden}.example-ratings-1:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.example-ratings-1 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-1 input[type="radio"]:focus+label:before,.example-ratings-1 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-1 label{position:absolute;display:block;cursor:pointer}.example-ratings-1 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-1 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.example-ratings-1 label:hover:before{opacity:1}.example-ratings-1 label:hover~label:before{opacity:0}.example-ratings-1 .rating-5{z-index:2}.example-ratings-1 .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-1 .rating-4{z-index:3}.example-ratings-1 .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.example-ratings-1 .rating-3{z-index:4}.example-ratings-1 .rating-3:before{content:'\e605' '\e605' '\e605'}.example-ratings-1 .rating-2{z-index:5}.example-ratings-1 .rating-2:before{content:'\e605' '\e605'}.example-ratings-1 .rating-1{z-index:6}.example-ratings-1 .rating-1:before{content:'\e605'}.example-ratings-2{overflow:hidden}.example-ratings-2:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.example-ratings-2 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-2 input[type="radio"]:focus+label:before,.example-ratings-2 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-2 label{position:absolute;display:block;cursor:pointer}.example-ratings-2 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-2 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.example-ratings-2 label:hover:before{opacity:1}.example-ratings-2 label:hover~label:before{opacity:0}.example-ratings-2 .rating-8{z-index:2}.example-ratings-2 .rating-8:before{content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-7{z-index:3}.example-ratings-2 .rating-7:before{content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-6{z-index:4}.example-ratings-2 .rating-6:before{content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-5{z-index:5}.example-ratings-2 .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-4{z-index:6}.example-ratings-2 .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.example-ratings-2 .rating-3{z-index:7}.example-ratings-2 .rating-3:before{content:'\e605' '\e605' '\e605'}.example-ratings-2 .rating-2{z-index:8}.example-ratings-2 .rating-2:before{content:'\e605' '\e605'}.example-ratings-2 .rating-1{z-index:9}.example-ratings-2 .rating-1:before{content:'\e605'}.example-ratings-3{overflow:hidden}.example-ratings-3:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#aff5e3;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.example-ratings-3 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-3 input[type="radio"]:focus+label:before,.example-ratings-3 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-3 label{position:absolute;display:block;cursor:pointer}.example-ratings-3 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-3 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#0a6767;opacity:0}.example-ratings-3 label:hover:before{opacity:1}.example-ratings-3 label:hover~label:before{opacity:0}.example-ratings-3 .rating-5{z-index:2}.example-ratings-3 .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.example-ratings-3 .rating-4{z-index:3}.example-ratings-3 .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.example-ratings-3 .rating-3{z-index:4}.example-ratings-3 .rating-3:before{content:'\e605' '\e605' '\e605'}.example-ratings-3 .rating-2{z-index:5}.example-ratings-3 .rating-2:before{content:'\e605' '\e605'}.example-ratings-3 .rating-1{z-index:6}.example-ratings-3 .rating-1:before{content:'\e605'}.example-ratings-4{overflow:hidden}.example-ratings-4:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e600' '\e600' '\e600' '\e600' '\e600';position:absolute;z-index:1;display:block}.example-ratings-4 input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-4 input[type="radio"]:focus+label:before,.example-ratings-4 input[type="radio"]:checked+label:before{opacity:1}.example-ratings-4 label{position:absolute;display:block;cursor:pointer}.example-ratings-4 label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-ratings-4 label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.example-ratings-4 label:hover:before{opacity:1}.example-ratings-4 label:hover~label:before{opacity:0}.example-ratings-4 .rating-5{z-index:2}.example-ratings-4 .rating-5:before{content:'\e600' '\e600' '\e600' '\e600' '\e600'}.example-ratings-4 .rating-4{z-index:3}.example-ratings-4 .rating-4:before{content:'\e600' '\e600' '\e600' '\e600'}.example-ratings-4 .rating-3{z-index:4}.example-ratings-4 .rating-3:before{content:'\e600' '\e600' '\e600'}.example-ratings-4 .rating-2{z-index:5}.example-ratings-4 .rating-2:before{content:'\e600' '\e600'}.example-ratings-4 .rating-1{z-index:6}.example-ratings-4 .rating-1:before{content:'\e600'}.exapmle-ratings-5 .control.rating.vote{overflow:hidden}.exapmle-ratings-5 .control.rating.vote:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc;content:'\e605' '\e605' '\e605' '\e605' '\e605';position:absolute;z-index:1;display:block}.exapmle-ratings-5 .control.rating.vote input[type="radio"]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.exapmle-ratings-5 .control.rating.vote input[type="radio"]:focus+label:before,.exapmle-ratings-5 .control.rating.vote input[type="radio"]:checked+label:before{opacity:1}.exapmle-ratings-5 .control.rating.vote label{position:absolute;display:block;cursor:pointer}.exapmle-ratings-5 .control.rating.vote label span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.exapmle-ratings-5 .control.rating.vote label:before{letter-spacing:-10px;font-family:'icons-blank-theme';font-style:normal;font-size:28px;line-height:28px;height:28px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601;opacity:0}.exapmle-ratings-5 .control.rating.vote label:hover:before{opacity:1}.exapmle-ratings-5 .control.rating.vote label:hover~label:before{opacity:0}.exapmle-ratings-5 .control.rating.vote .rating-5{z-index:2}.exapmle-ratings-5 .control.rating.vote .rating-5:before{content:'\e605' '\e605' '\e605' '\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-4{z-index:3}.exapmle-ratings-5 .control.rating.vote .rating-4:before{content:'\e605' '\e605' '\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-3{z-index:4}.exapmle-ratings-5 .control.rating.vote .rating-3:before{content:'\e605' '\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-2{z-index:5}.exapmle-ratings-5 .control.rating.vote .rating-2:before{content:'\e605' '\e605'}.exapmle-ratings-5 .control.rating.vote .rating-1{z-index:6}.exapmle-ratings-5 .control.rating.vote .rating-1:before{content:'\e605'}.example-rating-summary-1{overflow:hidden}.example-rating-summary-1 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-1 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-1 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-1 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-1 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-2{overflow:hidden}.example-rating-summary-2 .rating.result{width:154px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-2 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-2 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-2 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-2 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-3{overflow:hidden}.example-rating-summary-3 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-3 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#aff5e3}.example-rating-summary-3 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-3 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#0a6767}.example-rating-summary-3 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-4{overflow:hidden}.example-rating-summary-4 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-4 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e600' '\e600' '\e600' '\e600' '\e600';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-4 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-4 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e600' '\e600' '\e600' '\e600' '\e600';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-4 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-5{overflow:hidden}.example-rating-summary-5 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-5 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-5 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-5 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-5 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-5 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-6 .rating.summary{overflow:hidden}.example-rating-summary-6 .rating.summary .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-6 .rating.summary .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-6 .rating.summary .rating.result>span{display:block;overflow:hidden}.example-rating-summary-6 .rating.summary .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-6 .rating.summary .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-7{overflow:hidden}.example-rating-summary-7 .rating.result{width:100px;display:inline-block;vertical-align:middle;position:relative}.example-rating-summary-7 .rating.result:before{position:absolute;z-index:1;top:0;left:0;width:100%;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ccc}.example-rating-summary-7 .rating.result>span{display:block;overflow:hidden}.example-rating-summary-7 .rating.result>span:before{position:relative;z-index:2;display:block;font-family:'icons-blank-theme';content:'\e605' '\e605' '\e605' '\e605' '\e605';font-style:normal;font-size:28px;line-height:28px;height:28px;letter-spacing:-10px;speak:none;font-weight:400;-webkit-font-smoothing:antialiased;color:#ff5601}.example-rating-summary-7 .rating.result>span span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-rating-summary-7 .label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.example-sections-1{position:relative;z-index:1}.example-sections-1:before,.example-sections-1:after{content:"";display:table}.example-sections-1:after{clear:both}.example-sections-1>.item.title{float:left}.example-sections-1>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-1>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-1>.item.content:before,.example-sections-1>.item.content:after{content:"";display:table}.example-sections-1>.item.content:after{clear:both}.example-sections-1>.item.content.active{display:block}.example-sections-1>.item.title{margin:0 5px 0 0}.example-sections-1>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.example-sections-1>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-1>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.example-sections-1>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-1>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-1>.item.title:not(.disabled)>.switch:focus,.example-sections-1>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-1>.item.title:not(.disabled)>.switch:active,.example-sections-1>.item.title.active>.switch,.example-sections-1>.item.title.active>.switch:focus,.example-sections-1>.item.title.active>.switch:hover{background-color:#fff;color:#333}.example-sections-1>.item.title.active>.switch{padding-bottom:6px}.example-sections-1>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border:1px solid #d1d1d1}.example-sections-2{position:relative;z-index:1}.example-sections-2:before,.example-sections-2:after{content:"";display:table}.example-sections-2:after{clear:both}.example-sections-2>.item.title{float:left}.example-sections-2>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-2>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-2>.item.content:before,.example-sections-2>.item.content:after{content:"";display:table}.example-sections-2>.item.content:after{clear:both}.example-sections-2>.item.content.active{display:block}.example-sections-2>.item.title{margin:0 5px 0 0}.example-sections-2>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.example-sections-2>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-2>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.example-sections-2>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-2>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-2>.item.title:not(.disabled)>.switch:focus,.example-sections-2>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-2>.item.title:not(.disabled)>.switch:active,.example-sections-2>.item.title.active>.switch,.example-sections-2>.item.title.active>.switch:focus,.example-sections-2>.item.title.active>.switch:hover{background-color:#fff;color:#333}.example-sections-2>.item.title.active>.switch{padding-bottom:6px}.example-sections-2>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border-top:1px solid #d1d1d1}.example-sections-3{margin:0;padding:0}.example-sections-3>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.example-sections-3>.item.title>.switch{display:block}.example-sections-3>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.example-sections-3>.item.content:before,.example-sections-3>.item.content:after{content:"";display:table}.example-sections-3>.item.content:after{clear:both}.example-sections-3>.item.content.active{display:block}.example-sections-3>.item.title{margin:0 0 5px}.example-sections-3>.item.title>.switch{border:1px solid #d1d1d1;background-color:#f0f0f0;font-size:18px;font-size:1.8rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:40px;color:#7d7d7d;text-decoration:none;height:40px;padding:5px 20px 5px 20px}.example-sections-3>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-3>.item.title>.switch:hover{color:#7d7d7d;text-decoration:#7d7d7d}.example-sections-3>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-3>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-3>.item.title:not(.disabled)>.switch:focus,.example-sections-3>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-3>.item.title:not(.disabled)>.switch:active,.example-sections-3>.item.title.active>.switch,.example-sections-3>.item.title.active>.switch:focus,.example-sections-3>.item.title.active>.switch:hover{background-color:#fff;padding-bottom:5px}.example-sections-3>.item.content{margin:0;padding:20px 20px 20px 20px;background-color:#fff;border:1px solid #d1d1d1}@media only screen and (max-width: 99999px){.example-sections-4{ position:relative;z-index:1}.example-sections-4:before,.example-sections-4:after{content:"";display:table}.example-sections-4:after{clear:both}.example-sections-4>.item.title{float:left}.example-sections-4>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-4>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-4>.item.content:before,.example-sections-4>.item.content:after{content:"";display:table}.example-sections-4>.item.content:after{clear:both}.example-sections-4>.item.content.active{display:block}.example-sections-4>.item.title{margin:0 5px 0 0}.example-sections-4>.item.title>.switch{font-size:14px;font-size:1.4rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:20px;color:#7d7d7d;text-decoration:none;height:20px;padding:5px 20px 5px 20px;border:1px solid #d1d1d1;background-color:#f0f0f0;border-bottom:0}.example-sections-4>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-4>.item.title>.switch:hover{color:#7d7d7d;text-decoration:none}.example-sections-4>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-4>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-4>.item.title:not(.disabled)>.switch:focus,.example-sections-4>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-4>.item.title:not(.disabled)>.switch:active,.example-sections-4>.item.title.active>.switch,.example-sections-4>.item.title.active>.switch:focus,.example-sections-4>.item.title.active>.switch:hover{background-color:#fff;color:#333}.example-sections-4>.item.title.active>.switch{padding-bottom:6px}.example-sections-4>.item.content{background-color:#fff;margin-top:31px;padding:20px 20px 20px 20px;border:1px solid #d1d1d1}}@media only screen and (max-width: 768px){.example-sections-4{ margin:0;padding:0}.example-sections-4>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.example-sections-4>.item.title>.switch{display:block}.example-sections-4>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.example-sections-4>.item.content:before,.example-sections-4>.item.content:after{content:"";display:table}.example-sections-4>.item.content:after{clear:both}.example-sections-4>.item.content.active{display:block}.example-sections-4>.item.title{margin:0 0 5px}.example-sections-4>.item.title>.switch{border:1px solid #d1d1d1;background-color:#f0f0f0;font-size:18px;font-size:1.8rem;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:600;font-style:normal;line-height:40px;color:#7d7d7d;text-decoration:none;height:40px;padding:5px 20px 5px 20px}.example-sections-4>.item.title>.switch:visited{color:#7d7d7d;text-decoration:none}.example-sections-4>.item.title>.switch:hover{color:#7d7d7d;text-decoration:#7d7d7d}.example-sections-4>.item.title>.switch:active{color:#333;text-decoration:none}.example-sections-4>.item.title>.switch:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-sections-4>.item.title:not(.disabled)>.switch:focus,.example-sections-4>.item.title:not(.disabled)>.switch:hover{background-color:#fcfcfc}.example-sections-4>.item.title:not(.disabled)>.switch:active,.example-sections-4>.item.title.active>.switch,.example-sections-4>.item.title.active>.switch:focus,.example-sections-4>.item.title.active>.switch:hover{background-color:#fff;padding-bottom:5px}.example-sections-4>.item.content{margin:0;padding:20px 20px 20px 20px;background-color:#fff;border:1px solid #d1d1d1}}.example-sections-5{position:relative;z-index:1}.example-sections-5:before,.example-sections-5:after{content:"";display:table}.example-sections-5:after{clear:both}.example-sections-5>.item.title{float:left}.example-sections-5>.item.title>.switch{display:block;position:relative;z-index:2;height:20px}.example-sections-5>.item.content{margin-top:20px;width:100%;float:right;margin-left:-100%;display:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.example-sections-5>.item.content:before,.example-sections-5>.item.content:after{content:"";display:table}.example-sections-5>.item.content:after{clear:both}.example-sections-5>.item.content.active{display:block}.example-sections-6{margin:0;padding:0}.example-sections-6>.item.title{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;width:100%}.example-sections-6>.item.title>.switch{display:block}.example-sections-6>.item.content{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:none;margin:0;display:none}.example-sections-6>.item.content:before,.example-sections-6>.item.content:after{content:"";display:table}.example-sections-6>.item.content:after{clear:both}.example-sections-6>.item.content.active{display:block}.example-table-1{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-1 th{text-align:left}.example-table-1>tbody>tr>th,.example-table-1>tfoot>tr>th,.example-table-1>tbody>tr>td,.example-table-1>tfoot>tr>td{vertical-align:top}.example-table-1>thead>tr>th,.example-table-1>thead>tr>td{vertical-align:bottom}.example-table-1>thead>tr>th,.example-table-1>tbody>tr>th,.example-table-1>tfoot>tr>th,.example-table-1>thead>tr>td,.example-table-1>tbody>tr>td,.example-table-1>tfoot>tr>td{padding:3px 10px}.example-table-2>thead>tr>td,.example-table-2>tbody>tr>td,.example-table-2>tfoot>tr>td{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}.example-table-2>thead>tr>th,.example-table-2>tbody>tr>th,.example-table-2>tfoot>tr>th{font-size:14px;font-size:1.4rem;color:#111;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;font-style:normal;line-height:1.42857143}.example-table-3{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-3 th{text-align:left}.example-table-3>tbody>tr>th,.example-table-3>tfoot>tr>th,.example-table-3>tbody>tr>td,.example-table-3>tfoot>tr>td{vertical-align:top}.example-table-3>thead>tr>th,.example-table-3>thead>tr>td{vertical-align:bottom}.example-table-3>thead>tr>th,.example-table-3>tbody>tr>th,.example-table-3>tfoot>tr>th,.example-table-3>thead>tr>td,.example-table-3>tbody>tr>td,.example-table-3>tfoot>tr>td{padding:3px 10px}.example-table-3>caption{font-size:18px;font-size:1.8rem;color:red;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143;text-align:left;margin-top:20px;margin-bottom:10px}.example-table-4{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-4 th{text-align:left}.example-table-4>tbody>tr>th,.example-table-4>tfoot>tr>th,.example-table-4>tbody>tr>td,.example-table-4>tfoot>tr>td{vertical-align:top}.example-table-4>thead>tr>th,.example-table-4>thead>tr>td{vertical-align:bottom}.example-table-4>thead>tr>th,.example-table-4>tbody>tr>th,.example-table-4>tfoot>tr>th,.example-table-4>thead>tr>td,.example-table-4>tbody>tr>td,.example-table-4>tfoot>tr>td{padding:3px 10px}.example-table-4>thead>tr>td,.example-table-4>tbody>tr>td,.example-table-4>tfoot>tr>td{padding:15px 25px 5px 0}.example-table-4>thead>tr>th,.example-table-4>tbody>tr>th,.example-table-4>tfoot>tr>th{padding:15px 25px 10px 0}.example-table-5{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;background-color:#fff}.example-table-5 th{text-align:left}.example-table-5>tbody>tr>th,.example-table-5>tfoot>tr>th,.example-table-5>tbody>tr>td,.example-table-5>tfoot>tr>td{vertical-align:top}.example-table-5>thead>tr>th,.example-table-5>thead>tr>td{vertical-align:bottom}.example-table-5>thead>tr>th,.example-table-5>tbody>tr>th,.example-table-5>tfoot>tr>th,.example-table-5>thead>tr>td,.example-table-5>tbody>tr>td,.example-table-5>tfoot>tr>td{padding:3px 10px}.example-table-5>thead{background-color:#ff0}.example-table-5>tfoot{background-color:#008000}.example-table-5>tbody>tr>td{background-color:#ffc0cb}.example-table-5>tbody>tr>th{background-color:#ffa500}.example-table-6{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:1px solid #d1d1d1}.example-table-6 th{text-align:left}.example-table-6>tbody>tr>th,.example-table-6>tfoot>tr>th,.example-table-6>tbody>tr>td,.example-table-6>tfoot>tr>td{vertical-align:top}.example-table-6>thead>tr>th,.example-table-6>thead>tr>td{vertical-align:bottom}.example-table-6>thead>tr>th,.example-table-6>tbody>tr>th,.example-table-6>tfoot>tr>th,.example-table-6>thead>tr>td,.example-table-6>tbody>tr>td,.example-table-6>tfoot>tr>td{padding:3px 10px}.example-table-6>thead>tr>th,.example-table-6>tbody>tr>th,.example-table-6>tfoot>tr>th,.example-table-6>thead>tr>td,.example-table-6>tbody>tr>td,.example-table-6>tfoot>tr>td{border:1px solid #d1d1d1}.example-table-7{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-7 th{text-align:left}.example-table-7>tbody>tr>th,.example-table-7>tfoot>tr>th,.example-table-7>tbody>tr>td,.example-table-7>tfoot>tr>td{vertical-align:top}.example-table-7>thead>tr>th,.example-table-7>thead>tr>td{vertical-align:bottom}.example-table-7>thead>tr>th,.example-table-7>tbody>tr>th,.example-table-7>tfoot>tr>th,.example-table-7>thead>tr>td,.example-table-7>tbody>tr>td,.example-table-7>tfoot>tr>td{padding:3px 10px}.example-table-7>thead>tr>th,.example-table-7>tbody>tr>th,.example-table-7>tfoot>tr>th,.example-table-7>thead>tr>td,.example-table-7>tbody>tr>td,.example-table-7>tfoot>tr>td{border-top:1px solid #d1d1d1}.example-table-7>caption+thead>tr:first-child>th,.example-table-7>colgroup+thead>tr:first-child>th,.example-table-7>thead:first-child>tr:first-child>th,.example-table-7>caption+thead>tr:first-child>td,.example-table-7>colgroup+thead>tr:first-child>td,.example-table-7>thead:first-child>tr:first-child>td{border-top:0}.example-table-7>tbody+tbody{border-top:1px solid #919191}.example-table-8{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-8 th{text-align:left}.example-table-8>tbody>tr>th,.example-table-8>tfoot>tr>th,.example-table-8>tbody>tr>td,.example-table-8>tfoot>tr>td{vertical-align:top}.example-table-8>thead>tr>th,.example-table-8>thead>tr>td{vertical-align:bottom}.example-table-8>thead>tr>th,.example-table-8>tbody>tr>th,.example-table-8>tfoot>tr>th,.example-table-8>thead>tr>td,.example-table-8>tbody>tr>td,.example-table-8>tfoot>tr>td{padding:3px 10px}.example-table-8>thead>tr>th,.example-table-8>tbody>tr>th,.example-table-8>tfoot>tr>th,.example-table-8>thead>tr>td,.example-table-8>tbody>tr>td,.example-table-8>tfoot>tr>td{border-left:1px solid #d1d1d1}.example-table-8>thead>tr>th:first-child,.example-table-8>tbody>tr>th:first-child,.example-table-8>tfoot>tr>th:first-child,.example-table-8>thead>tr>td:first-child,.example-table-8>tbody>tr>td:first-child,.example-table-8>tfoot>tr>td:first-child{border-left:0}.example-table-9{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:0}.example-table-9 th{text-align:left}.example-table-9>tbody>tr>th,.example-table-9>tfoot>tr>th,.example-table-9>tbody>tr>td,.example-table-9>tfoot>tr>td{vertical-align:top}.example-table-9>thead>tr>th,.example-table-9>thead>tr>td{vertical-align:bottom}.example-table-9>thead>tr>th,.example-table-9>tbody>tr>th,.example-table-9>tfoot>tr>th,.example-table-9>thead>tr>td,.example-table-9>tbody>tr>td,.example-table-9>tfoot>tr>td{padding:3px 10px}.example-table-9>thead>tr>th,.example-table-9>tbody>tr>th,.example-table-9>tfoot>tr>th,.example-table-9>thead>tr>td,.example-table-9>tbody>tr>td,.example-table-9>tfoot>tr>td{border:0}.example-table-9>thead>tr>th,.example-table-9>thead>tr>td{border-bottom:1px solid #d1d1d1}.example-table-10{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:0}.example-table-10 th{text-align:left}.example-table-10>tbody>tr>th,.example-table-10>tfoot>tr>th,.example-table-10>tbody>tr>td,.example-table-10>tfoot>tr>td{vertical-align:top}.example-table-10>thead>tr>th,.example-table-10>thead>tr>td{vertical-align:bottom}.example-table-10>thead>tr>th,.example-table-10>tbody>tr>th,.example-table-10>tfoot>tr>th,.example-table-10>thead>tr>td,.example-table-10>tbody>tr>td,.example-table-10>tfoot>tr>td{padding:3px 10px}.example-table-10>thead>tr>th,.example-table-10>tbody>tr>th,.example-table-10>tfoot>tr>th,.example-table-10>thead>tr>td,.example-table-10>tbody>tr>td,.example-table-10>tfoot>tr>td{border:0}.example-table-11{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-11 th{text-align:left}.example-table-11>tbody>tr>th,.example-table-11>tfoot>tr>th,.example-table-11>tbody>tr>td,.example-table-11>tfoot>tr>td{vertical-align:top}.example-table-11>thead>tr>th,.example-table-11>thead>tr>td{vertical-align:bottom}.example-table-11>thead>tr>th,.example-table-11>tbody>tr>th,.example-table-11>tfoot>tr>th,.example-table-11>thead>tr>td,.example-table-11>tbody>tr>td,.example-table-11>tfoot>tr>td{padding:3px 10px}.example-table-11>tbody>tr:nth-child(even)>td,.example-table-11>tbody>tr:nth-child(even)>th{background-color:#fc0;color:#000}.example-table-12{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.example-table-12 th{text-align:left}.example-table-12>tbody>tr>th,.example-table-12>tfoot>tr>th,.example-table-12>tbody>tr>td,.example-table-12>tfoot>tr>td{vertical-align:top}.example-table-12>thead>tr>th,.example-table-12>thead>tr>td{vertical-align:bottom}.example-table-12>thead>tr>th,.example-table-12>tbody>tr>th,.example-table-12>tfoot>tr>th,.example-table-12>thead>tr>td,.example-table-12>tbody>tr>td,.example-table-12>tfoot>tr>td{padding:3px 10px}.example-table-12>tbody>tr:nth-child(even):hover>td,.example-table-12>tbody>tr:nth-child(even):hover>th{background-color:#f0f0f0}.example-table-12>tbody>tr:nth-child(odd):hover>td,.example-table-12>tbody>tr:nth-child(odd):hover>th{background-color:#f0f0f0}.example-table-13{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:1px solid #d1d1d1}.example-table-13 th{text-align:left}.example-table-13>tbody>tr>th,.example-table-13>tfoot>tr>th,.example-table-13>tbody>tr>td,.example-table-13>tfoot>tr>td{vertical-align:top}.example-table-13>thead>tr>th,.example-table-13>thead>tr>td{vertical-align:bottom}.example-table-13>thead>tr>th,.example-table-13>tbody>tr>th,.example-table-13>tfoot>tr>th,.example-table-13>thead>tr>td,.example-table-13>tbody>tr>td,.example-table-13>tfoot>tr>td{padding:3px 10px}.example-table-13>thead>tr>th,.example-table-13>tbody>tr>th,.example-table-13>tfoot>tr>th,.example-table-13>thead>tr>td,.example-table-13>tbody>tr>td,.example-table-13>tfoot>tr>td{border:1px solid #d1d1d1}.example-table-13>tbody>tr:nth-child(odd)>td,.example-table-13>tbody>tr:nth-child(odd)>th{background-color:#fff;color:#333}.example-table-13>tbody>tr:nth-child(even):hover>td,.example-table-13>tbody>tr:nth-child(even):hover>th{background-color:#f0f0f0}.example-table-13>tbody>tr:nth-child(odd):hover>td,.example-table-13>tbody>tr:nth-child(odd):hover>th{background-color:#f0f0f0}@media only screen and (max-width: 768px){.example-table-14{ width:100%;margin-bottom:20px;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch}.example-table-14>table{margin-bottom:0}.example-table-14>table>thead>tr>th,.example-table-14>table>tbody>tr>th,.example-table-14>table>tfoot>tr>th,.example-table-14>table>thead>tr>td,.example-table-14>table>tbody>tr>td,.example-table-14>table>tfoot>tr>td{white-space:nowrap}}.example-table-15{border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%;border:1px solid #d1d1d1}.example-table-15 th{text-align:left}.example-table-15>tbody>tr>th,.example-table-15>tfoot>tr>th,.example-table-15>tbody>tr>td,.example-table-15>tfoot>tr>td{vertical-align:top}.example-table-15>thead>tr>th,.example-table-15>thead>tr>td{vertical-align:bottom}.example-table-15>thead>tr>th,.example-table-15>tbody>tr>th,.example-table-15>tfoot>tr>th,.example-table-15>thead>tr>td,.example-table-15>tbody>tr>td,.example-table-15>tfoot>tr>td{padding:3px 10px}.example-table-15>thead>tr>th,.example-table-15>tbody>tr>th,.example-table-15>tfoot>tr>th,.example-table-15>thead>tr>td,.example-table-15>tbody>tr>td,.example-table-15>tfoot>tr>td{border:1px solid #d1d1d1}.example-table-15>tbody>tr:nth-child(odd)>td,.example-table-15>tbody>tr:nth-child(odd)>th{background-color:#fff;color:#333}.example-table-15>tbody>tr:nth-child(even):hover>td,.example-table-15>tbody>tr:nth-child(even):hover>th{background-color:#f0f0f0}.example-table-15>tbody>tr:nth-child(odd):hover>td,.example-table-15>tbody>tr:nth-child(odd):hover>th{background-color:#f0f0f0}@media only screen and (max-width: 768px){.example-table-15{ border:0;background-color:#fc0}.example-table-15>tbody>tr:nth-child(odd)>td,.example-table-15>tbody>tr:nth-child(odd)>th{background-color:#fc0;color:#333}.example-table-15>tbody>tr:nth-child(even):hover>td,.example-table-15>tbody>tr:nth-child(even):hover>th{background-color:#fc0}.example-table-15>tbody>tr:nth-child(odd):hover>td,.example-table-15>tbody>tr:nth-child(odd):hover>th{background-color:#fc0}.example-table-15>thead>tr>th{display:none}.example-table-15>tbody>tr td,.example-table-15>tbody>tr th{display:block;padding:1.5px 10px;border-bottom:0}.example-table-15>tbody>tr td:before,.example-table-15>tbody>tr th:before{content:attr(data-th) ":";display:inline-block;padding-right:10px;font-size:14px;font-size:1.4rem;color:#111;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;font-style:normal;line-height:1.42857143}.example-table-15>tbody>tr>td{background-color:#fc0}.example-table-15>tfoot>tr td,.example-table-15>tfoot>tr th{display:block}.example-table-15>tbody>tr>th{background-color:#ffa500!important}}.example-tooltip-bottom{position:relative;display:inline-block}.example-tooltip-bottom .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;top:100%;left:0;margin-top:5px}.example-tooltip-bottom .tooltip-content:after,.example-tooltip-bottom .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-bottom .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-bottom .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-bottom .tooltip-content:after,.example-tooltip-bottom .tooltip-content:before{bottom:100%}.example-tooltip-bottom .tooltip-content:after{border-bottom-color:#fff;margin-left:-5px;left:15px}.example-tooltip-bottom .tooltip-content:before{border-bottom-color:#bbb;margin-left:-6px;left:15px}.example-tooltip-bottom>:first-child{cursor:help}.example-tooltip-bottom>:first-child:hover+.tooltip-content,.example-tooltip-bottom>:first-child:focus+.tooltip-content,.example-tooltip-bottom:hover>.tooltip-content{display:block}.example-tooltip-left{position:relative;display:inline-block}.example-tooltip-left .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;right:100%;top:0;margin-right:5px}.example-tooltip-left .tooltip-content:after,.example-tooltip-left .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-left .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-left .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-left .tooltip-content:after,.example-tooltip-left .tooltip-content:before{left:100%}.example-tooltip-left .tooltip-content:after{border-left-color:#fff;margin-top:-5px;top:15px}.example-tooltip-left .tooltip-content:before{border-left-color:#bbb;margin-top:-6px;top:15px}.example-tooltip-left>:first-child{cursor:help}.example-tooltip-left>:first-child:hover+.tooltip-content,.example-tooltip-left>:first-child:focus+.tooltip-content,.example-tooltip-left:hover>.tooltip-content{display:block}.example-tooltip-right{position:relative;display:inline-block}.example-tooltip-right .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;left:100%;top:0;margin-left:5px}.example-tooltip-right .tooltip-content:after,.example-tooltip-right .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-right .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-right .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-right .tooltip-content:after,.example-tooltip-right .tooltip-content:before{right:100%}.example-tooltip-right .tooltip-content:after{border-right-color:#fff;margin-top:-5px;top:15px}.example-tooltip-right .tooltip-content:before{border-right-color:#bbb;margin-top:-6px;top:15px}.example-tooltip-right>:first-child{cursor:help}.example-tooltip-right>:first-child:hover+.tooltip-content,.example-tooltip-right>:first-child:focus+.tooltip-content,.example-tooltip-right:hover>.tooltip-content{display:block}.example-tooltip-top{position:relative;display:inline-block}.example-tooltip-top .tooltip-content{z-index:100;background:#fff;min-width:210px;max-width:360px;padding:12px 16px;display:none;position:absolute;text-align:left;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.4;border:1px solid #bbb;bottom:100%;left:0;margin-bottom:5px}.example-tooltip-top .tooltip-content:after,.example-tooltip-top .tooltip-content:before{border:solid transparent;content:'';height:0;width:0;position:absolute}.example-tooltip-top .tooltip-content:after{border-color:transparent;border-width:5px}.example-tooltip-top .tooltip-content:before{border-color:transparent;border-width:6px}.example-tooltip-top .tooltip-content:after,.example-tooltip-top .tooltip-content:before{top:100%}.example-tooltip-top .tooltip-content:after{border-top-color:#fff;margin-left:-5px;left:15px}.example-tooltip-top .tooltip-content:before{border-top-color:#bbb;margin-left:-6px;left:15px}.example-tooltip-top>:first-child{cursor:help}.example-tooltip-top>:first-child:hover+.tooltip-content,.example-tooltip-top>:first-child:focus+.tooltip-content,.example-tooltip-top:hover>.tooltip-content{display:block}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}p{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}abbr[title]{cursor:help;border-bottom:1px dotted #d1d1d1}b,strong{font-weight:700}em,i{font-style:italic}mark{background-color:#f0f0f0;color:#000}small,.small{font-size:12px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #d1d1d1}sub,sup{font-size:71.42857143000001%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dfn{font-style:italic}h1{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}h3{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}h4{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h5{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h6{font-size:10px;font-size:1rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-size:71.42857143000001%;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1}a,.alink{color:#1979c3;text-decoration:none}a:visited,.alink:visited{color:#800080;text-decoration:none}a:hover,.alink:hover{color:#006bb4;text-decoration:underline}a:active,.alink:active{color:#ff5501;text-decoration:underline}a:focus,.alink:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}ul,ol{margin-top:0;margin-top:0rem;margin-bottom:25px;margin-bottom:2.5rem}ul>li,ol>li{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}dl{margin-top:0;margin-bottom:20px}dt{font-weight:700;margin-top:0;margin-bottom:5px}dd{margin-top:0;margin-bottom:10px}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,'Courier New',monospace}code{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0;white-space:nowrap}kbd{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0}pre{background-color:#f0f0f0;border:1px solid #d1d1d1;color:#111;display:block;font-size:12px;font-size:1.2rem;margin:0 0 10px;line-height:1.42857143;padding:10px;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}blockquote{padding:0;margin:0 0 20px 40px;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:italic;line-height:1.42857143;border-left:0 solid #d1d1d1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{color:#333;display:block;font-size:10px;font-size:1rem;line-height:1.42857143}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote cite{font-style:normal}blockquote:before,blockquote:after{content:""}q{quotes:none}q:before,q:after{content:'';content:none}cite{font-style:normal}.example{font-size:25px;font-size:2.5rem}.example-word-wrap{-ms-word-break:break-all;word-break:break-all;word-break:break-word;word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto;background:#ccc;width:120px}.example-text-overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#ccc;width:120px}.example-text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.example-hyphens{word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;-o-hyphens:auto;hyphens:auto}.example-hyphens-none{word-wrap:break-word;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;-o-hyphens:none;hyphens:none}.example-typography{font-size:30px;font-size:3rem;color:#fc0;font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-weight:500;font-style:italic;line-height:1.2}.example-list-reset-styles{margin:0;padding:0;list-style-type:none;list-style-image:none}.example-list-inline{margin:0;padding:0;list-style-type:none;list-style-image:none}.example-list-inline>li{display:inline-block;vertical-align:top}.example-link-default{color:#1979c3;text-decoration:none}.example-link-default:visited{color:#800080;text-decoration:none}.example-link-default:hover{color:#006bb4;text-decoration:underline}.example-link-default:active{color:#ff5501;text-decoration:underline}.example-link-default:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-link{color:#008000;text-decoration:none}.example-link:visited{color:#800080;text-decoration:none}.example-link:hover{color:#ffa500;text-decoration:none}.example-link:active{color:#ff5501;text-decoration:underline}.example-link:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.example-heading{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}.example-heading-2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}html{font-size:62.5%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.42857143}p{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}abbr[title]{cursor:help;border-bottom:1px dotted #d1d1d1}b,strong{font-weight:700}em,i{font-style:italic}mark{background-color:#f0f0f0;color:#000}small,.small{font-size:12px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #d1d1d1}sub,sup{font-size:71.42857143000001%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dfn{font-style:italic}h1{font-size:40px;font-size:4rem;font-weight:300;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h2{font-size:26px;font-size:2.6rem;font-weight:300;line-height:1.1;margin-top:25px;margin-top:2.5rem;margin-bottom:20px;margin-bottom:2rem}h3{font-size:18px;font-size:1.8rem;font-weight:300;line-height:1.1;margin-top:15px;margin-top:1.5rem;margin-bottom:10px;margin-bottom:1rem}h4{font-size:14px;font-size:1.4rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h5{font-size:12px;font-size:1.2rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h6{font-size:10px;font-size:1rem;font-weight:700;line-height:1.1;margin-top:20px;margin-top:2rem;margin-bottom:20px;margin-bottom:2rem}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small{font-size:71.42857143000001%;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1}a,.alink{color:#1979c3;text-decoration:none}a:visited,.alink:visited{color:#800080;text-decoration:none}a:hover,.alink:hover{color:#006bb4;text-decoration:underline}a:active,.alink:active{color:#ff5501;text-decoration:underline}a:focus,.alink:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}ul,ol{margin-top:0;margin-top:0rem;margin-bottom:25px;margin-bottom:2.5rem}ul>li,ol>li{margin-top:0;margin-top:0rem;margin-bottom:10px;margin-bottom:1rem}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}dl{margin-top:0;margin-bottom:20px}dt{font-weight:700;margin-top:0;margin-bottom:5px}dd{margin-top:0;margin-bottom:10px}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,'Courier New',monospace}code{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0;white-space:nowrap}kbd{padding:2px 4px;font-size:12px;font-size:1.2rem;color:#111;background-color:#f0f0f0}pre{background-color:#f0f0f0;border:1px solid #d1d1d1;color:#111;display:block;font-size:12px;font-size:1.2rem;margin:0 0 10px;line-height:1.42857143;padding:10px;word-break:break-all;word-wrap:break-word}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}blockquote{padding:0;margin:0 0 20px 40px;font-size:14px;font-size:1.4rem;color:#333;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;font-style:italic;line-height:1.42857143;border-left:0 solid #d1d1d1}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{color:#333;display:block;font-size:10px;font-size:1rem;line-height:1.42857143}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}blockquote cite{font-style:normal}blockquote:before,blockquote:after{content:""}q{quotes:none}q:before,q:after{content:'';content:none}cite{font-style:normal}body{padding:15px;background-image:none}</style></head><body><nav class="bar top cf"><div class="container"><a href="index.html" class="brand">Magento UI library</a><ul class="menu"><li><a href="#" data-toggle="dropdown-1" unselectable="on" class="dropdown-toggle">files</a><ul id="dropdown-1" hidden class="dropdown"><li><a href="actions-toolbar.html">actions-toolbar</a></li><li><a href="breadcrumbs.html">breadcrumbs</a></li><li><a href="buttons.html">buttons</a></li><li><a href="docs.html">docs</a></li><li><a href="dropdowns.html">dropdowns</a></li><li><a href="forms.html">forms</a></li><li><a href="icons.html">icons</a></li><li><a href="layout.html">layout</a></li><li><a href="lib.html">lib</a></li><li><a href="loaders.html">loaders</a></li><li><a href="messages.html">messages</a></li><li><a href="navigation.html">navigation</a></li><li><a href="pages.html">pages</a></li><li><a href="popups.html">popups</a></li><li><a href="rating.html">rating</a></li><li><a href="resets.html">resets</a></li><li><a href="sections.html">sections</a></li><li><a href="tables.html">tables</a></li><li><a href="tooltips.html">tooltips</a></li><li><a href="typography.html">typography</a></li><li><a href="variables.html">variables</a></li></ul></li></ul><div class="nav"><button title="Table of Contents" data-toggle="nav-toc"><svg viewBox="0 0 512 512" height="22" width="22" class="icon"><path d="M108.9,403.1V462H50v-58.9H108.9z M108.9,285.4H50v58.9h58.9V285.4zM108.9,50H50v58.9h58.9V50z M108.9,167.7H50v58.9h58.9V167.7z M167.7,344.3H462v-58.9H167.7V344.3zM167.7,50v58.9H462V50H167.7z M167.7,462H462v-58.9H167.7V462z M167.7,226.6H462v-58.9H167.7V226.6z"></path></svg></button><input type="search" placeholder="Search" class="search"></div></div></nav><section class="container"><article id="forms-mixins" class="section"><div class="docs"><a href="#forms-mixins" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="forms-mixins">Forms mixins</h1> +<p> Magento UI library provides a set of mixins for forms elements customization. You can customize your forms globally by configuring global variables, or you can customize every form separately using appropriate mixin.</p> +</div></article><article id="global-forms-elements-customization" class="section"><div class="docs"><a href="#global-forms-elements-customization" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="global-forms-elements-customization">Global forms elements customization</h1> +<p> The <code>.form-element-all()</code> mixin is used to set default styles for all form elements in the theme. To configure these elements global variables are used.</p> +</div></article><article id="fieldsets-fields-customization" class="section"><div class="docs"><a href="#fieldsets-fields-customization" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="fieldsets-fields-customization">Fieldsets & fields customization</h1> +<p> The <code>.form-fieldset()</code> mixin is used to customize form fieldset borders and legend.</p> +<p> The <code>.form-field()</code> mixin is used to customize form elements.</p> +<p> The <code>.form-hasrequired()</code> mixin is used to show and customize "required fields" message if the form or fieldset has required fields and a <code>data-hasrequired</code> attribute.</p> +<p> Using these mixins you can customize your forms. By default these mixins use global variables.</p> +<h2 id="simple-form-with-required-fields-message">Simple form with "required fields" message</h2> +<textarea class="preview-code" spellcheck="false"> <form class="example-form-1"> + <fieldset class="example-form-1-fieldset" data-hasrequired="* Required Fields"> + <legend class="legend"><span>Login Information</span></legend><br> + + <div class="field password required"> + <label for="password" class="label"><span>Password</span></label> + + <div class="control"> + <input type="password" name="password" id="password" title="Password"> + </div> + </div> + + <div class="field confirmation required"> + <label for="confirmation" class="label"><span>Confirm Password</span></label> + + <div class="control"> + <input type="password" name="confirmation" title="Confirm Password" id="confirmation"> + </div> + </div> + + <div class="field password required"> + <label for="password2" class="label"><span>Password</span></label> + + <div class="control"> + <input type="password" name="password2" id="password2" title="Password"> + </div> + </div> + + <div class="field textarea"> + <label for="textarea2" class="label"><span>Textarea</span></label> + + <div class="control"> + <textarea rows="3" cols="5" id="textarea2" name="textarea2"></textarea> + <div class="note">Please enter your message here</div> + </div> + </div> + + <div class="field file"> + <label for="file2" class="label"><span>File field</span></label> + + <div class="control"> + <input type="file" id="file2" value="" name="file2"> + <div class="note">Please choose your picture here</div> + </div> + </div> + + <div class="field choice"> + <input type="radio" id="radio2" checked="" value="1" name="radio2"> + + <label for="radio2" class="label"><span>Radiobutton choice</span></label> + </div> + + <div class="field choice"> + <input type="checkbox" id="checkbox2" value="1" name="checkbox2"> + + <label for="checkbox2" class="label"><span>Checkbox choice</span></label> + </div> + + <div class="field region"> + <label for="select2" class="label"><span>Select</span></label> + + <div class="control"> + <select name="select2" id="select2"> + <option value="">Please select</option> + <option value="5">5</option> + <option value="10">10</option> + <option value="15">15</option> + <option value="20">20</option> + </select> + </div> + </div> + + <div class="field multiselect"> + <label for="multiselect2" class="label"><span>Multiple select</span></label> + + <div class="control"> + <select name="multiselect2" id="multiselect2" multiple="multiple"> + <option value="Option 1">Option 1</option> + <option value="Option 2">Option 2</option> + <option value="Option 3">Option 3</option> + <option value="Option 4">Option 4</option> + <option value="Option 5">Option 5</option> + <option value="Option 6">Option 6</option> + <option value="Option 7">Option 7</option> + </select> + </div> + </div> + </fieldset> + </form></textarea><h2 id="form-with-fields-in-2-columns">Form with fields in 2 columns</h2> +<textarea class="preview-code" spellcheck="false"> <form class="example-form-2" action="#" method="post"> + <fieldset class="example-form-2-fieldset"> + <legend class="legend"><span>Personal Information</span></legend><br> + + <div class="field name firstname required"> + <label class="label" for="firstname"><span>First Name</span></label> + + <div class="control"> + <input type="text" id="firstname" name="firstname" value="" title="First Name"> + </div> + </div> + + <div class="field name lastname required"> + <label class="label" for="lastname"><span>Last Name</span></label> + + <div class="control"> + <input type="text" id="lastname" name="lastname" value="" title="Last Name"> + </div> + </div> + + <div class="field required"> + <label for="email_address" class="label"><span>Email Address</span></label> + + <div class="control"> + <input type="email" name="email" id="email_address" value="" title="Email Address"> + </div> + </div> + + <div class="field textarea"> + <label for="textarea" class="label"><span>Textarea</span></label> + + <div class="control"> + <textarea rows="3" cols="5" id="textarea" name="textarea"></textarea> + <div class="note">Please enter your message here</div> + </div> + </div> + + <div class="field file"> + <label for="file" class="label"><span>File field</span></label> + + <div class="control"> + <input type="file" id="file" value="" name="file"> + <div class="note">Please choose your picture here</div> + </div> + </div> + + <div class="field choice"> + <input type="radio" id="radio" checked="" value="1" name="radio"> + + <label for="radio" class="label"><span>Radiobutton choice</span></label> + </div> + + <div class="field choice"> + <input type="checkbox" id="checkbox" value="1" name="checkbox"> + + <label for="checkbox" class="label"><span>Checkbox choice</span></label> + </div> + + <div class="field region"> + <label for="select" class="label"><span>Select</span></label> + + <div class="control"> + <select name="select" id="select"> + <option value="">Please select</option> + <option value="5">5</option> + <option value="10">10</option> + <option value="15">15</option> + <option value="20">20</option> + </select> + </div> + </div> + + <div class="field multiselect"> + <label for="multiselect" class="label"><span>Multiple select</span></label> + + <div class="control"> + <select name="multiselect" id="multiselect" multiple="multiple"> + <option value="Option 1">Option 1</option> + <option value="Option 2">Option 2</option> + <option value="Option 3">Option 3</option> + <option value="Option 4">Option 4</option> + <option value="Option 5">Option 5</option> + <option value="Option 6">Option 6</option> + <option value="Option 7">Option 7</option> + </select> + </div> + </div> + </fieldset> + </form></textarea> </div><div class="code"><pre><code> .example-form-1 { .example-form-1-fieldset { @@ -209,460 +209,462 @@ } } } - </code></pre></div></article><article id="fieldset-and-legend-customization-variables" class="section"><div class="docs"><a href="#fieldset-and-legend-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="fieldset-and-legend-customization-variables">Fieldset and legend customization variables</h1> -<p> The <code>.form-fieldset()</code> mixin variables - <pre> - <table> - <tr> - <th class="vars_head">Mixin variable</th> - <th class="vars_head">Global variable</th> - <th class="vars_head">Default value</th> - <th class="vars_head">Comment</th> - </tr> - <tr> - <th>@_border</th> - <td class="vars_value">@form-fieldset-border</td> - <td class="vars_value">0</td> - <td>Fieldset border</td> - </tr> - <tr> - <th>@_margin</th> - <td class="vars_value">@form-fieldset-margin</td> - <td class="vars_value">0 0 40px</td> - <td>Fieldset margin</td> - </tr> - <tr> - <th>@_padding</th> - <td class="vars_value">@form-fieldset-padding</td> - <td class="vars_value">0</td> - <td>Fieldset padding</td> - </tr> - <tr> - <th>@_legend-color</th> - <td class="vars_value">@form-fieldset-legend-color</td> - <td class="vars_value">inherit</td> - <td>Legend color</td> - </tr> - <tr> - <th>@_legend-font-size</th> - <td class="vars_value">@form-fieldset-legend-font-size</td> - <td class="vars_value">20px</td> - <td>Legend font size</td> - </tr> - <tr> - <th>@_legend-font-family</th> - <td class="vars_value">@form-fieldset-legend-font-family</td> - <td class="vars_value">@font-family-base</td> - <td>Legend font family</td> - </tr> - <tr> - <th>@_legend-font-weight</th> - <td class="vars_value">@form-fieldset-legend-font-weight</td> - <td class="vars_value">@font-weight-base</td> - <td>Legend font weight</td> - </tr> - <tr> - <th>@_legend-font-style</th> - <td class="vars_value">@form-fieldset-legend-font-style</td> - <td class="vars_value">normal</td> - <td>Legend font style</td> - </tr> - <tr> - <th>@_legend-line-height</th> - <td class="vars_value">@form-fieldset-legend-line-height</td> - <td class="vars_value">1.2</td> - <td>Legend line height</td> - </tr> - <tr> - <th>@_legend-margin</th> - <td class="vars_value">@form-fieldset-legend-margin</td> - <td class="vars_value">0 0 25px @form-field-type-inline-label-width</td> - <td>Legend margin</td> - </tr> - <tr> - <th>@_legend-padding</th> - <td class="vars_value">@form-fieldset-legend-padding</td> - <td class="vars_value">0</td> - <td>Legend padding</td> - </tr> - <tr> - <th>@_legend-width</th> - <td class="vars_value">@form-fieldset-legend-width</td> - <td class="vars_value">0 0 25px @form-field-type-inline-label-width</td> - <td>Legend width</td> - </tr> - </table> - </pre></p> -</div></article><article id="fields-customization-variables" class="section"><div class="docs"><a href="#fields-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="fields-customization-variables">Fields customization variables</h1> -<p> The <code>.form-field()</code> mixin variables</p> - <pre> - <table> - <tr> - <th class="vars_head">Mixin variable</th> - <th class="vars_head">Global variable</th> - <th class="vars_head">Default values [Allowed values]</th> - <th class="vars_head">Comment</th> - </tr> - <tr> - <th>@_type</th> - <td class="vars_value">@form-field-type</td> - <td class="vars_value">inline [inline | block]</td> - <td>How to display from field element and its label. When set to 'inline' they are displayed side-by-side. When set to 'block' the label is displayed above the control</td> - </tr> - <tr> - <th>@_border</th> - <td class="vars_value">@form-field-border</td> - <td class="vars_value">none</td> - <td>Border of the <div class="field"> element</td> - </tr> - <tr> - <th>@_column</th> - <td class="vars_value">@form-field-column</td> - <td class="vars_value">false [true | false]</td> - <td>Form fields are displayed in columns</td> - </tr> - <tr> - <th>@_column-padding</th> - <td class="vars_value">@form-field-column-padding</td> - <td class="vars_value">0 20px 0 0</td> - <td>Form fields column padding</td> - </tr> - <tr> - <th>@_column-width</th> - <td class="vars_value">@form-field-column-width</td> - <td class="vars_value">50%</td> - <td>Form fields column width</td> - </tr> - <tr> - <th>@_type-block-margin</th> - <td class="vars_value">@form-field-type-block-margin</td> - <td class="vars_value">0 0 20px</td> - <td>Form fields margin if @form-field-type set to is 'block'</td> - </tr> - <tr> - <th>@_type-inline-margin</th> - <td class="vars_value">@form-field-type-inline-margin</td> - <td class="vars_value">0 0 @form-field-type-inline-vertical-margin</td> - <td>Form fields margin if @form-field-type is set to 'inline'</td> - </tr> - <tr> - <th colspan="4" class="vars_section">Form field label</th> - </tr> - <tr> - <th>@_label-color</th> - <td class="vars_value">@form-field-label-color</td> - <td class="vars_value">''</td> - <td>Field label text color</td> - </tr> - <tr> - <th>@_label-font-size</th> - <td class="vars_value">@form-field-label-font-size</td> - <td class="vars_value">@font-size-base</td> - <td>Field label font size</td> - </tr> - <tr> - <th>@_label-font-family</th> - <td class="vars_value">@form-field-label-font-family</td> - <td class="vars_value">''</td> - <td>Field label font family</td> - </tr> - <tr> - <th>@_label-font-weight</th> - <td class="vars_value">@form-field-label-font-weight</td> - <td class="vars_value">@font-weight-bold</td> - <td>Field label font weight</td> - </tr> - <tr> - <th> @_label-font-style</th> - <td class="vars_value">@form-field-label-font-style</td> - <td class="vars_value">''</td> - <td>Field label font style</td> - </tr> - <tr> - <th>@_label-line-height</th> - <td class="vars_value">@form-field-label-line-height</td> - <td class="vars_value">''</td> - <td>Field label line height</td> - </tr> - <tr> - <th>@_type-block-label-margin</th> - <td class="vars_value">@form-field-type-block-label-margin</td> - <td class="vars_value">0 0 5px</td> - <td>Field label margin if @form-field-type is set to 'block'</td> - </tr> - <tr> - <th>@_type-inline-label-padding</th> - <td class="vars_value">@form-field-type-inline-label-padding</td> - <td class="vars_value">6px 15px 0 0</td> - <td>Field label padding if @form-field-type is set to 'inline'</td> - </tr> - <tr> - <th>@_type-inline-label-width</th> - <td class="vars_value">@form-field-type-inline-label-width</td> - <td class="vars_value">25.8%</td> - <td>Field label width if @form-field-type is set to 'inline'</td> - </tr> - <tr> - <th>@_type-inline-control-width</th> - <td class="vars_value">@form-field-type-inline-control-width</td> - <td class="vars_value">74.2%</td> - <td>Field control width if @form-field-type is set to 'inline'</td> - </tr> - <tr> - <th colspan="4" class="vars_section">Label "required" asterisk</th> - </tr> - <tr> - <th>@_label-asterisk-color</th> - <td class="vars_value">@form-field-label-asterisk-color</td> - <td class="vars_value">#da370a</td> - <td>Label asterisk color</td> - </tr> - <tr> - <th>@_label-asterisk-font-size</th> - <td class="vars_value">@form-field-label-asterisk-font-size</td> - <td class="vars_value">@font-size-s</td> - <td>Label asterisk font size</td> - </tr> - <tr> - <th>@_label-asterisk-font-family</th> - <td class="vars_value">@form-field-label-asterisk-font-family</td> - <td class="vars_value">''</td> - <td>Label asterisk font family</td> - </tr> - <tr> - <th>@_label-asterisk-font-weight</th> - <td class="vars_value" >@form-field-label-asterisk-font-weight</td> - <td class="vars_value">''</td> - <td>Label asterisk font weight</td> - </tr> - <tr> - <th>@_label-asterisk-font-style</th> - <td class="vars_value">@form-field-label-asterisk-font-style</td> - <td class="vars_value">''</td> - <td>Label asterisk font style</td> - </tr> - <tr> - <th>@_label-asterisk-line-height</th> - <td class="vars_value">@form-field-label-asterisk-line-height</td> - <td class="vars_value">''</td> - <td>Label asterisk line height</td> - </tr> - <tr> - <th>@_label-asterisk-margin</th> - <td class="vars_value">@form-field-label-asterisk-margin</td> - <td class="vars_value">0 0 0 5px</td> - <td>Label asterisk margin</td> - </tr> - <tr> - <th colspan="4" class="vars_section">Field note</th> - </tr> - <tr> - <th>@_note-color</th> - <td class="vars_value">@form-field-note-color</td> - <td class="vars_value">''</td> - <td>Field note text color</td> - </tr> - <tr> - <th>@_note-font-size</th> - <td class="vars_value">@form-field-note-font-size</td> - <td class="vars_value">@font-size-s</td> - <td>Field note font size</td> - </tr> - <tr> - <th>@_note-font-family</th> - <td class="vars_value">@form-field-note-font-family</td> - <td class="vars_value">''</td> - <td>Field note font family</td> - </tr> - <tr> - <th>@_note-font-weight</th> - <td class="vars_value">@form-field-note-font-weight</td> - <td class="vars_value">''</td> - <td>Field note font weight</td> - </tr> - <tr> - <th>@_note-font-style</th> - <td class="vars_value">@form-field-note-font-style</td> - <td class="vars_value">''</td> - <td>Field note font style</td> - </tr> - <tr> - <th>@_note-line-height</th> - <td class="vars_value">@form-field-note-line-height</td> - <td class="vars_value">''</td> - <td>Field note line height</td> - </tr> - <tr> - <th>@_note-margin</th> - <td class="vars_value">@form-field-note-margin</td> - <td class="vars_value">3px 0 0</td> - <td>Field note margin</td> - </tr> - <tr> - <th>@_note-padding</th> - <td class="vars_value">@form-field-note-padding</td> - <td class="vars_value">0</td> - <td>Field note padding</td> - </tr> - <tr> - <th>@_note-icon-font-content</th> - <td class="vars_value">@form-field-note-icon-font-content</td> - <td class="vars_value">@icon-pointer-up</td> - <td>Field note icon code</td> - </tr> - <tr> - <th>@_note-icon-font</th> - <td class="vars_value">@form-field-note-icon-font</td> - <td class="vars_value">@icon-font</td> - <td>Field note icon font</td> - </tr> - <tr> - <th>@_note-icon-font-size</th> - <td class="vars_value">@form-field-note-icon-font-size</td> - <td class="vars_value">@form-field-note-font-size*2</td> - <td>Field note icon font size</td> - </tr> - <tr> - <th>@_note-icon-font-line-height</th> - <td class="vars_value">@form-field-note-icon-font-line-height</td> - <td class="vars_value">@form-field-note-font-size</td> - <td>Field note icon line height</td> - </tr> - <tr> - <th>@_note-icon-font-color</th> - <td class="vars_value">@form-field-note-icon-font-color</td> - <td class="vars_value">@form-field-note-color</td> - <td>Field note icon color</td> - </tr> - <tr> - <th>@_note-icon-font-color-hover</th> - <td class="vars_value">@form-field-note-icon-font-color-hover</td> - <td class="vars_value">''</td> - <td>Field note icon hovered color</td> - </tr> - <tr> - <th>@_note-icon-font-color-active</th> - <td class="vars_value">@form-field-note-icon-font-color-active</td> - <td class="vars_value">''</td> - <td>Field note icon active color</td> - </tr> - <tr> - <th>@_note-icon-font-margin</th> - <td class="vars_value">@form-field-note-icon-font-margin</td> - <td class="vars_value">''</td> - <td>Field note icon margin</td> - </tr> - <tr> - <th nowrap="nowrap">@_note-icon-font-vertical-align</th> - <td class="vars_value" nowrap="nowrap">@form-field-note-icon-font-vertical-align</td> - <td class="vars_value">@icon-font-vertical-align</td> - <td>Field note icon vertical align</td> - </tr> - <tr> - <th>@_note-icon-font-position</th> - <td class="vars_value">@form-field-note-icon-font-position</td> - <td class="vars_value">@icon-font-position [before | after]</td> - <td>Field note icon position</td> - </tr> - <tr> - <th>@_note-icon-font-text-hide</th> - <td class="vars_value">@form-field-note-icon-font-text-hide</td> - <td class="vars_value">@icon-font-text-hide [true | false]</td> - <td>Field note icon text hide</td> - </tr> - </table> - </pre> -</div></article><article id="required-fields-message-customization-variables" class="section"><div class="docs"><a href="#required-fields-message-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="required-fields-message-customization-variables">Required fields message customization variables</h1> -<p> The <code>.form-hasrequired()</code> mixin variables</p> - <pre> - <table> - <tr> - <th class="vars_head">Mixin variable</th> - <th class="vars_head">Global variable</th> - <th class="vars_head">Default values [Allowed values]</th> - <th class="vars_head">Comment</th> - </tr> - <tr> - <th>@_position</th> - <td class="vars_value">@form-hasrequired-position</td> - <td class="vars_value">top [top | bottom]</td> - <td>Position of "required fields" notice</td> - </tr> - <tr> - <th>@_color</th> - <td class="vars_value">@form-hasrequired-color</td> - <td class="vars_value">#da370a</td> - <td>Text color of "required fields" notice</td> - </tr> - <tr> - <th>@_font-size</th> - <td class="vars_value">@form-hasrequired-font-size</td> - <td class="vars_value">@font-size-base</td> - <td>Font size of "required fields" notice</td> - </tr> - <tr> - <th>@_font-family</th> - <td class="vars_value">@form-hasrequired-font-family</td> - <td class="vars_value">''</td> - <td>Font family of "required fields" notice</td> - </tr> - <tr> - <th>@_font-weight</th> - <td class="vars_value">@form-hasrequired-font-weight</td> - <td class="vars_value">''</td> - <td>Font weight of "required fields" notice</td> - </tr> - <tr> - <th>@_font-style</th> - <td class="vars_value">@form-hasrequired-font-style</td> - <td class="vars_value">''</td> - <td>Font style of "required fields" notice</td> - </tr> - <tr> - <th>@_line-height</th> - <td class="vars_value">@form-hasrequired-line-height</td> - <td class="vars_value">''</td> - <td>Line height of "required fields" notice</td> - </tr> - <tr> - <th>@_border</th> - <td class="vars_value">@form-hasrequired-border</td> - <td class="vars_value">''</td> - <td>Border of "required fields" notice</td> - </tr> - <tr> - <th>@_margin</th> - <td class="vars_value">@form-hasrequired-margin</td> - <td class="vars_value">10px 0 0</td> - <td>Margin of "required fields" notice</td> - </tr> - <tr> - <th>@_padding</th> - <td class="vars_value">@form-hasrequired-padding</td> - <td class="vars_value">''</td> - <td>Padding of "required fields" notice</td> - </tr> - </table> - </pre> -</div><div class="code"><pre><code> </code></pre></div></article><article id="form-element-inputs-customization" class="section"><div class="docs"><a href="#form-element-inputs-customization" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-inputs-customization">Form element inputs customization</h1> -<p> The <code>.form-element-input(@_type: <em>type</em>)</code> mixin is used to style form controls. This mixin accepts 1 mandatory parameter - the control type. This can be:</p> -<ul> -<li>input-text - for all input-text-like inputs</li> -<li>input-radio - for radiobutton</li> -<li>input-checkbox - for checkbox</li> -<li>select - for select</li> -<li>textarea - for textarea</li> -</ul> -<textarea class="preview-code" spellcheck="false"> <input type="password" placeholder="placeholder, type = password" /> - <input type="text" placeholder="placeholder, type = text" /> - <input type="url" placeholder="placeholder, type = url" /> - <input type="tel" placeholder="placeholder, type = tel" /> - <input type="search" placeholder="placeholder, type = search" /> - <input type="number" placeholder="placeholder, type = number" /> - <input type="email" placeholder="placeholder, type = email" /> - <select><option>type = select</option><option>option</option></select> - <select multiple="multiple"><option>type = select multiple</option><option>option</option></select> - <textarea placeholder="placeholder, type = textarea" ></textarea></textarea> + +</code></pre></div></article><article id="fieldset-and-legend-customization-variables" class="section"><div class="docs"><a href="#fieldset-and-legend-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="fieldset-and-legend-customization-variables">Fieldset and legend customization variables</h1> +<p> The <code>.form-fieldset()</code> mixin variables + <pre> + <table> + <tr> + <th class="vars_head">Mixin variable</th> + <th class="vars_head">Global variable</th> + <th class="vars_head">Default value</th> + <th class="vars_head">Comment</th> + </tr> + <tr> + <th>@_border</th> + <td class="vars_value">@form-fieldset-border</td> + <td class="vars_value">0</td> + <td>Fieldset border</td> + </tr> + <tr> + <th>@_margin</th> + <td class="vars_value">@form-fieldset-margin</td> + <td class="vars_value">0 0 40px</td> + <td>Fieldset margin</td> + </tr> + <tr> + <th>@_padding</th> + <td class="vars_value">@form-fieldset-padding</td> + <td class="vars_value">0</td> + <td>Fieldset padding</td> + </tr> + <tr> + <th>@_legend-color</th> + <td class="vars_value">@form-fieldset-legend-color</td> + <td class="vars_value">inherit</td> + <td>Legend color</td> + </tr> + <tr> + <th>@_legend-font-size</th> + <td class="vars_value">@form-fieldset-legend-font-size</td> + <td class="vars_value">20px</td> + <td>Legend font size</td> + </tr> + <tr> + <th>@_legend-font-family</th> + <td class="vars_value">@form-fieldset-legend-font-family</td> + <td class="vars_value">@font-family-base</td> + <td>Legend font family</td> + </tr> + <tr> + <th>@_legend-font-weight</th> + <td class="vars_value">@form-fieldset-legend-font-weight</td> + <td class="vars_value">@font-weight-base</td> + <td>Legend font weight</td> + </tr> + <tr> + <th>@_legend-font-style</th> + <td class="vars_value">@form-fieldset-legend-font-style</td> + <td class="vars_value">normal</td> + <td>Legend font style</td> + </tr> + <tr> + <th>@_legend-line-height</th> + <td class="vars_value">@form-fieldset-legend-line-height</td> + <td class="vars_value">1.2</td> + <td>Legend line height</td> + </tr> + <tr> + <th>@_legend-margin</th> + <td class="vars_value">@form-fieldset-legend-margin</td> + <td class="vars_value">0 0 25px @form-field-type-inline-label-width</td> + <td>Legend margin</td> + </tr> + <tr> + <th>@_legend-padding</th> + <td class="vars_value">@form-fieldset-legend-padding</td> + <td class="vars_value">0</td> + <td>Legend padding</td> + </tr> + <tr> + <th>@_legend-width</th> + <td class="vars_value">@form-fieldset-legend-width</td> + <td class="vars_value">0 0 25px @form-field-type-inline-label-width</td> + <td>Legend width</td> + </tr> + </table> + </pre></p> +</div></article><article id="fields-customization-variables" class="section"><div class="docs"><a href="#fields-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="fields-customization-variables">Fields customization variables</h1> +<p> The <code>.form-field()</code> mixin variables</p> + <pre> + <table> + <tr> + <th class="vars_head">Mixin variable</th> + <th class="vars_head">Global variable</th> + <th class="vars_head">Default values [Allowed values]</th> + <th class="vars_head">Comment</th> + </tr> + <tr> + <th>@_type</th> + <td class="vars_value">@form-field-type</td> + <td class="vars_value">inline [inline | block]</td> + <td>How to display from field element and its label. When set to 'inline' they are displayed side-by-side. When set to 'block' the label is displayed above the control</td> + </tr> + <tr> + <th>@_border</th> + <td class="vars_value">@form-field-border</td> + <td class="vars_value">none</td> + <td>Border of the <div class="field"> element</td> + </tr> + <tr> + <th>@_column</th> + <td class="vars_value">@form-field-column</td> + <td class="vars_value">false [true | false]</td> + <td>Form fields are displayed in columns</td> + </tr> + <tr> + <th>@_column-padding</th> + <td class="vars_value">@form-field-column-padding</td> + <td class="vars_value">0 20px 0 0</td> + <td>Form fields column padding</td> + </tr> + <tr> + <th>@_column-width</th> + <td class="vars_value">@form-field-column-width</td> + <td class="vars_value">50%</td> + <td>Form fields column width</td> + </tr> + <tr> + <th>@_type-block-margin</th> + <td class="vars_value">@form-field-type-block-margin</td> + <td class="vars_value">0 0 20px</td> + <td>Form fields margin if @form-field-type set to is 'block'</td> + </tr> + <tr> + <th>@_type-inline-margin</th> + <td class="vars_value">@form-field-type-inline-margin</td> + <td class="vars_value">0 0 @form-field-type-inline-vertical-margin</td> + <td>Form fields margin if @form-field-type is set to 'inline'</td> + </tr> + <tr> + <th colspan="4" class="vars_section">Form field label</th> + </tr> + <tr> + <th>@_label-color</th> + <td class="vars_value">@form-field-label-color</td> + <td class="vars_value">''</td> + <td>Field label text color</td> + </tr> + <tr> + <th>@_label-font-size</th> + <td class="vars_value">@form-field-label-font-size</td> + <td class="vars_value">@font-size-base</td> + <td>Field label font size</td> + </tr> + <tr> + <th>@_label-font-family</th> + <td class="vars_value">@form-field-label-font-family</td> + <td class="vars_value">''</td> + <td>Field label font family</td> + </tr> + <tr> + <th>@_label-font-weight</th> + <td class="vars_value">@form-field-label-font-weight</td> + <td class="vars_value">@font-weight-bold</td> + <td>Field label font weight</td> + </tr> + <tr> + <th> @_label-font-style</th> + <td class="vars_value">@form-field-label-font-style</td> + <td class="vars_value">''</td> + <td>Field label font style</td> + </tr> + <tr> + <th>@_label-line-height</th> + <td class="vars_value">@form-field-label-line-height</td> + <td class="vars_value">''</td> + <td>Field label line height</td> + </tr> + <tr> + <th>@_type-block-label-margin</th> + <td class="vars_value">@form-field-type-block-label-margin</td> + <td class="vars_value">0 0 5px</td> + <td>Field label margin if @form-field-type is set to 'block'</td> + </tr> + <tr> + <th>@_type-inline-label-padding</th> + <td class="vars_value">@form-field-type-inline-label-padding</td> + <td class="vars_value">6px 15px 0 0</td> + <td>Field label padding if @form-field-type is set to 'inline'</td> + </tr> + <tr> + <th>@_type-inline-label-width</th> + <td class="vars_value">@form-field-type-inline-label-width</td> + <td class="vars_value">25.8%</td> + <td>Field label width if @form-field-type is set to 'inline'</td> + </tr> + <tr> + <th>@_type-inline-control-width</th> + <td class="vars_value">@form-field-type-inline-control-width</td> + <td class="vars_value">74.2%</td> + <td>Field control width if @form-field-type is set to 'inline'</td> + </tr> + <tr> + <th colspan="4" class="vars_section">Label "required" asterisk</th> + </tr> + <tr> + <th>@_label-asterisk-color</th> + <td class="vars_value">@form-field-label-asterisk-color</td> + <td class="vars_value">#da370a</td> + <td>Label asterisk color</td> + </tr> + <tr> + <th>@_label-asterisk-font-size</th> + <td class="vars_value">@form-field-label-asterisk-font-size</td> + <td class="vars_value">@font-size-s</td> + <td>Label asterisk font size</td> + </tr> + <tr> + <th>@_label-asterisk-font-family</th> + <td class="vars_value">@form-field-label-asterisk-font-family</td> + <td class="vars_value">''</td> + <td>Label asterisk font family</td> + </tr> + <tr> + <th>@_label-asterisk-font-weight</th> + <td class="vars_value" >@form-field-label-asterisk-font-weight</td> + <td class="vars_value">''</td> + <td>Label asterisk font weight</td> + </tr> + <tr> + <th>@_label-asterisk-font-style</th> + <td class="vars_value">@form-field-label-asterisk-font-style</td> + <td class="vars_value">''</td> + <td>Label asterisk font style</td> + </tr> + <tr> + <th>@_label-asterisk-line-height</th> + <td class="vars_value">@form-field-label-asterisk-line-height</td> + <td class="vars_value">''</td> + <td>Label asterisk line height</td> + </tr> + <tr> + <th>@_label-asterisk-margin</th> + <td class="vars_value">@form-field-label-asterisk-margin</td> + <td class="vars_value">0 0 0 5px</td> + <td>Label asterisk margin</td> + </tr> + <tr> + <th colspan="4" class="vars_section">Field note</th> + </tr> + <tr> + <th>@_note-color</th> + <td class="vars_value">@form-field-note-color</td> + <td class="vars_value">''</td> + <td>Field note text color</td> + </tr> + <tr> + <th>@_note-font-size</th> + <td class="vars_value">@form-field-note-font-size</td> + <td class="vars_value">@font-size-s</td> + <td>Field note font size</td> + </tr> + <tr> + <th>@_note-font-family</th> + <td class="vars_value">@form-field-note-font-family</td> + <td class="vars_value">''</td> + <td>Field note font family</td> + </tr> + <tr> + <th>@_note-font-weight</th> + <td class="vars_value">@form-field-note-font-weight</td> + <td class="vars_value">''</td> + <td>Field note font weight</td> + </tr> + <tr> + <th>@_note-font-style</th> + <td class="vars_value">@form-field-note-font-style</td> + <td class="vars_value">''</td> + <td>Field note font style</td> + </tr> + <tr> + <th>@_note-line-height</th> + <td class="vars_value">@form-field-note-line-height</td> + <td class="vars_value">''</td> + <td>Field note line height</td> + </tr> + <tr> + <th>@_note-margin</th> + <td class="vars_value">@form-field-note-margin</td> + <td class="vars_value">3px 0 0</td> + <td>Field note margin</td> + </tr> + <tr> + <th>@_note-padding</th> + <td class="vars_value">@form-field-note-padding</td> + <td class="vars_value">0</td> + <td>Field note padding</td> + </tr> + <tr> + <th>@_note-icon-font-content</th> + <td class="vars_value">@form-field-note-icon-font-content</td> + <td class="vars_value">@icon-pointer-up</td> + <td>Field note icon code</td> + </tr> + <tr> + <th>@_note-icon-font</th> + <td class="vars_value">@form-field-note-icon-font</td> + <td class="vars_value">@icon-font</td> + <td>Field note icon font</td> + </tr> + <tr> + <th>@_note-icon-font-size</th> + <td class="vars_value">@form-field-note-icon-font-size</td> + <td class="vars_value">@form-field-note-font-size*2</td> + <td>Field note icon font size</td> + </tr> + <tr> + <th>@_note-icon-font-line-height</th> + <td class="vars_value">@form-field-note-icon-font-line-height</td> + <td class="vars_value">@form-field-note-font-size</td> + <td>Field note icon line height</td> + </tr> + <tr> + <th>@_note-icon-font-color</th> + <td class="vars_value">@form-field-note-icon-font-color</td> + <td class="vars_value">@form-field-note-color</td> + <td>Field note icon color</td> + </tr> + <tr> + <th>@_note-icon-font-color-hover</th> + <td class="vars_value">@form-field-note-icon-font-color-hover</td> + <td class="vars_value">''</td> + <td>Field note icon hovered color</td> + </tr> + <tr> + <th>@_note-icon-font-color-active</th> + <td class="vars_value">@form-field-note-icon-font-color-active</td> + <td class="vars_value">''</td> + <td>Field note icon active color</td> + </tr> + <tr> + <th>@_note-icon-font-margin</th> + <td class="vars_value">@form-field-note-icon-font-margin</td> + <td class="vars_value">''</td> + <td>Field note icon margin</td> + </tr> + <tr> + <th nowrap="nowrap">@_note-icon-font-vertical-align</th> + <td class="vars_value" nowrap="nowrap">@form-field-note-icon-font-vertical-align</td> + <td class="vars_value">@icon-font-vertical-align</td> + <td>Field note icon vertical align</td> + </tr> + <tr> + <th>@_note-icon-font-position</th> + <td class="vars_value">@form-field-note-icon-font-position</td> + <td class="vars_value">@icon-font-position [before | after]</td> + <td>Field note icon position</td> + </tr> + <tr> + <th>@_note-icon-font-text-hide</th> + <td class="vars_value">@form-field-note-icon-font-text-hide</td> + <td class="vars_value">@icon-font-text-hide [true | false]</td> + <td>Field note icon text hide</td> + </tr> + </table> + </pre> +</div></article><article id="required-fields-message-customization-variables" class="section"><div class="docs"><a href="#required-fields-message-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="required-fields-message-customization-variables">Required fields message customization variables</h1> +<p> The <code>.form-hasrequired()</code> mixin variables</p> + <pre> + <table> + <tr> + <th class="vars_head">Mixin variable</th> + <th class="vars_head">Global variable</th> + <th class="vars_head">Default values [Allowed values]</th> + <th class="vars_head">Comment</th> + </tr> + <tr> + <th>@_position</th> + <td class="vars_value">@form-hasrequired-position</td> + <td class="vars_value">top [top | bottom]</td> + <td>Position of "required fields" notice</td> + </tr> + <tr> + <th>@_color</th> + <td class="vars_value">@form-hasrequired-color</td> + <td class="vars_value">#da370a</td> + <td>Text color of "required fields" notice</td> + </tr> + <tr> + <th>@_font-size</th> + <td class="vars_value">@form-hasrequired-font-size</td> + <td class="vars_value">@font-size-base</td> + <td>Font size of "required fields" notice</td> + </tr> + <tr> + <th>@_font-family</th> + <td class="vars_value">@form-hasrequired-font-family</td> + <td class="vars_value">''</td> + <td>Font family of "required fields" notice</td> + </tr> + <tr> + <th>@_font-weight</th> + <td class="vars_value">@form-hasrequired-font-weight</td> + <td class="vars_value">''</td> + <td>Font weight of "required fields" notice</td> + </tr> + <tr> + <th>@_font-style</th> + <td class="vars_value">@form-hasrequired-font-style</td> + <td class="vars_value">''</td> + <td>Font style of "required fields" notice</td> + </tr> + <tr> + <th>@_line-height</th> + <td class="vars_value">@form-hasrequired-line-height</td> + <td class="vars_value">''</td> + <td>Line height of "required fields" notice</td> + </tr> + <tr> + <th>@_border</th> + <td class="vars_value">@form-hasrequired-border</td> + <td class="vars_value">''</td> + <td>Border of "required fields" notice</td> + </tr> + <tr> + <th>@_margin</th> + <td class="vars_value">@form-hasrequired-margin</td> + <td class="vars_value">10px 0 0</td> + <td>Margin of "required fields" notice</td> + </tr> + <tr> + <th>@_padding</th> + <td class="vars_value">@form-hasrequired-padding</td> + <td class="vars_value">''</td> + <td>Padding of "required fields" notice</td> + </tr> + </table> + </pre> +</div><div class="code"><pre><code> +</code></pre></div></article><article id="form-element-inputs-customization" class="section"><div class="docs"><a href="#form-element-inputs-customization" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-inputs-customization">Form element inputs customization</h1> +<p> The <code>.form-element-input(@_type: <em>type</em>)</code> mixin is used to style form controls. This mixin accepts 1 mandatory parameter - the control type. This can be:</p> +<ul> +<li>input-text - for all input-text-like inputs</li> +<li>input-radio - for radiobutton</li> +<li>input-checkbox - for checkbox</li> +<li>select - for select</li> +<li>textarea - for textarea</li> +</ul> +<textarea class="preview-code" spellcheck="false"> <input type="password" placeholder="placeholder, type = password" /> + <input type="text" placeholder="placeholder, type = text" /> + <input type="url" placeholder="placeholder, type = url" /> + <input type="tel" placeholder="placeholder, type = tel" /> + <input type="search" placeholder="placeholder, type = search" /> + <input type="number" placeholder="placeholder, type = number" /> + <input type="email" placeholder="placeholder, type = email" /> + <select><option>type = select</option><option>option</option></select> + <select multiple="multiple"><option>type = select multiple</option><option>option</option></select> + <textarea placeholder="placeholder, type = textarea" ></textarea></textarea> </div><div class="code"><pre><code> input[type="text"], @@ -691,201 +693,197 @@ textarea { .form-element-input(@_type: textarea); .form-element-textarea-resize(); } - </code></pre></div></article><article id="form-element-inputs-customization-variables" class="section"><div class="docs"><a href="#form-element-inputs-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-inputs-customization-variables">Form element inputs customization variables</h1> - <pre> - <table> - <tr> - <th class="vars_head">Mixin variable</th> - <th class="vars_head">Global variable</th> - <th class="vars_head">Default value [Allowed value]</th> - <th class="vars_head">Comment</th> - </tr> - <tr> - <th>@_type</th> - <td class="vars_value">@form-element-input-type<br/></td> - <td class="vars_value">'' [input-text | select | textarea | input-radio | input-checkbox]</td> - <td>Form control type.<br/>@form-element-input-[] global variables are used to set up all form elements style. Control-specific global variables use these @form-element-input-[] variables by default. Control-specific global variables can be set up separately.<br/>@input-text-[] is used to set up input-text controls style<br/>@select-[] is used to set up selects style<br/>@textarea-[] is used to set up textarea style</td> - </tr> - <tr> - <th>@_background</th> - <td class="vars_value">@form-element-input-background<br/>@input-text-background<br/>@selectbackground<br/>@textarea-background</td> - <td class="vars_value">#fff</td> - <td>Form control background</td> - </tr> - <tr> - <th>@_border</th> - <td class="vars_value">@form-element-input-border<br/>@input-text-border<br/>@select-borderbr>@textarea-border</td> - <td class="vars_value" nowrap="nowrap">1px solid @form-element-input-border-color</td> - <td>Form control border</td> - </tr> - <tr> - <th>@_border-radius</th> - <td class="vars_value" nowrap="nowrap">@form-element-input-border-radius<br/>@input-textborder-radius<br/>@select-border-radius<br/>@textarea-border-radius</td> - <td class="vars_value">1px</td> - <td>Form control border radius</td> - </tr> - <tr> - <th>@_height</th> - <td class="vars_value">@form-element-input-height<br/>@input-text-height<br/>@select-height<br/>@textarea-height</td> - <td class="vars_value">32px<br/>@form-element-input-height<br/>@form-element-input-height<br/>auto</td> - <td>Form control height</td> - </tr> - <tr> - <th>@_width</th> - <td class="vars_value">@form-element-input-width<br/>@input-text-width<br/>@select-width<br/>@textarea-width</td> - <td class="vars_value">100%</td> - <td>Form control width</td> - </tr> - <tr> - <th>@_padding</th> - <td class="vars_value">@form-element-input-padding<br/>@input-text-padding <br/>@select-padding<br/>@textarea-padding</td> - <td class="vars_value">0 10px<br/>@form-element-input-padding<br/>5px 10px 4px<br/>10px</td> - <td>Form control padding</td> - </tr> - <tr> - <th>@_margin</th> - <td class="vars_value">@form-element-input-margin<br/>@input-text-margin<br/>@select-margin<br/>@textarea-margin</td> - <td class="vars_value">false [true | false]</td> - <td>Form control margin</td> - </tr> - <tr> - <th>@_vertical-align</th> - <td class="vars_value">@form-element-input-vertical-align<br/>@input-text-vertical-align<br/>@select-vertical-align<br/>@textarea-vertical-align</td> - <td class="vars_value">baseline</td> - <td>Form control vertical align</td> - </tr> - <tr> - <th>@_background-clip</th> - <td class="vars_value">@form-element-input-background-clip<br/>@input-text-background-clip<br/>@select-background-clip<br/>@textarea-background-clip</td> - <td class="vars_value">padding-box [padding-box | border-box | content-box]</td> - <td>Form control background clip</td> - </tr> - <tr> - <th>@_outline</th> - <td class="vars_value">@form-element-input-outline<br/>@input-text-outline<br/>@select-outline<br/>@textarea-outline</td> - <td class="vars_value">true [true | false]</td> - <td>Form control outline</td> - </tr> - <tr> - <th colspan="4" class="vars_section">Text settings</th> - </tr> - <tr> - <th>@_color</th> - <td class="vars_value">@form-element-input-color<br/>@input-text-color<br/>@select-color<br/>@textarea-color</td> - <td class="vars_value">@text-color</td> - <td>Form control text color</td> - </tr> - <tr> - <th>@_font-size</th> - <td class="vars_value">@form-element-input-font-size<br/>@input-text-font-size<br/>@select-font-size<br/>@textarea-font-size</td> - <td class="vars_value">@font-size-base</td> - <td>Form control font size</td> - </tr> - <tr> - <th>@_font-family</th> - <td class="vars_value">@form-element-input-font-family<br/>@input-text-font-family<br/>@select-font-family<br/>@textarea-font-family</td> - <td class="vars_value">@font-family-base</td> - <td>Form control font family</td> - </tr> - <tr> - <th>@_font-weight</th> - <td class="vars_value">@form-element-input-font-weight<br/>@input-text-font-weight<br/>@select-font-weight<br/>@textarea-font-weight</td> - <td class="vars_value">@font-weight-base</td> - <td>Form control font weight</td> - </tr> - <tr> - <th>@_font-style</th> - <td class="vars_value">@form-element-input-font-style<br/>@input-text-font-style<br/>@selectfont-style<br/>@textarea-font-style</td> - <td class="vars_value">@font-style-base</td> - <td>Form control font style</td> - </tr> - <tr> - <th>@_line-height</th> - <td class="vars_value">@form-element-input-line-height<br/>@input-text-line-height<br/>@select-line-height<br/>@textarea-line-height <br/></td> - <td class="vars_value">@line-height-base</td> - <td>Form control line height</td> - </tr> - <tr> - <th colspan="4" class="vars_section">Placeholder</th> - </tr> - <tr> - <th>@_placeholder-color</th> - <td class="vars_value">@form-element-input-placeholder-color<br/>@input-text-placeholder-color<br/>@select-placeholder-color<br/>@textarea-placeholder-color</td> - <td class="vars_value">false [false | '' | color code]</td> - <td>Form control placeholder color</td> - </tr> - <tr> - <th>@_placeholder-font-style</th> - <td class="vars_value" nowrap="nowrap">@form-element-input-placeholder-font-style<br/>@inputtext-placeholder-font-style<br/>@select-placeholder-font-style<br/>@textarea-placeholder-font-style</td> - <td class="vars_value">@form-element-input-font-style</td> - <td>Form control placeholder font style</td> - </tr> - <tr> - <th colspan="4" class="vars_section">Disabled element</th> - </tr> - <tr> - <th>@_disabled-background</th> - <td class="vars_value" nowrap="nowrap">@form-element-input-disabled-background<br/>@inputtextdisabled-background<br/>@select-disabled-background<br/>@textarea-disabled-background</td> - <td class="vars_value"> @form-element-input-background</td> - <td>Disabled form element background</td> - </tr> - <tr> - <th>@_disabled-border</th> - <td class="vars_value">@form-element-input-disabled-border<br/>@input-text-disabled-border<br/>@select-disabled-border<br/>@textarea-disabled-border</td> - <td class="vars_value">@form-element-input-border</td> - <td>Disabled form element border</td> - </tr> - <tr> - <th>@_disabled-opacity</th> - <td class="vars_value">@form-element-input-disabled-opacity<br/>@input-text-disabled-opacity<br/>@select-disabled-opacity<br/>@textarea-disabled-opacity</td> - <td class="vars_value">0.5</td> - <td>Disabled form element opacity</td> - </tr> - <tr> - <th>@_disabled-color</th> - <td class="vars_value">@form-element-input-disabled-color<br/>@input-text-disabled-color<br/>@select-disabled-color<br/>@textarea-disabled-color</td> - <td class="vars_value">@form-element-input-color</td> - <td>Disabled form element text color</td> - </tr> - <tr> - <th nowrap="nowrap">@_disabled-font-style</th> - <td class="vars_value">@form-element-input-disabled-font-style<br/>@input-text-disabled-font-style<br/>@select-disabled-font-style<br/>@textarea-disabled-font-style</td> - <td class="vars_value">@form-element-input-font-style</td> - <td>Disabled form element font style</td> - </tr> - <tr> - <th colspan="4" class="vars_section">Focused elements</th> - </tr> - <tr> - <th>@_focus-background</th> - <td class="vars_value">@form-element-input-focus-background<br/>@input-text-focus-background<br/>@select-focus-background<br/>@textarea-focus-background</td> - <td class="vars_value">@form-element-input-background</td> - <td>Focused form element background</td> - </tr> - <tr> - <th>@_focus-border</th> - <td class="vars_value">@form-element-input-focus-border<br/>@input-text-focus-border<br/>@select-focus-border<br/>@textarea-focus-border</td> - <td class="vars_value">@form-element-input-border</td> - <td>Focused form element border</td> - </tr> - <tr> - <th>@_focus-color</th> - <td class="vars_value">@form-element-input-focus-color<br/>@input-text-focus-color<br/>@select-focus-color<br/>@textarea-focus-color</td> - <td class="vars_value">@form-element-input-color</td> - <td>Focused form element color</td> - </tr> - <tr> - <th>@_focus-font-style</th> - <td class="vars_value">@form-element-input-focus-font-style<br/>@input-text-focus-font-style<br/>@select-focus-font-style<br/>@textarea-focus-font-style</td> - <td class="vars_value">@form-element-input-font-style</td> - <td>Focused form element font style</td> - </tr> - </table> - </pre> -</div><div class="code"><pre><code> </code></pre></div></article><article id="form-element-choice" class="section"><div class="docs"><a href="#form-element-choice" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-choice">Form element choice</h1> -<p> The <code>.form-element-choise()</code> mixin is used to customize checkboxes and radio buttons.</p> -<textarea class="preview-code" spellcheck="false"> <input type="checkbox" name="checkbox-example" /><br /> - <input type="radio" name="radio-example" /></textarea> + +</code></pre></div></article><article id="form-element-inputs-customization-variables" class="section"><div class="docs"><a href="#form-element-inputs-customization-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-inputs-customization-variables">Form element inputs customization variables</h1> + <pre> + <table> + <tr> + <th class="vars_head">Mixin variable</th> + <th class="vars_head">Global variable</th> + <th class="vars_head">Default value [Allowed value]</th> + <th class="vars_head">Comment</th> + </tr> + <tr> + <th>@_type</th> + <td class="vars_value">@form-element-input-type<br/></td> + <td class="vars_value">'' [input-text | select | textarea | input-radio | input-checkbox]</td> + <td>Form control type.<br/>@form-element-input-[] global variables are used to set up all form elements style. Control-specific global variables use these @form-element-input-[] variables by default. Control-specific global variables can be set up separately.<br/>@input-text-[] is used to set up input-text controls style<br/>@select-[] is used to set up selects style<br/>@textarea-[] is used to set up textarea style</td> + </tr> + <tr> + <th>@_background</th> + <td class="vars_value">@form-element-input-background<br/>@input-text-background<br/>@selectbackground<br/>@textarea-background</td> + <td class="vars_value">#fff</td> + <td>Form control background</td> + </tr> + <tr> + <th>@_border</th> + <td class="vars_value">@form-element-input-border<br/>@input-text-border<br/>@select-borderbr>@textarea-border</td> + <td class="vars_value" nowrap="nowrap">1px solid @form-element-input-border-color</td> + <td>Form control border</td> + </tr> + <tr> + <th>@_border-radius</th> + <td class="vars_value" nowrap="nowrap">@form-element-input-border-radius<br/>@input-textborder-radius<br/>@select-border-radius<br/>@textarea-border-radius</td> + <td class="vars_value">1px</td> + <td>Form control border radius</td> + </tr> + <tr> + <th>@_height</th> + <td class="vars_value">@form-element-input-height<br/>@input-text-height<br/>@select-height<br/>@textarea-height</td> + <td class="vars_value">32px<br/>@form-element-input-height<br/>@form-element-input-height<br/>auto</td> + <td>Form control height</td> + </tr> + <tr> + <th>@_width</th> + <td class="vars_value">@form-element-input-width<br/>@input-text-width<br/>@select-width<br/>@textarea-width</td> + <td class="vars_value">100%</td> + <td>Form control width</td> + </tr> + <tr> + <th>@_padding</th> + <td class="vars_value">@form-element-input-padding<br/>@input-text-padding <br/>@select-padding<br/>@textarea-padding</td> + <td class="vars_value">0 10px<br/>@form-element-input-padding<br/>5px 10px 4px<br/>10px</td> + <td>Form control padding</td> + </tr> + <tr> + <th>@_margin</th> + <td class="vars_value">@form-element-input-margin<br/>@input-text-margin<br/>@select-margin<br/>@textarea-margin</td> + <td class="vars_value">false [true | false]</td> + <td>Form control margin</td> + </tr> + <tr> + <th>@_vertical-align</th> + <td class="vars_value">@form-element-input-vertical-align<br/>@input-text-vertical-align<br/>@select-vertical-align<br/>@textarea-vertical-align</td> + <td class="vars_value">baseline</td> + <td>Form control vertical align</td> + </tr> + <tr> + <th>@_background-clip</th> + <td class="vars_value">@form-element-input-background-clip<br/>@input-text-background-clip<br/>@select-background-clip<br/>@textarea-background-clip</td> + <td class="vars_value">padding-box [padding-box | border-box | content-box]</td> + <td>Form control background clip</td> + </tr> + <tr> + <th colspan="4" class="vars_section">Text settings</th> + </tr> + <tr> + <th>@_color</th> + <td class="vars_value">@form-element-input-color<br/>@input-text-color<br/>@select-color<br/>@textarea-color</td> + <td class="vars_value">@text-color</td> + <td>Form control text color</td> + </tr> + <tr> + <th>@_font-size</th> + <td class="vars_value">@form-element-input-font-size<br/>@input-text-font-size<br/>@select-font-size<br/>@textarea-font-size</td> + <td class="vars_value">@font-size-base</td> + <td>Form control font size</td> + </tr> + <tr> + <th>@_font-family</th> + <td class="vars_value">@form-element-input-font-family<br/>@input-text-font-family<br/>@select-font-family<br/>@textarea-font-family</td> + <td class="vars_value">@font-family-base</td> + <td>Form control font family</td> + </tr> + <tr> + <th>@_font-weight</th> + <td class="vars_value">@form-element-input-font-weight<br/>@input-text-font-weight<br/>@select-font-weight<br/>@textarea-font-weight</td> + <td class="vars_value">@font-weight-base</td> + <td>Form control font weight</td> + </tr> + <tr> + <th>@_font-style</th> + <td class="vars_value">@form-element-input-font-style<br/>@input-text-font-style<br/>@selectfont-style<br/>@textarea-font-style</td> + <td class="vars_value">@font-style-base</td> + <td>Form control font style</td> + </tr> + <tr> + <th>@_line-height</th> + <td class="vars_value">@form-element-input-line-height<br/>@input-text-line-height<br/>@select-line-height<br/>@textarea-line-height <br/></td> + <td class="vars_value">@line-height-base</td> + <td>Form control line height</td> + </tr> + <tr> + <th colspan="4" class="vars_section">Placeholder</th> + </tr> + <tr> + <th>@_placeholder-color</th> + <td class="vars_value">@form-element-input-placeholder-color<br/>@input-text-placeholder-color<br/>@select-placeholder-color<br/>@textarea-placeholder-color</td> + <td class="vars_value">false [false | '' | color code]</td> + <td>Form control placeholder color</td> + </tr> + <tr> + <th>@_placeholder-font-style</th> + <td class="vars_value" nowrap="nowrap">@form-element-input-placeholder-font-style<br/>@inputtext-placeholder-font-style<br/>@select-placeholder-font-style<br/>@textarea-placeholder-font-style</td> + <td class="vars_value">@form-element-input-font-style</td> + <td>Form control placeholder font style</td> + </tr> + <tr> + <th colspan="4" class="vars_section">Disabled element</th> + </tr> + <tr> + <th>@_disabled-background</th> + <td class="vars_value" nowrap="nowrap">@form-element-input-disabled-background<br/>@inputtextdisabled-background<br/>@select-disabled-background<br/>@textarea-disabled-background</td> + <td class="vars_value"> @form-element-input-background</td> + <td>Disabled form element background</td> + </tr> + <tr> + <th>@_disabled-border</th> + <td class="vars_value">@form-element-input-disabled-border<br/>@input-text-disabled-border<br/>@select-disabled-border<br/>@textarea-disabled-border</td> + <td class="vars_value">@form-element-input-border</td> + <td>Disabled form element border</td> + </tr> + <tr> + <th>@_disabled-opacity</th> + <td class="vars_value">@form-element-input-disabled-opacity<br/>@input-text-disabled-opacity<br/>@select-disabled-opacity<br/>@textarea-disabled-opacity</td> + <td class="vars_value">0.5</td> + <td>Disabled form element opacity</td> + </tr> + <tr> + <th>@_disabled-color</th> + <td class="vars_value">@form-element-input-disabled-color<br/>@input-text-disabled-color<br/>@select-disabled-color<br/>@textarea-disabled-color</td> + <td class="vars_value">@form-element-input-color</td> + <td>Disabled form element text color</td> + </tr> + <tr> + <th nowrap="nowrap">@_disabled-font-style</th> + <td class="vars_value">@form-element-input-disabled-font-style<br/>@input-text-disabled-font-style<br/>@select-disabled-font-style<br/>@textarea-disabled-font-style</td> + <td class="vars_value">@form-element-input-font-style</td> + <td>Disabled form element font style</td> + </tr> + <tr> + <th colspan="4" class="vars_section">Focused elements</th> + </tr> + <tr> + <th>@_focus-background</th> + <td class="vars_value">@form-element-input-focus-background<br/>@input-text-focus-background<br/>@select-focus-background<br/>@textarea-focus-background</td> + <td class="vars_value">@form-element-input-background</td> + <td>Focused form element background</td> + </tr> + <tr> + <th>@_focus-border</th> + <td class="vars_value">@form-element-input-focus-border<br/>@input-text-focus-border<br/>@select-focus-border<br/>@textarea-focus-border</td> + <td class="vars_value">@form-element-input-border</td> + <td>Focused form element border</td> + </tr> + <tr> + <th>@_focus-color</th> + <td class="vars_value">@form-element-input-focus-color<br/>@input-text-focus-color<br/>@select-focus-color<br/>@textarea-focus-color</td> + <td class="vars_value">@form-element-input-color</td> + <td>Focused form element color</td> + </tr> + <tr> + <th>@_focus-font-style</th> + <td class="vars_value">@form-element-input-focus-font-style<br/>@input-text-focus-font-style<br/>@select-focus-font-style<br/>@textarea-focus-font-style</td> + <td class="vars_value">@form-element-input-font-style</td> + <td>Focused form element font style</td> + </tr> + </table> + </pre> +</div><div class="code"><pre><code> +</code></pre></div></article><article id="form-element-choice" class="section"><div class="docs"><a href="#form-element-choice" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-choice">Form element choice</h1> +<p> The <code>.form-element-choise()</code> mixin is used to customize checkboxes and radio buttons.</p> +<textarea class="preview-code" spellcheck="false"> <input type="checkbox" name="checkbox-example" /><br /> + <input type="radio" name="radio-example" /></textarea> </div><div class="code"><pre><code>input[type="checkbox"] { .form-element-choice(@_type: input-checkbox); } @@ -893,48 +891,50 @@ textarea { input[type="radio"] { .form-element-choice(@_type: input-radio); } - </code></pre></div></article><article id="form-element-choice-variables" class="section"><div class="docs"><a href="#form-element-choice-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-choice-variables">Form element choice variables</h1> - <pre> - <table> - <tr> - <th class="vars_head">Mixin variable</th> - <th class="vars_head">Global variable</th> - <th class="vars_head">Default values [Allowed values]</th> - <th class="vars_head">Comment</th> - </tr> - <tr> - <th>@_type</th> - <td class="vars_value">@form-element-choice-type</td> - <td class="vars_value">'' ['' | radio | checkbox]</td> - <td>Choice element type</td> - </tr> - <tr> - <th>@_vertical-align</th> - <td class="vars_value">@form-element-choice-vertical-align<br>@input-radio-vertical-align<br>@input-checkbox-vertical-align</td> - <td class="vars_value">top</td> - <td>Choice element vertical align</td> - </tr> - <tr> - <th>@_margin</th> - <td class="vars_value">@form-element-choice-margin<br>@input-radio-margin<br>@input-checkbox-margin</td> - <td class="vars_value"> 2px 5px 0 0</td> - <td>Choice element margin</td> - </tr> - <tr> - <th>@_disabled-opacity</th> - <td class="vars_value">@form-element-choice-disabled-opacity<br>@input-radio-disabled-opacity<br>@input-checkbox-disabled-opacity</td> - <td class="vars_value">@form-element-input-disabled-opacity</td> - <td>Disabled choice element opacity</td> - </tr> - </table> - </pre> -</div><div class="code"><pre><code> </code></pre></div></article><article id="custom-indents-for-element-inputs" class="section"><div class="docs"><a href="#custom-indents-for-element-inputs" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="custom-indents-for-element-inputs">Custom indents for element inputs</h1> -<p> The <code>.form-element-indent()</code> mixin is used to set form elements background and color.</p> -<pre><code class="lang-css"> @_margin: '' - @_padding: ''</code></pre> -<textarea class="preview-code" spellcheck="false"> <input type="text" class="text text-example-2" placeholder="placeholder, type = text" /><br /><br /> - <select class="select-example-2"><option>type = select</option><option>option</option></select><br /><br /> - <textarea class="textarea-example-2" placeholder="placeholder, type = textarea"></textarea></textarea> + +</code></pre></div></article><article id="form-element-choice-variables" class="section"><div class="docs"><a href="#form-element-choice-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-element-choice-variables">Form element choice variables</h1> + <pre> + <table> + <tr> + <th class="vars_head">Mixin variable</th> + <th class="vars_head">Global variable</th> + <th class="vars_head">Default values [Allowed values]</th> + <th class="vars_head">Comment</th> + </tr> + <tr> + <th>@_type</th> + <td class="vars_value">@form-element-choice-type</td> + <td class="vars_value">'' ['' | radio | checkbox]</td> + <td>Choice element type</td> + </tr> + <tr> + <th>@_vertical-align</th> + <td class="vars_value">@form-element-choice-vertical-align<br>@input-radio-vertical-align<br>@input-checkbox-vertical-align</td> + <td class="vars_value">top</td> + <td>Choice element vertical align</td> + </tr> + <tr> + <th>@_margin</th> + <td class="vars_value">@form-element-choice-margin<br>@input-radio-margin<br>@input-checkbox-margin</td> + <td class="vars_value"> 2px 5px 0 0</td> + <td>Choice element margin</td> + </tr> + <tr> + <th>@_disabled-opacity</th> + <td class="vars_value">@form-element-choice-disabled-opacity<br>@input-radio-disabled-opacity<br>@input-checkbox-disabled-opacity</td> + <td class="vars_value">@form-element-input-disabled-opacity</td> + <td>Disabled choice element opacity</td> + </tr> + </table> + </pre> +</div><div class="code"><pre><code> +</code></pre></div></article><article id="custom-indents-for-element-inputs" class="section"><div class="docs"><a href="#custom-indents-for-element-inputs" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="custom-indents-for-element-inputs">Custom indents for element inputs</h1> +<p> The <code>.form-element-indent()</code> mixin is used to set form elements background and color.</p> +<pre><code class="lang-css"> @_margin: '' + @_padding: ''</code></pre> +<textarea class="preview-code" spellcheck="false"> <input type="text" class="text text-example-2" placeholder="placeholder, type = text" /><br /><br /> + <select class="select-example-2"><option>type = select</option><option>option</option></select><br /><br /> + <textarea class="textarea-example-2" placeholder="placeholder, type = textarea"></textarea></textarea> </div><div class="code"><pre><code>input.text-example-2, select.select-example-2 { .form-element-size( @@ -949,22 +949,23 @@ textarea.textarea-example-2 { @_padding: 5px 25px ); } - </code></pre></div></article><article id="custom-color" class="section"><div class="docs"><a href="#custom-color" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="custom-color">Custom color</h1> -<p> The <code>.form-element-color()</code> mixin is used to set form elements background and color.</p> -<pre><code class="lang-css"> @_border-color: '' - @_background: '' - @_color: '' - @_focus-border-color: '' - @_focus-background: '' - @_focus-color: '' - @_disabled-border-color: '' - @_disabled-background: '' - @_disabled-color: '' - @_placeholder-color: ''</code></pre> -<textarea class="preview-code" spellcheck="false"> <input type="text" class="text text-example-1" placeholder="placeholder, type = text" /><br /><br /> - <input type="text" class="text text-example-1" placeholder="placeholder, type = text, disabled" disabled="disabled" /><br /><br /> - <select class="select-example-1"><option>type = select</option><option>option</option></select><br /><br /> - <textarea class="textarea-example-1" placeholder="placeholder, type = textarea"></textarea></textarea> + +</code></pre></div></article><article id="custom-color" class="section"><div class="docs"><a href="#custom-color" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="custom-color">Custom color</h1> +<p> The <code>.form-element-color()</code> mixin is used to set form elements background and color.</p> +<pre><code class="lang-css"> @_border-color: '' + @_background: '' + @_color: '' + @_focus-border-color: '' + @_focus-background: '' + @_focus-color: '' + @_disabled-border-color: '' + @_disabled-background: '' + @_disabled-color: '' + @_placeholder-color: ''</code></pre> +<textarea class="preview-code" spellcheck="false"> <input type="text" class="text text-example-1" placeholder="placeholder, type = text" /><br /><br /> + <input type="text" class="text text-example-1" placeholder="placeholder, type = text, disabled" disabled="disabled" /><br /><br /> + <select class="select-example-1"><option>type = select</option><option>option</option></select><br /><br /> + <textarea class="textarea-example-1" placeholder="placeholder, type = textarea"></textarea></textarea> </div><div class="code"><pre><code>input.text-example-1, select.select-example-1, textarea.textarea-example-1 { @@ -983,18 +984,20 @@ textarea.textarea-example-1 { @_placeholder-color: darkgray ); } - </code></pre></div></article><article id="custom-indents-for-choice-inputs" class="section"><div class="docs"><a href="#custom-indents-for-choice-inputs" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="custom-indents-for-choice-inputs">Custom indents for choice inputs</h1> -<textarea class="preview-code" spellcheck="false"> <input type="checkbox" name="checkbox-example-1"class="checkbox-example-1" /><br /> - <input type="radio" name="radio-example-1" class="radio-example-1" /></textarea> + +</code></pre></div></article><article id="custom-indents-for-choice-inputs" class="section"><div class="docs"><a href="#custom-indents-for-choice-inputs" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="custom-indents-for-choice-inputs">Custom indents for choice inputs</h1> +<textarea class="preview-code" spellcheck="false"> <input type="checkbox" name="checkbox-example-1"class="checkbox-example-1" /><br /> + <input type="radio" name="radio-example-1" class="radio-example-1" /></textarea> </div><div class="code"><pre><code>input.checkbox-example-1, input.radio-example-1 { .add-margin(@_add-margin: 15px); } - </code></pre></div></article><article id="form-elements-custom-size" class="section"><div class="docs"><a href="#form-elements-custom-size" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-elements-custom-size">Form elements custom size</h1> -<p> The <code>.form-element-size()</code> mixin is used to set form elements custom size.</p> -<textarea class="preview-code" spellcheck="false"> <input type="text" class="text text-example-3" placeholder="placeholder, type = text" /><br /><br /> - <select class="select-example-3"><option>type = select</option><option>option</option></select><br /><br /> - <textarea class="textarea-example-3" placeholder="placeholder, type = textarea"></textarea></textarea> + +</code></pre></div></article><article id="form-elements-custom-size" class="section"><div class="docs"><a href="#form-elements-custom-size" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-elements-custom-size">Form elements custom size</h1> +<p> The <code>.form-element-size()</code> mixin is used to set form elements custom size.</p> +<textarea class="preview-code" spellcheck="false"> <input type="text" class="text text-example-3" placeholder="placeholder, type = text" /><br /><br /> + <select class="select-example-3"><option>type = select</option><option>option</option></select><br /><br /> + <textarea class="textarea-example-3" placeholder="placeholder, type = textarea"></textarea></textarea> </div><div class="code"><pre><code>input.text-example-3, select.select-example-3 { .form-element-size( @@ -1008,176 +1011,180 @@ textarea.textarea-example-3 { @_width: 50% ); } - </code></pre></div></article><article id="input-number-inputtext-view" class="section"><div class="docs"><a href="#input-number-inputtext-view" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="input-number-inputtext-view">Input number - input-text view</h1> -<textarea class="preview-code" spellcheck="false"> <input type="number" class="number number-example" placeholder="placeholder, type = number " /></textarea> + +</code></pre></div></article><article id="input-number-inputtext-view" class="section"><div class="docs"><a href="#input-number-inputtext-view" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="input-number-inputtext-view">Input number - input-text view</h1> +<textarea class="preview-code" spellcheck="false"> <input type="number" class="number number-example" placeholder="placeholder, type = number " /></textarea> </div><div class="code"><pre><code>.number-example { .form-element-number-reset(); } - </code></pre></div></article><article id="input-search-inputtext-view" class="section"><div class="docs"><a href="#input-search-inputtext-view" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="input-search-inputtext-view">Input search - input-text view</h1> -<textarea class="preview-code" spellcheck="false"> <input type="search" class="search search-example" placeholder="placeholder, type = search " /></textarea> + +</code></pre></div></article><article id="input-search-inputtext-view" class="section"><div class="docs"><a href="#input-search-inputtext-view" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="input-search-inputtext-view">Input search - input-text view</h1> +<textarea class="preview-code" spellcheck="false"> <input type="search" class="search search-example" placeholder="placeholder, type = search " /></textarea> </div><div class="code"><pre><code>.search-example { .form-element-search-reset(); } - </code></pre></div></article><article id="form-validation" class="section"><div class="docs"><a href="#form-validation" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-validation">Form validation</h1> -<p> The <code>.form-validation-note()</code> mixin is used to customize form validation error messages.</p> -<textarea class="preview-code" spellcheck="false"> <input type="text" class="textarea-example-4 mage-error" placeholder="placeholder, type = text" /> - <div class="mage-error">This is a required field.</div> - <br /> - <input type="text" class="textarea-example-5 valid" placeholder="placeholder, type = text" /> - - <br /><br /> - <select class="select-example-4 mage-error"><option>type = select</option><option>option</option></select> - <div class="mage-error">This is a required field.</div> - <br /> - <select class="select-example-5 valid"><option>type = select</option><option>option</option></select> - - <br /><br /> - <textarea class="textarea-example-4 mage-error" placeholder="placeholder, type = textarea"></textarea> - <div class="mage-error">This is a required field.</div> - <br /> - <textarea class="textarea-example-5 valid" placeholder="placeholder, type = textarea"></textarea> - - <br /><br /> - <input type="checkbox" name="checkbox-example-1" class="checkbox-example-2 mage-error" /> - <div class="mage-error">This is a required field.</div> - - <br /><br /> - <input type="radio" name="radio-example-1" class="radio-example-2 mage-error" /> - <div class="mage-error">This is a required field.</div></textarea> + +</code></pre></div></article><article id="form-validation" class="section"><div class="docs"><a href="#form-validation" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-validation">Form validation</h1> +<p> The <code>.form-validation-note()</code> mixin is used to customize form validation error messages.</p> +<textarea class="preview-code" spellcheck="false"> <input type="text" class="textarea-example-4 mage-error" placeholder="placeholder, type = text" /> + <div class="mage-error">This is a required field.</div> + <br /> + <input type="text" class="textarea-example-5 valid" placeholder="placeholder, type = text" /> + + <br /><br /> + <select class="select-example-4 mage-error"><option>type = select</option><option>option</option></select> + <div class="mage-error">This is a required field.</div> + <br /> + <select class="select-example-5 valid"><option>type = select</option><option>option</option></select> + + <br /><br /> + <textarea class="textarea-example-4 mage-error" placeholder="placeholder, type = textarea"></textarea> + <div class="mage-error">This is a required field.</div> + <br /> + <textarea class="textarea-example-5 valid" placeholder="placeholder, type = textarea"></textarea> + + <br /><br /> + <input type="checkbox" name="checkbox-example-1" class="checkbox-example-2 mage-error" /> + <div class="mage-error">This is a required field.</div> + + <br /><br /> + <input type="radio" name="radio-example-1" class="radio-example-2 mage-error" /> + <div class="mage-error">This is a required field.</div></textarea> </div><div class="code"><pre><code>input, textarea, select { .form-validation-note(); } - </code></pre></div></article><article id="form-validation-variables" class="section"><div class="docs"><a href="#form-validation-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-validation-variables">Form validation variables</h1> - <pre> - <table> - <tr> - <th class="vars_head">Mixin variable</th> - <th class="vars_head">Global variable</th> - <th class="vars_head">Default values [Allowed values]</th> - <th class="vars_head">Comment</th> - </tr> - <tr> - <th>@_note-color</th> - <td class="vars_value">@form-validation-note-color-error</td> - <td class="vars_value">@color-error</td> - <td>Validation note text color</td> - </tr> - <tr> - <th>@_note-font-size</th> - <td class="vars_value">@form-validation-note-font-size</td> - <td class="vars_value">@font-size-s</td> - <td>Validation note font size</td> - </tr> - <tr> - <th>@_note-font-family</th> - <td class="vars_value">@form-validation-note-font-family</td> - <td class="vars_value">false</td> - <td>Validation note font family</td> - </tr> - <tr> - <th>@_note-font-style</th> - <td class="vars_value">@form-validation-note-font-style</td> - <td class="vars_value">false</td> - <td>Validation note font style</td> - </tr> - <tr> - <th>@_note-font-weight</th> - <td class="vars_value">@form-validation-note-font-weight</td> - <td class="vars_value">false</td> - <td>Validation note font weight</td> - </tr> - <tr> - <th>@_note-line-height</th> - <td class="vars_value">@form-validation-note-line-height</td> - <td class="vars_value">false</td> - <td>Validation note line height</td> - </tr> - <tr> - <th>@_note-margin</th> - <td class="vars_value">@form-validation-note-margin</td> - <td class="vars_value">3px 0 0</td> - <td>Validation note margin</td> - </tr> - <tr> - <th>@_note-padding</th> - <td class="vars_value">@form-validation-note-padding</td> - <td class="vars_value">false</td> - <td>Validation note padding</td> - </tr> - <tr> - <th>@_note-icon-use</th> - <td class="vars_value">@form-validation-note-icon-use</td> - <td class="vars_value">false [true | false]</td> - <td>Show validation note icon</td> - </tr> - <tr> - <th>@_note-icon-font-content</th> - <td class="vars_value">@form-validation-note-icon-font-content</td> - <td class="vars_value">@icon-pointer-up</td> - <td>Validation note icon code</td> - </tr> - <tr> - <th>@_note-icon-font</th> - <td class="vars_value">@form-validation-note-icon-font</td> - <td class="vars_value">@icon-font</td> - <td>Validation note icon font</td> - </tr> - <tr> - <th>@_note-icon-font-size</th> - <td class="vars_value">@form-validation-note-icon-font-size</td> - <td class="vars_value">@form-validation-note-font-size * 2</td> - <td>Validation note icon font size</td> - </tr> - <tr> - <th>@_note-icon-font-line-height</th> - <td class="vars_value">@form-validation-note-icon-font-line-height</td> - <td class="vars_value">@form-validation-note-font-size</td> - <td>Validation note icon line height</td> - </tr> - <tr> - <th>@_note-icon-font-color</th> - <td class="vars_value">@form-validation-note-icon-font-color</td> - <td class="vars_value">@form-validation-note-color-error</td> - <td>Validation note icon color</td> - </tr> - <tr> - <th>@_note-icon-font-color-hover</th> - <td class="vars_value">@form-validation-note-icon-font-color-hover</td> - <td class="vars_value">false</td> - <td>Hovered validation note icon color</td> - </tr> - <tr> - <th>@_note-icon-font-color-active</th> - <td class="vars_value">@form-validation-note-icon-font-color-active</td> - <td class="vars_value">false</td> - <td>Active validation note icon color</td> - </tr> - <tr> - <th>@_note-icon-font-margin</th> - <td class="vars_value">@form-validation-note-icon-font-margin</td> - <td class="vars_value">false</td> - <td>Validation note icon margin</td> - </tr> - <tr> - <th>@_note-icon-font-vertical-align</th> - <td class="vars_value">@form-validation-note-icon-font-vertical-align</td> - <td class="vars_value"> @icon-font-vertical-align</td> - <td>Validation note icon vertical align</td> - </tr> - <tr> - <th>@_note-icon-font-position</th> - <td class="vars_value">@form-validation-note-icon-font-position</td> - <td class="vars_value">@icon-font-position</td> - <td>Validation note icon position</td> - </tr> - <tr> - <th>@_note-icon-font-text-hide</th> - <td class="vars_value">@form-validation-note-icon-font-text-hide</td> - <td class="vars_value">@icon-font-text-hide</td> - <td>Validation note icon text hide</td> - </tr> - </table> - </pre> -</div></article></section><div class="bar bottom"><div hidden class="settings container"><!-- Icons from http://iconmonstr.com--><button title="Desktop (1280)" data-width='1280'><svg viewBox="0 0 412 386" height="24" width="26" class="icon"><path d="m147.6,343.9c-4.5,15.9-26.2,37.6-42.1,42.1h201c-15.3,-4-38.1,-26.8-42.1,-42.1H147.6zM387,0.5H25c-13.8,0-25,11.2-25,25V294c0,13.8 11.2,25 25,25h362c13.8,0 25,-11.2 25,-25V25.5C412,11.7 400.8,0.5 387,0.5zM369.9,238.2H42.1L42.1,42.6 369.9,42.6V238.2z"></path></svg></button><button title="Laptop (1024)" data-width='1024'><svg viewBox="0 0 384 312" height="23" width="28" class="icon"><path d="m349.2,20.5c0,-11-9,-20-20,-20H53.6c-11,0-20,9-20,20v194H349.2v-194zm-27,167H60.6V27.5H322.2v160zm28,42H32.6L2.6,282.1c-3.5,6.2-3.5,13.8 0.1,19.9 3.6,6.2 10.2,9.9 17.3,9.9H363.1c7.1,0 13.7,-3.8 17.3,-10 3.6,-6.2 3.6,-13.8 0,-20l-30.2,-52.5zm-196.9,54 8,-23.5h60.5l8,23.5h-76.5z"></path></svg></button><button title="Tablet (768)" data-width='768'><svg viewBox="0 0 317 412" height="24" width="18" class="icon"><path d="M 316.5,380 V 32 c 0,-17.7 -14.3,-32 -32,-32 H 32 C 14.3,0 0,14.3 0,32 v 348 c 0,17.7 14.3,32 32,32 h 252.5 c 17.7,0 32,-14.3 32,-32 z M 40,367 V 45 H 276.5 V 367 H 40 z m 109.8,22.7 c 0,-4.7 3.8,-8.5 8.5,-8.5 4.7,0 8.5,3.8 8.5,8.5 0,4.7 -3.8,8.5 -8.5,8.5 -4.7,0 -8.5,-3.8 -8.5,-8.5 z"></path></svg></button><button title="Smart phone (320)" data-width='320'><svg viewBox="0 0 224 412" height="24" width="13" class="icon"><path d="M 190.7,0 H 33 C 14.8,0 0,14.8 0,33 v 346 c 0,18.2 14.8,33 33,33 h 157.7 c 18.2,0 33,-14.8 33,-33 V 33 c 0,-18.2 -14.8,-33 -33,-33 z M 94.3,30.2 h 37 c 2.2,0 4,1.8 4,4 0,2.2 -1.8,4 -4,4 h -37 c -2.2,0 -4,-1.8 -4,-4 0,-2.2 1.8,-4 4,-4 z m 18.5,362.8 c -8.8,0 -16,-7.2 -16,-16 0,-8.8 7.2,-16 16,-16 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 z M 198.6,343.8 H 25.1 V 68.2 h 173.5 v 275.5 z"></path></svg></button><button title="Feature phone (240)" data-width='240'><svg viewBox="0 0 201 412" height="24" width="12" class="icon"><path d="M 165.5,0.2 V 45 H 25 c -13.8,0 -25,11.2 -25,25 V 387 c 0,13.8 11.2,25 25,25 h 150.5 c 13.8,0 25,-11.2 25,-25 V 0.2 h -35 z M 65.2,366.5 H 34.2 v -24.5 h 31 v 24.5 z m 0,-44.3 H 34.2 v -24.5 h 31 v 24.5 z m 50.5,44.3 H 84.7 v -24.5 h 31 v 24.5 z m 0,-44.3 H 84.7 v -24.5 h 31 v 24.5 z m 50.5,44.3 h -31 v -24.5 h 31 v 24.5 z m 0,-44.3 h -31 v -24.5 h 31 v 24.5 z m 0,-59.3 h -132 V 95.4 h 132 V 262.9 z"></path></svg></button><button title="Auto (100%)" data-width="auto" class="auto is-active">Auto</button></div></div><script>(function(){var a=[{title:"actions-toolbar",filename:"actions-toolbar",url:"actions-toolbar.html"},{title:"Actions toolbar",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar"},{title:"Actions toolbar mixin variables",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar-mixin-variables"},{title:"Actions toolbar alignment",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar-alignment"},{title:"Reverse primary and secondary blocks",filename:"actions-toolbar",url:"actions-toolbar.html#reverse-primary-and-secondary-blocks"},{title:"Actions toolbar indents customizations",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar-indents-customizations"},{title:"Responsive actions toolbar",filename:"actions-toolbar",url:"actions-toolbar.html#responsive-actions-toolbar"},{title:"breadcrumbs",filename:"breadcrumbs",url:"breadcrumbs.html"},{title:"Breadcrumbs",filename:"breadcrumbs",url:"breadcrumbs.html#breadcrumbs"},{title:"Breadcrumbs variables",filename:"breadcrumbs",url:"breadcrumbs.html#breadcrumbs-variables"},{title:"Button-styled breadcrumbs with gradient background, border, and no separating symbol",filename:"breadcrumbs",url:"breadcrumbs.html#buttonstyled-breadcrumbs-with-gradient-background-border-and-no-separating-symbol"},{title:"Breadcrumbs with solid background",filename:"breadcrumbs",url:"breadcrumbs.html#breadcrumbs-with-solid-background"},{title:"buttons",filename:"buttons",url:"buttons.html"},{title:"Default button",filename:"buttons",url:"buttons.html#default-button"},{title:"Button variables",filename:"buttons",url:"buttons.html#button-variables"},{title:"Button as an icon",filename:"buttons",url:"buttons.html#button-as-an-icon"},{title:"Button with an icon on the left or right side of the text",filename:"buttons",url:"buttons.html#button-with-an-icon-on-the-left-or-right-side-of-the-text"},{title:"Button with fixed width",filename:"buttons",url:"buttons.html#button-with-fixed-width"},{title:"Primary button",filename:"buttons",url:"buttons.html#primary-button"},{title:"Primary button variables",filename:"buttons",url:"buttons.html#primary-button-variables"},{title:"Button with gradient background",filename:"buttons",url:"buttons.html#button-with-gradient-background"},{title:"Button as a link",filename:"buttons",url:"buttons.html#button-as-a-link"},{title:"Link as a button",filename:"buttons",url:"buttons.html#link-as-a-button"},{title:"docs",filename:"docs",url:"docs.html"},{title:"Documentation",filename:"docs",url:"docs.html#documentation"},{title:"dropdowns",filename:"dropdowns",url:"dropdowns.html"},{title:"Drop-down and split buttons mixins",filename:"dropdowns",url:"dropdowns.html#dropdown-and-split-buttons-mixins"},{title:"Drop-down",filename:"dropdowns",url:"dropdowns.html#dropdown"},{title:"Drop-down variables",filename:"dropdowns",url:"dropdowns.html#dropdown-variables"},{title:"Drop-down with icon customization",filename:"dropdowns",url:"dropdowns.html#dropdown-with-icon-customization"},{title:"Modify dropdown list styles",filename:"dropdowns",url:"dropdowns.html#modify-dropdown-list-styles"},{title:"Split button",filename:"dropdowns",url:"dropdowns.html#split-button"},{title:"Split button variables",filename:"dropdowns",url:"dropdowns.html#split-button-variables"},{title:"Split button - button styling",filename:"dropdowns",url:"dropdowns.html#split-button-button-styling"},{title:"Split button icon customization",filename:"dropdowns",url:"dropdowns.html#split-button-icon-customization"},{title:"Split button drop-down list customization",filename:"dropdowns",url:"dropdowns.html#split-button-dropdown-list-customization"},{title:"forms",filename:"forms",url:"forms.html"},{title:"Forms mixins",filename:"forms",url:"forms.html#forms-mixins"},{title:"Global forms elements customization",filename:"forms",url:"forms.html#global-forms-elements-customization"},{title:"Fieldsets & fields customization",filename:"forms",url:"forms.html#fieldsets-fields-customization"},{title:"Fieldset and legend customization variables",filename:"forms",url:"forms.html#fieldset-and-legend-customization-variables"},{title:"Fields customization variables",filename:"forms",url:"forms.html#fields-customization-variables"},{title:"Required fields message customization variables",filename:"forms",url:"forms.html#required-fields-message-customization-variables"},{title:"Form element inputs customization",filename:"forms",url:"forms.html#form-element-inputs-customization"},{title:"Form element inputs customization variables",filename:"forms",url:"forms.html#form-element-inputs-customization-variables"},{title:"Form element choice",filename:"forms",url:"forms.html#form-element-choice"},{title:"Form element choice variables",filename:"forms",url:"forms.html#form-element-choice-variables"},{title:"Custom indents for element inputs",filename:"forms",url:"forms.html#custom-indents-for-element-inputs"},{title:"Custom color",filename:"forms",url:"forms.html#custom-color"},{title:"Custom indents for choice inputs",filename:"forms",url:"forms.html#custom-indents-for-choice-inputs"},{title:"Form elements custom size",filename:"forms",url:"forms.html#form-elements-custom-size"},{title:"Input number - input-text view",filename:"forms",url:"forms.html#input-number-inputtext-view"},{title:"Input search - input-text view",filename:"forms",url:"forms.html#input-search-inputtext-view"},{title:"Form validation",filename:"forms",url:"forms.html#form-validation"},{title:"Form validation variables",filename:"forms",url:"forms.html#form-validation-variables"},{title:"icons",filename:"icons",url:"icons.html"},{title:"Icons",filename:"icons",url:"icons.html#icons"},{title:"Icon with image or sprite",filename:"icons",url:"icons.html#icon-with-image-or-sprite"},{title:"Icon with image or sprite variables",filename:"icons",url:"icons.html#icon-with-image-or-sprite-variables"},{title:"Icon position for an icon with image or sprite",filename:"icons",url:"icons.html#icon-position-for-an-icon-with-image-or-sprite"},{title:"Position for icon with image or sprite mixin variables",filename:"icons",url:"icons.html#position-for-icon-with-image-or-sprite-mixin-variables"},{title:"Icon sprite position (with grid)",filename:"icons",url:"icons.html#icon-sprite-position-with-grid"},{title:"Icon sprite position variables",filename:"icons",url:"icons.html#icon-sprite-position-variables"},{title:"Image/sprite icon size",filename:"icons",url:"icons.html#imagesprite-icon-size"},{title:"Image/sprite icon size variables",filename:"icons",url:"icons.html#imagesprite-icon-size-variables"},{title:"Font icon",filename:"icons",url:"icons.html#font-icon"},{title:"Font icon variables",filename:"icons",url:"icons.html#font-icon-variables"},{title:"Change the size of font icon",filename:"icons",url:"icons.html#change-the-size-of-font-icon"},{title:"Change the size of font icon variables",filename:"icons",url:"icons.html#change-the-size-of-font-icon-variables"},{title:"Hide icon text",filename:"icons",url:"icons.html#hide-icon-text"},{title:"Sprite and font icons for Blank theme",filename:"icons",url:"icons.html#sprite-and-font-icons-for-blank-theme"},{title:"layout",filename:"layout",url:"layout.html"},{title:"Layout",filename:"layout",url:"layout.html#layout"},{title:"Layout global variables",filename:"layout",url:"layout.html#layout-global-variables"},{title:"Page layouts",filename:"layout",url:"layout.html#page-layouts"},{title:"Layout column",filename:"layout",url:"layout.html#layout-column"},{title:"Layout column variables",filename:"layout",url:"layout.html#layout-column-variables"},{title:"Layout width",filename:"layout",url:"layout.html#layout-width"},{title:"Layout width variables",filename:"layout",url:"layout.html#layout-width-variables"},{title:"lib",filename:"lib",url:"lib.html"},{title:"Including Magento UI library to your theme",filename:"lib",url:"lib.html#including-magento-ui-library-to-your-theme"},{title:"loaders",filename:"loaders",url:"loaders.html"},{title:"Loaders",filename:"loaders",url:"loaders.html#loaders"},{title:"Default loader variables",filename:"loaders",url:"loaders.html#default-loader-variables"},{title:"Loading",filename:"loaders",url:"loaders.html#loading"},{title:"Loading default variables",filename:"loaders",url:"loaders.html#loading-default-variables"},{title:"messages",filename:"messages",url:"messages.html"},{title:"Messages",filename:"messages",url:"messages.html#messages"},{title:"Information message",filename:"messages",url:"messages.html#information-message"},{title:"Warning message",filename:"messages",url:"messages.html#warning-message"},{title:"Error message",filename:"messages",url:"messages.html#error-message"},{title:"Success message",filename:"messages",url:"messages.html#success-message"},{title:"Notice message",filename:"messages",url:"messages.html#notice-message"},{title:"Message with inner icon",filename:"messages",url:"messages.html#message-with-inner-icon"},{title:"Message with lateral icon",filename:"messages",url:"messages.html#message-with-lateral-icon"},{title:"Custom message style",filename:"messages",url:"messages.html#custom-message-style"},{title:"Messages global variables",filename:"messages",url:"messages.html#messages-global-variables"},{title:"navigation",filename:"navigation",url:"navigation.html"},{title:"Mobile off canvas navigation",filename:"navigation",url:"navigation.html#mobile-off-canvas-navigation"},{title:"Mobile off canvas navigation variables",filename:"navigation",url:"navigation.html#mobile-off-canvas-navigation-variables"},{title:"Desktop navigation",filename:"navigation",url:"navigation.html#desktop-navigation"},{title:"Desktop navigation variables",filename:"navigation",url:"navigation.html#desktop-navigation-variables"},{title:"pages",filename:"pages",url:"pages.html"},{title:"Pagination HTML markup",filename:"pages",url:"pages.html#pagination-html-markup"},{title:"Pagination variables",filename:"pages",url:"pages.html#pagination-variables"},{title:"Pagination with label and gradient background on links",filename:"pages",url:"pages.html#pagination-with-label-and-gradient-background-on-links"},{title:'Pagination with "previous"..."next" text links and label',filename:"pages",url:"pages.html#pagination-with-previousnext-text-links-and-label"},{title:"Pagination without label, with solid background",filename:"pages",url:"pages.html#pagination-without-label-with-solid-background"},{title:"popups",filename:"popups",url:"popups.html"},{title:"Popups",filename:"popups",url:"popups.html#popups"},{title:"Popup variables",filename:"popups",url:"popups.html#popup-variables"},{title:"Window overlay mixin variables",filename:"popups",url:"popups.html#window-overlay-mixin-variables"},{title:"Fixed height popup",filename:"popups",url:"popups.html#fixed-height-popup"},{title:"Fixed content height popup",filename:"popups",url:"popups.html#fixed-content-height-popup"},{title:"Margins for header, content and footer block in popup",filename:"popups",url:"popups.html#margins-for-header-content-and-footer-block-in-popup"},{title:"Popup titles styled as theme headings",filename:"popups",url:"popups.html#popup-titles-styled-as-theme-headings"},{title:"Popup action toolbar",filename:"popups",url:"popups.html#popup-action-toolbar"},{title:"Popup Close button without an icon",filename:"popups",url:"popups.html#popup-close-button-without-an-icon"},{title:"Modify the icon of popup Close button",filename:"popups",url:"popups.html#modify-the-icon-of-popup-close-button"},{title:"Modify overlay styles",filename:"popups",url:"popups.html#modify-overlay-styles"},{title:"rating",filename:"rating",url:"rating.html"},{title:"Ratings",filename:"rating",url:"rating.html#ratings"},{title:"Global rating variables",filename:"rating",url:"rating.html#global-rating-variables"},{title:"Rating with vote",filename:"rating",url:"rating.html#rating-with-vote"},{title:"Rating with vote icons number customization",filename:"rating",url:"rating.html#rating-with-vote-icons-number-customization"},{title:"Rating with vote icons colors customization",filename:"rating",url:"rating.html#rating-with-vote-icons-colors-customization"},{title:"Rating with vote icons symbol customization",filename:"rating",url:"rating.html#rating-with-vote-icons-symbol-customization"},{title:"Accessible rating with vote",filename:"rating",url:"rating.html#accessible-rating-with-vote"},{title:"Rating summary",filename:"rating",url:"rating.html#rating-summary"},{title:"Rating summary icons number customization",filename:"rating",url:"rating.html#rating-summary-icons-number-customization"},{title:"Rating summary icons color customization",filename:"rating",url:"rating.html#rating-summary-icons-color-customization"},{title:"Rating summary icons symbol customization",filename:"rating",url:"rating.html#rating-summary-icons-symbol-customization"},{title:"Rating summary hide label",filename:"rating",url:"rating.html#rating-summary-hide-label"},{title:"Rating summary multiple ratings",filename:"rating",url:"rating.html#rating-summary-multiple-ratings"},{title:"Rating hide label mixin",filename:"rating",url:"rating.html#rating-hide-label-mixin"},{title:"resets",filename:"resets",url:"resets.html"},{title:"Resets",filename:"resets",url:"resets.html#resets"},{title:"sections",filename:"sections",url:"sections.html"},{title:"Tabs and accordions",filename:"sections",url:"sections.html#tabs-and-accordions"},{title:"Tabs",filename:"sections",url:"sections.html#tabs"},{title:"Tabs mixin variables",filename:"sections",url:"sections.html#tabs-mixin-variables"},{title:"Tabs with content top border",filename:"sections",url:"sections.html#tabs-with-content-top-border"},{title:"Accordion",filename:"sections",url:"sections.html#accordion"},{title:"Accordion mixin variables",filename:"sections",url:"sections.html#accordion-mixin-variables"},{title:"Responsive tabs",filename:"sections",url:"sections.html#responsive-tabs"},{title:"Tabs Base",filename:"sections",url:"sections.html#tabs-base"},{title:"Accordion Base",filename:"sections",url:"sections.html#accordion-base"},{title:"tables",filename:"tables",url:"tables.html"},{title:"Tables",filename:"tables",url:"tables.html#tables"},{title:"Table mixin variables",filename:"tables",url:"tables.html#table-mixin-variables"},{title:"Table typography",filename:"tables",url:"tables.html#table-typography"},{title:"Table typography mixin variables",filename:"tables",url:"tables.html#table-typography-mixin-variables"},{title:"Table caption",filename:"tables",url:"tables.html#table-caption"},{title:"Table caption mixin variables",filename:"tables",url:"tables.html#table-caption-mixin-variables"},{title:"Table cells resize",filename:"tables",url:"tables.html#table-cells-resize"},{title:"Table cells resize variables",filename:"tables",url:"tables.html#table-cells-resize-variables"},{title:"Table background customization",filename:"tables",url:"tables.html#table-background-customization"},{title:"Table background mixin variables",filename:"tables",url:"tables.html#table-background-mixin-variables"},{title:"Table borders customization",filename:"tables",url:"tables.html#table-borders-customization"},{title:"Table borders mixin variables",filename:"tables",url:"tables.html#table-borders-mixin-variables"},{title:"Table with horizontal borders",filename:"tables",url:"tables.html#table-with-horizontal-borders"},{title:"Table with vertical borders",filename:"tables",url:"tables.html#table-with-vertical-borders"},{title:"Table with light borders",filename:"tables",url:"tables.html#table-with-light-borders"},{title:"Table without borders",filename:"tables",url:"tables.html#table-without-borders"},{title:"Striped table",filename:"tables",url:"tables.html#striped-table"},{title:"Striped table mixin variables",filename:"tables",url:"tables.html#striped-table-mixin-variables"},{title:"Table with rows hover",filename:"tables",url:"tables.html#table-with-rows-hover"},{title:"Table with rows hover mixin variables",filename:"tables",url:"tables.html#table-with-rows-hover-mixin-variables"},{title:"Responsive table technics #1",filename:"tables",url:"tables.html#responsive-table-technics-1"},{title:"Responsive table technics #2",filename:"tables",url:"tables.html#responsive-table-technics-2"},{title:"Responsive table technics #2 mixin variables",filename:"tables",url:"tables.html#responsive-table-technics-2-mixin-variables"},{title:"tooltips",filename:"tooltips",url:"tooltips.html"},{title:"Tooltips",filename:"tooltips",url:"tooltips.html#tooltips"},{title:"Tooltips variables",filename:"tooltips",url:"tooltips.html#tooltips-variables"},{title:"typography",filename:"typography",url:"typography.html"},{title:"Typogrphy",filename:"typography",url:"typography.html#typogrphy"},{title:"Typography variables",filename:"typography",url:"typography.html#typography-variables"},{title:"Font-size mixin",filename:"typography",url:"typography.html#fontsize-mixin"},{title:"Word breaking mixin",filename:"typography",url:"typography.html#word-breaking-mixin"},{title:"Font face mixin",filename:"typography",url:"typography.html#font-face-mixin"},{title:"Text overflow mixin",filename:"typography",url:"typography.html#text-overflow-mixin"},{title:"Text hide",filename:"typography",url:"typography.html#text-hide"},{title:"Hyphens",filename:"typography",url:"typography.html#hyphens"},{title:"Font style and color",filename:"typography",url:"typography.html#font-style-and-color"},{title:"Font style mixin variables",filename:"typography",url:"typography.html#font-style-mixin-variables"},{title:"Reset list styles",filename:"typography",url:"typography.html#reset-list-styles"},{title:"Reset list styles variables",filename:"typography",url:"typography.html#reset-list-styles-variables"},{title:"Inline-block list item styling",filename:"typography",url:"typography.html#inlineblock-list-item-styling"},{title:"Link styling mixin",filename:"typography",url:"typography.html#link-styling-mixin"},{title:"Link styling mixin variables",filename:"typography",url:"typography.html#link-styling-mixin-variables"},{title:"Heading styling mixin",filename:"typography",url:"typography.html#heading-styling-mixin"},{title:"Base typography mixins",filename:"typography",url:"typography.html#base-typography-mixins"},{title:"Headings typography mixin",filename:"typography",url:"typography.html#headings-typography-mixin"},{title:"Typography links mixin",filename:"typography",url:"typography.html#typography-links-mixin"},{title:"Typography lists mixin",filename:"typography",url:"typography.html#typography-lists-mixin"},{title:"Typography code elements mixin",filename:"typography",url:"typography.html#typography-code-elements-mixin"},{title:"Typography blockquote",filename:"typography",url:"typography.html#typography-blockquote"},{title:"variables",filename:"variables",url:"variables.html"},{title:"List of Global Variables",filename:"variables",url:"variables.html#list-of-global-variables"},{title:"Table with rows hover mixin variables",filename:"variables",url:"variables.html#table-with-rows-hover-mixin-variables"}];(function(){"use strict";var b=function(a,b){return Array.prototype.indexOf.call(a,b)!==-1},c=function(a,b){return Array.prototype.filter.call(a,b)},d=function(a,b){return Array.prototype.forEach.call(a,b)},e=document.getElementsByTagName("body")[0];e.addEventListener("click",function(a){var b=a.target;b.tagName.toLowerCase()==="svg"&&(b=b.parentNode);var c=!1;b.dataset.toggle!=null&&(a.preventDefault(),b.classList.contains("is-active")||(c=!0)),d(e.querySelectorAll("[data-toggle]"),function(a){a.classList.remove("is-active"),document.getElementById(a.dataset.toggle).hidden=!0}),c&&(b.classList.add("is-active"),document.getElementById(b.dataset.toggle).hidden=!1)}),function(){var f=e.getElementsByClassName("nav")[0];if(!f)return;var g=document.createElement("ul");g.className="nav-results",g.id="nav-search",g.hidden=!0,d(a,function(a){var b,c,d;b=document.createElement("li"),b._title=a.title.toLowerCase(),b.hidden=!0,b.appendChild(c=document.createElement("a")),c.href=a.url,c.innerHTML=a.title,c.appendChild(d=document.createElement("span")),d.innerHTML=a.filename,d.className="nav-results-filename",g.appendChild(b)}),f.appendChild(g);var h=g.children,i=function(a){d(h,function(a){a.hidden=!0});var b=this.value.toLowerCase(),e=[];b!==""&&(e=c(h,function(a){return a._title.indexOf(b)!==-1})),e.length>0?(d(e,function(a){a.hidden=!1}),g.hidden=!1):g.hidden=!0},j=f.querySelector('input[type="search"]');j.addEventListener("keyup",i),j.addEventListener("focus",i),e.addEventListener("click",function(a){if(a.target.classList&&a.target.classList.contains("search"))return;g.hidden=!0}),g.addEventListener("click",function(a){j.value=""});var k=document.createElement("ul");k.id="nav-toc",k.hidden=!0,k.className="nav-results toc-list",c(e.getElementsByTagName("*"),function(a){return b(["h1","h2","h3"],a.tagName.toLowerCase())}).map(function(a){var b=document.createElement("li"),c=document.createElement("a"),d=a.tagName.toLowerCase()[1];c.classList.add("level-"+d),b.appendChild(c),c.href="#"+a.id,c.innerHTML=a.innerHTML,k.appendChild(b)}),f.appendChild(k)}()})(),function(){"use strict";if(location.hash==="#__preview__"||location.protocol==="data:")return;var a=function(a,b){return Array.prototype.forEach.call(a,b)},b=function(a,b){var e=Array.prototype.slice.call(arguments,2);return d(a,function(a){return(c(b)?b||a:a[b]).apply(a,e)})},c=function(a){return Object.prototype.toString.call(a)==="[object Function]"},d=function(a,b){return Array.prototype.map.call(a,b)},e=function(a,b){return d(a,function(a){return a[b]})},f=function(a){var b={},c=a.split(";");for(var d=0;c.length>d;d++){var e=c[d].trim().split("=");b[e[0]]=e[1]}return b},g=function(a,c){return b(e(a,"classList"),"remove",c)},h=function(a,b){a.contentDocument.defaultView.postMessage(b,"*")},i=document.getElementsByTagName("head")[0],j=document.getElementsByTagName("body")[0],k=e(i.querySelectorAll('style[type="text/preview"]'),"innerHTML").join(""),l=e(i.querySelectorAll('script[type="text/preview"]'),"innerHTML").join(""),m=location.href.split("#")[0]+"#__preview__",n=document.createElement("iframe");n.src="data:text/html,",j.appendChild(n),n.addEventListener("load",function(){var b={sameOriginDataUri:!0};try{this.contentDocument,this.contentDocument||(b.sameOriginDataUri=!1)}catch(c){b.sameOriginDataUri=!1}this.parentNode.removeChild(this),a(j.getElementsByTagName("textarea"),function(a,c){o(a,b,c),q(),p(a)})});var o=function(a,b,c){var d,e,f;d=document.createElement("div"),d.appendChild(e=document.createElement("div")),d.className="preview",e.appendChild(f=document.createElement("iframe")),e.className="resizeable",f.setAttribute("scrolling","no"),f.name="iframe"+c++,f.addEventListener("load",function(){var c,d,e,f,g,i,j;j=this.contentDocument;if(!b.sameOriginDataUri&&this.src!==m)return;this.src===m&&(c=j.createElement("html"),c.appendChild(j.createElement("head")),c.appendChild(d=j.createElement("body")),d.innerHTML=a.textContent,j.replaceChild(c,j.documentElement)),g=j.createElement("head"),g.appendChild(f=j.createElement("style")),g.appendChild(e=j.createElement("script")),e.textContent=l,f.textContent=k,i=j.getElementsByTagName("head")[0],i.parentNode.replaceChild(g,i),h(this,"getHeight")});var g;b.sameOriginDataUri?g="data:text/html;charset=utf-8,"+encodeURIComponent("<!doctype html><html><head></head></body>"+a.textContent):g=m,f.setAttribute("src",g);var i=function(){f.contentDocument.body.innerHTML=this.value,h(f,"getHeight")};a.addEventListener("keypress",i),a.addEventListener("keyup",i),a.parentNode.insertBefore(d,a)},p=function(a){var b=document.createElement("div");b.className="preview-code",b.style.position="absolute",b.style.left="-9999px",j.appendChild(b);var c=parseInt(window.getComputedStyle(a).getPropertyValue("max-height"),10),d=function(a){b.textContent=this.value+"\n";var d=b.offsetHeight+2;d>=c?this.style.overflow="auto":this.style.overflow="hidden",this.style.height=b.offsetHeight+2+"px"};a.addEventListener("keypress",d),a.addEventListener("keyup",d),d.call(a)},q=function(){var b=j.getElementsByClassName("settings")[0],c=j.getElementsByClassName("resizeable"),d=30,e=function(b){document.cookie="preview-width="+b,a(c,function(a){b==="auto"&&(b=a.parentNode.offsetWidth),a.style.width=b+"px",h(a.getElementsByTagName("iframe")[0],"getHeight")})},i=f(document.cookie)["preview-width"];if(i){e(i),g(b.getElementsByClassName("is-active"),"is-active");var k=b.querySelector('button[data-width="'+i+'"]');k&&k.classList.add("is-active")}window.addEventListener("message",function(a){if(a.data==null||!a.source)return;var b=a.data,c=document.getElementsByName(a.source.name)[0];b.height!=null&&c&&(c.parentNode.style.height=b.height+d+"px")},!1),b&&c.length>0&&(b.hidden=!1,b.addEventListener("click",function(a){var c=a.target.tagName.toLowerCase(),d;if(c==="button")d=a.target;else{if(c!=="svg")return;d=a.target.parentNode}a.preventDefault(),g(b.getElementsByClassName("is-active"),"is-active"),d.classList.add("is-active");var f=d.dataset.width;e(f)}))}}()})()</script></body></html><!-- Generated with StyleDocco (http://jacobrask.github.com/styledocco). --> + +</code></pre></div></article><article id="form-validation-variables" class="section"><div class="docs"><a href="#form-validation-variables" class="permalink"><svg viewBox="0 0 512 512" height="32" width="32" class="icon"><path d="M156.2,199.7c7.5-7.5,15.9-13.8,24.8-18.7c49.6-27.3,113.1-12.8,145,35.5l-38.5,38.5c-11.1-25.2-38.5-39.6-65.8-33.5c-10.3,2.3-20.1,7.4-28,15.4l-73.9,73.9c-22.4,22.4-22.4,58.9,0,81.4c22.4,22.4,58.9,22.4,81.4,0l22.8-22.8c20.7,8.2,42.9,11.5,64.9,9.9l-50.3,50.3c-43.1,43.1-113,43.1-156.1,0c-43.1-43.1-43.1-113-0-156.1L156.2,199.7z M273.6,82.3l-50.3,50.3c21.9-1.6,44.2,1.6,64.9,9.9l22.8-22.8c22.4-22.4,58.9-22.4,81.4,0c22.4,22.4,22.4,58.9,0,81.4l-73.9,73.9c-22.5,22.5-59.1,22.3-81.4,0c-5.2-5.2-9.7-11.7-12.5-18l-38.5,38.5c4,6.1,8.3,11.5,13.7,16.9c13.9,13.9,31.7,24.3,52.1,29.3c26.5,6.4,54.8,2.8,79.2-10.6c8.9-4.9,17.3-11.1,24.8-18.7l73.9-73.9c43.1-43.1,43.1-113,0-156.1C386.6,39.2,316.7,39.2,273.6,82.3z"></path></svg></a><h1 id="form-validation-variables">Form validation variables</h1> + <pre> + <table> + <tr> + <th class="vars_head">Mixin variable</th> + <th class="vars_head">Global variable</th> + <th class="vars_head">Default values [Allowed values]</th> + <th class="vars_head">Comment</th> + </tr> + <tr> + <th>@_note-color</th> + <td class="vars_value">@form-validation-note-color-error</td> + <td class="vars_value">@color-error</td> + <td>Validation note text color</td> + </tr> + <tr> + <th>@_note-font-size</th> + <td class="vars_value">@form-validation-note-font-size</td> + <td class="vars_value">@font-size-s</td> + <td>Validation note font size</td> + </tr> + <tr> + <th>@_note-font-family</th> + <td class="vars_value">@form-validation-note-font-family</td> + <td class="vars_value">false</td> + <td>Validation note font family</td> + </tr> + <tr> + <th>@_note-font-style</th> + <td class="vars_value">@form-validation-note-font-style</td> + <td class="vars_value">false</td> + <td>Validation note font style</td> + </tr> + <tr> + <th>@_note-font-weight</th> + <td class="vars_value">@form-validation-note-font-weight</td> + <td class="vars_value">false</td> + <td>Validation note font weight</td> + </tr> + <tr> + <th>@_note-line-height</th> + <td class="vars_value">@form-validation-note-line-height</td> + <td class="vars_value">false</td> + <td>Validation note line height</td> + </tr> + <tr> + <th>@_note-margin</th> + <td class="vars_value">@form-validation-note-margin</td> + <td class="vars_value">3px 0 0</td> + <td>Validation note margin</td> + </tr> + <tr> + <th>@_note-padding</th> + <td class="vars_value">@form-validation-note-padding</td> + <td class="vars_value">false</td> + <td>Validation note padding</td> + </tr> + <tr> + <th>@_note-icon-use</th> + <td class="vars_value">@form-validation-note-icon-use</td> + <td class="vars_value">false [true | false]</td> + <td>Show validation note icon</td> + </tr> + <tr> + <th>@_note-icon-font-content</th> + <td class="vars_value">@form-validation-note-icon-font-content</td> + <td class="vars_value">@icon-pointer-up</td> + <td>Validation note icon code</td> + </tr> + <tr> + <th>@_note-icon-font</th> + <td class="vars_value">@form-validation-note-icon-font</td> + <td class="vars_value">@icon-font</td> + <td>Validation note icon font</td> + </tr> + <tr> + <th>@_note-icon-font-size</th> + <td class="vars_value">@form-validation-note-icon-font-size</td> + <td class="vars_value">@form-validation-note-font-size * 2</td> + <td>Validation note icon font size</td> + </tr> + <tr> + <th>@_note-icon-font-line-height</th> + <td class="vars_value">@form-validation-note-icon-font-line-height</td> + <td class="vars_value">@form-validation-note-font-size</td> + <td>Validation note icon line height</td> + </tr> + <tr> + <th>@_note-icon-font-color</th> + <td class="vars_value">@form-validation-note-icon-font-color</td> + <td class="vars_value">@form-validation-note-color-error</td> + <td>Validation note icon color</td> + </tr> + <tr> + <th>@_note-icon-font-color-hover</th> + <td class="vars_value">@form-validation-note-icon-font-color-hover</td> + <td class="vars_value">false</td> + <td>Hovered validation note icon color</td> + </tr> + <tr> + <th>@_note-icon-font-color-active</th> + <td class="vars_value">@form-validation-note-icon-font-color-active</td> + <td class="vars_value">false</td> + <td>Active validation note icon color</td> + </tr> + <tr> + <th>@_note-icon-font-margin</th> + <td class="vars_value">@form-validation-note-icon-font-margin</td> + <td class="vars_value">false</td> + <td>Validation note icon margin</td> + </tr> + <tr> + <th>@_note-icon-font-vertical-align</th> + <td class="vars_value">@form-validation-note-icon-font-vertical-align</td> + <td class="vars_value"> @icon-font-vertical-align</td> + <td>Validation note icon vertical align</td> + </tr> + <tr> + <th>@_note-icon-font-position</th> + <td class="vars_value">@form-validation-note-icon-font-position</td> + <td class="vars_value">@icon-font-position</td> + <td>Validation note icon position</td> + </tr> + <tr> + <th>@_note-icon-font-text-hide</th> + <td class="vars_value">@form-validation-note-icon-font-text-hide</td> + <td class="vars_value">@icon-font-text-hide</td> + <td>Validation note icon text hide</td> + </tr> + </table> + </pre> +</div></article></section><div class="bar bottom"><div hidden class="settings container"><!-- Icons from http://iconmonstr.com--><button title="Desktop (1280)" data-width='1280'><svg viewBox="0 0 412 386" height="24" width="26" class="icon"><path d="m147.6,343.9c-4.5,15.9-26.2,37.6-42.1,42.1h201c-15.3,-4-38.1,-26.8-42.1,-42.1H147.6zM387,0.5H25c-13.8,0-25,11.2-25,25V294c0,13.8 11.2,25 25,25h362c13.8,0 25,-11.2 25,-25V25.5C412,11.7 400.8,0.5 387,0.5zM369.9,238.2H42.1L42.1,42.6 369.9,42.6V238.2z"></path></svg></button><button title="Laptop (1024)" data-width='1024'><svg viewBox="0 0 384 312" height="23" width="28" class="icon"><path d="m349.2,20.5c0,-11-9,-20-20,-20H53.6c-11,0-20,9-20,20v194H349.2v-194zm-27,167H60.6V27.5H322.2v160zm28,42H32.6L2.6,282.1c-3.5,6.2-3.5,13.8 0.1,19.9 3.6,6.2 10.2,9.9 17.3,9.9H363.1c7.1,0 13.7,-3.8 17.3,-10 3.6,-6.2 3.6,-13.8 0,-20l-30.2,-52.5zm-196.9,54 8,-23.5h60.5l8,23.5h-76.5z"></path></svg></button><button title="Tablet (768)" data-width='768'><svg viewBox="0 0 317 412" height="24" width="18" class="icon"><path d="M 316.5,380 V 32 c 0,-17.7 -14.3,-32 -32,-32 H 32 C 14.3,0 0,14.3 0,32 v 348 c 0,17.7 14.3,32 32,32 h 252.5 c 17.7,0 32,-14.3 32,-32 z M 40,367 V 45 H 276.5 V 367 H 40 z m 109.8,22.7 c 0,-4.7 3.8,-8.5 8.5,-8.5 4.7,0 8.5,3.8 8.5,8.5 0,4.7 -3.8,8.5 -8.5,8.5 -4.7,0 -8.5,-3.8 -8.5,-8.5 z"></path></svg></button><button title="Smart phone (320)" data-width='320'><svg viewBox="0 0 224 412" height="24" width="13" class="icon"><path d="M 190.7,0 H 33 C 14.8,0 0,14.8 0,33 v 346 c 0,18.2 14.8,33 33,33 h 157.7 c 18.2,0 33,-14.8 33,-33 V 33 c 0,-18.2 -14.8,-33 -33,-33 z M 94.3,30.2 h 37 c 2.2,0 4,1.8 4,4 0,2.2 -1.8,4 -4,4 h -37 c -2.2,0 -4,-1.8 -4,-4 0,-2.2 1.8,-4 4,-4 z m 18.5,362.8 c -8.8,0 -16,-7.2 -16,-16 0,-8.8 7.2,-16 16,-16 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 z M 198.6,343.8 H 25.1 V 68.2 h 173.5 v 275.5 z"></path></svg></button><button title="Feature phone (240)" data-width='240'><svg viewBox="0 0 201 412" height="24" width="12" class="icon"><path d="M 165.5,0.2 V 45 H 25 c -13.8,0 -25,11.2 -25,25 V 387 c 0,13.8 11.2,25 25,25 h 150.5 c 13.8,0 25,-11.2 25,-25 V 0.2 h -35 z M 65.2,366.5 H 34.2 v -24.5 h 31 v 24.5 z m 0,-44.3 H 34.2 v -24.5 h 31 v 24.5 z m 50.5,44.3 H 84.7 v -24.5 h 31 v 24.5 z m 0,-44.3 H 84.7 v -24.5 h 31 v 24.5 z m 50.5,44.3 h -31 v -24.5 h 31 v 24.5 z m 0,-44.3 h -31 v -24.5 h 31 v 24.5 z m 0,-59.3 h -132 V 95.4 h 132 V 262.9 z"></path></svg></button><button title="Auto (100%)" data-width="auto" class="auto is-active">Auto</button></div></div><script>(function(){var a=[{title:"actions-toolbar",filename:"actions-toolbar",url:"actions-toolbar.html"},{title:"Actions toolbar",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar"},{title:"Actions toolbar mixin variables",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar-mixin-variables"},{title:"Actions toolbar alignment",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar-alignment"},{title:"Reverse primary and secondary blocks",filename:"actions-toolbar",url:"actions-toolbar.html#reverse-primary-and-secondary-blocks"},{title:"Actions toolbar indents customizations",filename:"actions-toolbar",url:"actions-toolbar.html#actions-toolbar-indents-customizations"},{title:"Responsive actions toolbar",filename:"actions-toolbar",url:"actions-toolbar.html#responsive-actions-toolbar"},{title:"breadcrumbs",filename:"breadcrumbs",url:"breadcrumbs.html"},{title:"Breadcrumbs",filename:"breadcrumbs",url:"breadcrumbs.html#breadcrumbs"},{title:"Breadcrumbs variables",filename:"breadcrumbs",url:"breadcrumbs.html#breadcrumbs-variables"},{title:"Button-styled breadcrumbs with gradient background, border, and no separating symbol",filename:"breadcrumbs",url:"breadcrumbs.html#buttonstyled-breadcrumbs-with-gradient-background-border-and-no-separating-symbol"},{title:"Breadcrumbs with solid background",filename:"breadcrumbs",url:"breadcrumbs.html#breadcrumbs-with-solid-background"},{title:"buttons",filename:"buttons",url:"buttons.html"},{title:"Default button",filename:"buttons",url:"buttons.html#default-button"},{title:"Button variables",filename:"buttons",url:"buttons.html#button-variables"},{title:"Button as an icon",filename:"buttons",url:"buttons.html#button-as-an-icon"},{title:"Button with an icon on the left or right side of the text",filename:"buttons",url:"buttons.html#button-with-an-icon-on-the-left-or-right-side-of-the-text"},{title:"Button with fixed width",filename:"buttons",url:"buttons.html#button-with-fixed-width"},{title:"Primary button",filename:"buttons",url:"buttons.html#primary-button"},{title:"Primary button variables",filename:"buttons",url:"buttons.html#primary-button-variables"},{title:"Button with gradient background",filename:"buttons",url:"buttons.html#button-with-gradient-background"},{title:"Button as a link",filename:"buttons",url:"buttons.html#button-as-a-link"},{title:"Link as a button",filename:"buttons",url:"buttons.html#link-as-a-button"},{title:"docs",filename:"docs",url:"docs.html"},{title:"Documentation",filename:"docs",url:"docs.html#documentation"},{title:"dropdowns",filename:"dropdowns",url:"dropdowns.html"},{title:"Drop-down and split buttons mixins",filename:"dropdowns",url:"dropdowns.html#dropdown-and-split-buttons-mixins"},{title:"Drop-down",filename:"dropdowns",url:"dropdowns.html#dropdown"},{title:"Drop-down variables",filename:"dropdowns",url:"dropdowns.html#dropdown-variables"},{title:"Drop-down with icon customization",filename:"dropdowns",url:"dropdowns.html#dropdown-with-icon-customization"},{title:"Modify dropdown list styles",filename:"dropdowns",url:"dropdowns.html#modify-dropdown-list-styles"},{title:"Split button",filename:"dropdowns",url:"dropdowns.html#split-button"},{title:"Split button variables",filename:"dropdowns",url:"dropdowns.html#split-button-variables"},{title:"Split button - button styling",filename:"dropdowns",url:"dropdowns.html#split-button-button-styling"},{title:"Split button icon customization",filename:"dropdowns",url:"dropdowns.html#split-button-icon-customization"},{title:"Split button drop-down list customization",filename:"dropdowns",url:"dropdowns.html#split-button-dropdown-list-customization"},{title:"forms",filename:"forms",url:"forms.html"},{title:"Forms mixins",filename:"forms",url:"forms.html#forms-mixins"},{title:"Global forms elements customization",filename:"forms",url:"forms.html#global-forms-elements-customization"},{title:"Fieldsets & fields customization",filename:"forms",url:"forms.html#fieldsets-fields-customization"},{title:"Fieldset and legend customization variables",filename:"forms",url:"forms.html#fieldset-and-legend-customization-variables"},{title:"Fields customization variables",filename:"forms",url:"forms.html#fields-customization-variables"},{title:"Required fields message customization variables",filename:"forms",url:"forms.html#required-fields-message-customization-variables"},{title:"Form element inputs customization",filename:"forms",url:"forms.html#form-element-inputs-customization"},{title:"Form element inputs customization variables",filename:"forms",url:"forms.html#form-element-inputs-customization-variables"},{title:"Form element choice",filename:"forms",url:"forms.html#form-element-choice"},{title:"Form element choice variables",filename:"forms",url:"forms.html#form-element-choice-variables"},{title:"Custom indents for element inputs",filename:"forms",url:"forms.html#custom-indents-for-element-inputs"},{title:"Custom color",filename:"forms",url:"forms.html#custom-color"},{title:"Custom indents for choice inputs",filename:"forms",url:"forms.html#custom-indents-for-choice-inputs"},{title:"Form elements custom size",filename:"forms",url:"forms.html#form-elements-custom-size"},{title:"Input number - input-text view",filename:"forms",url:"forms.html#input-number-inputtext-view"},{title:"Input search - input-text view",filename:"forms",url:"forms.html#input-search-inputtext-view"},{title:"Form validation",filename:"forms",url:"forms.html#form-validation"},{title:"Form validation variables",filename:"forms",url:"forms.html#form-validation-variables"},{title:"icons",filename:"icons",url:"icons.html"},{title:"Icons",filename:"icons",url:"icons.html#icons"},{title:"Icon with image or sprite",filename:"icons",url:"icons.html#icon-with-image-or-sprite"},{title:"Icon with image or sprite variables",filename:"icons",url:"icons.html#icon-with-image-or-sprite-variables"},{title:"Icon position for an icon with image or sprite",filename:"icons",url:"icons.html#icon-position-for-an-icon-with-image-or-sprite"},{title:"Position for icon with image or sprite mixin variables",filename:"icons",url:"icons.html#position-for-icon-with-image-or-sprite-mixin-variables"},{title:"Icon sprite position (with grid)",filename:"icons",url:"icons.html#icon-sprite-position-with-grid"},{title:"Icon sprite position variables",filename:"icons",url:"icons.html#icon-sprite-position-variables"},{title:"Image/sprite icon size",filename:"icons",url:"icons.html#imagesprite-icon-size"},{title:"Image/sprite icon size variables",filename:"icons",url:"icons.html#imagesprite-icon-size-variables"},{title:"Font icon",filename:"icons",url:"icons.html#font-icon"},{title:"Font icon variables",filename:"icons",url:"icons.html#font-icon-variables"},{title:"Change the size of font icon",filename:"icons",url:"icons.html#change-the-size-of-font-icon"},{title:"Change the size of font icon variables",filename:"icons",url:"icons.html#change-the-size-of-font-icon-variables"},{title:"Hide icon text",filename:"icons",url:"icons.html#hide-icon-text"},{title:"Sprite and font icons for Blank theme",filename:"icons",url:"icons.html#sprite-and-font-icons-for-blank-theme"},{title:"layout",filename:"layout",url:"layout.html"},{title:"Layout",filename:"layout",url:"layout.html#layout"},{title:"Layout global variables",filename:"layout",url:"layout.html#layout-global-variables"},{title:"Page layouts",filename:"layout",url:"layout.html#page-layouts"},{title:"Layout column",filename:"layout",url:"layout.html#layout-column"},{title:"Layout column variables",filename:"layout",url:"layout.html#layout-column-variables"},{title:"Layout width",filename:"layout",url:"layout.html#layout-width"},{title:"Layout width variables",filename:"layout",url:"layout.html#layout-width-variables"},{title:"lib",filename:"lib",url:"lib.html"},{title:"Including Magento UI library to your theme",filename:"lib",url:"lib.html#including-magento-ui-library-to-your-theme"},{title:"loaders",filename:"loaders",url:"loaders.html"},{title:"Loaders",filename:"loaders",url:"loaders.html#loaders"},{title:"Default loader variables",filename:"loaders",url:"loaders.html#default-loader-variables"},{title:"Loading",filename:"loaders",url:"loaders.html#loading"},{title:"Loading default variables",filename:"loaders",url:"loaders.html#loading-default-variables"},{title:"messages",filename:"messages",url:"messages.html"},{title:"Messages",filename:"messages",url:"messages.html#messages"},{title:"Information message",filename:"messages",url:"messages.html#information-message"},{title:"Warning message",filename:"messages",url:"messages.html#warning-message"},{title:"Error message",filename:"messages",url:"messages.html#error-message"},{title:"Success message",filename:"messages",url:"messages.html#success-message"},{title:"Notice message",filename:"messages",url:"messages.html#notice-message"},{title:"Message with inner icon",filename:"messages",url:"messages.html#message-with-inner-icon"},{title:"Message with lateral icon",filename:"messages",url:"messages.html#message-with-lateral-icon"},{title:"Custom message style",filename:"messages",url:"messages.html#custom-message-style"},{title:"Messages global variables",filename:"messages",url:"messages.html#messages-global-variables"},{title:"navigation",filename:"navigation",url:"navigation.html"},{title:"Mobile off canvas navigation",filename:"navigation",url:"navigation.html#mobile-off-canvas-navigation"},{title:"Mobile off canvas navigation variables",filename:"navigation",url:"navigation.html#mobile-off-canvas-navigation-variables"},{title:"Desktop navigation",filename:"navigation",url:"navigation.html#desktop-navigation"},{title:"Desktop navigation variables",filename:"navigation",url:"navigation.html#desktop-navigation-variables"},{title:"pages",filename:"pages",url:"pages.html"},{title:"Pagination HTML markup",filename:"pages",url:"pages.html#pagination-html-markup"},{title:"Pagination variables",filename:"pages",url:"pages.html#pagination-variables"},{title:"Pagination with label and gradient background on links",filename:"pages",url:"pages.html#pagination-with-label-and-gradient-background-on-links"},{title:'Pagination with "previous"..."next" text links and label',filename:"pages",url:"pages.html#pagination-with-previousnext-text-links-and-label"},{title:"Pagination without label, with solid background",filename:"pages",url:"pages.html#pagination-without-label-with-solid-background"},{title:"popups",filename:"popups",url:"popups.html"},{title:"Popups",filename:"popups",url:"popups.html#popups"},{title:"Popup variables",filename:"popups",url:"popups.html#popup-variables"},{title:"Window overlay mixin variables",filename:"popups",url:"popups.html#window-overlay-mixin-variables"},{title:"Fixed height popup",filename:"popups",url:"popups.html#fixed-height-popup"},{title:"Fixed content height popup",filename:"popups",url:"popups.html#fixed-content-height-popup"},{title:"Margins for header, content and footer block in popup",filename:"popups",url:"popups.html#margins-for-header-content-and-footer-block-in-popup"},{title:"Popup titles styled as theme headings",filename:"popups",url:"popups.html#popup-titles-styled-as-theme-headings"},{title:"Popup action toolbar",filename:"popups",url:"popups.html#popup-action-toolbar"},{title:"Popup Close button without an icon",filename:"popups",url:"popups.html#popup-close-button-without-an-icon"},{title:"Modify the icon of popup Close button",filename:"popups",url:"popups.html#modify-the-icon-of-popup-close-button"},{title:"Modify overlay styles",filename:"popups",url:"popups.html#modify-overlay-styles"},{title:"rating",filename:"rating",url:"rating.html"},{title:"Ratings",filename:"rating",url:"rating.html#ratings"},{title:"Global rating variables",filename:"rating",url:"rating.html#global-rating-variables"},{title:"Rating with vote",filename:"rating",url:"rating.html#rating-with-vote"},{title:"Rating with vote icons number customization",filename:"rating",url:"rating.html#rating-with-vote-icons-number-customization"},{title:"Rating with vote icons colors customization",filename:"rating",url:"rating.html#rating-with-vote-icons-colors-customization"},{title:"Rating with vote icons symbol customization",filename:"rating",url:"rating.html#rating-with-vote-icons-symbol-customization"},{title:"Accessible rating with vote",filename:"rating",url:"rating.html#accessible-rating-with-vote"},{title:"Rating summary",filename:"rating",url:"rating.html#rating-summary"},{title:"Rating summary icons number customization",filename:"rating",url:"rating.html#rating-summary-icons-number-customization"},{title:"Rating summary icons color customization",filename:"rating",url:"rating.html#rating-summary-icons-color-customization"},{title:"Rating summary icons symbol customization",filename:"rating",url:"rating.html#rating-summary-icons-symbol-customization"},{title:"Rating summary hide label",filename:"rating",url:"rating.html#rating-summary-hide-label"},{title:"Rating summary multiple ratings",filename:"rating",url:"rating.html#rating-summary-multiple-ratings"},{title:"Rating hide label mixin",filename:"rating",url:"rating.html#rating-hide-label-mixin"},{title:"resets",filename:"resets",url:"resets.html"},{title:"Resets",filename:"resets",url:"resets.html#resets"},{title:"sections",filename:"sections",url:"sections.html"},{title:"Tabs and accordions",filename:"sections",url:"sections.html#tabs-and-accordions"},{title:"Tabs",filename:"sections",url:"sections.html#tabs"},{title:"Tabs mixin variables",filename:"sections",url:"sections.html#tabs-mixin-variables"},{title:"Tabs with content top border",filename:"sections",url:"sections.html#tabs-with-content-top-border"},{title:"Accordion",filename:"sections",url:"sections.html#accordion"},{title:"Accordion mixin variables",filename:"sections",url:"sections.html#accordion-mixin-variables"},{title:"Responsive tabs",filename:"sections",url:"sections.html#responsive-tabs"},{title:"Tabs Base",filename:"sections",url:"sections.html#tabs-base"},{title:"Accordion Base",filename:"sections",url:"sections.html#accordion-base"},{title:"tables",filename:"tables",url:"tables.html"},{title:"Tables",filename:"tables",url:"tables.html#tables"},{title:"Table mixin variables",filename:"tables",url:"tables.html#table-mixin-variables"},{title:"Table typography",filename:"tables",url:"tables.html#table-typography"},{title:"Table typography mixin variables",filename:"tables",url:"tables.html#table-typography-mixin-variables"},{title:"Table caption",filename:"tables",url:"tables.html#table-caption"},{title:"Table caption mixin variables",filename:"tables",url:"tables.html#table-caption-mixin-variables"},{title:"Table cells resize",filename:"tables",url:"tables.html#table-cells-resize"},{title:"Table cells resize variables",filename:"tables",url:"tables.html#table-cells-resize-variables"},{title:"Table background customization",filename:"tables",url:"tables.html#table-background-customization"},{title:"Table background mixin variables",filename:"tables",url:"tables.html#table-background-mixin-variables"},{title:"Table borders customization",filename:"tables",url:"tables.html#table-borders-customization"},{title:"Table borders mixin variables",filename:"tables",url:"tables.html#table-borders-mixin-variables"},{title:"Table with horizontal borders",filename:"tables",url:"tables.html#table-with-horizontal-borders"},{title:"Table with vertical borders",filename:"tables",url:"tables.html#table-with-vertical-borders"},{title:"Table with light borders",filename:"tables",url:"tables.html#table-with-light-borders"},{title:"Table without borders",filename:"tables",url:"tables.html#table-without-borders"},{title:"Striped table",filename:"tables",url:"tables.html#striped-table"},{title:"Striped table mixin variables",filename:"tables",url:"tables.html#striped-table-mixin-variables"},{title:"Table with rows hover",filename:"tables",url:"tables.html#table-with-rows-hover"},{title:"Table with rows hover mixin variables",filename:"tables",url:"tables.html#table-with-rows-hover-mixin-variables"},{title:"Responsive table technics #1",filename:"tables",url:"tables.html#responsive-table-technics-1"},{title:"Responsive table technics #2",filename:"tables",url:"tables.html#responsive-table-technics-2"},{title:"Responsive table technics #2 mixin variables",filename:"tables",url:"tables.html#responsive-table-technics-2-mixin-variables"},{title:"tooltips",filename:"tooltips",url:"tooltips.html"},{title:"Tooltips",filename:"tooltips",url:"tooltips.html#tooltips"},{title:"Tooltips variables",filename:"tooltips",url:"tooltips.html#tooltips-variables"},{title:"typography",filename:"typography",url:"typography.html"},{title:"Typogrphy",filename:"typography",url:"typography.html#typogrphy"},{title:"Typography variables",filename:"typography",url:"typography.html#typography-variables"},{title:"Font-size mixin",filename:"typography",url:"typography.html#fontsize-mixin"},{title:"Word breaking mixin",filename:"typography",url:"typography.html#word-breaking-mixin"},{title:"Font face mixin",filename:"typography",url:"typography.html#font-face-mixin"},{title:"Text overflow mixin",filename:"typography",url:"typography.html#text-overflow-mixin"},{title:"Text hide",filename:"typography",url:"typography.html#text-hide"},{title:"Hyphens",filename:"typography",url:"typography.html#hyphens"},{title:"Font style and color",filename:"typography",url:"typography.html#font-style-and-color"},{title:"Font style mixin variables",filename:"typography",url:"typography.html#font-style-mixin-variables"},{title:"Reset list styles",filename:"typography",url:"typography.html#reset-list-styles"},{title:"Reset list styles variables",filename:"typography",url:"typography.html#reset-list-styles-variables"},{title:"Inline-block list item styling",filename:"typography",url:"typography.html#inlineblock-list-item-styling"},{title:"Link styling mixin",filename:"typography",url:"typography.html#link-styling-mixin"},{title:"Link styling mixin variables",filename:"typography",url:"typography.html#link-styling-mixin-variables"},{title:"Heading styling mixin",filename:"typography",url:"typography.html#heading-styling-mixin"},{title:"Base typography mixins",filename:"typography",url:"typography.html#base-typography-mixins"},{title:"Headings typography mixin",filename:"typography",url:"typography.html#headings-typography-mixin"},{title:"Typography links mixin",filename:"typography",url:"typography.html#typography-links-mixin"},{title:"Typography lists mixin",filename:"typography",url:"typography.html#typography-lists-mixin"},{title:"Typography code elements mixin",filename:"typography",url:"typography.html#typography-code-elements-mixin"},{title:"Typography blockquote",filename:"typography",url:"typography.html#typography-blockquote"},{title:"variables",filename:"variables",url:"variables.html"},{title:"List of Global Variables",filename:"variables",url:"variables.html#list-of-global-variables"},{title:"Table with rows hover mixin variables",filename:"variables",url:"variables.html#table-with-rows-hover-mixin-variables"}];(function(){"use strict";var b=function(a,b){return Array.prototype.indexOf.call(a,b)!==-1},c=function(a,b){return Array.prototype.filter.call(a,b)},d=function(a,b){return Array.prototype.forEach.call(a,b)},e=document.getElementsByTagName("body")[0];e.addEventListener("click",function(a){var b=a.target;b.tagName.toLowerCase()==="svg"&&(b=b.parentNode);var c=!1;b.dataset.toggle!=null&&(a.preventDefault(),b.classList.contains("is-active")||(c=!0)),d(e.querySelectorAll("[data-toggle]"),function(a){a.classList.remove("is-active"),document.getElementById(a.dataset.toggle).hidden=!0}),c&&(b.classList.add("is-active"),document.getElementById(b.dataset.toggle).hidden=!1)}),function(){var f=e.getElementsByClassName("nav")[0];if(!f)return;var g=document.createElement("ul");g.className="nav-results",g.id="nav-search",g.hidden=!0,d(a,function(a){var b,c,d;b=document.createElement("li"),b._title=a.title.toLowerCase(),b.hidden=!0,b.appendChild(c=document.createElement("a")),c.href=a.url,c.innerHTML=a.title,c.appendChild(d=document.createElement("span")),d.innerHTML=a.filename,d.className="nav-results-filename",g.appendChild(b)}),f.appendChild(g);var h=g.children,i=function(a){d(h,function(a){a.hidden=!0});var b=this.value.toLowerCase(),e=[];b!==""&&(e=c(h,function(a){return a._title.indexOf(b)!==-1})),e.length>0?(d(e,function(a){a.hidden=!1}),g.hidden=!1):g.hidden=!0},j=f.querySelector('input[type="search"]');j.addEventListener("keyup",i),j.addEventListener("focus",i),e.addEventListener("click",function(a){if(a.target.classList&&a.target.classList.contains("search"))return;g.hidden=!0}),g.addEventListener("click",function(a){j.value=""});var k=document.createElement("ul");k.id="nav-toc",k.hidden=!0,k.className="nav-results toc-list",c(e.getElementsByTagName("*"),function(a){return b(["h1","h2","h3"],a.tagName.toLowerCase())}).map(function(a){var b=document.createElement("li"),c=document.createElement("a"),d=a.tagName.toLowerCase()[1];c.classList.add("level-"+d),b.appendChild(c),c.href="#"+a.id,c.innerHTML=a.innerHTML,k.appendChild(b)}),f.appendChild(k)}()})(),function(){"use strict";if(location.hash==="#__preview__"||location.protocol==="data:")return;var a=function(a,b){return Array.prototype.forEach.call(a,b)},b=function(a,b){var e=Array.prototype.slice.call(arguments,2);return d(a,function(a){return(c(b)?b||a:a[b]).apply(a,e)})},c=function(a){return Object.prototype.toString.call(a)==="[object Function]"},d=function(a,b){return Array.prototype.map.call(a,b)},e=function(a,b){return d(a,function(a){return a[b]})},f=function(a){var b={},c=a.split(";");for(var d=0;c.length>d;d++){var e=c[d].trim().split("=");b[e[0]]=e[1]}return b},g=function(a,c){return b(e(a,"classList"),"remove",c)},h=function(a,b){a.contentDocument.defaultView.postMessage(b,"*")},i=document.getElementsByTagName("head")[0],j=document.getElementsByTagName("body")[0],k=e(i.querySelectorAll('style[type="text/preview"]'),"innerHTML").join(""),l=e(i.querySelectorAll('script[type="text/preview"]'),"innerHTML").join(""),m=location.href.split("#")[0]+"#__preview__",n=document.createElement("iframe");n.src="data:text/html,",j.appendChild(n),n.addEventListener("load",function(){var b={sameOriginDataUri:!0};try{this.contentDocument,this.contentDocument||(b.sameOriginDataUri=!1)}catch(c){b.sameOriginDataUri=!1}this.parentNode.removeChild(this),a(j.getElementsByTagName("textarea"),function(a,c){o(a,b,c),q(),p(a)})});var o=function(a,b,c){var d,e,f;d=document.createElement("div"),d.appendChild(e=document.createElement("div")),d.className="preview",e.appendChild(f=document.createElement("iframe")),e.className="resizeable",f.setAttribute("scrolling","no"),f.name="iframe"+c++,f.addEventListener("load",function(){var c,d,e,f,g,i,j;j=this.contentDocument;if(!b.sameOriginDataUri&&this.src!==m)return;this.src===m&&(c=j.createElement("html"),c.appendChild(j.createElement("head")),c.appendChild(d=j.createElement("body")),d.innerHTML=a.textContent,j.replaceChild(c,j.documentElement)),g=j.createElement("head"),g.appendChild(f=j.createElement("style")),g.appendChild(e=j.createElement("script")),e.textContent=l,f.textContent=k,i=j.getElementsByTagName("head")[0],i.parentNode.replaceChild(g,i),h(this,"getHeight")});var g;b.sameOriginDataUri?g="data:text/html;charset=utf-8,"+encodeURIComponent("<!doctype html><html><head></head></body>"+a.textContent):g=m,f.setAttribute("src",g);var i=function(){f.contentDocument.body.innerHTML=this.value,h(f,"getHeight")};a.addEventListener("keypress",i),a.addEventListener("keyup",i),a.parentNode.insertBefore(d,a)},p=function(a){var b=document.createElement("div");b.className="preview-code",b.style.position="absolute",b.style.left="-9999px",j.appendChild(b);var c=parseInt(window.getComputedStyle(a).getPropertyValue("max-height"),10),d=function(a){b.textContent=this.value+"\n";var d=b.offsetHeight+2;d>=c?this.style.overflow="auto":this.style.overflow="hidden",this.style.height=b.offsetHeight+2+"px"};a.addEventListener("keypress",d),a.addEventListener("keyup",d),d.call(a)},q=function(){var b=j.getElementsByClassName("settings")[0],c=j.getElementsByClassName("resizeable"),d=30,e=function(b){document.cookie="preview-width="+b,a(c,function(a){b==="auto"&&(b=a.parentNode.offsetWidth),a.style.width=b+"px",h(a.getElementsByTagName("iframe")[0],"getHeight")})},i=f(document.cookie)["preview-width"];if(i){e(i),g(b.getElementsByClassName("is-active"),"is-active");var k=b.querySelector('button[data-width="'+i+'"]');k&&k.classList.add("is-active")}window.addEventListener("message",function(a){if(a.data==null||!a.source)return;var b=a.data,c=document.getElementsByName(a.source.name)[0];b.height!=null&&c&&(c.parentNode.style.height=b.height+d+"px")},!1),b&&c.length>0&&(b.hidden=!1,b.addEventListener("click",function(a){var c=a.target.tagName.toLowerCase(),d;if(c==="button")d=a.target;else{if(c!=="svg")return;d=a.target.parentNode}a.preventDefault(),g(b.getElementsByClassName("is-active"),"is-active"),d.classList.add("is-active");var f=d.dataset.width;e(f)}))}}()})()</script></body></html><!-- Generated with StyleDocco (http://jacobrask.github.com/styledocco). --> diff --git a/lib/web/css/docs/source/forms.less b/lib/web/css/docs/source/forms.less index 5563bec8133501f42446bc86edac7022082f84d2..64f6da1dbf3c583aa84c3a6d12a88053f7a82840 100644 --- a/lib/web/css/docs/source/forms.less +++ b/lib/web/css/docs/source/forms.less @@ -814,12 +814,6 @@ textarea { // <td>Form control background clip</td> // </tr> // <tr> -// <th>@_outline</th> -// <td class="vars_value">@form-element-input-outline<br/>@input-text-outline<br/>@select-outline<br/>@textarea-outline</td> -// <td class="vars_value">true [true | false]</td> -// <td>Form control outline</td> -// </tr> -// <tr> // <th colspan="4" class="vars_section">Text settings</th> // </tr> // <tr> diff --git a/lib/web/css/docs/source/variables.less b/lib/web/css/docs/source/variables.less index 9bb7bf08304def493d7fac3518ec787a7016562a..a615f6a84f94bd9146b15900d5da6c26296db05e 100644 --- a/lib/web/css/docs/source/variables.less +++ b/lib/web/css/docs/source/variables.less @@ -2428,12 +2428,6 @@ // <td>Form control background clip</td> // </tr> // <tr> -// <th>@_outline</th> -// <td class="vars_value">@form-element-input-outline<br/>@input-text-outline<br/>@select-outline<br/>@textarea-outline</td> -// <td class="vars_value">true [true | false]</td> -// <td>Form control outline</td> -// </tr> -// <tr> // <th colspan="4" class="vars_section">Text settings</th> // </tr> // <tr> diff --git a/lib/web/css/docs/variables.html b/lib/web/css/docs/variables.html index d2d349bf61e454ee761a8d032cc7883fb8f78286..a380e14814e6d192aaa708435644f95f478a3508 100644 --- a/lib/web/css/docs/variables.html +++ b/lib/web/css/docs/variables.html @@ -2400,12 +2400,6 @@ <td class="vars_value">padding-box [padding-box | border-box | content-box]</td> <td>Form control background clip</td> </tr> - <tr> - <th>@_outline</th> - <td class="vars_value">@form-element-input-outline<br/>@input-text-outline<br/>@select-outline<br/>@textarea-outline</td> - <td class="vars_value">true [true | false]</td> - <td>Form control outline</td> - </tr> <tr> <th colspan="4" class="vars_section">Text settings</th> </tr> diff --git a/lib/web/css/source/lib/buttons.less b/lib/web/css/source/lib/buttons.less index c004f2c967fb2f4fccb4fee19bff8c6a4d5ade79..9f6964f6fe252f7d5bfe4f86fd35176bd9c0211d 100644 --- a/lib/web/css/source/lib/buttons.less +++ b/lib/web/css/source/lib/buttons.less @@ -112,7 +112,6 @@ @_button-gradient ); .css(border, @_button-border-active); - .tab-focus(); .css(color, @_button-color-active); } &:hover { @@ -213,7 +212,6 @@ &:focus { background: none; border: 0; - outline: none; } &.disabled, &[disabled], @@ -250,7 +248,6 @@ .css(font-weight, @font-weight-base); &:focus, &:active { - .tab-focus(); background: none; border: none; } diff --git a/lib/web/css/source/lib/forms.less b/lib/web/css/source/lib/forms.less index 15d522129a0b14aaced8816d3048432d0c77ca50..8ca0d8b473504a6388a37f814da38b94a05511fb 100644 --- a/lib/web/css/source/lib/forms.less +++ b/lib/web/css/source/lib/forms.less @@ -33,7 +33,6 @@ @_margin: ~"@{@{_type}-margin}", @_vertical-align: ~"@{@{_type}-vertical-align}", @_background-clip: ~"@{@{_type}-background-clip}", - @_outline: ~"@{@{_type}-outline}", @_font-size: ~"@{@{_type}-font-size}", @_color: ~"@{@{_type}-color}", @@ -64,7 +63,6 @@ .css(width, @_width); .css(padding, @_padding); .css(margin, @_margin); - ._form-element-outline(@_outline); .css(font-size, @_font-size); .css(font-family, @_font-family); @@ -388,10 +386,6 @@ ); } -._form-element-outline(@_form-element-outline) when (@_form-element-outline = false) { - outline: none; -} - ._form-element-add-opacity(@_opacity) when not (@_opacity = 1) { .css(opacity, @_opacity); } diff --git a/lib/web/css/source/lib/resets.less b/lib/web/css/source/lib/resets.less index c630893c3d56db38adc80fca0b17067027103841..978ade89771f218a079d57422e50c7bd17a2bd1a 100644 --- a/lib/web/css/source/lib/resets.less +++ b/lib/web/css/source/lib/resets.less @@ -96,6 +96,25 @@ address { font-style: normal; } + + * { + &:focus { + outline: 0; + box-shadow: none; + } + } + + .focusin *, + input:not([disabled]), + textarea:not([disabled]), + select:not([disabled]) { + &:focus { + box-shadow: @focus-box-shadow; + } + } + + + } // diff --git a/lib/web/css/source/lib/responsive.less b/lib/web/css/source/lib/responsive.less index a21ab6eb88a3bfa2ad5210ec5c90d7dd1a59a688..9d88fa5fc34db09a7d1de4750d56a4ccf191c86b 100644 --- a/lib/web/css/source/lib/responsive.less +++ b/lib/web/css/source/lib/responsive.less @@ -25,15 +25,15 @@ // Small screens only .responsive-smaller(@screen-s) {} -@media only screen and (max-width: @screen-xs) { +@media only screen and (max-width: (@screen-xs - 1)) { .responsive-smaller(@screen-xs); } -@media only screen and (max-width: @screen-s) { +@media only screen and (max-width: (@screen-s - 1)) { .responsive-smaller(@screen-s); } -@media only screen and (max-width: @screen-m) { +@media only screen and (max-width: (@screen-m - 1)) { .responsive-smaller(@screen-m); } @@ -51,3 +51,8 @@ print { print { .responsive(@screen-l); } + +@media all and (min-width: @screen-xl), +print { + .responsive(@screen-xl); +} diff --git a/lib/web/css/source/lib/typography.less b/lib/web/css/source/lib/typography.less index d6962e22dbcf6fc12de46201d7b416c4655dc47f..db7bb778e4972aa5ca029e157cbdcda11b0ec039 100644 --- a/lib/web/css/source/lib/typography.less +++ b/lib/web/css/source/lib/typography.less @@ -152,9 +152,6 @@ .add-color(@_link-color-active); text-decoration: @_link-text-decoration-active; } - &:focus { - .tab-focus(); - } } .heading(@_heading_level: h1) { diff --git a/lib/web/css/source/lib/ui-dialog.less b/lib/web/css/source/lib/ui-dialog.less index db50cf0fc665ba445ce0df843b6f8a1f3701f09f..8834fd0c7ca492ac53d4c77c875d3fbaa3d57a78 100644 --- a/lib/web/css/source/lib/ui-dialog.less +++ b/lib/web/css/source/lib/ui-dialog.less @@ -29,5 +29,4 @@ .ui-dialog-buttonpane { padding: 0; } - outline: none; } diff --git a/lib/web/css/source/lib/utilities.less b/lib/web/css/source/lib/utilities.less index 6a97e0e25d13a81edd632f536568ae6863c72951..e6677ca687face7ef1c47d4997b41380d46c0455 100644 --- a/lib/web/css/source/lib/utilities.less +++ b/lib/web/css/source/lib/utilities.less @@ -22,10 +22,6 @@ // * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) // */ -.debug() { - outline:2px dotted red; -} - .margin-top-rem( @value ) when not (@value = false) and not (@value = '') { @@ -183,17 +179,6 @@ #gradient > .vertical(@_background-gradient-start-color, @_background-gradient-end-color); } -// -// WebKit-style focus -//-------------------------------------- -.tab-focus() { - // Default - outline: thin dotted; - // WebKit - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - // // Box-sizing //-------------------------------------- diff --git a/lib/web/css/source/lib/variables.less b/lib/web/css/source/lib/variables.less index 0886947b4b387fbddb9bb2ce3fcc36699aa7824a..242defbc7ea96d0a7fb652dde05b6ce4f871d34c 100644 --- a/lib/web/css/source/lib/variables.less +++ b/lib/web/css/source/lib/variables.less @@ -44,6 +44,7 @@ @panel-bg: darken(@page-bg-color, 6%); @color-active: #ff5501; @color-error: #e02b27; +@color-focus: #68a8e0; @font-family-base: @font-family-sans-serif; // Also used in: @loader-text-font-family // setting font-size for HTML tag, use <b>%</b> units @@ -184,6 +185,9 @@ @heading-small-line-height: 1; @heading-small-size: (@font-size-xs/@font-size-base) * 100%; +// Focus +@focus-box-shadow: 0 0 3px 1px @color-focus; + // Code blocks @code-font-size: @font-size-s; @code-color: @color-primary-darker; @@ -845,7 +849,6 @@ @form-element-input-margin: false; @form-element-input-vertical-align: baseline; @form-element-input-background-clip: padding-box; // border-box, content-box -@form-element-input-outline: true; // false @form-element-input-font-size: @font-size-base; @form-element-input-color: false; @form-element-input-font-family: @font-family-base; @@ -886,7 +889,6 @@ @input-text-margin: @form-element-input-margin; @input-text-vertical-align: @form-element-input-vertical-align; @input-text-background-clip: @form-element-input-background-clip; // border-box, content-box -@input-text-outline: @form-element-input-outline; // false @input-text-font-size: @form-element-input-font-size; @input-text-color: @form-element-input-color; @input-text-font-family: @form-element-input-font-family; @@ -921,7 +923,6 @@ @select-margin: @form-element-input-margin; @select-vertical-align: @form-element-input-vertical-align; @select-background-clip: @form-element-input-background-clip; // border-box, content-box -@select-outline: @form-element-input-outline; // false @select-font-size: @form-element-input-font-size; @select-color: @form-element-input-color; @select-font-family: @form-element-input-font-family; @@ -956,7 +957,6 @@ @textarea-margin: 0; @textarea-vertical-align: @form-element-input-vertical-align; @textarea-background-clip: @form-element-input-background-clip; // border-box, content-box -@textarea-outline: @form-element-input-outline; // false @textarea-font-size: @form-element-input-font-size; @textarea-color: @form-element-input-color; @textarea-font-family: @form-element-input-font-family; @@ -1122,7 +1122,7 @@ @pager-font-size: @font-size-s; @pager-font-weight: @font-weight-base; @pager-line-height: 32px; -@pager-item-margin: 0 1px; +@pager-item-margin: 0 2px 0 0; @pager-item-padding: 0 4px; @pager-actions-padding: 0; diff --git a/lib/web/mage/gallery.less b/lib/web/mage/gallery.less index a64d7674812ae1acb940387fc6b4d6070ed1c092..fef6306df0fff51c8594102cb9578fa9d72e8001 100644 --- a/lib/web/mage/gallery.less +++ b/lib/web/mage/gallery.less @@ -78,7 +78,6 @@ z-index: 9999; overflow: hidden; background: @page-bg-color; - outline: @gallery-lens-border-width solid @gallery-lens-border-color; .zoom.inner > img { position: absolute; } @@ -212,7 +211,6 @@ a { border: @gallery-thumb-border-width solid transparent; display: block; - outline: none; &.active { border-color: @gallery-thumb-border-color-active; } diff --git a/lib/web/mage/smart-keyboard-handler.js b/lib/web/mage/smart-keyboard-handler.js new file mode 100644 index 0000000000000000000000000000000000000000..fa267cb38b49d56b1aa1c34d2b5286f48df85dda --- /dev/null +++ b/lib/web/mage/smart-keyboard-handler.js @@ -0,0 +1,58 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +define([ + 'jquery' +], function ($) { + + function KeyboardHandler() { + var focusState = false; + var tabFocusClass = 'focusin'; + return { + init: SmartKeyboardFocus + }; + + function SmartKeyboardFocus() { + $(document).on('keydown keypress', function (event) { + if (event.which === 9 && !focusState) { + $('body') + .on('focusin', onFocusInHandler) + .on('click', onClickHandler); + } + }); + } + + function onFocusInHandler() { + focusState = true; + $('body').addClass(tabFocusClass) + .off('focusin', onFocusInHandler); + } + + function onClickHandler(event) { + focusState = false; + $('body').removeClass(tabFocusClass) + .off('click', onClickHandler); + } + } + + return new KeyboardHandler(); +}); diff --git a/lib/web/varien/js.js b/lib/web/varien/js.js index 8511e8de3313891e76795364332904a7f1c575ce..533adcd1d8b3a36688380db1ef4d3c23c9dfc116 100644 --- a/lib/web/varien/js.js +++ b/lib/web/varien/js.js @@ -336,40 +336,6 @@ Varien.searchForm.prototype = { } } } -/* Varien.Tabs is depricated. - IK: 12/17/12 - Only one usage left in /app/code/Magento/Install/view/install/download.phtml - Questionable becuase that page does not have the markup using CSS class "tabs" - Need further investigation - */ -Varien.Tabs = Class.create(); -Varien.Tabs.prototype = { - initialize: function(selector) { - var self=this; - $$(selector+' a').each(this.initTab.bind(this)); - }, - - initTab: function(el) { - el.href = 'javascript:void(0)'; - if ($(el.parentNode).hasClassName('active')) { - this.showContent(el); - } - el.observe('click', this.showContent.bind(this, el)); - }, - - showContent: function(a) { - var li = $(a.parentNode), ul = $(li.parentNode); - ul.getElementsBySelector('li', 'ol').each(function(el){ - var contents = $(el.id+'_contents'); - if (el==li) { - el.addClassName('active'); - contents.show(); - } else { - el.removeClassName('active'); - contents.hide(); - } - }); - } -} Varien.DateElement = Class.create(); Varien.DateElement.prototype = { diff --git a/setup/config/application.config.php b/setup/config/application.config.php index e60400759ecccfbaa64a0a1780d82a063a96adbb..c4fb6dd9eb769a21e208ad6aa65f6e96acfd55cd 100644 --- a/setup/config/application.config.php +++ b/setup/config/application.config.php @@ -22,9 +22,10 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Magento\Setup\Mvc\Bootstrap\InitParamListener; + return [ 'modules' => [ - 'Magento\Config', 'Magento\Setup', ], 'module_listener_options' => [ @@ -36,4 +37,10 @@ return [ __DIR__ . '/autoload/{,*.}{global,local}.php', ), ], + 'listeners' => ['Magento\Setup\Mvc\Bootstrap\InitParamListener'], + 'service_manager' => [ + 'factories' => [ + InitParamListener::BOOTSTRAP_PARAM => 'Magento\Setup\Mvc\Bootstrap\InitParamListener', + ] + ], ]; diff --git a/setup/config/autoload/global.php b/setup/config/autoload/global.php index 54e90d7edb2ef6faee1882658543bbc31f4b6c23..02e1601b75282e51fec8157814edac0072507887 100644 --- a/setup/config/autoload/global.php +++ b/setup/config/autoload/global.php @@ -22,18 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Magento\Framework\App\Bootstrap; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Setup\Mvc\Bootstrap\InitParamListener; + return [ - 'parameters' => [ - 'application' => [ - 'base_path' => realpath(__DIR__ . '/../../'), - ], - 'magento' => [ - 'base_path' => realpath(__DIR__ . '/../../../'), - 'filesystem' => [ - 'module' => '/app/code/', - 'config' => '/app/etc/', - 'framework' => '/lib/internal/Magento/Framework/', - ], - ], - ], + InitParamListener::BOOTSTRAP_PARAM => [ + Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => [DirectoryList::ROOT => [DirectoryList::PATH => BP]] + ] ]; diff --git a/setup/index.php b/setup/index.php index de0298447cbea59a63b226703b82e7af24e25070..2e1e4e94884e1130285822c6fb18b4ac254108cc 100644 --- a/setup/index.php +++ b/setup/index.php @@ -24,6 +24,8 @@ $autoload = __DIR__ . '/vendor/autoload.php'; +define('BP', dirname(__DIR__)); + if (!file_exists($autoload)) { if (PHP_SAPI == 'cli') { echo "Dependencies not installed. Please run 'composer install' under /setup directory.\n"; @@ -43,19 +45,4 @@ HTML; require $autoload; -use Zend\Mvc\Service\ServiceManagerConfig; -use Zend\ServiceManager\ServiceManager; - -$configuration = include "config/application.config.php"; - -$smConfig = new ServiceManagerConfig(); -$serviceManager = new ServiceManager($smConfig); -$serviceManager->setService('ApplicationConfig', $configuration); - -$serviceManager->setAllowOverride(true); -$serviceManager->get('ModuleManager')->loadModules(); -$serviceManager->setAllowOverride(false); - -$serviceManager->get('Application') - ->bootstrap() - ->run(); \ No newline at end of file +\Zend\Mvc\Application::init(require __DIR__ . '/config/application.config.php')->run(); diff --git a/setup/module/Magento/Composer/src/FileResolver.php b/setup/module/Magento/Composer/src/FileResolver.php index 98dee5b025c94d4932c9d69fc8650c8074ac9fd3..983d4a0af7e7c1a390a6b81d8a71f19f8e9d8e8d 100644 --- a/setup/module/Magento/Composer/src/FileResolver.php +++ b/setup/module/Magento/Composer/src/FileResolver.php @@ -26,79 +26,37 @@ namespace Magento\Composer; use Zend\Stdlib\Glob; use Magento\Config\FileResolverInterface; -use Magento\Config\FileIteratorFactory; -use Magento\Config\ConfigFactory; +use Magento\Config\FileIterator; +use Magento\Framework\App\Filesystem\DirectoryList; class FileResolver implements FileResolverInterface { /** - * @var \Magento\Config\FileIteratorFactory - */ - protected $iteratorFactory; - - /** - * @var \Magento\Config\ConfigFactory - */ - protected $configFactory; - - /** - * @var \Magento\Config\Config + * Magento application's DirectoryList + * + * @var DirectoryList */ - protected $config; + private $directoryList; /** - * @param \Magento\Config\FileIteratorFactory $iteratorFactory - * @param \Magento\Config\ConfigFactory $configFactory - * @internal param \Magento\Config\Config $config + * Constructor + * + * @param DirectoryList $directoryList */ - public function __construct( - FileIteratorFactory $iteratorFactory, - ConfigFactory $configFactory - ) { - $this->iteratorFactory = $iteratorFactory; - $this->configFactory = $configFactory; - $this->config = $this->configFactory->create(); + public function __construct(DirectoryList $directoryList) + { + $this->directoryList = $directoryList; } /** * Collect files and wrap them into an Iterator object * * @param string $filename - * @return array + * @return FileIterator */ public function get($filename) { - $paths = []; - $files = $this->getFiles($this->config->getMagentoModulePath() . '*/*/' . $filename); - foreach ($files as $file) { - $paths[] = $this->getRelativePath($file); - } - return $this->iteratorFactory->create($this->config->getMagentoBasePath(), $paths); - } - - /** - * Retrieves relative path - * - * @param string $path - * @return string - */ - protected function getRelativePath($path = null) - { - $basePath = $this->config->getMagentoBasePath(); - if (strpos($path, $basePath) === 0 - || $basePath == $path . '/') { - return substr($path, strlen($basePath)); - } else { - return $path; - } - } - - /** - * @param string $path - * @return array|false - */ - protected function getFiles($path) - { - return Glob::glob($this->config->getMagentoBasePath() . $path); + $pattern = $this->directoryList->getPath(DirectoryList::MODULES) . '/*/*/' . $filename; + return new FileIterator(Glob::glob($pattern)); } } diff --git a/setup/module/Magento/Config/Module.php b/setup/module/Magento/Config/Module.php deleted file mode 100644 index e5a51ba1084953da8da99de62eb56e5534825b14..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Config/Module.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Config; - -use Zend\ModuleManager\Feature\ConfigProviderInterface; - -class Module implements ConfigProviderInterface -{ - /** - * @return array - */ - public function getConfig() - { - return include __DIR__ . '/config/module.config.php'; - } - -} diff --git a/setup/module/Magento/Config/src/Config.php b/setup/module/Magento/Config/src/Config.php deleted file mode 100644 index 326071a1216063ad8a709ebafd20a6ccc93ebbd6..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Config/src/Config.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Config; - -use Zend\Config\Config as ZendConfig; -use Zend\Filter\Inflector; - -class Config extends ZendConfig -{ - /** - * @var Inflector - */ - private $inflector; - - /** - * @param Inflector $inflector - * @param array $array - */ - public function __construct(Inflector $inflector, array $array) - { - $this->inflector = $inflector; - $this->inflector->setTarget(':name') - ->setRules([':name' => ['Word\CamelCaseToUnderscore', 'StringToLower']]); - - foreach ($array as $key => $value) { - if (is_array($value)) { - $this->data[$key] = new static($this->inflector, $value); - } else { - $this->data[$key] = $value; - } - $this->count++; - } - } - - /** - * Retrieve a value and return $default if there is no element set. - * - * @param string $name - * @param mixed $default - * @return mixed - */ - public function get($name, $default = null) - { - $name = $this->inflector->filter(['name' => $name]); - - if (array_key_exists($name, $this->data)) { - return $this->data[$name]; - } - - return $default; - } - - /** - * Retrieve Magento base path - * - * @return string - */ - public function getMagentoBasePath() - { - return $this->magento->basePath; - } - - /** - * Retrieve path to Magento modules - * - * @return string - */ - public function getMagentoModulePath() - { - return $this->magento->filesystem->module; - } - - /** - * Retrieve path to Magento config directory - * - * @return mixed - */ - public function getMagentoConfigPath() - { - return $this->magento->filesystem->config; - } -} diff --git a/setup/module/Magento/Config/src/ConfigFactory.php b/setup/module/Magento/Config/src/ConfigFactory.php deleted file mode 100644 index d42a00b09015631221ef79dea7cd13564763f45d..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Config/src/ConfigFactory.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Config; - -use Zend\Filter\Inflector; -use Zend\ServiceManager\ServiceLocatorInterface; - -class ConfigFactory -{ - /** - * @var ServiceLocatorInterface - */ - protected $serviceLocator; - - /** - * @var array - */ - protected $configuration = []; - - /** - * @param ServiceLocatorInterface $serviceLocator - */ - public function __construct(ServiceLocatorInterface $serviceLocator) - { - $this->serviceLocator = $serviceLocator; - $this->configuration = $this->serviceLocator->get('config')['parameters']; - } - - /** - * @return Config - */ - public function create() - { - return new Config(new Inflector(), $this->configuration); - } -} diff --git a/setup/module/Magento/Config/src/FileIterator.php b/setup/module/Magento/Config/src/FileIterator.php index 6a4441bfd5881a115eeeecf9061901082fe1b29e..95c8a5daa57960277701ada870828f5c43f7189c 100644 --- a/setup/module/Magento/Config/src/FileIterator.php +++ b/setup/module/Magento/Config/src/FileIterator.php @@ -29,23 +29,16 @@ namespace Magento\Config; */ class FileIterator implements \Iterator, \Countable { - /** - * @var string - */ - private $basePath; - /** * @var array */ protected $paths = array(); /** - * @param string $basePath * @param array $paths */ - public function __construct($basePath, array $paths) + public function __construct(array $paths) { - $this->basePath = $basePath; $this->paths = $paths; } @@ -66,7 +59,7 @@ class FileIterator implements \Iterator, \Countable */ public function current() { - return file_get_contents($this->basePath . $this->key()); + return file_get_contents($this->key()); } /** diff --git a/setup/module/Magento/Config/src/FileIteratorFactory.php b/setup/module/Magento/Config/src/FileIteratorFactory.php deleted file mode 100644 index f41f08030c1c5f88ce5a7f4c1908b927b1bf1a61..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Config/src/FileIteratorFactory.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Config; - -class FileIteratorFactory -{ - /** - * Create file iterator - * - * @param string $basePath - * @param array $paths - * @return FileIterator - */ - public function create($basePath, $paths) - { - return new FileIterator($basePath, $paths); - } -} diff --git a/setup/module/Magento/Setup/Module.php b/setup/module/Magento/Setup/Module.php index c5c08cc8a13f9936562ad185f88439598950ab9a..9b68b6bcef00b8b3a3943cbc8bb2e4cd14cf820c 100644 --- a/setup/module/Magento/Setup/Module.php +++ b/setup/module/Magento/Setup/Module.php @@ -34,6 +34,7 @@ use Zend\Mvc\MvcEvent; use Zend\EventManager\EventInterface; use Magento\Setup\Mvc\View\Http\InjectTemplateListener; use Magento\Setup\Controller\ConsoleController; +use Magento\Setup\Mvc\Bootstrap\InitParamListener; class Module implements BootstrapListenerInterface, @@ -60,16 +61,6 @@ class Module implements // Override Zend\Mvc\View\Http\InjectTemplateListener // to process templates by Vendor/Module $injectTemplateListener = new InjectTemplateListener(); - $translator = $application->getServiceManager()->get('translator'); - $sharedEvents->attach( - 'Zend\Stdlib\DispatchableInterface', - MvcEvent::EVENT_DISPATCH, - [ - new \Magento\Setup\Model\Location($translator), - 'onChangeLocation' - ], - 10 - ); $sharedEvents->attach( 'Zend\Stdlib\DispatchableInterface', MvcEvent::EVENT_DISPATCH, @@ -84,13 +75,15 @@ class Module implements */ public function getConfig() { - return array_merge( + $result = array_merge( include __DIR__ . '/config/module.config.php', include __DIR__ . '/config/router.config.php', include __DIR__ . '/config/di.config.php', include __DIR__ . '/config/states.config.php', include __DIR__ . '/config/languages.config.php' ); + $result = InitParamListener::attachToConsoleRoutes($result); + return $result; } /** @@ -108,6 +101,6 @@ class Module implements */ public function getConsoleUsage(AdapterInterface $console) { - return ConsoleController::getConsoleUsage(); + return array_merge(ConsoleController::getConsoleUsage(), InitParamListener::getConsoleUsage()); } } diff --git a/setup/module/Magento/Setup/src/Controller/ConsoleController.php b/setup/module/Magento/Setup/src/Controller/ConsoleController.php index 696d3b4e566d869986e1840a5a0d095da28e7927..47b23770ac9bf22769354a061321666e9e9e2123 100644 --- a/setup/module/Magento/Setup/src/Controller/ConsoleController.php +++ b/setup/module/Magento/Setup/src/Controller/ConsoleController.php @@ -29,13 +29,12 @@ use Magento\Setup\Module\Setup\Config; use Magento\Setup\Model\InstallerFactory; use Magento\Setup\Model\Installer; use Magento\Setup\Model\ConsoleLogger; -use Magento\Webapi\Exception; use Zend\Console\Request as ConsoleRequest; use Zend\EventManager\EventManagerInterface; -use Zend\Stdlib\RequestInterface as Request; use Zend\Mvc\Controller\AbstractActionController; use Magento\Setup\Model\UserConfigurationData as UserConfig; use Magento\Setup\Model\AdminAccount; +use Magento\Framework\App\MaintenanceMode; /** * Controller that handles all setup commands via command line interface. @@ -55,6 +54,8 @@ class ConsoleController extends AbstractActionController const CMD_INSTALL_USER_CONFIG = 'install-user-configuration'; const CMD_INSTALL_ADMIN_USER = 'install-admin-user'; const CMD_UPDATE = 'update'; + const CMD_UNINSTALL = 'uninstall'; + const CMD_MAINTENANCE = 'maintenance'; /**#@- */ /**#@+ @@ -79,6 +80,8 @@ class ConsoleController extends AbstractActionController self::CMD_INSTALL_USER_CONFIG => 'installUserConfig', self::CMD_INSTALL_ADMIN_USER => 'installAdminUser', self::CMD_UPDATE => 'update', + self::CMD_UNINSTALL => 'uninstall', + self::CMD_MAINTENANCE => 'maintenance', ]; /** @@ -94,6 +97,8 @@ class ConsoleController extends AbstractActionController self::CMD_INSTALL_USER_CONFIG, self::CMD_INSTALL_ADMIN_USER, self::CMD_UPDATE, + self::CMD_UNINSTALL, + self::CMD_MAINTENANCE, self::INFO_LOCALES, self::INFO_CURRENCIES, self::INFO_TIMEZONES, @@ -172,10 +177,10 @@ class ConsoleController extends AbstractActionController . ' [--' . Config::KEY_DB_INIT_STATEMENTS . '=]' . ' [--' . Config::KEY_SESSION_SAVE . '=]' . ' [--' . Config::KEY_ENCRYPTION_KEY . '=]'; - $userConfig = '--' . UserConfig::KEY_BASE_URL . '=' - . ' --' . UserConfig::KEY_LANGUAGE . '=' - . ' --' . UserConfig::KEY_TIMEZONE . '=' - . ' --' . UserConfig::KEY_CURRENCY . '=' + $userConfig = '[--' . UserConfig::KEY_BASE_URL . '=]' + . ' [--' . UserConfig::KEY_LANGUAGE . '=]' + . ' [--' . UserConfig::KEY_TIMEZONE . '=]' + . ' [--' . UserConfig::KEY_CURRENCY . '=]' . ' [--' . UserConfig::KEY_USE_SEF_URL . '=]' . ' [--' . UserConfig::KEY_IS_SECURE . '=]' . ' [--' . UserConfig::KEY_BASE_URL_SECURE . '=]' @@ -203,6 +208,12 @@ class ConsoleController extends AbstractActionController 'usage_short' => self::CMD_UPDATE, 'usage_desc' => 'Update database schema and data', ], + self::CMD_UNINSTALL => [ + 'route' => self::CMD_UNINSTALL, + 'usage' => '', + 'usage_short' => self::CMD_UNINSTALL, + 'usage_desc' => 'Uninstall Magento application', + ], self::CMD_INSTALL_CONFIG => [ 'route' => self::CMD_INSTALL_CONFIG . ' ' . $deployConfig, 'usage' => $deployConfig, @@ -233,6 +244,12 @@ class ConsoleController extends AbstractActionController 'usage_short' => self::CMD_INSTALL_ADMIN_USER . ' <options>', 'usage_desc' => 'Install admin user account', ], + self::CMD_MAINTENANCE => [ + 'route' => self::CMD_MAINTENANCE . ' [--set=] [--addresses=]', + 'usage' => '[--set=1|0] [--addresses=127.0.0.1,...|none]', + 'usage_short' => self::CMD_MAINTENANCE, + 'usage_desc' => 'Set maintenance mode, optionally for specified addresses', + ], self::CMD_HELP => [ 'route' => self::CMD_HELP . ' (' . implode('|', self::$helpOptions) . '):type', 'usage' => '<' . implode('|', self::$helpOptions) . '>', @@ -248,15 +265,18 @@ class ConsoleController extends AbstractActionController * @param ConsoleLogger $consoleLogger * @param Lists $options * @param InstallerFactory $installerFactory + * @param MaintenanceMode $maintenanceMode */ public function __construct( ConsoleLogger $consoleLogger, Lists $options, - InstallerFactory $installerFactory + InstallerFactory $installerFactory, + MaintenanceMode $maintenanceMode ) { $this->log = $consoleLogger; $this->options = $options; $this->installer = $installerFactory->create($consoleLogger); + $this->maintenanceMode = $maintenanceMode; } /** @@ -287,13 +307,9 @@ class ConsoleController extends AbstractActionController */ public function installAction() { - try { - /** @var \Zend\Console\Request $request */ - $request = $this->getRequest(); - $this->installer->install($request->getParams()); - } catch (Exception $e) { - $this->log->logError($e); - } + /** @var \Zend\Console\Request $request */ + $request = $this->getRequest(); + $this->installer->install($request->getParams()); } /** @@ -370,6 +386,48 @@ class ConsoleController extends AbstractActionController $this->installer->installAdminUser($request->getParams()); } + /** + * Controller for Uninstall Command + * + * @return void + * @throws \Exception + */ + public function uninstallAction() + { + $this->installer->uninstall(); + } + + /** + * Action for "maintenance" command + * + * @return void + */ + public function maintenanceAction() + { + /** @var \Zend\Console\Request $request */ + $request = $this->getRequest(); + $set = $request->getParam('set'); + $addresses = $request->getParam('addresses'); + + if (null !== $set) { + if (1 == $set) { + $this->log->log('Enabling maintenance mode...'); + $this->maintenanceMode->set(true); + } else { + $this->log->log('Disabling maintenance mode...'); + $this->maintenanceMode->set(false); + } + } + if (null !== $addresses) { + $addresses = ('none' == $addresses) ? '' : $addresses; + $this->maintenanceMode->setAddresses($addresses); + } + + $this->log->log('Status: maintenance mode is ' . ($this->maintenanceMode->isOn() ? 'active' : 'not active')); + $addresses = implode(', ', $this->maintenanceMode->getAddressInfo()); + $this->log->log('List of exempt IP-addresses: ' . ($addresses ? $addresses : 'none')); + } + /** * Shows necessary information for installing Magento * @@ -407,7 +465,7 @@ class ConsoleController extends AbstractActionController */ private function formatCliUsage($text) { - $result = []; + $result = ['required' => [], 'optional' => []]; foreach (explode(' ', $text) as $value) { if (empty($value)) { continue; diff --git a/setup/module/Magento/Setup/src/Controller/LandingController.php b/setup/module/Magento/Setup/src/Controller/LandingController.php index 4a8670cd2ce2953a4aa2d5d6a077de3f499715ee..cba7469b5673ecbb699345ae7f8b4a626ba16fc7 100644 --- a/setup/module/Magento/Setup/src/Controller/LandingController.php +++ b/setup/module/Magento/Setup/src/Controller/LandingController.php @@ -27,9 +27,8 @@ namespace Magento\Setup\Controller; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; use Zend\ServiceManager\ServiceLocatorInterface; -use Magento\Setup\Model\Location; use Composer\Json\JsonFile; -use Magento\Config\ConfigFactory as SystemConfigFactory; +use Magento\Framework\App\Filesystem\DirectoryList; class LandingController extends AbstractActionController { @@ -43,32 +42,23 @@ class LandingController extends AbstractActionController */ protected $view; - /** - * @var Location - */ - protected $location; - /** * @var array */ protected $composerJson; /** - * @param Location $location * @param ServiceLocatorInterface $serviceLocator * @param ViewModel $view - * @param SystemConfigFactory $systemConfigFactory + * @param DirectoryList $directoryList */ public function __construct( - Location $location, ServiceLocatorInterface $serviceLocator, ViewModel $view, - SystemConfigFactory $systemConfigFactory + DirectoryList $directoryList ) { - $this->location = $location; $this->view = $view; - $config = $systemConfigFactory->create(); - $jsonFile = new JsonFile($config->getMagentoBasePath() . '/composer.json'); + $jsonFile = new JsonFile($directoryList->getRoot() . '/composer.json'); $this->composerJson = $jsonFile->read(); } @@ -79,7 +69,7 @@ class LandingController extends AbstractActionController { $this->view->setTerminal(true); $this->view->setVariable('languages', $this->serviceLocator->get('config')['languages']); - $this->view->setVariable('location', $this->location->getLocationCode()); + $this->view->setVariable('location', 'en_US'); $this->view->setVariable('version', $this->composerJson['version']); return $this->view; } diff --git a/setup/module/Magento/Setup/src/Framework/DB/Adapter/AdapterInterface.php b/setup/module/Magento/Setup/src/Framework/DB/Adapter/AdapterInterface.php deleted file mode 100644 index a5ca82e852ac546c265a2569b2f86f4b184e265d..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Setup/src/Framework/DB/Adapter/AdapterInterface.php +++ /dev/null @@ -1,642 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Setup\Framework\DB\Adapter; - -use Magento\Setup\Framework\DB\Ddl\Table; - -/** - * Magento Database Adapter Interface - * - * @author Magento Core Team <core@magentocommerce.com> - */ -interface AdapterInterface extends \Zend\Db\Adapter\AdapterInterface -{ - const INDEX_TYPE_PRIMARY = 'primary'; - - const INDEX_TYPE_UNIQUE = 'unique'; - - const INDEX_TYPE_INDEX = 'index'; - - const INDEX_TYPE_FULLTEXT = 'fulltext'; - - const FK_ACTION_CASCADE = 'CASCADE'; - - const FK_ACTION_SET_NULL = 'SET NULL'; - - const FK_ACTION_NO_ACTION = 'NO ACTION'; - - const FK_ACTION_RESTRICT = 'RESTRICT'; - - const FK_ACTION_SET_DEFAULT = 'SET DEFAULT'; - - const INSERT_ON_DUPLICATE = 1; - - const INSERT_IGNORE = 2; - - const ISO_DATE_FORMAT = 'yyyy-MM-dd'; - - const ISO_DATETIME_FORMAT = 'yyyy-MM-dd HH-mm-ss'; - - const INTERVAL_SECOND = 'SECOND'; - - const INTERVAL_MINUTE = 'MINUTES'; - - const INTERVAL_HOUR = 'HOURS'; - - const INTERVAL_DAY = 'DAYS'; - - const INTERVAL_MONTH = 'MONTHS'; - - const INTERVAL_YEAR = 'YEARS'; - - /** - * Error message for DDL query in transactions - */ - const ERROR_DDL_MESSAGE = 'DDL statements are not allowed in transactions'; - - /** - * Error message for unfinished rollBack transaction - */ - const ERROR_ROLLBACK_INCOMPLETE_MESSAGE = 'Rolled back transaction has not been completed correctly.'; - - /** - * Error message for asymmetric transaction rollback - */ - const ERROR_ASYMMETRIC_ROLLBACK_MESSAGE = 'Asymmetric transaction rollback.'; - - /** - * Error message for asymmetric transaction commit - */ - const ERROR_ASYMMETRIC_COMMIT_MESSAGE = 'Asymmetric transaction commit.'; - - /** - * Begin new DB transaction for connection - * - * @return \Magento\Setup\Framework\DB\Adapter\Pdo\Mysql - */ - public function beginTransaction(); - - /** - * Commit DB transaction - * - * @return \Magento\Setup\Framework\DB\Adapter\Pdo\Mysql - */ - public function commit(); - - /** - * Roll-back DB transaction - * - * @return \Magento\Setup\Framework\DB\Adapter\Pdo\Mysql - */ - public function rollBack(); - - /** - * Retrieve DDL object for new table - * - * @param string $tableName the table name - * @param string $schemaName the database or schema name - * @return Table - */ - public function newTable($tableName = null, $schemaName = null); - - /** - * Create table from DDL object - * - * @param Table $table - * @throws \Zend_Db_Exception - * @return \Zend_Db_Statement_Interface - */ - public function createTable(Table $table); - - /** - * Drop table from database - * - * @param string $tableName - * @param string $schemaName - * @return boolean - */ - public function dropTable($tableName, $schemaName = null); - - /** - * Rename several tables - * - * @param array $tablePairs array('oldName' => 'Name1', 'newName' => 'Name2') - * - * @return boolean - * @throws \Zend_Db_Exception - */ - public function renameTablesBatch(array $tablePairs); - - /** - * Truncate a table - * - * @param string $tableName - * @param string $schemaName - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - */ - public function truncateTable($tableName, $schemaName = null); - - /** - * Checks if table exists - * - * @param string $tableName - * @param string $schemaName - * @return boolean - */ - public function isTableExists($tableName, $schemaName = null); - - /** - * Returns short table status array - * - * @param string $tableName - * @param string $schemaName - * @return array|false - */ - public function showTableStatus($tableName, $schemaName = null); - - /** - * Returns the column descriptions for a table. - * - * The return value is an associative array keyed by the column name, - * as returned by the RDBMS. - * - * The value of each array element is an associative array - * with the following keys: - * - * SCHEMA_NAME => string; name of database or schema - * TABLE_NAME => string; - * COLUMN_NAME => string; column name - * COLUMN_POSITION => number; ordinal position of column in table - * DATA_TYPE => string; SQL datatype name of column - * DEFAULT => string; default expression of column, null if none - * NULLABLE => boolean; true if column can have nulls - * LENGTH => number; length of CHAR/VARCHAR - * SCALE => number; scale of NUMERIC/DECIMAL - * PRECISION => number; precision of NUMERIC/DECIMAL - * UNSIGNED => boolean; unsigned property of an integer type - * PRIMARY => boolean; true if column is part of the primary key - * PRIMARY_POSITION => integer; position of column in primary key - * IDENTITY => integer; true if column is auto-generated with unique values - * - * @param string $tableName - * @param string $schemaName OPTIONAL - * @return array - */ - public function describeTable($tableName, $schemaName = null); - - /** - * Create \Magento\Setup\Framework\DB\Ddl\Table object by data from describe table - * - * @param string $tableName - * @param string $newTableName - * @return Table - */ - public function createTableByDdl($tableName, $newTableName); - - /** - * Modify the column definition by data from describe table - * - * @param string $tableName - * @param string $columnName - * @param array|string $definition - * @param boolean $flushData - * @param string $schemaName - * @return \Magento\Setup\Framework\DB\Adapter\Pdo\Mysql - */ - public function modifyColumnByDdl($tableName, $columnName, $definition, $flushData = false, $schemaName = null); - - /** - * Rename table - * - * @param string $oldTableName - * @param string $newTableName - * @param string $schemaName - * @return boolean - */ - public function renameTable($oldTableName, $newTableName, $schemaName = null); - - /** - * Adds new column to the table. - * - * Generally $defintion must be array with column data to keep this call cross-DB compatible. - * Using string as $definition is allowed only for concrete DB adapter. - * - * @param string $tableName - * @param string $columnName - * @param array|string $definition string specific or universal array DB Server definition - * @param string $schemaName - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - */ - public function addColumn($tableName, $columnName, $definition, $schemaName = null); - - /** - * Change the column name and definition - * - * For change definition of column - use modifyColumn - * - * @param string $tableName - * @param string $oldColumnName - * @param string $newColumnName - * @param array|string $definition - * @param boolean $flushData flush table statistic - * @param string $schemaName - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - */ - public function changeColumn( - $tableName, - $oldColumnName, - $newColumnName, - $definition, - $flushData = false, - $schemaName = null - ); - - /** - * Modify the column definition - * - * @param string $tableName - * @param string $columnName - * @param array|string $definition - * @param boolean $flushData - * @param string $schemaName - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - */ - public function modifyColumn($tableName, $columnName, $definition, $flushData = false, $schemaName = null); - - /** - * Drop the column from table - * - * @param string $tableName - * @param string $columnName - * @param string $schemaName - * @return boolean - */ - public function dropColumn($tableName, $columnName, $schemaName = null); - - /** - * Check is table column exists - * - * @param string $tableName - * @param string $columnName - * @param string $schemaName - * @return boolean - */ - public function tableColumnExists($tableName, $columnName, $schemaName = null); - - /** - * Add new index to table name - * - * @param string $tableName - * @param string $indexName - * @param string|array $fields the table column name or array of ones - * @param string $indexType the index type - * @param string $schemaName - * @return \Zend_Db_Statement_Interface - */ - public function addIndex($tableName, $indexName, $fields, $indexType = self::INDEX_TYPE_INDEX, $schemaName = null); - - /** - * Drop the index from table - * - * @param string $tableName - * @param string $keyName - * @param string $schemaName - * @return bool|\Zend_Db_Statement_Interface - */ - public function dropIndex($tableName, $keyName, $schemaName = null); - - /** - * Returns the table index information - * - * The return value is an associative array keyed by the UPPERCASE index key (except for primary key, - * that is always stored under 'PRIMARY' key) as returned by the RDBMS. - * - * The value of each array element is an associative array - * with the following keys: - * - * SCHEMA_NAME => string; name of database or schema - * TABLE_NAME => string; name of the table - * KEY_NAME => string; the original index name - * COLUMNS_LIST => array; array of index column names - * INDEX_TYPE => string; lowercase, create index type - * INDEX_METHOD => string; index method using - * type => string; see INDEX_TYPE - * fields => array; see COLUMNS_LIST - * - * @param string $tableName - * @param string $schemaName - * @return array - */ - public function getIndexList($tableName, $schemaName = null); - - /** - * Add new Foreign Key to table - * If Foreign Key with same name is exist - it will be deleted - * - * @param string $fkName - * @param string $tableName - * @param string $columnName - * @param string $refTableName - * @param string $refColumnName - * @param string $onDelete - * @param string $onUpdate - * @param boolean $purge trying remove invalid data - * @param string $schemaName - * @param string $refSchemaName - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) - */ - public function addForeignKey( - $fkName, - $tableName, - $columnName, - $refTableName, - $refColumnName, - $onDelete = self::FK_ACTION_CASCADE, - $onUpdate = self::FK_ACTION_CASCADE, - $purge = false, - $schemaName = null, - $refSchemaName = null - ); - - /** - * Drop the Foreign Key from table - * - * @param string $tableName - * @param string $fkName - * @param string $schemaName - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - */ - public function dropForeignKey($tableName, $fkName, $schemaName = null); - - /** - * Retrieve the foreign keys descriptions for a table. - * - * The return value is an associative array keyed by the UPPERCASE foreign key, - * as returned by the RDBMS. - * - * The value of each array element is an associative array - * with the following keys: - * - * FK_NAME => string; original foreign key name - * SCHEMA_NAME => string; name of database or schema - * TABLE_NAME => string; - * COLUMN_NAME => string; column name - * REF_SCHEMA_NAME => string; name of reference database or schema - * REF_TABLE_NAME => string; reference table name - * REF_COLUMN_NAME => string; reference column name - * ON_DELETE => string; action type on delete row - * ON_UPDATE => string; action type on update row - * - * @param string $tableName - * @param string $schemaName - * @return array - */ - public function getForeignKeys($tableName, $schemaName = null); - - /** - * Creates and returns a new \Magento\Setup\Framework\DB\Select object for this adapter. - * - * @return \Zend\Db\Sql\Select - */ - public function select(); - - /** - * Inserts a table row with specified data. - * - * @param mixed $table The table to insert data into. - * @param array $bind Column-value pairs. - * @return int The number of affected rows. - */ - public function insert($table, array $bind); - - /** - * Inserts a table row with specified data - * Special for Zero values to identity column - * - * @param string $table - * @param array $bind - * @return int The number of affected rows. - */ - public function insertForce($table, array $bind); - - /** - * Updates table rows with specified data based on a WHERE clause. - * - * @param mixed $table The table to update. - * @param array $bind Column-value pairs. - * @param mixed $where UPDATE WHERE clause(s). - * @return int The number of affected rows. - */ - public function update($table, array $bind, $where = ''); - - /** - * Deletes table rows based on a WHERE clause. - * - * @param mixed $table The table to update. - * @param mixed $where DELETE WHERE clause(s). - * @return int The number of affected rows. - */ - public function delete($table, $where = ''); - - /** - * Prepares and executes an SQL statement with bound data. - * - * @param mixed $sql The SQL statement with placeholders. - * @param mixed $bind An array of data or data itself to bind to the placeholders. - * @return \Zend\Db\Adapter\Driver\StatementInterface - */ - public function query($sql, $bind = array()); - - /** - * Safely quotes a value for an SQL statement. - * - * If an array is passed as the value, the array values are quoted - * and then returned as a comma-separated string. - * - * @param mixed $value The value to quote. - * @param mixed $type OPTIONAL the SQL datatype name, or constant, or null. - * @return mixed An SQL-safe quoted value (or string of separated values). - */ - public function quote($value, $type = null); - - /** - * Quotes a value and places into a piece of text at a placeholder. - * - * The placeholder is a question-mark; all placeholders will be replaced - * with the quoted value. For example: - * - * <code> - * $text = "WHERE date < ?"; - * $date = "2005-01-02"; - * $safe = $sql->quoteInto($text, $date); - * // $safe = "WHERE date < '2005-01-02'" - * </code> - * - * @param string $text The text with a placeholder. - * @param mixed $value The value to quote. - * @param string $type OPTIONAL SQL datatype - * @param integer $count OPTIONAL count of placeholders to replace - * @return string An SQL-safe quoted value placed into the original text. - */ - public function quoteInto($text, $value, $type = null, $count = null); - - /** - * Quotes an identifier. - * - * Accepts a string representing a qualified indentifier. For Example: - * <code> - * $adapter->quoteIdentifier('myschema.mytable') - * </code> - * Returns: "myschema"."mytable" - * - * Or, an array of one or more identifiers that may form a qualified identifier: - * <code> - * $adapter->quoteIdentifier(array('myschema','my.table')) - * </code> - * Returns: "myschema"."my.table" - * - * The actual quote character surrounding the identifiers may vary depending on - * the adapter. - * - * @param string|array|\Zend_Db_Expr $ident The identifier. - * @param boolean $auto If true, heed the AUTO_QUOTE_IDENTIFIERS config option. - * @return string The quoted identifier. - */ - public function quoteIdentifier($ident, $auto = false); - - /** - * Run additional environment before setup - * - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - */ - public function startSetup(); - - /** - * Run additional environment after setup - * - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface - */ - public function endSetup(); - - /** - * Build SQL statement for condition - * - * If $condition integer or string - exact value will be filtered ('eq' condition) - * - * If $condition is array - one of the following structures is expected: - * - array("from" => $fromValue, "to" => $toValue) - * - array("eq" => $equalValue) - * - array("neq" => $notEqualValue) - * - array("like" => $likeValue) - * - array("in" => array($inValues)) - * - array("nin" => array($notInValues)) - * - array("notnull" => $valueIsNotNull) - * - array("null" => $valueIsNull) - * - array("moreq" => $moreOrEqualValue) - * - array("gt" => $greaterValue) - * - array("lt" => $lessValue) - * - array("gteq" => $greaterOrEqualValue) - * - array("lteq" => $lessOrEqualValue) - * - array("finset" => $valueInSet) - * - array("regexp" => $regularExpression) - * - array("seq" => $stringValue) - * - array("sneq" => $stringValue) - * - * If non matched - sequential array is expected and OR conditions - * will be built using above mentioned structure - * - * @param string $fieldName - * @param integer|string|array $condition - * @return string - */ - public function prepareSqlCondition($fieldName, $condition); - - /** - * Retrieve valid table name - * Check table name length and allowed symbols - * - * @param string $tableName - * @return string - */ - public function getTableName($tableName); - - /** - * Retrieve valid index name - * Check index name length and allowed symbols - * - * @param string $tableName - * @param string|array $fields the columns list - * @param string $indexType - * @return string - */ - public function getIndexName($tableName, $fields, $indexType = ''); - - /** - * Retrieve valid foreign key name - * Check foreign key name length and allowed symbols - * - * @param string $priTableName - * @param string $priColumnName - * @param string $refTableName - * @param string $refColumnName - * @return string - */ - public function getForeignKeyName($priTableName, $priColumnName, $refTableName, $refColumnName); - - /** - * Return array of table(s) checksum as table name - checksum pairs - * - * @param array|string $tableNames - * @param string $schemaName - * @return array - */ - public function getTablesChecksum($tableNames, $schemaName = null); - - /** - * Try to find installed primary key name, if not - formate new one. - * - * @param string $tableName Table name - * @param string $schemaName OPTIONAL - * @return string Primary Key name - */ - public function getPrimaryKeyName($tableName, $schemaName = null); - - /** - * Get adapter transaction level state. Return 0 if all transactions are complete - * - * @return int - */ - public function getTransactionLevel(); - - /** - * Drop trigger from database - * - * @param string $triggerName - * @param string|null $schemaName - * @return bool - */ - public function dropTrigger($triggerName, $schemaName = null); -} diff --git a/setup/module/Magento/Setup/src/Framework/DB/Adapter/Pdo/Mysql.php b/setup/module/Magento/Setup/src/Framework/DB/Adapter/Pdo/Mysql.php deleted file mode 100644 index 2fcc49bb11cdf583dbdc29fe722ac4863ec0e476..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Setup/src/Framework/DB/Adapter/Pdo/Mysql.php +++ /dev/null @@ -1,2789 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Setup\Framework\DB\Adapter\Pdo; - -use Magento\Framework\Filesystem; -use Magento\Setup\Framework\DB\Adapter\AdapterInterface; -use Magento\Setup\Framework\DB\Ddl\Table; -use \Magento\Framework\DB\ExpressionConverter; -use Zend\Db\Adapter\Adapter; -use Zend\Db\Adapter\Driver\StatementInterface; -use Zend\Db\Adapter\Driver; -use Zend\Db\Exception\ErrorException; -use Zend\Db\Exception\InvalidArgumentException; -use Zend\Db\Adapter\Exception; -use Zend\Db\Adapter\ParameterContainer; -use Zend\Db\Adapter\Platform; -use Zend\Db\Adapter\Profiler; -use Zend\Db\ResultSet; -use Zend\Db\Sql\Expression; -use Zend\Db\Sql\Sql; -use Magento\Setup\Model\FilesystemFactory; - -class Mysql extends Adapter implements AdapterInterface -{ - const DEBUG_CONNECT = 0; - const DEBUG_TRANSACTION = 1; - const DEBUG_QUERY = 2; - - - const LENGTH_TABLE_NAME = 64; - const LENGTH_INDEX_NAME = 64; - const LENGTH_FOREIGN_NAME = 64; - - /** - * MEMORY engine type for MySQL tables - */ - const ENGINE_MEMORY = 'MEMORY'; - - /** - * Maximum number of connection retries - */ - const MAX_CONNECTION_RETRIES = 10; - - /** - * Current Transaction Level - * - * @var int - */ - protected $_transactionLevel = 0; - - /** - * Whether transaction was rolled back or not - * - * @var bool - */ - protected $_isRolledBack = false; - - /** - * Set attribute to connection flag - * - * @var bool - */ - protected $_connectionFlagsSet = false; - - - - /** - * SQL bind params. Used temporarily by regexp callback. - * - * @var array - */ - protected $_bindParams = []; - - /** - * Autoincrement for bind value. Used by regexp callback. - * - * @var int - */ - protected $_bindIncrement = 0; - - /** - * Write SQL debug data to file - * - * @var bool - */ - protected $_debug = false; - - /** - * Minimum query duration time to be logged - * - * @var float - */ - protected $_logQueryTime = 0.05; - - /** - * Log all queries (ignored minimum query duration time) - * - * @var bool - */ - protected $_logAllQueries = false; - - /** - * Add to log call stack data (backtrace) - * - * @var bool - */ - protected $_logCallStack = false; - - /** - * Path to SQL debug data log - * - * @var string - */ - protected $_debugFile = '/debug/pdo_mysql.log'; - - /** - * Filesystem class - * - * @var Filesystem - */ - protected $_filesystem; - - /** - * Debug timer start value - * - * @var float - */ - protected $_debugTimer = 0; - - /** - * MySQL column - Table DDL type pairs - * - * @var array - */ - protected $_ddlColumnTypes = array( - Table::TYPE_BOOLEAN => 'bool', - Table::TYPE_SMALLINT => 'smallint', - Table::TYPE_INTEGER => 'int', - Table::TYPE_BIGINT => 'bigint', - Table::TYPE_FLOAT => 'float', - Table::TYPE_DECIMAL => 'decimal', - Table::TYPE_NUMERIC => 'decimal', - Table::TYPE_DATE => 'date', - Table::TYPE_TIMESTAMP => 'timestamp', - Table::TYPE_DATETIME => 'datetime', - Table::TYPE_TEXT => 'text', - Table::TYPE_BLOB => 'blob', - Table::TYPE_VARBINARY => 'blob' - ); - - /** - * All possible DDL statements - * First 3 symbols for each statement - * - * @var string[] - */ - protected $_ddlRoutines = array('alt', 'cre', 'ren', 'dro', 'tru'); - - /** - * Contructor to create - * - * @param array|Driver\DriverInterface $driver - * @param Platform\PlatformInterface $platform - * @param ResultSet\ResultSetInterface $queryResultPrototype - * @param Profiler\ProfilerInterface $profiler - * @param FilesystemFactory $filesystemFactory - */ - public function __construct( - $driver, - Platform\PlatformInterface $platform = null, - ResultSet\ResultSetInterface $queryResultPrototype = null, - Profiler\ProfilerInterface $profiler = null, - FilesystemFactory $filesystemFactory = null - ) { - if ($filesystemFactory !== null) { - $this->_filesystem = $filesystemFactory->create(); - } - parent::__construct($driver, $platform, $queryResultPrototype, $profiler); - } - - /** - * Begin new DB transaction for connection - * - * @return $this - * @throws \Exception - */ - public function beginTransaction() - { - if ($this->_isRolledBack) { - throw new \Exception(AdapterInterface::ERROR_ROLLBACK_INCOMPLETE_MESSAGE); - } - if ($this->_transactionLevel === 0) { - $this->_debugTimer(); - $this->getDriver()->getConnection()->beginTransaction(); - $this->_debugStat(self::DEBUG_TRANSACTION, 'BEGIN'); - } - ++$this->_transactionLevel; - return $this; - } - - /** - * Commit DB transaction - * - * @return $this - * @throws \Exception - */ - public function commit() - { - if ($this->_transactionLevel === 1 && !$this->_isRolledBack) { - $this->_debugTimer(); - $this->getDriver()->getConnection()->commit(); - $this->_debugStat(self::DEBUG_TRANSACTION, 'COMMIT'); - } elseif ($this->_transactionLevel === 0) { - throw new \Exception(AdapterInterface::ERROR_ASYMMETRIC_COMMIT_MESSAGE); - } elseif ($this->_isRolledBack) { - throw new \Exception(AdapterInterface::ERROR_ROLLBACK_INCOMPLETE_MESSAGE); - } - --$this->_transactionLevel; - return $this; - } - - /** - * Rollback DB transaction - * - * @return $this - * @throws \Exception - */ - public function rollBack() - { - if ($this->_transactionLevel === 1) { - $this->_debugTimer(); - $this->getDriver()->getConnection()->rollBack(); - $this->_isRolledBack = false; - $this->_debugStat(self::DEBUG_TRANSACTION, 'ROLLBACK'); - } elseif ($this->_transactionLevel === 0) { - throw new \Exception(AdapterInterface::ERROR_ASYMMETRIC_ROLLBACK_MESSAGE); - } else { - $this->_isRolledBack = true; - } - --$this->_transactionLevel; - return $this; - } - - /** - * Get adapter transaction level state. Return 0 if all transactions are complete - * - * @return int - */ - public function getTransactionLevel() - { - return $this->_transactionLevel; - } - - /** - * Creates a PDO object and connects to the database. - * - * @return void - * @throws ErrorException - */ - public function connect() - { - if ($this->getDriver()->getConnection()->isConnected()) { - return; - } - - $this->_debugTimer(); - $this->getDriver()->getConnection()->connect(); - $this->_debugStat(self::DEBUG_CONNECT, ''); - } - - /** - * Run RAW Query - * - * @param string $sql - * @return StatementInterface - * @throws \PDOException - */ - public function rawQuery($sql) - { - try { - $result = $this->query($sql); - } catch (InvalidArgumentException $e) { - // Convert to \PDOException to maintain backwards compatibility with usage of MySQL adapter - $e = $e->getPrevious(); - if (!($e instanceof \PDOException)) { - $e = new \PDOException($e->getMessage(), $e->getCode()); - } - throw $e; - } - - return $result; - } - - /** - * Fetch all queries - * - * @param \Zend\Db\Sql\Select $sql - * @param array $bind - * @param null $fetchMode - * @return StatementInterface|ResultSet\ResultSetInterface - */ - public function fetchAll($sql, $bind = array(), $fetchMode = null) - { - if ($sql instanceof \Zend\Db\Sql\Select) { - $sql = $sql->getSqlString($this->getPlatform()); - } - return $this->query($sql); - } - - /** - * Run RAW query and Fetch First row - * - * @param string $sql - * @param string|int $field - * @return mixed|null - */ - public function rawFetchRow($sql, $field = null) - { - $result = $this->rawQuery($sql); - - if ($result instanceof ResultSet\ResultSetInterface && $result->count()) { - $resultSet = new ResultSet\ResultSet; - $resultSet->initialize($result); - - $row = $resultSet->toArray(); - - if (empty($field)) { - return $row; - } else { - return isset($row[0][$field]) ? $row[0][$field] : false; - } - } else { - return false; - } - } - - /** - * Check transaction level in case of DDL query - * - * @param string $sql - * @return void - * @throws \Zend_Db_Adapter_Exception - */ - protected function _checkDdlTransaction($sql) - { - if (is_string($sql) && $this->getTransactionLevel() > 0) { - $startSql = strtolower(substr(ltrim($sql), 0, 3)); - if (in_array($startSql, $this->_ddlRoutines)) { - trigger_error(AdapterInterface::ERROR_DDL_MESSAGE, E_USER_ERROR); - } - } - } - - /** - * {@inheritdoc} - */ - public function query( - $sql, - $parametersOrQueryMode = self::QUERY_MODE_EXECUTE, - ResultSet\ResultSetInterface $resultPrototype = null - ) { - return parent::query($sql, $parametersOrQueryMode, $resultPrototype); - } - - /** - * Drop the Foreign Key from table - * - * @param string $tableName - * @param string $fkName - * @param string $schemaName - * @return $this - */ - public function dropForeignKey($tableName, $fkName, $schemaName = null) - { - $foreignKeys = $this->getForeignKeys($tableName, $schemaName); - $fkName = strtoupper($fkName); - if (substr($fkName, 0, 3) == 'FK_') { - $fkName = substr($fkName, 3); - } - foreach (array($fkName, 'FK_' . $fkName) as $key) { - if (isset($foreignKeys[$key])) { - $sql = sprintf( - 'ALTER TABLE %s DROP FOREIGN KEY %s', - $this->getPlatform()->quoteIdentifierChain($this->_getTableName($tableName)), - $this->quoteIdentifier($foreignKeys[$key]['FK_NAME']) - ); - $this->rawQuery($sql); - } - } - return $this; - } - - /** - * Prepare table before add constraint foreign key - * - * @param string $tableName - * @param string $columnName - * @param string $refTableName - * @param string $refColumnName - * @param string $onDelete - * @return $this - */ - public function purgeOrphanRecords( - $tableName, - $columnName, - $refTableName, - $refColumnName, - $onDelete = AdapterInterface::FK_ACTION_CASCADE - ) { - $onDelete = strtoupper($onDelete); - if ($onDelete == AdapterInterface::FK_ACTION_CASCADE - || $onDelete == AdapterInterface::FK_ACTION_RESTRICT - ) { - $sql = sprintf( - "DELETE p.* FROM %s AS p LEFT JOIN %s AS r ON p.%s = r.%s WHERE r.%s IS NULL", - $this->quoteIdentifier($tableName), - $this->quoteIdentifier($refTableName), - $this->quoteIdentifier($columnName), - $this->quoteIdentifier($refColumnName), - $this->quoteIdentifier($refColumnName) - ); - $this->rawQuery($sql); - } elseif ($onDelete == AdapterInterface::FK_ACTION_SET_NULL) { - $sql = sprintf( - "UPDATE %s AS p LEFT JOIN %s AS r ON p.%s = r.%s SET p.%s = NULL WHERE r.%s IS NULL", - $this->quoteIdentifier($tableName), - $this->quoteIdentifier($refTableName), - $this->quoteIdentifier($columnName), - $this->quoteIdentifier($refColumnName), - $this->quoteIdentifier($columnName), - $this->quoteIdentifier($refColumnName) - ); - $this->query($sql); - } - - return $this; - } - - /** - * Check does table column exist - * - * @param string $tableName - * @param string $columnName - * @param string $schemaName - * @return bool - */ - public function tableColumnExists($tableName, $columnName, $schemaName = null) - { - $describe = $this->describeTable($tableName, $schemaName); - foreach ($describe as $column) { - if ($column['COLUMN_NAME'] == $columnName) { - return true; - } - } - return false; - } - - /** - * Adds new column to table. - * - * Generally $defintion must be array with column data to keep this call cross-DB compatible. - * Using string as $definition is allowed only for concrete DB adapter. - * Adds primary key if needed - * - * @param string $tableName - * @param string $columnName - * @param array|string $definition string specific or universal array DB Server definition - * @param string $schemaName - * @return true|StatementInterface - * @throws ErrorException - */ - public function addColumn($tableName, $columnName, $definition, $schemaName = null) - { - if ($this->tableColumnExists($tableName, $columnName, $schemaName)) { - return true; - } - - $primaryKey = ''; - if (is_array($definition)) { - $definition = array_change_key_case($definition, CASE_UPPER); - if (empty($definition['COMMENT'])) { - throw new ErrorException("Impossible to create a column without comment."); - } - if (!empty($definition['PRIMARY'])) { - $primaryKey = sprintf(', ADD PRIMARY KEY (%s)', $this->quoteIdentifier($columnName)); - } - $definition = $this->_getColumnDefinition($definition); - } - - $sql = sprintf( - 'ALTER TABLE %s ADD COLUMN %s %s %s', - $this->getPlatform()->quoteIdentifierChain($tableName), - $this->quoteIdentifier($columnName), - $definition, - $primaryKey - ); - - $result = $this->query($sql); - - return $result; - } - - /** - * Delete table column - * - * @param string $tableName - * @param string $columnName - * @param string $schemaName - * @return true|StatementInterface - */ - public function dropColumn($tableName, $columnName, $schemaName = null) - { - if (!$this->tableColumnExists($tableName, $columnName, $schemaName)) { - return true; - } - - $alterDrop = array(); - - $foreignKeys = $this->getForeignKeys($tableName, $schemaName); - foreach ($foreignKeys as $fkProp) { - if ($fkProp['COLUMN_NAME'] == $columnName) { - $alterDrop[] = 'DROP FOREIGN KEY ' . $this->quoteIdentifier($fkProp['FK_NAME']); - } - } - - /* drop index that after column removal would coincide with the existing index by indexed columns */ - foreach ($this->getIndexList($tableName, $schemaName) as $idxData) { - $idxColumns = $idxData['COLUMNS_LIST']; - $idxColumnKey = array_search($columnName, $idxColumns); - if ($idxColumnKey !== false) { - unset($idxColumns[$idxColumnKey]); - if ($idxColumns && $this->_getIndexByColumns($tableName, $idxColumns, $schemaName)) { - $this->dropIndex($tableName, $idxData['KEY_NAME'], $schemaName); - } - } - } - - $alterDrop[] = 'DROP COLUMN ' . $this->quoteIdentifier($columnName); - $sql = sprintf( - 'ALTER TABLE %s %s', - $this->getPlatform()->quoteIdentifierChain($tableName), - implode(', ', $alterDrop) - ); - - $result = $this->query($sql); - - return $result; - } - - /** - * Retrieve index information by indexed columns or return NULL, if there is no index for a column list - * - * @param string $tableName - * @param array $columns - * @param string|null $schemaName - * @return array|null - */ - protected function _getIndexByColumns($tableName, array $columns, $schemaName) - { - foreach ($this->getIndexList($tableName, $schemaName) as $idxData) { - if ($idxData['COLUMNS_LIST'] === $columns) { - return $idxData; - } - } - return null; - } - - /** - * Change the column name and definition - * - * For change definition of column - use modifyColumn - * - * @param string $tableName - * @param string $oldColumnName - * @param string $newColumnName - * @param array $definition - * @param boolean $flushData flush table statistic - * @param string $schemaName - * @return StatementInterface - * @throws ErrorException - */ - public function changeColumn( - $tableName, - $oldColumnName, - $newColumnName, - $definition, - $flushData = false, - $schemaName = null - ) { - if (!$this->tableColumnExists($tableName, $oldColumnName, $schemaName)) { - throw new ErrorException( - sprintf( - 'Column "%s" does not exist in table "%s".', - $oldColumnName, - $tableName - ) - ); - } - - if (is_array($definition)) { - $definition = $this->_getColumnDefinition($definition); - } - - $sql = sprintf( - 'ALTER TABLE %s CHANGE COLUMN %s %s %s', - $this->getPlatform()->quoteIdentifierChain($tableName), - $this->quoteIdentifier($oldColumnName), - $this->quoteIdentifier($newColumnName), - $definition - ); - - $result = $this->query($sql); - - if ($flushData) { - $this->showTableStatus($tableName, $schemaName); - } - - return $result; - } - - /** - * Modify the column definition - * - * @param string $tableName - * @param string $columnName - * @param array|string $definition - * @param boolean $flushData - * @param string $schemaName - * @return $this - * @throws ErrorException - */ - public function modifyColumn($tableName, $columnName, $definition, $flushData = false, $schemaName = null) - { - if (!$this->tableColumnExists($tableName, $columnName, $schemaName)) { - throw new ErrorException(sprintf('Column "%s" does not exist in table "%s".', $columnName, $tableName)); - } - if (is_array($definition)) { - $definition = $this->_getColumnDefinition($definition); - } - - $sql = sprintf( - 'ALTER TABLE %s MODIFY COLUMN %s %s', - $this->getPlatform()->quoteIdentifierChain($tableName), - $this->quoteIdentifier($columnName), - $definition - ); - - $this->query($sql); - if ($flushData) { - $this->showTableStatus($tableName, $schemaName); - } - - return $this; - } - - /** - * Show table status - * - * @param string $tableName - * @param string $schemaName - * @return mixed - */ - public function showTableStatus($tableName, $schemaName = null) - { - $fromDbName = null; - if ($schemaName !== null) { - $fromDbName = ' FROM ' . $this->quoteIdentifier($schemaName); - } - $query = sprintf('SHOW TABLE STATUS%s LIKE %s', $fromDbName, $this->quote($tableName)); - - return $this->rawFetchRow($query); - } - - /** - * Retrieve Create Table SQL - * - * @param string $tableName - * @param string $schemaName - * @return string - */ - public function getCreateTable($tableName, $schemaName = null) - { - if ($schemaName) { - $table = array($schemaName, $tableName); - } else { - $table = $tableName; - } - $sql = 'SHOW CREATE TABLE ' . $this->getPlatform()->quoteIdentifierChain($table); - $ddl = $this->rawFetchRow($sql, 'Create Table'); - - return $ddl; - } - - /** - * Retrieve the foreign keys descriptions for a table. - * - * The return value is an associative array keyed by the UPPERCASE foreign key, - * as returned by the RDBMS. - * - * The value of each array element is an associative array - * with the following keys: - * - * FK_NAME => string; original foreign key name - * SCHEMA_NAME => string; name of database or schema - * TABLE_NAME => string; - * COLUMN_NAME => string; column name - * REF_SCHEMA_NAME => string; name of reference database or schema - * REF_TABLE_NAME => string; reference table name - * REF_COLUMN_NAME => string; reference column name - * ON_DELETE => string; action type on delete row - * ON_UPDATE => string; action type on update row - * - * @param string $tableName - * @param string $schemaName - * @return array - */ - public function getForeignKeys($tableName, $schemaName = null) - { - $ddl = array(); - $createSql = $this->getCreateTable($tableName, $schemaName); - - // collect CONSTRAINT - $regExp = '#,\s+CONSTRAINT `([^`]*)` FOREIGN KEY \(`([^`]*)`\) ' - . 'REFERENCES (`([^`]*)`\.)?`([^`]*)` \(`([^`]*)`\)' - . '( ON DELETE (RESTRICT|CASCADE|SET NULL|NO ACTION))?' - . '( ON UPDATE (RESTRICT|CASCADE|SET NULL|NO ACTION))?#'; - $matches = array(); - preg_match_all($regExp, $createSql, $matches, PREG_SET_ORDER); - foreach ($matches as $match) { - $ddl[strtoupper($match[1])] = array( - 'FK_NAME' => $match[1], - 'SCHEMA_NAME' => $schemaName, - 'TABLE_NAME' => $tableName, - 'COLUMN_NAME' => $match[2], - 'REF_SHEMA_NAME' => isset($match[4]) ? $match[4] : $schemaName, - 'REF_TABLE_NAME' => $match[5], - 'REF_COLUMN_NAME' => $match[6], - 'ON_DELETE' => isset($match[7]) ? $match[8] : '', - 'ON_UPDATE' => isset($match[9]) ? $match[10] : '' - ); - } - - return $ddl; - } - - /** - * Retrieve the foreign keys tree for all tables - * - * @return array - */ - public function getForeignKeysTree() - { - $tree = array(); - foreach ($this->listTables() as $table) { - foreach ($this->getForeignKeys($table) as $key) { - $tree[$table][$key['COLUMN_NAME']] = $key; - } - } - - return $tree; - } - - /** - * Modify tables, used for upgrade process - * Change columns definitions, reset foreign keys, change tables comments and engines. - * - * The value of each array element is an associative array - * with the following keys: - * - * columns => array; list of columns definitions - * comment => string; table comment - * engine => string; table engine - * - * @param array $tables - * @return $this - */ - public function modifyTables($tables) - { - $foreignKeys = $this->getForeignKeysTree(); - foreach ($tables as $table => $tableData) { - if (!$this->isTableExists($table)) { - continue; - } - foreach ($tableData['columns'] as $column => $columnDefinition) { - if (!$this->tableColumnExists($table, $column)) { - continue; - } - $droppedKeys = array(); - foreach ($foreignKeys as $keyTable => $columns) { - foreach ($columns as $columnName => $keyOptions) { - if ($table == $keyOptions['REF_TABLE_NAME'] && $column == $keyOptions['REF_COLUMN_NAME']) { - $this->dropForeignKey($keyTable, $keyOptions['FK_NAME']); - $droppedKeys[] = $keyOptions; - } - } - } - - $this->modifyColumn($table, $column, $columnDefinition); - - foreach ($droppedKeys as $options) { - unset($columnDefinition['identity'], $columnDefinition['primary'], $columnDefinition['comment']); - - $onDelete = $options['ON_DELETE']; - $onUpdate = $options['ON_UPDATE']; - - if ($onDelete == AdapterInterface::FK_ACTION_SET_NULL - || $onUpdate == AdapterInterface::FK_ACTION_SET_NULL) { - $columnDefinition['nullable'] = true; - } - $this->modifyColumn($options['TABLE_NAME'], $options['COLUMN_NAME'], $columnDefinition); - $this->addForeignKey( - $options['FK_NAME'], - $options['TABLE_NAME'], - $options['COLUMN_NAME'], - $options['REF_TABLE_NAME'], - $options['REF_COLUMN_NAME'], - ($onDelete) ? $onDelete : AdapterInterface::FK_ACTION_NO_ACTION, - ($onUpdate) ? $onUpdate : AdapterInterface::FK_ACTION_NO_ACTION - ); - } - } - if (!empty($tableData['comment'])) { - $this->changeTableComment($table, $tableData['comment']); - } - if (!empty($tableData['engine'])) { - $this->changeTableEngine($table, $tableData['engine']); - } - } - - return $this; - } - - /** - * Retrieve table index information - * - * The return value is an associative array keyed by the UPPERCASE index key (except for primary key, - * that is always stored under 'PRIMARY' key) as returned by the RDBMS. - * - * The value of each array element is an associative array - * with the following keys: - * - * SCHEMA_NAME => string; name of database or schema - * TABLE_NAME => string; name of the table - * KEY_NAME => string; the original index name - * COLUMNS_LIST => array; array of index column names - * INDEX_TYPE => string; lowercase, create index type - * INDEX_METHOD => string; index method using - * type => string; see INDEX_TYPE - * fields => array; see COLUMNS_LIST - * - * @param string $tableName - * @param string $schemaName - * @return array|string|int - */ - public function getIndexList($tableName, $schemaName = null) - { - $ddl = array(); - - $sql = sprintf( - 'SHOW INDEX FROM %s', - $this->getPlatform()->quoteIdentifierChain($tableName) - ); - - foreach ($this->fetchAll($sql) as $row) { - $fieldKeyName = 'Key_name'; - $fieldNonUnique = 'Non_unique'; - $fieldColumn = 'Column_name'; - $fieldIndexType = 'Index_type'; - - if (strtolower($row[$fieldKeyName]) == AdapterInterface::INDEX_TYPE_PRIMARY) { - $indexType = AdapterInterface::INDEX_TYPE_PRIMARY; - } elseif ($row[$fieldNonUnique] == 0) { - $indexType = AdapterInterface::INDEX_TYPE_UNIQUE; - } elseif (strtolower($row[$fieldIndexType]) == AdapterInterface::INDEX_TYPE_FULLTEXT) { - $indexType = AdapterInterface::INDEX_TYPE_FULLTEXT; - } else { - $indexType = AdapterInterface::INDEX_TYPE_INDEX; - } - - $upperKeyName = strtoupper($row[$fieldKeyName]); - if (isset($ddl[$upperKeyName])) { - $ddl[$upperKeyName]['fields'][] = $row[$fieldColumn]; // for compatible - $ddl[$upperKeyName]['COLUMNS_LIST'][] = $row[$fieldColumn]; - } else { - $ddl[$upperKeyName] = array( - 'SCHEMA_NAME' => $schemaName, - 'TABLE_NAME' => $tableName, - 'KEY_NAME' => $row[$fieldKeyName], - 'COLUMNS_LIST' => array($row[$fieldColumn]), - 'INDEX_TYPE' => $indexType, - 'INDEX_METHOD' => $row[$fieldIndexType], - 'type' => strtolower($indexType), // for compatibility - 'fields' => array($row[$fieldColumn]) // for compatibility - ); - } - } - - return $ddl; - } - - /** - * Remove duplicate entry for create key - * - * @param string $table - * @param array $fields - * @param string[] $ids - * @return $this - */ - protected function _removeDuplicateEntry($table, $fields, $ids) - { - $where = array(); - $i = 0; - foreach ($fields as $field) { - $where[] = $this->quoteInto($field . '=?', $ids[$i++]); - } - - if (!$where) { - return $this; - } - $whereCond = implode(' AND ', $where); - $sql = sprintf('SELECT COUNT(*) as `cnt` FROM `%s` WHERE %s', $table, $whereCond); - - $cnt = $this->rawFetchRow($sql, 'cnt'); - if ($cnt > 1) { - $sql = sprintf( - 'DELETE FROM `%s` WHERE %s LIMIT %d', - $table, - $whereCond, - $cnt - 1 - ); - $this->rawQuery($sql); - } - - return $this; - } - - /** - * Creates and returns a new \Zend\Db\Sql\Select object for this adapter. - * - * @return Sql/Select - */ - public function select() - { - $sql = new Sql($this); - return $sql->select(); - } - - /** - * Start debug timer - * - * @return $this - */ - protected function _debugTimer() - { - if ($this->_debug) { - $this->_debugTimer = microtime(true); - } - - return $this; - } - - /** - * Logging debug information - * - * @param int $type - * @param string $sql - * @param array $bind - * @param StatementInterface $result - * @return $this - */ - protected function _debugStat($type, $sql, $bind = array(), $result = null) - { - if (!$this->_debug) { - return $this; - } - - $code = '## ' . getmypid() . ' ## '; - $nl = "\n"; - $time = sprintf('%.4f', microtime(true) - $this->_debugTimer); - - if (!$this->_logAllQueries && $time < $this->_logQueryTime) { - return $this; - } - switch ($type) { - case self::DEBUG_CONNECT: - $code .= 'CONNECT' . $nl; - break; - case self::DEBUG_TRANSACTION: - $code .= 'TRANSACTION ' . $sql . $nl; - break; - case self::DEBUG_QUERY: - $code .= 'QUERY' . $nl; - $code .= 'SQL: ' . $sql . $nl; - if ($bind) { - $code .= 'BIND: ' . var_export($bind, true) . $nl; - } - if ($result instanceof StatementInterface) { - $code .= 'AFF: ' . $result->rowCount() . $nl; - } - break; - } - $code .= 'TIME: ' . $time . $nl; - - if ($this->_logCallStack) { - $code .= 'TRACE: ' . Debug::backtrace(true, false) . $nl; - } - - $code .= $nl; - - $this->_debugWriteToFile($code); - - return $this; - } - - /** - * Write exception and thow - * - * @param \Exception $e - * @return void - * @throws \Exception - */ - protected function _debugException(\Exception $e) - { - if (!$this->_debug) { - throw $e; - } - - $nl = "\n"; - $code = 'EXCEPTION ' . $nl . $e . $nl . $nl; - $this->_debugWriteToFile($code); - - throw $e; - } - - /** - * Debug write to file process - * - * @param string $str - * @return void - */ - protected function _debugWriteToFile($str) - { - $str = '## ' . date('Y-m-d H:i:s') . "\r\n" . $str; - $this->_filesystem->getDirectoryWrite('var')->writeFile($this->_debugFile, $str, FILE_APPEND | LOCK_EX); - } - - /** - * Quotes a value and places into a piece of text at a placeholder. - * - * Method revrited for handle empty arrays in value param - * - * @param string $text The text with a placeholder. - * @param mixed $value The value to quote. - * @param string $type OPTIONAL SQL datatype - * @param integer $count OPTIONAL count of placeholders to replace - * @return string An SQL-safe quoted value placed into the orignal text. - */ - public function quoteInto($text, $value, $type = null, $count = null) - { - if ($value instanceof \Zend\Db\Sql\Expression) { - $value = $value->getExpression(); - } - if ($count === null) { - return str_replace('?', $this->quote($value, $type), $text); - } else { - while ($count > 0) { - if (strpos($text, '?') !== false) { - $text = substr_replace($text, $this->quote($value, $type), strpos($text, '?'), 1); - } - --$count; - } - return $text; - } - } - - /** - * Retrieve ddl cache name - * - * @param string $tableName - * @param string $schemaName - * @return string - */ - protected function _getTableName($tableName, $schemaName = null) - { - return ($schemaName ? $schemaName . '.' : '') . $tableName; - } - - /** - * Returns the column descriptions for a table. - * - * The return value is an associative array keyed by the column name, - * as returned by the RDBMS. - * - * The value of each array element is an associative array - * with the following keys: - * - * SCHEMA_NAME => string; name of database or schema - * TABLE_NAME => string; - * COLUMN_NAME => string; column name - * COLUMN_POSITION => number; ordinal position of column in table - * DATA_TYPE => string; SQL datatype name of column - * DEFAULT => string; default expression of column, null if none - * NULLABLE => boolean; true if column can have nulls - * LENGTH => number; length of CHAR/VARCHAR - * SCALE => number; scale of NUMERIC/DECIMAL - * PRECISION => number; precision of NUMERIC/DECIMAL - * UNSIGNED => boolean; unsigned property of an integer type - * PRIMARY => boolean; true if column is part of the primary key - * PRIMARY_POSITION => integer; position of column in primary key - * IDENTITY => integer; true if column is auto-generated with unique values - * - * @param string $tableName - * @param string $schemaName OPTIONAL - * @return array - */ - public function describeTable($tableName, $schemaName = null) - { - $desc = []; - $ddl = new \Zend\Db\Metadata\Metadata($this); - $ddlTable = $ddl->getTable($tableName, $schemaName); - $constraints = $ddlTable->getConstraints(); - - foreach ($ddlTable->getColumns() as $ddlColumn) { - $primary = false; - foreach ($constraints as $constraint) { - $primary = in_array($ddlColumn->getName(), $constraint->getColumns()) && $constraint->isPrimaryKey(); - } - $desc[$ddlColumn->getName()] = array( - 'SCHEMA_NAME' => null, - 'TABLE_NAME' => $tableName, - 'COLUMN_NAME' => $ddlColumn->getName(), - 'COLUMN_POSITION' => $ddlColumn->getOrdinalPosition(), - 'DATA_TYPE' => $ddlColumn->getDataType(), - 'DEFAULT' => $ddlColumn->getColumnDefault(), - 'NULLABLE' => $ddlColumn->isNullable(), - 'LENGTH' => $ddlColumn->getCharacterMaximumLength(), - 'SCALE' => $ddlColumn->getNumericScale(), - 'PRECISION' => $ddlColumn->getNumericPrecision(), - 'UNSIGNED' => $ddlColumn->isNumericUnsigned(), - 'PRIMARY' => $primary, - 'PRIMARY_POSITION' => 0, - 'IDENTITY' => false, - ); - - } - - return $desc; - } - - /** - * Format described column to definition, ready to be added to ddl table. - * Return array with keys: name, type, length, options, comment - * - * @param array $columnData - * @return array - */ - public function getColumnCreateByDescribe($columnData) - { - $type = $this->_getColumnTypeByDdl($columnData); - $options = array(); - - if ($columnData['IDENTITY'] === true) { - $options['identity'] = true; - } - if ($columnData['UNSIGNED'] === true) { - $options['unsigned'] = true; - } - if ($columnData['NULLABLE'] === false - && !($type == Table::TYPE_TEXT && strlen($columnData['DEFAULT']) != 0) - ) { - $options['nullable'] = false; - } - if ($columnData['PRIMARY'] === true) { - $options['primary'] = true; - } - if (!is_null($columnData['DEFAULT']) - && $type != Table::TYPE_TEXT - ) { - $options['default'] = $this->quote($columnData['DEFAULT']); - } - if (strlen($columnData['SCALE']) > 0) { - $options['scale'] = $columnData['SCALE']; - } - if (strlen($columnData['PRECISION']) > 0) { - $options['precision'] = $columnData['PRECISION']; - } - - $comment = ucwords(str_replace('_', ' ', $columnData['COLUMN_NAME'])); - - $result = array( - 'name' => $columnData['COLUMN_NAME'], - 'type' => $type, - 'length' => $columnData['LENGTH'], - 'options' => $options, - 'comment' => $comment - ); - - return $result; - } - - /** - * Create \Magento\Setup\Framework\DB\Ddl\Table object by data from describe table - * - * @param string $tableName - * @param string $newTableName - * @return Table - */ - public function createTableByDdl($tableName, $newTableName) - { - $describe = $this->describeTable($tableName); - $table = $this->newTable($newTableName) - ->setComment(ucwords(str_replace('_', ' ', $newTableName))); - - foreach ($describe as $columnData) { - $columnInfo = $this->getColumnCreateByDescribe($columnData); - - $table->addColumn( - $columnInfo['name'], - $columnInfo['type'], - $columnInfo['length'], - $columnInfo['options'], - $columnInfo['comment'] - ); - } - - $indexes = $this->getIndexList($tableName); - foreach ($indexes as $indexData) { - /** - * Do not create primary index - it is created with identity column. - * For reliability check both name and type, because these values can start to differ in future. - */ - if (($indexData['KEY_NAME'] == 'PRIMARY') - || ($indexData['INDEX_TYPE'] == AdapterInterface::INDEX_TYPE_PRIMARY) - ) { - continue; - } - - $fields = $indexData['COLUMNS_LIST']; - $options = array('type' => $indexData['INDEX_TYPE']); - $table->addIndex($this->getIndexName($newTableName, $fields, $indexData['INDEX_TYPE']), $fields, $options); - } - - $foreignKeys = $this->getForeignKeys($tableName); - foreach ($foreignKeys as $keyData) { - $fkName = $this->getForeignKeyName( - $newTableName, - $keyData['COLUMN_NAME'], - $keyData['REF_TABLE_NAME'], - $keyData['REF_COLUMN_NAME'] - ); - $onDelete = $this->_getDdlAction($keyData['ON_DELETE']); - $onUpdate = $this->_getDdlAction($keyData['ON_UPDATE']); - - $table->addForeignKey( - $fkName, - $keyData['COLUMN_NAME'], - $keyData['REF_TABLE_NAME'], - $keyData['REF_COLUMN_NAME'], - $onDelete, - $onUpdate - ); - } - - // Set additional options - $tableData = $this->showTableStatus($tableName); - if (isset($tableData['Engine'])) { - $table->setOption('type', $tableData['Engine']); - } - - return $table; - } - - /** - * Modify the column definition by data from describe table - * - * @param string $tableName - * @param string $columnName - * @param array $definition - * @param boolean $flushData - * @param string $schemaName - * @return $this - */ - public function modifyColumnByDdl($tableName, $columnName, $definition, $flushData = false, $schemaName = null) - { - $definition = array_change_key_case($definition, CASE_UPPER); - $definition['COLUMN_TYPE'] = $this->_getColumnTypeByDdl($definition); - if (array_key_exists('DEFAULT', $definition) && is_null($definition['DEFAULT'])) { - unset($definition['DEFAULT']); - } - - return $this->modifyColumn($tableName, $columnName, $definition, $flushData, $schemaName); - } - - /** - * Retrieve column data type by data from describe table - * - * @param array $column - * @return string - */ - protected function _getColumnTypeByDdl($column) - { - switch ($column['DATA_TYPE']) { - case 'bool': - return Table::TYPE_BOOLEAN; - case 'tinytext': - case 'char': - case 'varchar': - case 'text': - case 'mediumtext': - case 'longtext': - return Table::TYPE_TEXT; - case 'blob': - case 'mediumblob': - case 'longblob': - return Table::TYPE_BLOB; - case 'tinyint': - case 'smallint': - return Table::TYPE_SMALLINT; - case 'mediumint': - case 'int': - return Table::TYPE_INTEGER; - case 'bigint': - return Table::TYPE_BIGINT; - case 'datetime': - return Table::TYPE_DATETIME; - case 'timestamp': - return Table::TYPE_TIMESTAMP; - case 'date': - return Table::TYPE_DATE; - case 'float': - return Table::TYPE_FLOAT; - case 'decimal': - case 'numeric': - return Table::TYPE_DECIMAL; - } - } - - /** - * Change table storage engine - * - * @param string $tableName - * @param string $engine - * @param string $schemaName - * @return StatementInterface - */ - public function changeTableEngine($tableName, $engine, $schemaName = null) - { - $table = $this->getPlatform()->quoteIdentifierChain($tableName); - $sql = sprintf('ALTER TABLE %s ENGINE=%s', $table, $engine); - - return $this->query($sql); - } - - /** - * Change table comment - * - * @param string $tableName - * @param string $comment - * @param string $schemaName - * @return StatementInterface - */ - public function changeTableComment($tableName, $comment, $schemaName = null) - { - $table = $this->getPlatform()->quoteIdentifierChain($tableName); - $sql = sprintf("ALTER TABLE %s COMMENT='%s'", $table, $comment); - - return $this->query($sql); - } - - /** - * Inserts a table row with specified data - * Special for Zero values to identity column - * - * @param string $table - * @param array $bind - * @return int The number of affected rows. - */ - public function insertForce($table, array $bind) - { - $this->rawQuery("SET @OLD_INSERT_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'"); - $result = $this->insert($table, $bind); - $this->rawQuery("SET SQL_MODE=IFNULL(@OLD_INSERT_SQL_MODE,'')"); - - return $result; - } - - /** - * Return new DDL Table object - * - * @param string $tableName the table name - * @param string $schemaName the database/schema name - * @return Table - */ - public function newTable($tableName = null, $schemaName = null) - { - $table = new Table(); - if ($tableName !== null) { - $table->setName($tableName); - } - if ($schemaName !== null) { - $table->setSchema($schemaName); - } - - return $table; - } - - /** - * Create table - * - * @param Table $table - * @throws ErrorException - * @return ResultSet\ResultSetInterface - */ - public function createTable(Table $table) - { - $columns = $table->getColumns(); - foreach ($columns as $columnEntry) { - if (empty($columnEntry['COMMENT'])) { - throw new ErrorException("Cannot create table without columns comments"); - } - } - - $sqlFragment = array_merge( - $this->_getColumnsDefinition($table), - $this->_getIndexesDefinition($table), - $this->_getForeignKeysDefinition($table) - ); - $tableOptions = $this->_getOptionsDefinition($table); - $sql = sprintf( - "CREATE TABLE %s (\n%s\n) %s", - $this->quoteIdentifier($table->getName()), - implode(",\n", $sqlFragment), - implode(" ", $tableOptions) - ); - return $this->query($sql); - } - - /** - * Create temporary table - * - * @param Table $table - * @return ResultSet\ResultSetInterface - */ - public function createTemporaryTable(Table $table) - { - $columns = $table->getColumns(); - $sqlFragment = array_merge( - $this->_getColumnsDefinition($table), - $this->_getIndexesDefinition($table), - $this->_getForeignKeysDefinition($table) - ); - $tableOptions = $this->_getOptionsDefinition($table); - $sql = sprintf( - "CREATE TEMPORARY TABLE %s (\n%s\n) %s", - $this->getPlatform()->quoteIdentifier($table->getName()), - implode(",\n", $sqlFragment), - implode(" ", $tableOptions) - ); - - return $this->query($sql); - } - - /** - * Rename several tables - * - * @param array $tablePairs array('oldName' => 'Name1', 'newName' => 'Name2') - * - * @return boolean - * @throws ErrorException - */ - public function renameTablesBatch(array $tablePairs) - { - if (count($tablePairs) == 0) { - throw new ErrorException('Please provide tables for rename'); - } - - $renamesList = array(); - $tablesList = array(); - foreach ($tablePairs as $pair) { - $oldTableName = $pair['oldName']; - $newTableName = $pair['newName']; - $renamesList[] = sprintf('%s TO %s', $oldTableName, $newTableName); - - $tablesList[$oldTableName] = $oldTableName; - $tablesList[$newTableName] = $newTableName; - } - - $query = sprintf('RENAME TABLE %s', implode(',', $renamesList)); - $this->query($query); - - return true; - } - - /** - * Retrieve columns and primary keys definition array for create table - * - * @param Table $table - * @return string[] - * @throws ErrorException - */ - protected function _getColumnsDefinition(Table $table) - { - $definition = array(); - $primary = array(); - $columns = $table->getColumns(); - if (empty($columns)) { - throw new ErrorException('Table columns are not defined'); - } - - foreach ($columns as $columnData) { - $columnDefinition = $this->_getColumnDefinition($columnData); - if ($columnData['PRIMARY']) { - $primary[$columnData['COLUMN_NAME']] = $columnData['PRIMARY_POSITION']; - } - - $definition[] = sprintf( - ' %s %s', - $this->quoteIdentifier($columnData['COLUMN_NAME']), - $columnDefinition - ); - } - - // PRIMARY KEY - if (!empty($primary)) { - asort($primary, SORT_NUMERIC); - $primary = array_map(array($this->getPlatform(), 'quoteIdentifier'), array_keys($primary)); - $definition[] = sprintf(' PRIMARY KEY (%s)', implode(', ', $primary)); - } - - return $definition; - } - - /** - * Retrieve table indexes definition array for create table - * - * @param Table $table - * @return string[] - */ - protected function _getIndexesDefinition(Table $table) - { - $definition = array(); - $indexes = $table->getIndexes(); - if (!empty($indexes)) { - foreach ($indexes as $indexData) { - if (!empty($indexData['TYPE'])) { - switch ($indexData['TYPE']) { - case 'primary': - $indexType = 'PRIMARY KEY'; - unset($indexData['INDEX_NAME']); - break; - default: - $indexType = strtoupper($indexData['TYPE']); - break; - } - } else { - $indexType = 'KEY'; - } - - $columns = array(); - foreach ($indexData['COLUMNS'] as $columnData) { - $column = $this->quoteIdentifier($columnData['NAME']); - if (!empty($columnData['SIZE'])) { - $column .= sprintf('(%d)', $columnData['SIZE']); - } - $columns[] = $column; - } - $indexName = isset($indexData['INDEX_NAME']) - ? $this->getPlatform()->quoteIdentifier($indexData['INDEX_NAME']) - : ''; - $definition[] = sprintf( - ' %s %s (%s)', - $indexType, - $indexName, - implode(', ', $columns) - ); - } - } - - return $definition; - } - - /** - * Retrieve table foreign keys definition array for create table - * - * @param Table $table - * @return string[] - */ - protected function _getForeignKeysDefinition(Table $table) - { - $definition = array(); - $relations = $table->getForeignKeys(); - - if (!empty($relations)) { - foreach ($relations as $fkData) { - $onDelete = $this->_getDdlAction($fkData['ON_DELETE']); - $onUpdate = $this->_getDdlAction($fkData['ON_UPDATE']); - - $definition[] = sprintf( - ' CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s) ON DELETE %s ON UPDATE %s', - $this->quoteIdentifier($fkData['FK_NAME']), - $this->quoteIdentifier($fkData['COLUMN_NAME']), - $this->quoteIdentifier($fkData['REF_TABLE_NAME']), - $this->quoteIdentifier($fkData['REF_COLUMN_NAME']), - $onDelete, - $onUpdate - ); - } - } - - return $definition; - } - - /** - * Retrieve table options definition array for create table - * - * @param Table $table - * @return string[] - * @throws ErrorException - */ - protected function _getOptionsDefinition(Table $table) - { - $definition = array(); - $comment = $table->getComment(); - if (empty($comment)) { - throw new ErrorException('Comment for table is required and must be defined'); - } - $definition[] = $this->quoteInto('COMMENT=?', $comment); - - $tableProps = array( - 'type' => 'ENGINE=%s', - 'checksum' => 'CHECKSUM=%d', - 'auto_increment' => 'AUTO_INCREMENT=%d', - 'avg_row_length' => 'AVG_ROW_LENGTH=%d', - 'max_rows' => 'MAX_ROWS=%d', - 'min_rows' => 'MIN_ROWS=%d', - 'delay_key_write' => 'DELAY_KEY_WRITE=%d', - 'row_format' => 'row_format=%s', - 'charset' => 'charset=%s', - 'collate' => 'COLLATE=%s' - ); - foreach ($tableProps as $key => $mask) { - $v = $table->getOption($key); - if ($v !== null) { - $definition[] = sprintf($mask, $v); - } - } - - return $definition; - } - - /** - * Get column definition from description - * - * @param array $options - * @param null|string $ddlType - * @return string - */ - public function getColumnDefinitionFromDescribe($options, $ddlType = null) - { - $columnInfo = $this->getColumnCreateByDescribe($options); - foreach ($columnInfo['options'] as $key => $value) { - $columnInfo[$key] = $value; - } - return $this->_getColumnDefinition($columnInfo, $ddlType); - } - - /** - * Retrieve column definition fragment - * - * @param array $options - * @param string $ddlType Table DDL Column type constant - * @return string - * @throws ErrorException - */ - protected function _getColumnDefinition($options, $ddlType = null) - { - // convert keys to uppercase - $options = array_change_key_case($options, CASE_UPPER); - $cType = null; - $cUnsigned = false; - $cNullable = true; - $cDefault = false; - $cIdentity = false; - - // detect and validate column type - if ($ddlType === null) { - $ddlType = $this->_getDdlType($options); - } - - if (empty($ddlType) || !isset($this->_ddlColumnTypes[$ddlType])) { - throw new ErrorException('Invalid column definition data'); - } - - // column size - $cType = $this->_ddlColumnTypes[$ddlType]; - switch ($ddlType) { - case Table::TYPE_SMALLINT: - case Table::TYPE_INTEGER: - case Table::TYPE_BIGINT: - if (!empty($options['UNSIGNED'])) { - $cUnsigned = true; - } - break; - case Table::TYPE_DECIMAL: - case Table::TYPE_NUMERIC: - $precision = 10; - $scale = 0; - $match = array(); - if (!empty($options['LENGTH']) && preg_match('#^\(?(\d+),(\d+)\)?$#', $options['LENGTH'], $match)) { - $precision = $match[1]; - $scale = $match[2]; - } else { - if (isset($options['SCALE']) && is_numeric($options['SCALE'])) { - $scale = $options['SCALE']; - } - if (isset($options['PRECISION']) && is_numeric($options['PRECISION'])) { - $precision = $options['PRECISION']; - } - } - $cType .= sprintf('(%d,%d)', $precision, $scale); - break; - case Table::TYPE_TEXT: - case Table::TYPE_BLOB: - case Table::TYPE_VARBINARY: - if (empty($options['LENGTH'])) { - $length = Table::DEFAULT_TEXT_SIZE; - } else { - $length = $this->_parseTextSize($options['LENGTH']); - } - if ($length <= 255) { - $cType = $ddlType == Table::TYPE_TEXT ? 'varchar' : 'varbinary'; - $cType = sprintf('%s(%d)', $cType, $length); - } elseif ($length > 255 && $length <= 65536) { - $cType = $ddlType == Table::TYPE_TEXT ? 'text' : 'blob'; - } elseif ($length > 65536 && $length <= 16777216) { - $cType = $ddlType == Table::TYPE_TEXT ? 'mediumtext' : 'mediumblob'; - } else { - $cType = $ddlType == Table::TYPE_TEXT ? 'longtext' : 'longblob'; - } - break; - } - - if (array_key_exists('DEFAULT', $options)) { - $cDefault = $options['DEFAULT']; - } - if (array_key_exists('NULLABLE', $options)) { - $cNullable = (bool)$options['NULLABLE']; - } - if (!empty($options['IDENTITY']) || !empty($options['AUTO_INCREMENT'])) { - $cIdentity = true; - } - - /* For cases when tables created from createTableByDdl() - * where default value can be quoted already. - * We need to avoid "double-quoting" here - */ - if ($cDefault !== null && strlen($cDefault)) { - $cDefault = $this->quote(str_replace("'", '', $cDefault)); - } - - // prepare default value string - if ($ddlType == Table::TYPE_TIMESTAMP) { - if ($cDefault === null) { - $cDefault = new Expression('NULL'); - } elseif (Table::TIMESTAMP_INIT == $cDefault) { - $cDefault = new Expression('CURRENT_TIMESTAMP'); - } elseif ($cDefault == Table::TIMESTAMP_UPDATE) { - $cDefault = new Expression('0 ON UPDATE CURRENT_TIMESTAMP'); - } elseif ($cDefault == Table::TIMESTAMP_INIT_UPDATE) { - $cDefault = new Expression('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'); - } elseif ($cNullable && !$cDefault) { - $cDefault = new Expression('NULL'); - } else { - $cDefault = false; - } - } elseif (is_null($cDefault) && $cNullable) { - $cDefault = new Expression('NULL'); - } - - if (empty($options['COMMENT'])) { - $comment = ''; - } else { - $comment = $options['COMMENT']; - } - - //set column position - $after = null; - if (!empty($options['AFTER'])) { - $after = $options['AFTER']; - } - - if ($cDefault instanceof \Zend\Db\Sql\Expression) { - $cDefault = $cDefault->getExpression(); - } - - return sprintf( - '%s%s%s%s%s COMMENT %s %s', - $cType, - $cUnsigned ? ' UNSIGNED' : '', - $cNullable ? ' NULL' : ' NOT NULL', - $cDefault !== false ? ' default ' . $cDefault : '', - $cIdentity ? ' auto_increment' : '', - $this->quote($comment), - $after ? 'AFTER ' . $this->quoteIdentifier($after) : '' - ); - } - - /** - * Drop table from database - * - * @param string $tableName - * @param string $schemaName - * @return true - */ - public function dropTable($tableName, $schemaName = null) - { - $table = $this->getPlatform()->quoteIdentifierChain($tableName); - $query = 'DROP TABLE IF EXISTS ' . $table; - $this->query($query); - - return true; - } - - /** - * Drop temporary table from database - * - * @param string $tableName - * @param string $schemaName - * @return boolean - */ - public function dropTemporaryTable($tableName, $schemaName = null) - { - $table = $this->getPlatform()->quoteIdentifierChain($tableName); - $query = 'DROP TEMPORARY TABLE IF EXISTS ' . $table; - $this->query($query); - - return true; - } - - /** - * Truncate a table - * - * @param string $tableName - * @param string $schemaName - * @return $this - * @throws ErrorException - */ - public function truncateTable($tableName, $schemaName = null) - { - if (!$this->isTableExists($tableName, $schemaName)) { - throw new ErrorException(sprintf('Table "%s" is not exists', $tableName)); - } - - $table = $this->quoteIdentifier($this->_getTableName($tableName, $schemaName)); - $query = 'TRUNCATE TABLE ' . $table; - $this->query($query); - - return $this; - } - - /** - * Check is a table exists - * - * @param string $tableName - * @param string $schemaName - * @return bool - */ - public function isTableExists($tableName, $schemaName = null) - { - return $this->showTableStatus($tableName, $schemaName) !== false; - } - - /** - * Rename table - * - * @param string $oldTableName - * @param string $newTableName - * @param string $schemaName - * @return true - * @throws ErrorException - */ - public function renameTable($oldTableName, $newTableName, $schemaName = null) - { - if (!$this->isTableExists($oldTableName, $schemaName)) { - throw new ErrorException(sprintf('Table "%s" is not exists', $oldTableName)); - } - if ($this->isTableExists($newTableName, $schemaName)) { - throw new ErrorException(sprintf('Table "%s" already exists', $newTableName)); - } - - $oldTable = $this->_getTableName($oldTableName, $schemaName); - $newTable = $this->_getTableName($newTableName, $schemaName); - - $query = sprintf('ALTER TABLE %s RENAME TO %s', $oldTable, $newTable); - $this->query($query); - - return true; - } - - /** - * Add new index to table name - * - * @param string $tableName - * @param string $indexName - * @param string|array $fields the table column name or array of ones - * @param string $indexType the index type - * @param string $schemaName - * @return StatementInterface - * @throws ErrorException - * @throws \Exception - */ - public function addIndex( - $tableName, - $indexName, - $fields, - $indexType = AdapterInterface::INDEX_TYPE_INDEX, - $schemaName = null - ) { - $columns = $this->describeTable($tableName, $schemaName); - $keyList = $this->getIndexList($tableName, $schemaName); - - $query = sprintf('ALTER TABLE %s', $this->getPlatform()->quoteIdentifierChain($tableName)); - if (isset($keyList[strtoupper($indexName)])) { - if ($keyList[strtoupper($indexName)]['INDEX_TYPE'] == AdapterInterface::INDEX_TYPE_PRIMARY) { - $query .= ' DROP PRIMARY KEY,'; - } else { - $query .= sprintf(' DROP INDEX %s,', $this->quoteIdentifier($indexName)); - } - } - - if (!is_array($fields)) { - $fields = array($fields); - } - - $fieldSql = array(); - foreach ($fields as $field) { - if (!isset($columns[$field])) { - $msg = sprintf( - 'There is no field "%s" that you are trying to create an index on "%s"', - $field, - $tableName - ); - throw new ErrorException($msg); - } - $fieldSql[] = $this->quoteIdentifier($field); - } - $fieldSql = implode(',', $fieldSql); - - switch (strtolower($indexType)) { - case AdapterInterface::INDEX_TYPE_PRIMARY: - $condition = 'PRIMARY KEY'; - break; - case AdapterInterface::INDEX_TYPE_UNIQUE: - $condition = 'UNIQUE ' . $this->quoteIdentifier($indexName); - break; - case AdapterInterface::INDEX_TYPE_FULLTEXT: - $condition = 'FULLTEXT ' . $this->quoteIdentifier($indexName); - break; - default: - $condition = 'INDEX ' . $this->quoteIdentifier($indexName); - break; - } - - $query .= sprintf(' ADD %s (%s)', $condition, $fieldSql); - - $cycle = true; - while ($cycle === true) { - try { - $result = $this->rawQuery($query); - $cycle = false; - } catch (\Exception $e) { - if (in_array(strtolower($indexType), array('primary', 'unique'))) { - $match = array(); - if (preg_match('#SQLSTATE\[23000\]: [^:]+: 1062[^\']+\'([\d-\.]+)\'#', $e->getMessage(), $match)) { - $ids = explode('-', $match[1]); - $this->_removeDuplicateEntry($tableName, $fields, $ids); - continue; - } - } - throw $e; - } - } - - return $result; - } - - /** - * Drop the index from table - * - * @param string $tableName - * @param string $keyName - * @param string $schemaName - * @return true|StatementInterface - */ - public function dropIndex($tableName, $keyName, $schemaName = null) - { - $indexList = $this->getIndexList($tableName, $schemaName); - $keyName = strtoupper($keyName); - if (!isset($indexList[$keyName])) { - return true; - } - - if ($keyName == 'PRIMARY') { - $cond = 'DROP PRIMARY KEY'; - } else { - $cond = 'DROP KEY ' . $this->quoteIdentifier($indexList[$keyName]['KEY_NAME']); - } - $sql = sprintf( - 'ALTER TABLE %s %s', - $this->getPlatform()->quoteIdentifierChain($tableName), - $cond - ); - - return $this->rawQuery($sql); - } - - /** - * Add new Foreign Key to table - * If Foreign Key with same name is exist - it will be deleted - * - * @param string $fkName - * @param string $tableName - * @param string $columnName - * @param string $refTableName - * @param string $refColumnName - * @param string $onDelete - * @param string $onUpdate - * @param bool $purge trying remove invalid data - * @param string $schemaName - * @param string $refSchemaName - * @return StatementInterface - */ - public function addForeignKey( - $fkName, - $tableName, - $columnName, - $refTableName, - $refColumnName, - $onDelete = AdapterInterface::FK_ACTION_CASCADE, - $onUpdate = AdapterInterface::FK_ACTION_CASCADE, - $purge = false, - $schemaName = null, - $refSchemaName = null - ) { - $this->dropForeignKey($tableName, $fkName, $schemaName); - - if ($purge) { - $this->purgeOrphanRecords($tableName, $columnName, $refTableName, $refColumnName, $onDelete); - } - - $query = sprintf( - 'ALTER TABLE %s ADD CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s)', - $this->getPlatform()->quoteIdentifierChain($tableName), - $this->quoteIdentifier($fkName), - $this->quoteIdentifier($columnName), - $this->getPlatform()->quoteIdentifierChain($refTableName), - $this->quoteIdentifier($refColumnName) - ); - - if ($onDelete !== null) { - $query .= ' ON DELETE ' . strtoupper($onDelete); - } - if ($onUpdate !== null) { - $query .= ' ON UPDATE ' . strtoupper($onUpdate); - } - - $result = $this->rawQuery($query); - return $result; - } - - /** - * Run additional environment before setup - * - * @return $this - */ - public function startSetup() - { - $this->rawQuery("SET SQL_MODE=''"); - $this->rawQuery("SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0"); - $this->rawQuery("SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'"); - - return $this; - } - - /** - * Run additional environment after setup - * - * @return $this - */ - public function endSetup() - { - $this->rawQuery("SET SQL_MODE=IFNULL(@OLD_SQL_MODE,'')"); - $this->rawQuery("SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS=0, 0, 1)"); - - return $this; - } - - /** - * Build SQL statement for condition - * - * If $condition integer or string - exact value will be filtered ('eq' condition) - * - * If $condition is array is - one of the following structures is expected: - * - array("from" => $fromValue, "to" => $toValue) - * - array("eq" => $equalValue) - * - array("neq" => $notEqualValue) - * - array("like" => $likeValue) - * - array("in" => array($inValues)) - * - array("nin" => array($notInValues)) - * - array("notnull" => $valueIsNotNull) - * - array("null" => $valueIsNull) - * - array("gt" => $greaterValue) - * - array("lt" => $lessValue) - * - array("gteq" => $greaterOrEqualValue) - * - array("lteq" => $lessOrEqualValue) - * - array("finset" => $valueInSet) - * - array("regexp" => $regularExpression) - * - array("seq" => $stringValue) - * - array("sneq" => $stringValue) - * - * If non matched - sequential array is expected and OR conditions - * will be built using above mentioned structure - * - * @param string $fieldName - * @param integer|string|array $condition - * @return string - */ - public function prepareSqlCondition($fieldName, $condition) - { - $conditionKeyMap = array( - 'eq' => "{{fieldName}} = ?", - 'neq' => "{{fieldName}} != ?", - 'like' => "{{fieldName}} LIKE ?", - 'nlike' => "{{fieldName}} NOT LIKE ?", - 'in' => "{{fieldName}} IN(?)", - 'nin' => "{{fieldName}} NOT IN(?)", - 'is' => "{{fieldName}} IS ?", - 'notnull' => "{{fieldName}} IS NOT NULL", - 'null' => "{{fieldName}} IS NULL", - 'gt' => "{{fieldName}} > ?", - 'lt' => "{{fieldName}} < ?", - 'gteq' => "{{fieldName}} >= ?", - 'lteq' => "{{fieldName}} <= ?", - 'finset' => "FIND_IN_SET(?, {{fieldName}})", - 'regexp' => "{{fieldName}} REGEXP ?", - 'from' => "{{fieldName}} >= ?", - 'to' => "{{fieldName}} <= ?", - 'seq' => null, - 'sneq' => null - ); - - $query = ''; - if (is_array($condition)) { - if (isset($condition['field_expr'])) { - $fieldName = str_replace('#?', $this->quoteIdentifier($fieldName), $condition['field_expr']); - unset($condition['field_expr']); - } - $key = key(array_intersect_key($condition, $conditionKeyMap)); - - if (isset($condition['from']) || isset($condition['to'])) { - if (isset($condition['from'])) { - $from = $this->_prepareSqlDateCondition($condition, 'from'); - $query = $this->_prepareQuotedSqlCondition($conditionKeyMap['from'], $from, $fieldName); - } - - if (isset($condition['to'])) { - $query .= empty($query) ? '' : ' AND '; - $to = $this->_prepareSqlDateCondition($condition, 'to'); - $query = $this->_prepareQuotedSqlCondition($query . $conditionKeyMap['to'], $to, $fieldName); - } - } elseif (array_key_exists($key, $conditionKeyMap)) { - $value = $condition[$key]; - if (($key == 'seq') || ($key == 'sneq')) { - $key = $this->_transformStringSqlCondition($key, $value); - } - $query = $this->_prepareQuotedSqlCondition($conditionKeyMap[$key], $value, $fieldName); - } else { - $queries = array(); - foreach ($condition as $orCondition) { - $queries[] = sprintf('(%s)', $this->prepareSqlCondition($fieldName, $orCondition)); - } - - $query = sprintf('(%s)', implode(' OR ', $queries)); - } - } else { - $query = $this->_prepareQuotedSqlCondition($conditionKeyMap['eq'], (string)$condition, $fieldName); - } - - return $query; - } - - /** - * Prepare Sql condition - * - * @param string $text Condition value - * @param mixed $value - * @param string $fieldName - * @return string - */ - protected function _prepareQuotedSqlCondition($text, $value, $fieldName) - { - $sql = $this->quoteInto($text, $value); - $sql = str_replace('{{fieldName}}', $fieldName, $sql); - return $sql; - } - - /** - * Transforms sql condition key 'seq' / 'sneq' that is used for comparing string values to its analog: - * - 'null' / 'notnull' for empty strings - * - 'eq' / 'neq' for non-empty strings - * - * @param string $conditionKey - * @param mixed $value - * @return string - */ - protected function _transformStringSqlCondition($conditionKey, $value) - { - $value = (string) $value; - if ($value == '') { - return ($conditionKey == 'seq') ? 'null' : 'notnull'; - } else { - return ($conditionKey == 'seq') ? 'eq' : 'neq'; - } - } - - /** - * Get Interval Unit SQL fragment - * - * @param int $interval - * @param string $unit - * @return string - * @throws ErrorException - */ - protected function _getIntervalUnitSql($interval, $unit) - { - if (!isset($this->_intervalUnits[$unit])) { - throw new ErrorException(sprintf('Undefined interval unit "%s" specified', $unit)); - } - - return sprintf('INTERVAL %d %s', $interval, $this->_intervalUnits[$unit]); - } - - /** - * Add time values (intervals) to a date value - * - * @param \Zend_Db_Expr|string $date quoted field name or SQL statement - * @param int $interval - * @param string $unit - * @return \Zend_Db_Expr - * - * @see INTERVAL_* constants for $unit - */ - public function getDateAddSql($date, $interval, $unit) - { - $expr = sprintf('DATE_ADD(%s, %s)', $date, $this->_getIntervalUnitSql($interval, $unit)); - return new Expression($expr); - } - - /** - * Subtract time values (intervals) to a date value - * - * @param \Zend_Db_Expr|string $date quoted field name or SQL statement - * @param int|string $interval - * @param string $unit - * @return \Zend_Db_Expr - * @see INTERVAL_* constants for $expr - */ - public function getDateSubSql($date, $interval, $unit) - { - $expr = sprintf('DATE_SUB(%s, %s)', $date, $this->_getIntervalUnitSql($interval, $unit)); - return new Expression($expr); - } - - /** - * Minus superfluous characters from hash. - * - * @param string $hash - * @param string $prefix - * @param int $maxCharacters - * @return string - */ - protected function _minusSuperfluous($hash, $prefix, $maxCharacters) - { - $diff = strlen($hash) + strlen($prefix) - $maxCharacters; - $superfluous = $diff / 2; - $odd = $diff % 2; - $hash = substr($hash, $superfluous, - ($superfluous + $odd)); - return $hash; - } - - /** - * Retrieve valid table name - * Check table name length and allowed symbols - * - * @param string $tableName - * @return string - */ - public function getTableName($tableName) - { - $prefix = 't_'; - if (strlen($tableName) > self::LENGTH_TABLE_NAME) { - $shortName = ExpressionConverter::shortName($tableName); - if (strlen($shortName) > self::LENGTH_TABLE_NAME) { - $hash = md5($tableName); - if (strlen($prefix.$hash) > self::LENGTH_TABLE_NAME) { - $tableName = $this->_minusSuperfluous($hash, $prefix, self::LENGTH_TABLE_NAME); - } else { - $tableName = $prefix . $hash; - } - } else { - $tableName = $shortName; - } - } - - return $tableName; - } - - /** - * Retrieve valid index name - * Check index name length and allowed symbols - * - * @param string $tableName - * @param string|string[] $fields the columns list - * @param string $indexType - * @return string - */ - public function getIndexName($tableName, $fields, $indexType = '') - { - if (is_array($fields)) { - $fields = implode('_', $fields); - } - - switch (strtolower($indexType)) { - case AdapterInterface::INDEX_TYPE_UNIQUE: - $prefix = 'unq_'; - $shortPrefix = 'u_'; - break; - case AdapterInterface::INDEX_TYPE_FULLTEXT: - $prefix = 'fti_'; - $shortPrefix = 'f_'; - break; - case AdapterInterface::INDEX_TYPE_INDEX: - default: - $prefix = 'idx_'; - $shortPrefix = 'i_'; - } - - $hash = $tableName . '_' . $fields; - - if (strlen($hash) + strlen($prefix) > self::LENGTH_INDEX_NAME) { - $short = ExpressionConverter::shortName($prefix . $hash); - if (strlen($short) > self::LENGTH_INDEX_NAME) { - $hash = md5($hash); - if (strlen($hash) + strlen($shortPrefix) > self::LENGTH_INDEX_NAME) { - $hash = $this->_minusSuperfluous($hash, $shortPrefix, self::LENGTH_INDEX_NAME); - } - } else { - $hash = $short; - } - } else { - $hash = $prefix . $hash; - } - - return strtoupper($hash); - } - - /** - * Retrieve valid foreign key name - * Check foreign key name length and allowed symbols - * - * @param string $priTableName - * @param string $priColumnName - * @param string $refTableName - * @param string $refColumnName - * @return string - */ - public function getForeignKeyName($priTableName, $priColumnName, $refTableName, $refColumnName) - { - $prefix = 'fk_'; - $hash = sprintf('%s_%s_%s_%s', $priTableName, $priColumnName, $refTableName, $refColumnName); - if (strlen($prefix.$hash) > self::LENGTH_FOREIGN_NAME) { - $short = ExpressionConverter::shortName($prefix . $hash); - if (strlen($short) > self::LENGTH_FOREIGN_NAME) { - $hash = md5($hash); - if (strlen($prefix.$hash) > self::LENGTH_FOREIGN_NAME) { - $hash = $this->_minusSuperfluous($hash, $prefix, self::LENGTH_FOREIGN_NAME); - } else { - $hash = $prefix . $hash; - } - } else { - $hash = $short; - } - } else { - $hash = $prefix . $hash; - } - - return strtoupper($hash); - } - - /** - * Stop updating indexes - * - * @param string $tableName - * @param string $schemaName - * @return $this - */ - public function disableTableKeys($tableName, $schemaName = null) - { - $query = sprintf( - 'ALTER TABLE %s DISABLE KEYS', - $this->getPlatform()->quoteIdentifierChain($tableName) - ); - $this->query($query); - - return $this; - } - - /** - * Re-create missing indexes - * - * @param string $tableName - * @param string $schemaName - * @return $this - */ - public function enableTableKeys($tableName, $schemaName = null) - { - $tableName = $this->_getTableName($tableName, $schemaName); - $query = sprintf( - 'ALTER TABLE %s ENABLE KEYS', - $this->getPlatform()->quoteIdentifierChain($tableName) - ); - $this->query($query); - - return $this; - } - - /** - * Calculate checksum for table or for group of tables - * - * @param array|string $tableNames array of tables names | table name - * @param string $schemaName schema name - * @return array - */ - public function getTablesChecksum($tableNames, $schemaName = null) - { - $result = array(); - $tableNames = is_array($tableNames) ? $tableNames : array($tableNames); - - foreach ($tableNames as $tableName) { - $query = 'CHECKSUM TABLE ' . $this->_getTableName($tableName, $schemaName); - $checkSumArray = $this->fetchRow($query); - $result[$tableName] = $checkSumArray['Checksum']; - } - - return $result; - } - - /** - * Render SQL FOR UPDATE clause - * - * @param string $sql - * @return string - */ - public function forUpdate($sql) - { - return sprintf('%s FOR UPDATE', $sql); - } - - /** - * Prepare insert data - * - * @param mixed $row - * @param array &$bind - * @return string - */ - protected function _prepareInsertData($row, &$bind) - { - $row = (array)$row; - $line = array(); - foreach ($row as $value) { - if ($value instanceof \Zend_Db_Expr) { - $line[] = $value->__toString(); - } else { - $line[] = '?'; - $bind[] = $value; - } - } - $line = implode(', ', $line); - - return sprintf('(%s)', $line); - } - - /** - * Return ddl type - * - * @param array $options - * @return string - */ - protected function _getDdlType($options) - { - $ddlType = null; - if (isset($options['TYPE'])) { - $ddlType = $options['TYPE']; - } elseif (isset($options['COLUMN_TYPE'])) { - $ddlType = $options['COLUMN_TYPE']; - } - - return $ddlType; - } - - /** - * Return DDL action - * - * @param string $action - * @return string - */ - protected function _getDdlAction($action) - { - switch ($action) { - case AdapterInterface::FK_ACTION_CASCADE: - return Table::ACTION_CASCADE; - case AdapterInterface::FK_ACTION_SET_NULL: - return Table::ACTION_SET_NULL; - case AdapterInterface::FK_ACTION_RESTRICT: - return Table::ACTION_RESTRICT; - default: - return Table::ACTION_NO_ACTION; - } - } - - /** - * Prepare sql date condition - * - * @param array $condition - * @param string $key - * @return string - */ - protected function _prepareSqlDateCondition($condition, $key) - { - if (empty($condition['date'])) { - if (empty($condition['datetime'])) { - $result = $condition[$key]; - } else { - $result = $this->formatDate($condition[$key]); - } - } else { - $result = $this->formatDate($condition[$key]); - } - - return $result; - } - - /** - * Try to find installed primary key name, if not - formate new one. - * - * @param string $tableName Table name - * @param string $schemaName OPTIONAL - * @return string Primary Key name - */ - public function getPrimaryKeyName($tableName, $schemaName = null) - { - $indexes = $this->getIndexList($tableName, $schemaName); - if (isset($indexes['PRIMARY'])) { - return $indexes['PRIMARY']['KEY_NAME']; - } else { - return 'PK_' . strtoupper($tableName); - } - } - - /** - * Parse text size - * Returns max allowed size if value great it - * - * @param string|int $size - * @return int - */ - protected function _parseTextSize($size) - { - $size = trim($size); - $last = strtolower(substr($size, -1)); - - switch ($last) { - case 'k': - $size = intval($size) * 1024; - break; - case 'm': - $size = intval($size) * 1024 * 1024; - break; - case 'g': - $size = intval($size) * 1024 * 1024 * 1024; - break; - } - - if (empty($size)) { - return Table::DEFAULT_TEXT_SIZE; - } - if ($size >= Table::MAX_TEXT_SIZE) { - return Table::MAX_TEXT_SIZE; - } - - return intval($size); - } - - /** - * Converts fetched blob into raw binary PHP data. - * The MySQL drivers do it nice, no processing required. - * - * @param mixed $value - * @return mixed - */ - public function decodeVarbinary($value) - { - return $value; - } - - /** - * Create trigger - * - * @param \Magento\Setup\Framework\DB\Ddl\Trigger $trigger - * @throws ErrorException - * @return StatementInterface - */ - public function createTrigger(\Magento\Setup\Framework\DB\Ddl\Trigger $trigger) - { - if (!$trigger->getStatements()) { - throw new ErrorException(sprintf(__('Trigger %s has not statements available'), $trigger->getName())); - } - - $statements = implode("\n", $trigger->getStatements()); - - $sql = sprintf( - "CREATE TRIGGER %s %s %s ON %s FOR EACH ROW\nBEGIN\n%s\nEND", - $trigger->getName(), - $trigger->getTime(), - $trigger->getEvent(), - $trigger->getTable(), - $statements - ); - - return $this->query($sql); - } - - /** - * Drop trigger from database - * - * @param string $triggerName - * @param string|null $schemaName - * @return bool - * @throws \InvalidArgumentException - */ - public function dropTrigger($triggerName, $schemaName = null) - { - if (empty($triggerName)) { - throw new \InvalidArgumentException(__('Trigger name is not defined')); - } - - $triggerName = ($schemaName ? $schemaName . '.' : '') . $triggerName; - - $sql = 'DROP TRIGGER IF EXISTS ' . $this->quoteIdentifier($triggerName); - $this->query($sql); - - return true; - } - - /** - * Check if all transactions have been committed - * - * @return void - */ - public function __destruct() - { - if ($this->_transactionLevel > 0) { - trigger_error('Some transactions have not been committed or rolled back', E_USER_ERROR); - } - } - - /** - * Quotes an identifier. - * - * @param array|string|\Zend_Db_Expr $ident - * @param bool $auto - * @return string - */ - public function quoteIdentifier($ident, $auto = false) - { - return $this->getPlatform()->quoteIdentifier($ident); - } - - /** - * Safely quotes a value for an SQL statement. - * - * If an array is passed as the value, the array values are quoted - * and then returned as a comma-separated string. - * - * @param mixed $value The value to quote. - * @param mixed $type OPTIONAL the SQL datatype name, or constant, or null. - * @return mixed An SQL-safe quoted value (or string of separated values). - */ - public function quote($value, $type = null) - { - return $this->getPlatform()->quoteValueList($value); - } - - /** - * Deletes table rows based on a WHERE clause. - * - * @param mixed $table The table to update. - * @param mixed $where DELETE WHERE clause(s). - * @return int The number of affected rows. - */ - public function delete($table, $where = '') - { - $sql = new Sql($this); - $delete = $sql->delete($this->_getTableName($table)); - $delete->where($where); - - $sqlString = $sql->getSqlStringForSqlObject($delete); - $result = $this->query($sqlString); - return $result->count(); - } - - /** - * Updates table rows with specified data based on a WHERE clause. - * - * @param mixed $table The table to update. - * @param array $bind Column-value pairs. - * @param mixed $where UPDATE WHERE clause(s). - * @return int The number of affected rows. - */ - public function update($table, array $bind, $where = '') - { - $sql = new Sql($this); - $update = $sql->update($this->_getTableName($table)); - $update->where($where); - $update->set($bind); - $updateString = $sql->getSqlStringForSqlObject($update); - $result = $this->query($updateString); - return $result->count(); - } - - /** - * Inserts a table row with specified data. - * - * @param mixed $table The table to insert data into. - * @param array $bind Column-value pairs. - * @param boolean $onDuplicate - * @return int The number of affected rows. - */ - public function insert($table, array $bind, $onDuplicate = false) - { - $sql = new Sql($this); - $insert = $sql->insert($this->_getTableName($table)); - $insert->values($bind); - - $sqlString = $sql->getSqlStringForSqlObject($insert); - if ($onDuplicate) { - $sqlString .= ' ON DUPLICATE KEY UPDATE '; - $parts = []; - foreach (array_keys($bind) as $filed) { - $parts[] = $this->quoteIdentifier($filed) . '=VALUES(' . $this->quoteIdentifier($filed) . ')'; - } - $sqlString .= implode(', ', $parts); - } - - $result = $this->query($sqlString); - return $result->count(); - } -} diff --git a/setup/module/Magento/Setup/src/Framework/DB/Ddl/Table.php b/setup/module/Magento/Setup/src/Framework/DB/Ddl/Table.php deleted file mode 100644 index 983f0b413b77f4ac32a7077f4af29a41e2ef401f..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Setup/src/Framework/DB/Ddl/Table.php +++ /dev/null @@ -1,685 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * Data Definition for table - * - * @author Magento Core Team <core@magentocommerce.com> - */ -namespace Magento\Setup\Framework\DB\Ddl; - -use Magento\Setup\Framework\DB\Adapter\AdapterInterface; -use Zend\Db\Exception\ErrorException; - -class Table -{ - /** - * Types of columns - */ - const TYPE_BOOLEAN = 'boolean'; - - const TYPE_SMALLINT = 'smallint'; - - const TYPE_INTEGER = 'integer'; - - const TYPE_BIGINT = 'bigint'; - - const TYPE_FLOAT = 'float'; - - const TYPE_NUMERIC = 'numeric'; - - const TYPE_DECIMAL = 'decimal'; - - const TYPE_DATE = 'date'; - - const TYPE_TIMESTAMP = 'timestamp'; - - // Capable to support date-time from 1970 + auto-triggers in some RDBMS - const TYPE_DATETIME = 'datetime'; - - // Capable to support long date-time before 1970 - const TYPE_TEXT = 'text'; - - const TYPE_BLOB = 'blob'; - - // Used for back compatibility, when query param can't use statement options - const TYPE_VARBINARY = 'varbinary'; - - // A real blob, stored as binary inside DB - - /** - * Default and maximal TEXT and BLOB columns sizes we can support for different DB systems. - */ - const DEFAULT_TEXT_SIZE = 1024; - - const MAX_TEXT_SIZE = 2147483648; - - const MAX_VARBINARY_SIZE = 2147483648; - - /** - * Default values for timestampses - fill with current timestamp on inserting record, on changing and both cases - */ - const TIMESTAMP_INIT_UPDATE = 'TIMESTAMP_INIT_UPDATE'; - - const TIMESTAMP_INIT = 'TIMESTAMP_INIT'; - - const TIMESTAMP_UPDATE = 'TIMESTAMP_UPDATE'; - - /** - * Actions used for foreign keys - */ - const ACTION_CASCADE = 'CASCADE'; - - const ACTION_SET_NULL = 'SET NULL'; - - const ACTION_NO_ACTION = 'NO ACTION'; - - const ACTION_RESTRICT = 'RESTRICT'; - - const ACTION_SET_DEFAULT = 'SET DEFAULT'; - - /** - * Name of table - * - * @var string - */ - protected $_tableName; - - /** - * Schema name - * - * @var string - */ - protected $_schemaName; - - /** - * Comment for Table - * - * @var string - */ - protected $_tableComment; - - /** - * Column descriptions for a table - * - * Is an associative array keyed by the uppercase column name - * The value of each array element is an associative array - * with the following keys: - * - * COLUMN_NAME => string; column name - * COLUMN_POSITION => number; ordinal position of column in table - * DATA_TYPE => string; constant datatype of column - * DEFAULT => string; default expression of column, null if none - * NULLABLE => boolean; true if column can have nulls - * LENGTH => number; length of CHAR/VARCHAR/INT - * SCALE => number; scale of NUMERIC/DECIMAL - * PRECISION => number; precision of NUMERIC/DECIMAL - * UNSIGNED => boolean; unsigned property of an integer type - * PRIMARY => boolean; true if column is part of the primary key - * PRIMARY_POSITION => integer; position of column in primary key - * IDENTITY => integer; true if column is auto-generated with unique values - * COMMENT => string; column description - * - * @var array - */ - protected $_columns = array(); - - /** - * Index descriptions for a table - * - * Is an associative array keyed by the uppercase index name - * The value of each array element is an associative array - * with the following keys: - * - * INDEX_NAME => string; index name - * COLUMNS => array; array of index columns - * TYPE => string; Optional special index type - * - * COLUMNS is an associative array keyed by the uppercase column name - * The value of each COLUMNS array element is an associative array - * with the following keys: - * - * NAME => string; The column name - * SIZE => int|null; Length of index column (always null if index is unique) - * POSITION => int; Position in index - * - * @var array - */ - protected $_indexes = array(); - - /** - * Foreign key descriptions for a table - * - * Is an associative array keyed by the uppercase foreign key name - * The value of each array element is an associative array - * with the following keys: - * - * FK_NAME => string; The foreign key name - * COLUMN_NAME => string; The column name in table - * REF_TABLE_NAME => string; Reference table name - * REF_COLUMN_NAME => string; Reference table column name - * ON_DELETE => string; Integrity Actions, default NO ACTION - * ON_UPDATE => string; Integrity Actions, default NO ACTION - * - * Valid Integrity Actions: - * CASCADE | SET NULL | NONE | RESTRICT | SET DEFAULT - * - * @var array - */ - protected $_foreignKeys = array(); - - /** - * Additional table options - * - * @var array - */ - protected $_options = array('type' => 'INNODB', 'charset' => 'utf8', 'collate' => 'utf8_general_ci'); - - /** - * Set table name - * - * @param string $name - * @return $this - */ - public function setName($name) - { - $this->_tableName = $name; - if ($this->_tableComment === null) { - $this->_tableComment = $name; - } - return $this; - } - - /** - * Set schema name - * - * @param string $name - * @return $this - */ - public function setSchema($name) - { - $this->_schemaName = $name; - return $this; - } - - /** - * Set comment for table - * - * @param string $comment - * @return $this - */ - public function setComment($comment) - { - $this->_tableComment = $comment; - return $this; - } - - /** - * Retrieve name of table - * - * @return string - * @throws ErrorException - */ - public function getName() - { - if (is_null($this->_tableName)) { - throw new ErrorException('Table name is not defined'); - } - return $this->_tableName; - } - - /** - * Get schema name - * - * @return string|null - */ - public function getSchema() - { - return $this->_schemaName; - } - - /** - * Return comment for table - * - * @return string - */ - public function getComment() - { - return $this->_tableComment; - } - - /** - * Adds column to table. - * - * $options contains additional options for columns. Supported values are: - * - 'unsigned', for number types only. Default: FALSE. - * - 'precision', for numeric and decimal only. Default: taken from $size, if not set there then 0. - * - 'scale', for numeric and decimal only. Default: taken from $size, if not set there then 10. - * - 'default'. Default: not set. - * - 'nullable'. Default: TRUE. - * - 'primary', add column to primary index. Default: do not add. - * - 'primary_position', only for column in primary index. Default: count of primary columns + 1. - * - 'identity' or 'auto_increment'. Default: FALSE. - * - * @param string $name the column name - * @param string $type the column data type - * @param string|int|array $size the column length - * @param array $options array of additional options - * @param string $comment column description - * @return $this - * @throws \Zend\Db\Exception\ExceptionInterface - */ - public function addColumn($name, $type, $size = null, $options = array(), $comment = null) - { - $position = count($this->_columns); - $default = false; - $nullable = true; - $length = null; - $scale = null; - $precision = null; - $unsigned = false; - $primary = false; - $primaryPosition = 0; - $identity = false; - - // Prepare different properties - switch ($type) { - case self::TYPE_BOOLEAN: - break; - - case self::TYPE_SMALLINT: - case self::TYPE_INTEGER: - case self::TYPE_BIGINT: - if (!empty($options['unsigned'])) { - $unsigned = true; - } - - break; - - case self::TYPE_FLOAT: - if (!empty($options['unsigned'])) { - $unsigned = true; - } - break; - - case self::TYPE_DECIMAL: - case self::TYPE_NUMERIC: - $match = array(); - $scale = 10; - $precision = 0; - // parse size value - if (is_array($size)) { - if (count($size) == 2) { - $size = array_values($size); - $precision = $size[0]; - $scale = $size[1]; - } - } elseif (preg_match('#^(\d+),(\d+)$#', $size, $match)) { - $precision = $match[1]; - $scale = $match[2]; - } - // check options - if (isset($options['precision'])) { - $precision = $options['precision']; - } - - if (isset($options['scale'])) { - $scale = $options['scale']; - } - - if (!empty($options['unsigned'])) { - $unsigned = true; - } - break; - case self::TYPE_DATE: - case self::TYPE_DATETIME: - case self::TYPE_TIMESTAMP: - break; - case self::TYPE_TEXT: - case self::TYPE_BLOB: - case self::TYPE_VARBINARY: - $length = $size; - break; - default: - throw new ErrorException('Invalid column data type "' . $type . '"'); - } - - if (array_key_exists('default', $options)) { - $default = $options['default']; - } - if (array_key_exists('nullable', $options)) { - $nullable = (bool)$options['nullable']; - } - if (!empty($options['primary'])) { - $primary = true; - if (isset($options['primary_position'])) { - $primaryPosition = (int)$options['primary_position']; - } else { - $primaryPosition = 0; - foreach ($this->_columns as $v) { - if ($v['PRIMARY']) { - $primaryPosition++; - } - } - } - } - if (!empty($options['identity']) || !empty($options['auto_increment'])) { - $identity = true; - } - - if ($comment === null) { - $comment = ucfirst($name); - } - - $upperName = strtoupper($name); - $this->_columns[$upperName] = array( - 'COLUMN_NAME' => $name, - 'COLUMN_TYPE' => $type, - 'COLUMN_POSITION' => $position, - 'DATA_TYPE' => $type, - 'DEFAULT' => $default, - 'NULLABLE' => $nullable, - 'LENGTH' => $length, - 'SCALE' => $scale, - 'PRECISION' => $precision, - 'UNSIGNED' => $unsigned, - 'PRIMARY' => $primary, - 'PRIMARY_POSITION' => $primaryPosition, - 'IDENTITY' => $identity, - 'COMMENT' => $comment - ); - - return $this; - } - - /** - * Add Foreign Key to table - * - * @param string $fkName the foreign key name - * @param string $column the foreign key column name - * @param string $refTable the reference table name - * @param string $refColumn the reference table column name - * @param string $onDelete the action on delete row - * @param string $onUpdate the action on update - * @return $this - * @throws ErrorException - */ - public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete = null, $onUpdate = null) - { - $upperName = strtoupper($fkName); - - // validate column name - if (!isset($this->_columns[strtoupper($column)])) { - throw new ErrorException('Undefined column "' . $column . '"'); - } - - switch ($onDelete) { - case self::ACTION_CASCADE: - case self::ACTION_RESTRICT: - case self::ACTION_SET_DEFAULT: - case self::ACTION_SET_NULL: - break; - default: - $onDelete = self::ACTION_NO_ACTION; - } - - switch ($onUpdate) { - case self::ACTION_CASCADE: - case self::ACTION_RESTRICT: - case self::ACTION_SET_DEFAULT: - case self::ACTION_SET_NULL: - break; - default: - $onUpdate = self::ACTION_NO_ACTION; - } - - $this->_foreignKeys[$upperName] = array( - 'FK_NAME' => $fkName, - 'COLUMN_NAME' => $column, - 'REF_TABLE_NAME' => $refTable, - 'REF_COLUMN_NAME' => $refColumn, - 'ON_DELETE' => $onDelete, - 'ON_UPDATE' => $onUpdate - ); - - return $this; - } - - /** - * Add index to table - * - * @param string $indexName the index name - * @param array|string $fields array of columns or column string - * @param array $options array of additional options - * @return $this - * @throws ErrorException - */ - public function addIndex($indexName, $fields, $options = array()) - { - $idxType = AdapterInterface::INDEX_TYPE_INDEX; - $position = 0; - $columns = array(); - if (!is_array($fields)) { - $fields = array($fields); - } - - foreach ($fields as $columnData) { - $columnSize = null; - $columnPos = $position; - if (is_string($columnData)) { - $columnName = $columnData; - } elseif (is_array($columnData)) { - if (!isset($columnData['name'])) { - throw new ErrorException('Invalid index column data'); - } - - $columnName = $columnData['name']; - if (!empty($columnData['size'])) { - $columnSize = (int)$columnData['size']; - } - if (!empty($columnData['position'])) { - $columnPos = (int)$columnData['position']; - } - } else { - continue; - } - - $columns[strtoupper( - $columnName - )] = array( - 'NAME' => $columnName, - 'SIZE' => $columnSize, - 'POSITION' => $columnPos - ); - - $position++; - } - - if (empty($columns)) { - throw new ErrorException('Columns for index are not defined'); - } - - if (!empty($options['type'])) { - $idxType = $options['type']; - } - - $this->_indexes[strtoupper( - $indexName - )] = array( - 'INDEX_NAME' => $indexName, - 'COLUMNS' => $this->normalizeIndexColumnPosition($columns), - 'TYPE' => $idxType - ); - - return $this; - } - - /** - * Retrieve array of table columns - * - * @param bool $normalized - * @see $this->_columns - * @return array - */ - public function getColumns($normalized = true) - { - if ($normalized) { - return $this->normalizeColumnPosition($this->_columns); - } - return $this->_columns; - } - - /** - * Set column, formatted according to DDL Table format, into columns structure - * - * @param array $column - * @see $this->_columns - * @return $this - */ - public function setColumn($column) - { - $upperName = strtoupper($column['COLUMN_NAME']); - $this->_columns[$upperName] = $column; - return $this; - } - - /** - * Retrieve array of table indexes - * - * @see $this->_indexes - * @return array - */ - public function getIndexes() - { - return $this->_indexes; - } - - /** - * Retrieve array of table foreign keys - * - * @see $this->_foreignKeys - * @return array - */ - public function getForeignKeys() - { - return $this->_foreignKeys; - } - - /** - * Set table option - * - * @param string $key - * @param string $value - * @return $this - */ - public function setOption($key, $value) - { - $this->_options[$key] = $value; - return $this; - } - - /** - * Retrieve table option value by option name - * Return null if option does not exits - * - * @param string $key - * @return null|string - */ - public function getOption($key) - { - if (!isset($this->_options[$key])) { - return null; - } - return $this->_options[$key]; - } - - /** - * Retrieve array of table options - * - * @return array - */ - public function getOptions() - { - return $this->_options; - } - - /** - * Index column position comparison function - * - * @param array $a - * @param array $b - * @return int - */ - protected function sortIndexColumnPosition($a, $b) - { - return $a['POSITION'] - $b['POSITION']; - } - - /** - * table column position comparison function - * - * @param array $a - * @param array $b - * @return int - */ - protected function sortColumnPosition($a, $b) - { - return $a['COLUMN_POSITION'] - $b['COLUMN_POSITION']; - } - - /** - * Normalize positon of index columns array - * - * @param array $columns - * @return array - */ - protected function normalizeIndexColumnPosition($columns) - { - uasort($columns, array($this, 'sortIndexColumnPosition')); - $position = 0; - foreach (array_keys($columns) as $columnId) { - $columns[$columnId]['POSITION'] = $position; - $position++; - } - return $columns; - } - - /** - * Normalize position of table columns array - * - * @param array $columns - * @return array - */ - protected function normalizeColumnPosition($columns) - { - uasort($columns, array($this, 'sortColumnPosition')); - $position = 0; - foreach (array_keys($columns) as $columnId) { - $columns[$columnId]['COLUMN_POSITION'] = $position; - $position++; - } - return $columns; - } -} diff --git a/setup/module/Magento/Setup/src/Framework/DB/Ddl/Trigger.php b/setup/module/Magento/Setup/src/Framework/DB/Ddl/Trigger.php deleted file mode 100644 index 3efc769d5532ff0322865f99c1cb0de7b18308f5..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Setup/src/Framework/DB/Ddl/Trigger.php +++ /dev/null @@ -1,271 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ -namespace Magento\Setup\Framework\DB\Ddl; - -use Zend\Db\Exception\ErrorException; - -class Trigger -{ - /**#@+ - * Trigger times - */ - const TIME_BEFORE = 'BEFORE'; - - const TIME_AFTER = 'AFTER'; - /**#@-*/ - - /**#@+ - * Trigger events - */ - const EVENT_INSERT = 'INSERT'; - - const EVENT_UPDATE = 'UPDATE'; - - const EVENT_DELETE = 'DELETE'; - - /**#@-*/ - - /** - * List of times available for trigger - * - * @var array - */ - protected static $listOfTimes = array(self::TIME_BEFORE, self::TIME_AFTER); - - /** - * List of events available for trigger - * - * @var array - */ - protected static $listOfEvents = array(self::EVENT_INSERT, self::EVENT_UPDATE, self::EVENT_DELETE); - - /** - * Name of trigger - * - * @var string - */ - protected $name; - - /** - * Time of trigger - * - * @var string - */ - protected $time; - - /** - * Time of trigger - * - * @var string - */ - protected $event; - - /** - * Table name - * - * @var string - */ - protected $tableName; - - /** - * List of statements for trigger body - * - * @var array - */ - protected $statements = array(); - - /** - * Set trigger name - * - * @param string $name - * @throws \InvalidArgumentException - * @return Trigger - */ - public function setName($name) - { - if (!is_string($name)) { - throw new \InvalidArgumentException(__('Trigger name should be a string')); - } - - $this->name = strtolower($name); - return $this; - } - - /** - * Retrieve name of trigger - * - * @throws ErrorException - * @return string - */ - public function getName() - { - if (empty($this->name)) { - throw new ErrorException(__('Trigger name is not defined')); - } - return $this->name; - } - - /** - * Set trigger time - * - * @param string $time - * @throws \InvalidArgumentException - * @return Trigger - */ - public function setTime($time) - { - if (in_array($time, self::$listOfTimes)) { - $this->time = strtoupper($time); - } else { - throw new \InvalidArgumentException(__('Trigger unsupported time type')); - } - return $this; - } - - /** - * Retrieve time of trigger - * - * @throws ErrorException - * @return string - */ - public function getTime() - { - if (is_null($this->time)) { - throw new ErrorException(__('Trigger time is not defined')); - } - return $this->time; - } - - /** - * Set trigger event - * - * @param string $event - * @throws \InvalidArgumentException - * @return Trigger - */ - public function setEvent($event) - { - if (in_array($event, self::$listOfEvents)) { - $this->event = strtoupper($event); - } else { - throw new \InvalidArgumentException(__('Trigger unsupported event type')); - } - return $this; - } - - /** - * Retrieve event of trigger - * - * @throws ErrorException - * @return string - */ - public function getEvent() - { - if (is_null($this->event)) { - throw new ErrorException(__('Trigger event is not defined')); - } - return $this->event; - } - - /** - * Set table name - * - * @param string $name - * @throws \InvalidArgumentException - * @return Trigger - */ - public function setTable($name) - { - if (!is_string($name)) { - throw new \InvalidArgumentException(__('Trigger table name should be a string')); - } - $this->tableName = strtolower($name); - return $this; - } - - /** - * Retrieve table name - * - * @throws ErrorException - * @return string - */ - public function getTable() - { - if (empty($this->tableName)) { - throw new ErrorException(__('Trigger table name is not defined')); - } - return $this->tableName; - } - - /** - * Add statement to trigger - * - * @param string $statement - * @throws \InvalidArgumentException - * @return Trigger - */ - public function addStatement($statement) - { - if (!is_string($statement)) { - throw new \InvalidArgumentException(__('Trigger statement should be a string')); - } - - $statement = trim($statement); - $statement = rtrim($statement, ';') . ';'; - - $this->statements[] = $statement; - - return $this; - } - - /** - * Retrieve list of statements of trigger - * - * @return array - */ - public function getStatements() - { - return $this->statements; - } - - /** - * Retrieve list of times available for trigger - * - * @return array - */ - public static function getListOfTimes() - { - return self::$listOfTimes; - } - - /** - * Retrieve list of events available for trigger - * - * @return array - */ - public static function getListOfEvents() - { - return self::$listOfEvents; - } -} diff --git a/setup/module/Magento/Setup/src/Model/AdminAccount.php b/setup/module/Magento/Setup/src/Model/AdminAccount.php index a7640ae756dbbc8c4aff2cffea7d1d3ff0993369..b41246181bf748eaf934c39f35a9d71d379eeef5 100644 --- a/setup/module/Magento/Setup/src/Model/AdminAccount.php +++ b/setup/module/Magento/Setup/src/Model/AdminAccount.php @@ -117,16 +117,16 @@ class AdminAccount 'password' => $this->generatePassword(), 'is_active' => 1, ]; - $resultSet = $this->setup->getConnection()->query( + $result = $this->setup->getConnection()->fetchRow( 'SELECT user_id, username, email FROM ' . $this->setup->getTable('admin_user') . ' ' . 'WHERE username = :username OR email = :email', ['username' => $this->data[self::KEY_USERNAME], 'email' => $this->data[self::KEY_EMAIL]] ); - if ($resultSet->count() > 0) { + if (!empty($result)) { // User exists, update - $this->validateUserMatches($resultSet->current()->username, $resultSet->current()->email); - $adminId = $resultSet->current()->user_id; + $this->validateUserMatches($result['username'], $result['email']); + $adminId = $result['user_id']; $adminData['modified'] = date('Y-m-d H:i:s'); $this->setup->getConnection()->update( $this->setup->getTable('admin_user'), @@ -142,7 +142,7 @@ class AdminAccount $this->setup->getTable('admin_user'), $adminData ); - $adminId = $this->setup->getConnection()->getDriver()->getLastGeneratedValue(); + $adminId = $this->setup->getConnection()->lastInsertId(); } return $adminId; } @@ -185,12 +185,12 @@ class AdminAccount */ private function saveAdminUserRole($adminId) { - $resultSet = $this->setup->getConnection()->query( + $result = $this->setup->getConnection()->fetchRow( 'SELECT * FROM ' . $this->setup->getTable('authorization_role') . ' ' . 'WHERE user_id = :user_id', ['user_id' => $adminId] ); - if ($resultSet->count() < 1) { + if (empty($result)) { // No user role exists for this user id, create it $adminRoleData = [ 'parent_id' => $this->retrieveAdministratorsRoleId(), @@ -221,18 +221,17 @@ class AdminAccount 'user_type' => UserContextInterface::USER_TYPE_ADMIN, 'role_name' => 'Administrators' ]; - - $resultSet = $this->setup->getConnection()->query( + $result = $this->setup->getConnection()->fetchRow( 'SELECT * FROM ' . $this->setup->getTable('authorization_role') . ' ' . 'WHERE parent_id = :parent_id AND tree_level = :tree_level AND role_type = :role_type AND ' . 'user_id = :user_id AND user_type = :user_type AND role_name = :role_name', $administratorsRoleData ); - if ($resultSet->count() < 1) { + if (empty($result)) { throw new \Exception('No Administrators role was found, data fixture needs to be run'); } else { // Found at least one, use first - return $resultSet->current()->role_id; + return $result['role_id']; } } } diff --git a/setup/module/Magento/Setup/src/Model/DirectoryListFactory.php b/setup/module/Magento/Setup/src/Model/DirectoryListFactory.php deleted file mode 100644 index 395253e50d726294987068299587e8d1ad5cb1a2..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Setup/src/Model/DirectoryListFactory.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Setup\Model; - -use Zend\ServiceManager\ServiceLocatorInterface; -use Magento\Config\Config; -use Magento\Config\ConfigFactory; -use Magento\Framework\App\Filesystem\DirectoryList; - -class DirectoryListFactory -{ - /** - * Zend Framework's service locator - * - * @var ServiceLocatorInterface - */ - protected $serviceLocator; - - /** - * @var Config - */ - protected $config; - - /** - * Constructor - * - * @param ServiceLocatorInterface $serviceLocator - * @param ConfigFactory $configFactory - */ - public function __construct( - ServiceLocatorInterface $serviceLocator, - ConfigFactory $configFactory - ) { - $this->serviceLocator = $serviceLocator; - $this->config = $configFactory->create(); - } - - /** - * Factory method for DirectoryList object - * - * @param array $config - * @return DirectoryList - */ - public function create(array $config = array()) - { - return new DirectoryList( - $this->config->getMagentoBasePath(), - $config - ); - } -} diff --git a/setup/module/Magento/Setup/src/Model/FilePermissions.php b/setup/module/Magento/Setup/src/Model/FilePermissions.php index d57af0dec46f7be49e4b00e7155a448f87c9d32a..5da5d56693a7ff18bba0366dfa3eee30ababa7fa 100644 --- a/setup/module/Magento/Setup/src/Model/FilePermissions.php +++ b/setup/module/Magento/Setup/src/Model/FilePermissions.php @@ -29,7 +29,6 @@ use Magento\Framework\Filesystem; class FilePermissions { - /** * @var Filesystem */ @@ -69,15 +68,15 @@ class FilePermissions protected $applicationCurrentNonWritableDirectories = []; /** - * @param FilesystemFactory $filesystemFactory - * @param DirectoryListFactory $directoryListFactory + * @param Filesystem $filesystem + * @param DirectoryList $directoryList */ public function __construct( - FilesystemFactory $filesystemFactory, - DirectoryListFactory $directoryListFactory + Filesystem $filesystem, + DirectoryList $directoryList ) { - $this->filesystem = $filesystemFactory->create(); - $this->directoryList = $directoryListFactory->create(); + $this->filesystem = $filesystem; + $this->directoryList = $directoryList; } /** diff --git a/setup/module/Magento/Setup/src/Model/FilesystemFactory.php b/setup/module/Magento/Setup/src/Model/FilesystemFactory.php deleted file mode 100644 index f9cd4df2b3319f976d9c9fe8f8f7eece250197e2..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Setup/src/Model/FilesystemFactory.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Setup\Model; - -use Zend\ServiceManager\ServiceLocatorInterface; -use Magento\Framework\Filesystem; -use Magento\Framework\Filesystem\File\ReadFactory; - -class FilesystemFactory -{ - /** - * Zend Framework's service locator - * - * @var ServiceLocatorInterface - */ - protected $serviceLocator; - - /** - * Constructor - * - * @param ServiceLocatorInterface $serviceLocator - */ - public function __construct( - ServiceLocatorInterface $serviceLocator - ) { - $this->serviceLocator = $serviceLocator; - } - - /** - * Factory method for Filesystem object - * - * @param ReadFactory $fileReadFactory - * @return Filesystem - */ - public function create(ReadFactory $fileReadFactory = null) - { - return new Filesystem( - $this->serviceLocator->get('Magento\Setup\Model\DirectoryListFactory')->create(), - $this->serviceLocator->get('Magento\Framework\Filesystem\Directory\ReadFactory'), - $this->serviceLocator->get('Magento\Framework\Filesystem\Directory\WriteFactory'), - $fileReadFactory - ); - } -} diff --git a/setup/module/Magento/Setup/src/Model/Installer.php b/setup/module/Magento/Setup/src/Model/Installer.php index 132957b42a237a54d604614c2107f2b4f71d1669..b96772d3ed5dac046fcc945ae750f758e482da52 100644 --- a/setup/module/Magento/Setup/src/Model/Installer.php +++ b/setup/module/Magento/Setup/src/Model/Installer.php @@ -25,8 +25,6 @@ namespace Magento\Setup\Model; use Magento\Setup\Module\Setup\ConfigFactory as DeploymentConfigFactory; -use Magento\Config\ConfigFactory as SystemConfigFactory; -use Magento\Config\Config as SystemConfig; use Magento\Setup\Module\Setup\Config; use Magento\Setup\Module\SetupFactory; use Magento\Setup\Module\ModuleListInterface; @@ -37,6 +35,12 @@ use Zend\Db\Sql\Sql; use Magento\Framework\Shell; use Magento\Framework\Shell\CommandRenderer; use Symfony\Component\Process\PhpExecutableFinder; +use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\App\MaintenanceMode; +use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\FilesystemException; +use Zend\ServiceManager\ServiceLocatorInterface; +use Magento\Setup\Mvc\Bootstrap\InitParamListener; /** * Class Installer contains the logic to install Magento application. @@ -90,11 +94,11 @@ class Installer private $moduleList; /** - * System configuration factory + * List of directories of Magento application * - * @var SystemConfig + * @var DirectoryList */ - private $systemConfig; + private $directoryList; /** * Admin account factory @@ -146,12 +150,33 @@ class Installer private $progress; /** - * Messages + * Maintenance mode handler + * + * @var MaintenanceMode + */ + private $maintenanceMode; + + /** + * Magento filesystem + * + * @var Filesystem + */ + private $filesystem; + + /** + * Informational messages that may appear during installation routine * * @var array */ private $messages = array(); + /** + * A materialized string of initialization parameters to pass on any script that's run externally by this model + * + * @var string + */ + private $execParams; + /** * Constructor * @@ -159,34 +184,43 @@ class Installer * @param DeploymentConfigFactory $deploymentConfigFactory * @param SetupFactory $setupFactory * @param ModuleListInterface $moduleList - * @param SystemConfigFactory $systemConfigFactory + * @param DirectoryList $directoryList * @param AdminAccountFactory $adminAccountFactory * @param LoggerInterface $log * @param Random $random * @param ConnectionFactory $connectionFactory + * @param MaintenanceMode $maintenanceMode + * @param Filesystem $filesystem + * @param ServiceLocatorInterface $serviceManager */ public function __construct( FilePermissions $filePermissions, DeploymentConfigFactory $deploymentConfigFactory, SetupFactory $setupFactory, ModuleListInterface $moduleList, - SystemConfigFactory $systemConfigFactory, + DirectoryList $directoryList, AdminAccountFactory $adminAccountFactory, LoggerInterface $log, Random $random, - ConnectionFactory $connectionFactory + ConnectionFactory $connectionFactory, + MaintenanceMode $maintenanceMode, + Filesystem $filesystem, + ServiceLocatorInterface $serviceManager ) { $this->filePermissions = $filePermissions; $this->deploymentConfigFactory = $deploymentConfigFactory; $this->setupFactory = $setupFactory; $this->moduleList = $moduleList; - $this->systemConfig = $systemConfigFactory->create(); + $this->directoryList = $directoryList; $this->adminAccountFactory = $adminAccountFactory; $this->log = $log; $this->random = $random; $this->connectionFactory = $connectionFactory; $this->shellRenderer = new CommandRenderer; $this->shell = new Shell($this->shellRenderer); + $this->maintenanceMode = $maintenanceMode; + $this->filesystem = $filesystem; + $this->execParams = urldecode(http_build_query($serviceManager->get(InitParamListener::BOOTSTRAP_PARAM))); } /** @@ -199,10 +233,10 @@ class Installer public function install($request) { $script[] = ['File permissions check...', 'checkInstallationFilePermissions', []]; - $script[] = ['Enabling Maintenance Mode:', 'setMaintenanceMode', [1]]; + $script[] = ['Enabling Maintenance Mode...', 'setMaintenanceMode', [1]]; $script[] = ['Installing deployment configuration...', 'installDeploymentConfig', [$request]]; if (!empty($request[self::CLEANUP_DB])) { - $script[] = ['Cleaning up database...', 'cleanupDb', [$request]]; + $script[] = ['Cleaning up database...', 'cleanupDb', []]; } $script[] = ['Installing database schema:', 'installSchema', []]; $script[] = ['Installing user configuration...', 'installUserConfig', [$request]]; @@ -280,7 +314,7 @@ class Installer { $results = $this->filePermissions->getUnnecessaryWritableDirectoriesForApplication(); if ($results) { - $errorMsg = 'Unnecessary writing permissions to the following directories: '; + $errorMsg = 'For security, remove write permissions from these directories: '; foreach ($results as $result) { $errorMsg .= '\'' . $result . '\' '; } @@ -298,8 +332,8 @@ class Installer public function installDeploymentConfig($data) { $data[Config::KEY_DATE] = date('r'); - if (empty($data[config::KEY_ENCRYPTION_KEY])) { - $data[config::KEY_ENCRYPTION_KEY] = md5($this->random->getRandomString(10)); + if (empty($data[Config::KEY_ENCRYPTION_KEY])) { + $data[Config::KEY_ENCRYPTION_KEY] = md5($this->random->getRandomString(10)); } $config = $this->deploymentConfigFactory->create((array)$data); $config->saveToFile(); @@ -339,7 +373,8 @@ class Installer */ public function installDataFixtures() { - $this->exec('-f %s', [$this->systemConfig->getMagentoBasePath() . '/dev/shell/run_data_fixtures.php']); + $params = [$this->directoryList->getRoot() . '/dev/shell/run_data_fixtures.php', $this->execParams]; + $this->exec('-f %s -- --bootstrap=%s', $params); } /** @@ -368,23 +403,19 @@ class Installer // get entity_type_id for order $select = $dbConnection->select() - ->from($setup->getTable('eav_entity_type')) + ->from($setup->getTable('eav_entity_type'), 'entity_type_id') ->where('entity_type_code = \'order\''); - $sql = new Sql($dbConnection); - $selectString = $sql->getSqlStringForSqlObject($select, $dbConnection->getPlatform()); - $statement = $dbConnection->getDriver()->createStatement($selectString); - $selectResult = $statement->execute(); - $entityTypeId = $selectResult->current()['entity_type_id']; + $entityTypeId = $dbConnection->fetchOne($select); // See if row already exists - $resultSet = $dbConnection->query( + $incrementRow = $dbConnection->fetchRow( 'SELECT * FROM ' . $setup->getTable('eav_entity_store') . ' WHERE entity_type_id = ? AND store_id = ?', [$entityTypeId, Store::DISTRO_STORE_ID] ); - if ($resultSet->count() > 0) { + if (!empty($incrementRow)) { // row exists, update it - $entityStoreId = $resultSet->current()->entity_store_id; + $entityStoreId = $incrementRow['entity_store_id']; $dbConnection->update( $setup->getTable('eav_entity_store'), ['increment_prefix' => $orderIncrementPrefix], @@ -414,6 +445,24 @@ class Installer $adminAccount->save(); } + /** + * Uninstall Magento application + * + * @return void + */ + public function uninstall() + { + $this->log->log('Starting Magento uninstallation:'); + + $this->cleanupDb(); + $this->log->log('File system cleanup:'); + $this->deleteDirContents(DirectoryList::VAR_DIR); + $this->deleteDirContents(DirectoryList::STATIC_VIEW); + $this->deleteLocalXml(); + + $this->log->logSuccess('Magento uninstallation complete.'); + } + /** * Enables caches after installing application * @@ -421,8 +470,8 @@ class Installer */ private function enableCaches() { - $args = [$this->systemConfig->getMagentoBasePath() . '/dev/shell/cache.php']; - $this->exec('-f %s -- --set=1', $args); + $args = [$this->directoryList->getRoot() . '/dev/shell/cache.php', $this->execParams]; + $this->exec('-f %s -- --set=1 --bootstrap=%s', $args); } /** @@ -433,8 +482,7 @@ class Installer */ private function setMaintenanceMode($value) { - $args = [$this->systemConfig->getMagentoBasePath() . '/dev/shell/maintenance.php', $value]; - $this->exec('-f %s -- --set=%s', $args); + $this->maintenanceMode->set($value); } /** @@ -480,34 +528,97 @@ class Installer Config::KEY_DB_USER => $dbUser, Config::KEY_DB_PASS => $dbPass ]); - $adapter->connect(); - if (!$adapter->getDriver()->getConnection()->isConnected()) { + $adapter->getConnection(); + if (!$adapter->isConnected()) { throw new \Exception('Database connection failure.'); } return true; } /** - * Cleans up database + * Return messages + * + * @return array + */ + public function getMessages() + { + return $this->messages; + } + + + /** + * Deletes the database and creates it again * - * @param \ArrayObject|array $config * @return void */ - public function cleanupDb($config) + private function cleanupDb() { - $adapter = $this->connectionFactory->create($config); - $dbName = $adapter->quoteIdentifier($config[Config::KEY_DB_NAME]); + // stops cleanup if app/etc/local.xml does not exist + if (!$this->filesystem->getDirectoryWrite(DirectoryList::CONFIG)->isFile('local.xml')) { + $this->log->log('No database connection defined - skipping database cleanup'); + return; + } + $config = $this->deploymentConfigFactory->create(); + $config->loadFromFile(); + $configData = $config->getConfigData(); + $adapter = $this->connectionFactory->create($configData); + try { + $adapter->getConnection(); + } catch (\Exception $e) { + $this->log->log($e->getMessage() . ' - skipping database cleanup'); + return; + } + $dbName = $adapter->quoteIdentifier($configData[Config::KEY_DB_NAME]); + $this->log->log("Recreating database {$dbName}"); $adapter->query("DROP DATABASE IF EXISTS {$dbName}"); $adapter->query("CREATE DATABASE IF NOT EXISTS {$dbName}"); } /** - * Return messages + * Removes contents of a directory * - * @return array + * @param string $type + * @return void */ - public function getMessages() + private function deleteDirContents($type) { - return $this->messages; + $dir = $this->filesystem->getDirectoryWrite($type); + $dirPath = $dir->getAbsolutePath(); + if (!$dir->isExist()) { + $this->log->log("The directory '{$dirPath}' doesn't exist - skipping cleanup"); + return; + } + foreach ($dir->read() as $path) { + if (preg_match('/^\./', $path)) { + continue; + } + $this->log->log("{$dirPath}{$path}"); + try { + $dir->delete($path); + } catch (FilesystemException $e) { + $this->log->log($e->getMessage()); + } + } + } + + /** + * Removes deployment configuration + * + * @return void + */ + private function deleteLocalXml() + { + $configDir = $this->filesystem->getDirectoryWrite(DirectoryList::CONFIG); + $localXml = "{$configDir->getAbsolutePath()}local.xml"; + if (!$configDir->isFile('local.xml')) { + $this->log->log("The file '{$localXml}' doesn't exist - skipping cleanup"); + return; + } + try { + $this->log->log($localXml); + $configDir->delete('local.xml'); + } catch (FilesystemException $e) { + $this->log->log($e->getMessage()); + } } } diff --git a/setup/module/Magento/Setup/src/Model/InstallerFactory.php b/setup/module/Magento/Setup/src/Model/InstallerFactory.php index 7970e5b3ee60ad026068294314f617cff578e8db..4be7951ed43eb577c4ad9c83aa306b8b8ce67a1b 100644 --- a/setup/module/Magento/Setup/src/Model/InstallerFactory.php +++ b/setup/module/Magento/Setup/src/Model/InstallerFactory.php @@ -58,11 +58,14 @@ class InstallerFactory $this->serviceLocator->get('Magento\Setup\Module\Setup\ConfigFactory'), $this->serviceLocator->get('Magento\Setup\Module\SetupFactory'), $this->serviceLocator->get('Magento\Setup\Module\ModuleList'), - $this->serviceLocator->get('Magento\Config\ConfigFactory'), + $this->serviceLocator->get('Magento\Framework\App\Filesystem\DirectoryList'), $this->serviceLocator->get('Magento\Setup\Model\AdminAccountFactory'), $log, $this->serviceLocator->get('Magento\Framework\Math\Random'), - $this->serviceLocator->get('Magento\Setup\Module\Setup\ConnectionFactory') + $this->serviceLocator->get('Magento\Setup\Module\Setup\ConnectionFactory'), + $this->serviceLocator->get('Magento\Framework\App\MaintenanceMode'), + $this->serviceLocator->get('Magento\Framework\Filesystem'), + $this->serviceLocator ); } } diff --git a/setup/module/Magento/Setup/src/Model/License.php b/setup/module/Magento/Setup/src/Model/License.php index fc670d518516b31974d4b22f07c4fd13b46248b3..540e45f803849acde1529304e85ece3b9a098e4e 100644 --- a/setup/module/Magento/Setup/src/Model/License.php +++ b/setup/module/Magento/Setup/src/Model/License.php @@ -24,11 +24,11 @@ namespace Magento\Setup\Model; -use Magento\Config\Config; -use Magento\Config\ConfigFactory; +use Magento\Framework\Filesystem; +use Magento\Framework\App\Filesystem\DirectoryList; /** - * License model + * License file reader * * @package Magento\Setup\Model */ @@ -41,37 +41,22 @@ class License */ const LICENSE_FILENAME = 'LICENSE.txt'; - /** - * Path of license file - * - * @var string - */ - protected $licenseFile; - - /** - * Configuration details - * - * @var Config - */ - protected $config; /** - * ConfigFactory to create config + * Directory that contains license file * - * @var ConfigFactory + * @var \Magento\Framework\Filesystem\Directory\ReadInterface */ - protected $configFactory; + private $dir; /** * Constructor * - * @param ConfigFactory $configFactory + * @param Filesystem $filesystem */ - public function __construct(ConfigFactory $configFactory) + public function __construct(Filesystem $filesystem) { - $this->configFactory = $configFactory; - $this->config = $this->configFactory->create(); - $this->licenseFile = $this->config->getMagentoBasePath() . DIRECTORY_SEPARATOR . self::LICENSE_FILENAME; + $this->dir = $filesystem->getDirectoryRead(DirectoryList::ROOT); } /** @@ -81,9 +66,9 @@ class License */ public function getContents() { - if (!file_exists($this->licenseFile)) { + if (!$this->dir->isFile(self::LICENSE_FILENAME)) { return false; } - return file_get_contents($this->licenseFile); + return $this->dir->readFile(self::LICENSE_FILENAME); } } diff --git a/setup/module/Magento/Setup/src/Model/Location.php b/setup/module/Magento/Setup/src/Model/Location.php deleted file mode 100644 index 1b5ab3eeceb8f3ca2b287ce56a0ad5825368e8b0..0000000000000000000000000000000000000000 --- a/setup/module/Magento/Setup/src/Model/Location.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-3.0.php - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@magentocommerce.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade Magento to newer - * versions in the future. If you wish to customize Magento for your - * needs please refer to http://www.magentocommerce.com for more information. - * - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -namespace Magento\Setup\Model; - -use Zend\Mvc\I18n\Translator; -use Zend\Mvc\MvcEvent; - -class Location -{ - /** - * @var Translator - */ - protected $translator; - - public function __construct(Translator $translator) - { - $this->translator = $translator; - } - - public function onChangeLocation(MvcEvent $e) - { - $locale = $this->translator->getLocale(); - $this->translator->setLocale($e->getRouteMatch()->getParam('lang')); - $this->translator->setFallbackLocale($locale); - } - - public function getLocationCode() - { - return substr($this->translator->getLocale(), 0, 5); - } -} \ No newline at end of file diff --git a/setup/module/Magento/Setup/src/Model/UserConfigurationData.php b/setup/module/Magento/Setup/src/Model/UserConfigurationData.php index 8e5334f49e23c81d13a0585023b0a8893fc90018..63996a117248d64ffe9bfb7d9e79fc58eadb1f8e 100644 --- a/setup/module/Magento/Setup/src/Model/UserConfigurationData.php +++ b/setup/module/Magento/Setup/src/Model/UserConfigurationData.php @@ -70,23 +70,6 @@ class UserConfigurationData Url::XML_PATH_USE_SECURE_KEY => self::KEY_ADMIN_USE_SECURITY_KEY, ]; - /** - * Default data values - * - * @var array - */ - private static $defaults = [ - self::KEY_USE_SEF_URL => 0, - self::KEY_BASE_URL => '{{unsecure_base_url}}', - self::KEY_IS_SECURE => 0, - self::KEY_BASE_URL_SECURE => '{{unsecure_base_url}}', - self::KEY_IS_SECURE_ADMIN => 0, - self::KEY_LANGUAGE => 'en_US', - self::KEY_TIMEZONE => 'America/Los_Angeles', - self::KEY_CURRENCY => 'USD', - self::KEY_ADMIN_USE_SECURITY_KEY => 1, - ]; - /** * Setup Instance * @@ -112,12 +95,9 @@ class UserConfigurationData */ public function install($data) { - foreach (self::$defaults as $key => $value) { + foreach (self::$pathDataMap as $path => $key) { if (isset($data[$key])) { - $value = $data[$key]; - } - foreach (array_keys(self::$pathDataMap, $key) as $path) { - $this->installData($path, $value); + $this->installData($path, $data[$key]); } } } diff --git a/setup/module/Magento/Setup/src/Module/Dir.php b/setup/module/Magento/Setup/src/Module/Dir.php index 0de4282ccee7e11862294aeee18d3c24492c9c99..beacd6001098d14536eaa70c4f2a87caad639674 100644 --- a/setup/module/Magento/Setup/src/Module/Dir.php +++ b/setup/module/Magento/Setup/src/Module/Dir.php @@ -28,7 +28,6 @@ namespace Magento\Setup\Module; use Magento\Framework\Filesystem\Directory\ReadInterface; use Magento\Framework\Filesystem; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Setup\Model\FilesystemFactory; class Dir { @@ -40,11 +39,11 @@ class Dir protected $_modulesDirectory; /** - * @param FilesystemFactory $filesystemFactory + * @param Filesystem $filesystem */ - public function __construct(FilesystemFactory $filesystemFactory) + public function __construct(Filesystem $filesystem) { - $this->_modulesDirectory = $filesystemFactory->create()->getDirectoryRead(DirectoryList::MODULES); + $this->_modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES); } /** diff --git a/setup/module/Magento/Setup/src/Module/FileResolver.php b/setup/module/Magento/Setup/src/Module/FileResolver.php index 585682fbe22ea4cf942590d8907754874f43793b..4fcbc15785879ad8537f963954a9ac27472037ef 100644 --- a/setup/module/Magento/Setup/src/Module/FileResolver.php +++ b/setup/module/Magento/Setup/src/Module/FileResolver.php @@ -24,90 +24,52 @@ namespace Magento\Setup\Module; -use Magento\Config\Config; use Zend\Stdlib\Glob; use Magento\Config\FileResolverInterface; -use Magento\Config\FileIteratorFactory; -use Magento\Config\ConfigFactory; +use Magento\Config\FileIterator; +use Magento\Framework\App\Filesystem\DirectoryList; class FileResolver implements FileResolverInterface { /** - * @var FileIteratorFactory - */ - protected $iteratorFactory; - - /** - * @var ConfigFactory - */ - protected $configFactory; - - /** - * @var Config + * Magento application's DirectoryList + * + * @var DirectoryList */ - protected $config; + private $directoryList; /** - * @param FileIteratorFactory $iteratorFactory - * @param ConfigFactory $configFactory - * @internal param Config $config + * Constructor + * + * @param DirectoryList $directoryList */ - public function __construct( - FileIteratorFactory $iteratorFactory, - ConfigFactory $configFactory - ) { - $this->iteratorFactory = $iteratorFactory; - $this->configFactory = $configFactory; - $this->config = $this->configFactory->create(); + public function __construct(DirectoryList $directoryList) + { + $this->directoryList = $directoryList; } /** + * Collect files and wrap them into an Iterator object + * * @param string $filename - * @return array + * @return FileIterator */ public function get($filename) { - $paths = []; + $result = []; // Collect files by /app/code/*/*/etc/{filename} pattern - $files = $this->getFiles($this->config->getMagentoModulePath() . '*/*/etc/' . $filename); - foreach ($files as $file) { - $paths[] = $this->getRelativePath($file); + $pattern = $this->directoryList->getPath(DirectoryList::MODULES) . '/*/*/etc/' . $filename; + foreach (Glob::glob($pattern) as $file) { + $result[] = $file; } // Collect files by /app/etc/*/{filename} pattern - $files = $this->getFiles($this->config->getMagentoConfigPath() . '*/' . $filename); - foreach ($files as $file) { - $paths[] = $this->getRelativePath($file); - } - - return $this->iteratorFactory->create($this->config->getMagentoBasePath(), $paths); - } - - /** - * Retrieves relative path - * - * @param string $path - * @return string - */ - protected function getRelativePath($path = null) - { - $basePath = $this->config->getMagentoBasePath(); - if (strpos($path, $basePath) === 0 - || $basePath == $path . '/') { - $result = substr($path, strlen($basePath)); - } else { - $result = $path; + $pattern = $this->directoryList->getPath(DirectoryList::CONFIG) . '/*/' . $filename; + foreach (Glob::glob($pattern) as $file) { + $result[] = $file; } - return $result; - } - /** - * @param string $path - * @return array|false - */ - protected function getFiles($path) - { - return Glob::glob($this->config->getMagentoBasePath() . $path); + return new FileIterator($result); } } diff --git a/setup/module/Magento/Setup/src/Module/Resource/Resource.php b/setup/module/Magento/Setup/src/Module/Resource/Resource.php index 3c58437c55d8115b7d8f9f4ca3299d051cd22ec7..006c0cfc93e8a6607878e4e23eebcf902573be96 100644 --- a/setup/module/Magento/Setup/src/Module/Resource/Resource.php +++ b/setup/module/Magento/Setup/src/Module/Resource/Resource.php @@ -23,9 +23,7 @@ */ namespace Magento\Setup\Module\Resource; -use Zend\Db\Sql\Sql; -use Zend\Db\ResultSet; -use Magento\Setup\Framework\DB\Adapter\AdapterInterface; +use Magento\Framework\DB\Adapter\AdapterInterface; use Magento\Setup\Module\ResourceInterface; /** @@ -76,17 +74,12 @@ class Resource implements ResourceInterface protected function loadVersionDb() { self::$versions = array(); - // Db version column always exists + // Db version column always exists if ($this->adapter->isTableExists($this->getMainTable())) { $select = $this->adapter->select()->from($this->getMainTable()); - $sql = new Sql($this->adapter); - $selectString = $sql->getSqlStringForSqlObject($select); - $results = $this->adapter->query($selectString); - if ($results instanceof ResultSet\ResultSetInterface && $results->count()) { - foreach ($results as $row) { - self::$versions[$row['code']] = $row['version']; - } + foreach ($this->adapter->fetchAll($select) as $row) { + self::$versions[$row['code']] = $row['version']; } } @@ -98,9 +91,6 @@ class Resource implements ResourceInterface */ public function getDbVersion($resName) { - if (!$this->adapter) { - return false; - } $this->loadVersionDb(); return isset(self::$versions[$resName]) ? self::$versions[$resName] : false; } diff --git a/setup/module/Magento/Setup/src/Module/SchemaLocator.php b/setup/module/Magento/Setup/src/Module/SchemaLocator.php index d431a653a75c7b26337332e21659c0415c42880a..af73d99313dd78f9d65a59828936f67abf53ba0a 100644 --- a/setup/module/Magento/Setup/src/Module/SchemaLocator.php +++ b/setup/module/Magento/Setup/src/Module/SchemaLocator.php @@ -27,14 +27,14 @@ namespace Magento\Setup\Module; use Magento\Config\SchemaLocatorInterface; -use Magento\Config\ConfigFactory; +use Magento\Framework\App\Filesystem\DirectoryList; class SchemaLocator implements SchemaLocatorInterface { /** - * @var ConfigFactory + * @var DirectoryList */ - protected $configFactory; + protected $directoryList; /** * @var string @@ -42,15 +42,14 @@ class SchemaLocator implements SchemaLocatorInterface protected $schemaName; /** - * @param ConfigFactory $configFactory + * @param DirectoryList $directoryList * @param string $schemaName */ public function __construct( - ConfigFactory $configFactory, + DirectoryList $directoryList, $schemaName = 'module.xsd' ) { - $this->configFactory = $configFactory; - $this->config = $this->configFactory->create(); + $this->directoryList = $directoryList; $this->schemaName = $schemaName; } @@ -61,10 +60,7 @@ class SchemaLocator implements SchemaLocatorInterface */ public function getSchema() { - $path = $this->config->magento->basePath - . $this->config->magento->filesystem->framework - . 'Module/etc/' . $this->schemaName; - - return realpath($path); + return $this->directoryList->getPath(DirectoryList::LIB_INTERNAL) + . '/Magento/Framework/Module/etc/' . $this->schemaName; } } diff --git a/setup/module/Magento/Setup/src/Module/Setup.php b/setup/module/Magento/Setup/src/Module/Setup.php index 29b5814c2492185acaca17ef7275d814c464f3b8..27bbb8f111387d0edc7a5d26e4d0b51840fdd297 100644 --- a/setup/module/Magento/Setup/src/Module/Setup.php +++ b/setup/module/Magento/Setup/src/Module/Setup.php @@ -40,7 +40,7 @@ class Setup implements SetupInterface /** * Setup Connection * - * @var \Magento\Setup\Framework\DB\Adapter\AdapterInterface + * @var \Magento\Framework\DB\Adapter\AdapterInterface */ protected $connection = null; @@ -92,7 +92,7 @@ class Setup implements SetupInterface /** * Get connection object * - * @return \Magento\Setup\Framework\DB\Adapter\AdapterInterface + * @return \Magento\Framework\DB\Adapter\AdapterInterface */ public function getConnection() { @@ -364,13 +364,12 @@ class Setup implements SetupInterface */ public function addConfigData($key, $value) { - $this->getConnection()->insert( + $this->getConnection()->insertOnDuplicate( $this->getTable('core_config_data'), array( 'path' => $key, 'value' => $value - ), - true + ) ); } } diff --git a/setup/module/Magento/Setup/src/Module/Setup/Config.php b/setup/module/Magento/Setup/src/Module/Setup/Config.php index 4b29db95f8e4e5168ce33985517ec994de324262..14b939ee1fb271c2e80565fd4a2e2a77a0b9623e 100644 --- a/setup/module/Magento/Setup/src/Module/Setup/Config.php +++ b/setup/module/Magento/Setup/src/Module/Setup/Config.php @@ -27,7 +27,6 @@ namespace Magento\Setup\Module\Setup; use Magento\Framework\Filesystem\Directory\Write; use Magento\Framework\Filesystem; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Setup\Model\FilesystemFactory; /** * Deployment configuration model @@ -76,13 +75,6 @@ class Config self::KEY_ENCRYPTION_KEY => '', ]; - /** - * Filesystem - * - * @var Filesystem - */ - protected $filesystem; - /** * Config Directory * @@ -93,15 +85,12 @@ class Config /** * Default Constructor * - * @param FilesystemFactory $fileSystemFactory + * @param Filesystem $fileSystem * @param string[] $data */ - public function __construct( - FilesystemFactory $fileSystemFactory, - $data = [] - ) { - $this->filesystem = $fileSystemFactory->create(); - $this->configDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::CONFIG); + public function __construct(Filesystem $fileSystem, $data = []) + { + $this->configDirectory = $fileSystem->getDirectoryWrite(DirectoryList::CONFIG); if ($data) { $this->update($data); diff --git a/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php b/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php index 751897ce831fd57dfa387bcd0aece57dbe6778d1..e9bdf1356553c5a6e595a6d46a5bff9f318adb98 100644 --- a/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php +++ b/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php @@ -48,7 +48,7 @@ class ConfigFactory public function create(array $data = []) { return new Config( - $this->serviceLocator->get('Magento\Setup\Model\FilesystemFactory'), + $this->serviceLocator->get('Magento\Framework\Filesystem'), $data ); } diff --git a/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php b/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php index 74f0f40f14ab8d758de7abab21f7b168d37d2085..f4360fd22463889f501d23e889a621c278356430 100644 --- a/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php +++ b/setup/module/Magento/Setup/src/Module/Setup/ConnectionFactory.php @@ -23,26 +23,49 @@ */ namespace Magento\Setup\Module\Setup; -use Magento\Setup\Framework\DB\Adapter\Pdo\Mysql; +use Zend\ServiceManager\ServiceLocatorInterface; +use Magento\Framework\DB\Adapter\Pdo\Mysql; class ConnectionFactory { + /** + * Zend Framework's service locator + * + * @var ServiceLocatorInterface + */ + protected $serviceLocator; + + /** + * Constructor + * + * @param ServiceLocatorInterface $serviceLocator + */ + public function __construct(ServiceLocatorInterface $serviceLocator) + { + $this->serviceLocator = $serviceLocator; + } + /** * Create DB adapter object * * @param \ArrayObject|array $config - * @return \Magento\Setup\Framework\DB\Adapter\Pdo\Mysql + * @return Mysql */ public function create($config) { + $config = [ + 'driver' => 'Pdo', + 'dbname' => $config[Config::KEY_DB_NAME], + 'host' => $config[Config::KEY_DB_HOST], + 'username' => $config[Config::KEY_DB_USER], + 'password' => isset($config[Config::KEY_DB_PASS]) ? $config[Config::KEY_DB_PASS] : null, + 'driver_options' => [\PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"] + ]; return new Mysql( - [ - 'driver' => 'Pdo', - 'dsn' => "mysql:dbname=" . $config[Config::KEY_DB_NAME] . ";host=" . $config[Config::KEY_DB_HOST], - 'username' => $config[Config::KEY_DB_USER], - 'password' => isset($config[Config::KEY_DB_PASS]) ? $config[Config::KEY_DB_PASS] : null, - 'driver_options' => [\PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"] - ] + $this->serviceLocator->get('Magento\Framework\Filesystem'), + $this->serviceLocator->get('Magento\Framework\Stdlib\String'), + $this->serviceLocator->get('Magento\Framework\Stdlib\DateTime'), + $config ); } } diff --git a/setup/module/Magento/Setup/src/Module/Setup/FileResolver.php b/setup/module/Magento/Setup/src/Module/Setup/FileResolver.php index 0276737fb458f324b9ae5465093258a1b47dece8..d480f6e76a758b356dd94a1cdf1588f484aa40af 100644 --- a/setup/module/Magento/Setup/src/Module/Setup/FileResolver.php +++ b/setup/module/Magento/Setup/src/Module/Setup/FileResolver.php @@ -25,45 +25,25 @@ namespace Magento\Setup\Module\Setup; use Zend\Stdlib\Glob; -use Magento\Config\FileIteratorFactory; -use Magento\Config\ConfigFactory as SystemConfigFactory; +use Magento\Framework\App\Filesystem\DirectoryList; class FileResolver { /** - * File Iterator Factory + * Magento application's DirectoryList * - * @var FileIteratorFactory + * @var DirectoryList */ - protected $iteratorFactory; - - /** - * Configuration Factory - * - * @var SystemConfigFactory - */ - protected $configFactory; - - /** - * Configurations - * - * @var Config - */ - protected $config; + private $directoryList; /** * Default Constructor * - * @param FileIteratorFactory $iteratorFactory - * @param SystemConfigFactory $configFactory + * @param DirectoryList $directoryList */ - public function __construct( - FileIteratorFactory $iteratorFactory, - SystemConfigFactory $configFactory - ) { - $this->iteratorFactory = $iteratorFactory; - $this->configFactory = $configFactory; - $this->config = $this->configFactory->create(); + public function __construct(DirectoryList $directoryList) + { + $this->directoryList = $directoryList; } /** @@ -75,55 +55,10 @@ class FileResolver */ public function getSqlSetupFiles($moduleName, $fileNamePattern = '*.php') { - $paths = []; $modulePath = str_replace('_', '/', $moduleName); - // Collect files by /app/code/{modulePath}/sql/*/*.php pattern - $files = $this->getFiles($this->config->getMagentoModulePath() . $modulePath . '/sql/*/' . $fileNamePattern); - foreach ($files as $file) { - $paths[] = $this->getRelativePath($file); - } - - return $paths; - } - - /** - * Retrieves relative path - * - * @param string $path - * @return string - */ - protected function getRelativePath($path = null) - { - $basePath = $this->config->getMagentoBasePath(); - if (strpos($path, $basePath) === 0 - || $basePath == $path . '/') { - $result = substr($path, strlen($basePath)); - } else { - $result = $path; - } - return $result; - } - - /** - * Get Files - * - * @param string $path - * @return array|false - */ - protected function getFiles($path) - { - return Glob::glob($this->config->getMagentoBasePath() . $path, Glob::GLOB_BRACE); - } - - /** - * Get Directories - * - * @param string $path - * @return array|false - */ - protected function getDirs($path) - { - return Glob::glob($this->config->getMagentoBasePath() . $path, Glob::GLOB_ONLYDIR); + $pattern = $this->directoryList->getPath(DirectoryList::MODULES) + . '/' . $modulePath . '/sql/*/' . $fileNamePattern; + return Glob::glob($pattern, Glob::GLOB_BRACE); } /** @@ -139,15 +74,17 @@ class FileResolver $modulePath = str_replace('_', '/', $moduleName); // Collect files by /app/code/{modulePath}/sql/*/ pattern - $resourceDirs = $this->getDirs($this->config->getMagentoModulePath() . $modulePath . '/sql/*/'); + $pattern = $this->directoryList->getPath(DirectoryList::MODULES) . '/' . $modulePath . '/sql/*'; + $resourceDirs = Glob::glob($pattern, Glob::GLOB_ONLYDIR); if (!empty($resourceDirs)) { foreach ($resourceDirs as $resourceDir) { $sqlResources[] = basename($resourceDir); } } - // Collect files by /app/code/{modulePath}/sql/*/ pattern - $resourceDirs = $this->getDirs($this->config->getMagentoModulePath() . $modulePath . '/data/*/'); + // Collect files by /app/code/{modulePath}/data/*/ pattern + $pattern = $this->directoryList->getPath(DirectoryList::MODULES) . '/' . $modulePath . '/data/*'; + $resourceDirs = Glob::glob($pattern, Glob::GLOB_ONLYDIR); if (!empty($resourceDirs)) { foreach ($resourceDirs as $resourceDir) { $dataResources[] = basename($resourceDir); @@ -157,27 +94,4 @@ class FileResolver $resources = array_unique(array_merge($sqlResources, $dataResources)); return array_shift($resources); } - - /** - * Get Absolute Path - * - * @param string $path - * @return string - */ - public function getAbsolutePath($path) - { - return $this->config->getMagentoBasePath() . '/' . ltrim($this->fixSeparator($path), '/'); - } - - /** - * Fixes path separator - * Utility method. - * - * @param string $path - * @return string - */ - protected function fixSeparator($path) - { - return str_replace('\\', '/', $path); - } } diff --git a/setup/module/Magento/Setup/src/Module/SetupModule.php b/setup/module/Magento/Setup/src/Module/SetupModule.php index 4fbc10e3f1b72c03b513c4d58d9f0d3d87d6c3c4..f5a9c8dcb66cb357ad0030f31ca6b527a6a03d01 100644 --- a/setup/module/Magento/Setup/src/Module/SetupModule.php +++ b/setup/module/Magento/Setup/src/Module/SetupModule.php @@ -94,7 +94,6 @@ class SetupModule extends Setup $moduleName = (string)$this->moduleConfig['name']; foreach ($this->fileResolver->getSqlSetupFiles($moduleName, self::TYPE_DB_RECURRING . '.php') as $file) { try { - $file = $this->fileResolver->getAbsolutePath($file); $this->includeFile($file); } catch (\Exception $e) { throw new \Exception(sprintf('Error in file: "%s" - %s', $file, $e->getMessage()), 0, $e); @@ -121,9 +120,9 @@ class SetupModule extends Setup foreach ($this->fileResolver->getSqlSetupFiles($moduleName, '*.{php,sql}') as $file) { $matches = array(); if (preg_match($regExpDb, $file, $matches)) { - $dbFiles[$matches[1]] = $this->fileResolver->getAbsolutePath($file); + $dbFiles[$matches[1]] = $file; } elseif (preg_match($regExpType, $file, $matches)) { - $typeFiles[$matches[1]] = $this->fileResolver->getAbsolutePath($file); + $typeFiles[$matches[1]] = $file; } } diff --git a/setup/module/Magento/Setup/src/Mvc/Bootstrap/InitParamListener.php b/setup/module/Magento/Setup/src/Mvc/Bootstrap/InitParamListener.php new file mode 100644 index 0000000000000000000000000000000000000000..dbdfc9371deb9ff636cb7d104e6626690c60a5a9 --- /dev/null +++ b/setup/module/Magento/Setup/src/Mvc/Bootstrap/InitParamListener.php @@ -0,0 +1,229 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Setup\Mvc\Bootstrap; + +use Magento\Framework\Filesystem; +use Magento\Framework\App\Bootstrap as AppBootstrap; +use Magento\Framework\App\State; +use Magento\Framework\App\Filesystem\DirectoryList; +use Zend\EventManager\EventInterface; +use Zend\EventManager\EventManagerInterface; +use Zend\Mvc\Application; +use Zend\EventManager\ListenerAggregateInterface; +use Zend\Mvc\MvcEvent; +use Zend\Console\Request; +use Zend\Stdlib\RequestInterface; +use Magento\Framework\Shell\ComplexParameter; +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; + +/** + * A listener that injects relevant Magento initialization parameters and initializes Magento\Filesystem component + */ +class InitParamListener implements ListenerAggregateInterface, FactoryInterface +{ + /** + * A CLI parameter for injecting bootstrap variables + */ + const BOOTSTRAP_PARAM = 'magento_init_params'; + + /** + * List of ZF event listeners + * + * @var \Zend\Stdlib\CallbackHandler[] + */ + private $listeners = array(); + + /** + * Registers itself to every command in console routes + * + * @param array $config + * @return array + */ + public static function attachToConsoleRoutes($config) + { + foreach ($config['console']['router']['routes'] as &$route) { + $route['options']['route'] .= ' [--' . self::BOOTSTRAP_PARAM . '=]'; + } + return $config; + } + + /** + * Adds itself to CLI usage instructions + * + * @return array + */ + public static function getConsoleUsage() + { + $result = ['']; + $result[] = [ + '[--' . self::BOOTSTRAP_PARAM . sprintf('=%s]', escapeshellarg('<query>')), + 'Add to any command to customize Magento initialization parameters' + ]; + $mode = State::PARAM_MODE; + $dirs = AppBootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS; + $examples = [ + "{$mode}=developer", + "{$dirs}[base][path]=/var/www/example.com", + "{$dirs}[cache][path]=/var/tmp/cache", + ]; + $result[] = ['', sprintf('For example: %s', escapeshellarg(implode('&', $examples)))]; + return $result; + } + + /** + * {@inheritdoc} + */ + public function attach(EventManagerInterface $events) + { + $sharedEvents = $events->getSharedManager(); + $this->listeners[] = $sharedEvents->attach( + 'Zend\Mvc\Application', + MvcEvent::EVENT_BOOTSTRAP, + array($this, 'onBootstrap') + ); + } + + /** + * {@inheritdoc} + */ + public function detach(EventManagerInterface $events) + { + foreach ($this->listeners as $index => $listener) { + if ($events->detach($listener)) { + unset($this->listeners[$index]); + } + } + } + + /** + * An event subscriber that initializes DirectoryList and Filesystem objects in ZF application bootstrap + * + * @param MvcEvent $e + * @return void + */ + public function onBootstrap(\Zend\Mvc\MvcEvent $e) + { + /** @var Application $application */ + $application = $e->getApplication(); + $initParams = $application->getServiceManager()->get(self::BOOTSTRAP_PARAM); + $directoryList = $this->createDirectoryList($initParams); + $serviceManager = $application->getServiceManager(); + $serviceManager->setService('Magento\Framework\App\Filesystem\DirectoryList', $directoryList); + $serviceManager->setService('Magento\Framework\Filesystem', $this->createFilesystem($directoryList)); + + } + + /** + * {@inheritdoc} + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->extractInitParameters($serviceLocator->get('Application')); + } + + /** + * Collects init params configuration from multiple sources + * + * Each next step overwrites previous, whenever data is available, in the following order: + * 1: ZF application config + * 2: environment + * 3: CLI parameters (if the application is running in CLI mode) + * + * @param Application $application + * @return array + */ + private function extractInitParameters(Application $application) + { + $result = []; + $config = $application->getConfig(); + if (isset($config[self::BOOTSTRAP_PARAM])) { + $result = $config[self::BOOTSTRAP_PARAM]; + } + foreach ([State::PARAM_MODE, AppBootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS] as $initKey) { + if (isset($_SERVER[$initKey])) { + $result[$initKey] = $_SERVER[$initKey]; + } + } + $result = array_replace_recursive($result, $this->extractFromCli($application->getRequest())); + return $result; + } + + /** + * Extracts the directory paths from a CLI request + * + * Uses format of a URL query + * + * @param RequestInterface $request + * @return array + */ + private function extractFromCli(RequestInterface $request) + { + if (!($request instanceof Request)) { + return []; + } + $bootstrapParam = new ComplexParameter(self::BOOTSTRAP_PARAM); + foreach ($request->getContent() as $paramStr) { + $result = $bootstrapParam->getFromString($paramStr); + if (!empty($result)) { + return $result; + } + } + return []; + } + + /** + * Initializes DirectoryList service + * + * @param array $initParams + * @return DirectoryList + * @throws \LogicException + */ + public function createDirectoryList($initParams) + { + if (!isset($initParams[AppBootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS][DirectoryList::ROOT])) { + throw new \LogicException('Magento root directory is not specified.'); + } + $config = $initParams[AppBootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS]; + $rootDir = $config[DirectoryList::ROOT][DirectoryList::PATH]; + return new DirectoryList($rootDir, $config); + } + + /** + * Initializes Filesystem service + * + * @param DirectoryList $directoryList + * @return Filesystem + */ + public function createFilesystem(DirectoryList $directoryList) + { + $driverPool = new Filesystem\DriverPool; + return new Filesystem( + $directoryList, + new Filesystem\Directory\ReadFactory($driverPool), + new Filesystem\Directory\WriteFactory($driverPool) + ); + } +} diff --git a/setup/module/Magento/Setup/view/error/404.phtml b/setup/module/Magento/Setup/view/error/404.phtml index be0be4e69f32c03810ffe1a7257e44d2159cc9cc..56252abcff9bf84dcaf7b148e170da023183edb2 100644 --- a/setup/module/Magento/Setup/view/error/404.phtml +++ b/setup/module/Magento/Setup/view/error/404.phtml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<h1><?php echo $this->translate('A 404 error occurred') ?></h1> +<h1>A 404 error occurred</h1> <h2><?php echo $this->message ?></h2> <?php if (isset($this->reason) && $this->reason): ?> @@ -31,19 +31,19 @@ $reasonMessage= ''; switch ($this->reason) { case 'error-controller-cannot-dispatch': - $reasonMessage = $this->translate('The requested controller was unable to dispatch the request.'); + $reasonMessage = 'The requested controller was unable to dispatch the request.'; break; case 'error-controller-not-found': - $reasonMessage = $this->translate('The requested controller could not be mapped to an existing controller class.'); + $reasonMessage = 'The requested controller could not be mapped to an existing controller class.'; break; case 'error-controller-invalid': - $reasonMessage = $this->translate('The requested controller was not dispatchable.'); + $reasonMessage = 'The requested controller was not dispatchable.'; break; case 'error-router-no-match': - $reasonMessage = $this->translate('The requested URL could not be matched by routing.'); + $reasonMessage = 'The requested URL could not be matched by routing.'; break; default: - $reasonMessage = $this->translate('We cannot determine at this time why a 404 was generated.'); + $reasonMessage = 'We cannot determine at this time why a 404 was generated.'; break; } ?> @@ -55,14 +55,14 @@ switch ($this->reason) { <?php if (isset($this->controller) && $this->controller): ?> <dl> - <dt><?php echo $this->translate('Controller') ?>:</dt> + <dt>Controller:</dt> <dd><?php echo $this->escapeHtml($this->controller) ?> <?php if (isset($this->controller_class) && $this->controller_class && $this->controller_class != $this->controller ) { - echo '(' . sprintf($this->translate('resolves to %s'), $this->escapeHtml($this->controller_class)) . ')'; + echo '(' . sprintf('resolves to %s', $this->escapeHtml($this->controller_class)) . ')'; } ?> </dd> @@ -74,18 +74,18 @@ if (isset($this->controller_class) <?php if(isset($this->exception) && $this->exception instanceof Exception): ?> <hr/> -<h2><?php echo $this->translate('Additional information') ?>:</h2> +<h2>Additional information:</h2> <h3><?php echo get_class($this->exception); ?></h3> <dl> - <dt><?php echo $this->translate('File') ?>:</dt> + <dt>File:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->exception->getFile() ?>:<?php echo $this->exception->getLine() ?></pre> </dd> - <dt><?php echo $this->translate('Message') ?>:</dt> + <dt>Message:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->exception->getMessage() ?></pre> </dd> - <dt><?php echo $this->translate('Stack trace') ?>:</dt> + <dt>Stack trace:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->exception->getTraceAsString() ?></pre> </dd> @@ -95,21 +95,21 @@ if (isset($this->controller_class) if ($e) : ?> <hr/> -<h2><?php echo $this->translate('Previous exceptions') ?>:</h2> +<h2>Previous exceptions:</h2> <ul class="unstyled"> <?php while($e) : ?> <li> <h3><?php echo get_class($e); ?></h3> <dl> - <dt><?php echo $this->translate('File') ?>:</dt> + <dt>File:</dt> <dd> <pre class="prettyprint linenums"><?php echo $e->getFile() ?>:<?php echo $e->getLine() ?></pre> </dd> - <dt><?php echo $this->translate('Message') ?>:</dt> + <dt>Message:</dt> <dd> <pre class="prettyprint linenums"><?php echo $e->getMessage() ?></pre> </dd> - <dt><?php echo $this->translate('Stack trace') ?>:</dt> + <dt>Stack trace:</dt> <dd> <pre class="prettyprint linenums"><?php echo $e->getTraceAsString() ?></pre> </dd> @@ -124,7 +124,7 @@ if (isset($this->controller_class) <?php else: ?> -<h3><?php echo $this->translate('No Exception available') ?></h3> +<h3>No Exception available</h3> <?php endif ?> diff --git a/setup/module/Magento/Setup/view/error/index.phtml b/setup/module/Magento/Setup/view/error/index.phtml index 24c7e99d2f2dcd8da802c3d094791d6c5ccd7c2d..6ecef50c94ab69efce3e5b89694879d3e647bc26 100644 --- a/setup/module/Magento/Setup/view/error/index.phtml +++ b/setup/module/Magento/Setup/view/error/index.phtml @@ -22,25 +22,25 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<h1><?php echo $this->translate('An error occurred') ?></h1> +<h1>An error occurred</h1> <h2><?php echo $this->message ?></h2> <?php if (isset($this->display_exceptions) && $this->display_exceptions): ?> <?php if(isset($this->exception) && $this->exception instanceof Exception): ?> <hr/> -<h2><?php echo $this->translate('Additional information') ?>:</h2> +<h2>Additional information:</h2> <h3><?php echo get_class($this->exception); ?></h3> <dl> - <dt><?php echo $this->translate('File') ?>:</dt> + <dt>File:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->exception->getFile() ?>:<?php echo $this->exception->getLine() ?></pre> </dd> - <dt><?php echo $this->translate('Message') ?>:</dt> + <dt>Message:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->escapeHtml($this->exception->getMessage()) ?></pre> </dd> - <dt><?php echo $this->translate('Stack trace') ?>:</dt> + <dt>Stack trace:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->escapeHtml($this->exception->getTraceAsString()) ?></pre> </dd> @@ -50,21 +50,21 @@ if ($e) : ?> <hr/> -<h2><?php echo $this->translate('Previous exceptions') ?>:</h2> +<h2>Previous exceptions:</h2> <ul class="unstyled"> <?php while($e) : ?> <li> <h3><?php echo get_class($e); ?></h3> <dl> - <dt><?php echo $this->translate('File') ?>:</dt> + <dt>File:</dt> <dd> <pre class="prettyprint linenums"><?php echo $e->getFile() ?>:<?php echo $e->getLine() ?></pre> </dd> - <dt><?php echo $this->translate('Message') ?>:</dt> + <dt>Message:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->escapeHtml($e->getMessage()) ?></pre> </dd> - <dt><?php echo $this->translate('Stack trace') ?>:</dt> + <dt>Stack trace:</dt> <dd> <pre class="prettyprint linenums"><?php echo $this->escapeHtml($e->getTraceAsString()) ?></pre> </dd> @@ -79,7 +79,7 @@ <?php else: ?> -<h3><?php echo $this->translate('No Exception available') ?></h3> +<h3>No Exception available</h3> <?php endif ?> diff --git a/setup/module/Magento/Setup/view/layout/layout.phtml b/setup/module/Magento/Setup/view/layout/layout.phtml index b60cf617716260cf0a8f65a5b86e90b85763a35a..f3950207348b48c92abcfdc3ef675bb8e54b6193 100644 --- a/setup/module/Magento/Setup/view/layout/layout.phtml +++ b/setup/module/Magento/Setup/view/layout/layout.phtml @@ -27,7 +27,7 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <?php echo $this->headTitle($this->translate('Magento Setup Tool'))->setSeparator(' - ')->setAutoEscape(false) ?> + <title>Magento Setup Tool</title> <?php echo $this->headLink() ->appendStylesheet($this->basePath() . '/pub/bootstrap/css/bootstrap.min.css') ->appendStylesheet($this->basePath() . '/pub/bootstrap/css/bootstrap-theme.min.css') diff --git a/setup/module/Magento/Setup/view/magento/setup/add-database.phtml b/setup/module/Magento/Setup/view/magento/setup/add-database.phtml index b06692c69bb0f68ea1a0a63897cfd95392b88237..4e77cb9eb7628226aa7d322366ea177a55007c5e 100644 --- a/setup/module/Magento/Setup/view/magento/setup/add-database.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/add-database.phtml @@ -23,8 +23,8 @@ */ ?> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> <div class="page-header"> @@ -33,26 +33,26 @@ <form novalidate name="database" class="form-horizontal" role="form" ng-submit="testConnection()"> <div class="bs-callout bs-callout-warning col-sm-12 hide"> - <h4><?php echo $this->translate('Did you want to use an existing or create a new database?'); ?></h4> + <h4>Did you want to use an existing or create a new database?</h4> <div class="radio col-sm-6"> <label> <input type="radio" name="useExistingDb" ng-model="db.useExistingDb" value="1"> - <?php echo $this->translate('Use my existing database'); ?> + Use my existing database </label> </div> <div class="radio col-sm-6"> <label> <input type="radio" name="useExistingDb" ng-model="db.useExistingDb" value="0"> - <?php echo $this->translate('Create a database for me'); ?> + Create a database for me </label> </div> </div> <div class="form-group" ng-class="{'has-error': database.dbHost.$invalid && database.submitted}"> - <label class="col-sm-4 control-label"><?php echo $this->translate('Database Server Host'); ?> <span class="required">*</span></label> + <label class="col-sm-4 control-label">Database Server Host <span class="required">*</span></label> <div class="col-sm-4"> <input tooltip-placement="right" - tooltip="<?php echo $this->translate('Name and location of the server that hosts your store\'s database.'); ?>" + tooltip="Name and location of the server that hosts your store's database." tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -63,17 +63,17 @@ </div> <div class="col-sm-offset-4 col-sm-4" ng-show="database.dbHost.$invalid && database.submitted"> <div class="error-container"> - <span ng-show="database.dbHost.$error.required"><?php echo $this->translate('You must enter a valid host name. Please check the syntax and try again.'); ?></span> + <span ng-show="database.dbHost.$error.required">You must enter a valid host name. Please check the syntax and try again.</span> </div> </div> </div> <div class="form-group" ng-class="{'has-error': database.dbUser.$invalid && database.submitted}"> - <label class="col-sm-4 control-label"><?php echo $this->translate('Database Server Username'); ?> <span class="required">*</span></label> + <label class="col-sm-4 control-label">Database Server Username <span class="required">*</span></label> <div class="col-sm-4" ng-switch="db.useExistingDb"> <input ng-switch-when="1" tooltip-placement="right" - tooltip="<?php echo $this->translate('Sign-in credentials for your store\'s database on the database server (does not need to be admin-level credentials).'); ?>" + tooltip="Sign-in credentials for your store's database on the database server (does not need to be admin-level credentials)." tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -83,7 +83,7 @@ required /> <input ng-switch-when="0" tooltip-placement="right" - tooltip="<?php echo $this->translate('Administrator credentials to sign in to the server that will host your store\'s database.'); ?>" + tooltip="Administrator credentials to sign in to the server that will host your store's database." tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -94,42 +94,42 @@ </div> <div class="col-sm-offset-4 col-sm-4" ng-show="database.dbUser.$invalid && database.submitted"> <div class="error-container"> - <span ng-show="database.dbUser.$error.required"><?php echo $this->translate('Please enter a username to continue.'); ?></span> + <span ng-show="database.dbUser.$error.required">Please enter a username to continue.</span> </div> </div> </div> <div class="form-group"> - <label class="col-sm-4 control-label"><?php echo $this->translate('Database Server Password'); ?></label> + <label class="col-sm-4 control-label">Database Server Password</label> <div class="col-sm-4" ng-switch="db.useExistingDb"> <input ng-switch-when="1" tooltip-placement="right" - tooltip="<?php echo $this->translate('Sign-in credentials for your store\'s database on the database server (does not need to be admin-level credentials).'); ?>" + tooltip="Sign-in credentials for your store's database on the database server (does not need to be admin-level credentials)." tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" type="password" name="dbPassword" ng-model="db.password" - placeholder="<?php echo $this->translate('(not always necessary)'); ?>" /> + placeholder="(not always necessary)" /> <input ng-switch-when="0" tooltip-placement="right" - tooltip="<?php echo $this->translate('Administrator credentials to sign in to the server that will host your store\'s database.'); ?>" + tooltip="Administrator credentials to sign in to the server that will host your store's database." tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" type="password" name="dbPassword" ng-model="db.password" - placeholder="<?php echo $this->translate('(not always necessary)'); ?>" /> + placeholder="(not always necessary)" /> </div> </div> <div class="form-group" ng-if="db.useExistingDb"> - <label class="col-sm-4 control-label"><?php echo $this->translate('Database Name'); ?><span class="required">*</span></label> + <label class="col-sm-4 control-label">Database Name<span class="required">*</span></label> <div class="col-sm-4"> <input tooltip-placement="right" - tooltip="<?php echo $this->translate('Enter the name of your store\'s database.'); ?>" + tooltip="Enter the name of your store's database." tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -140,7 +140,7 @@ </div> <div class="col-sm-offset-4 col-sm-4" ng-show="database.dbName.$invalid && database.submitted"> <div class="error-container"> - <span ng-show="database.dbName.$error.required"><?php echo $this->translate('You must enter a valid database name. Please check the syntax and try again.'); ?></span> + <span ng-show="database.dbName.$error.required">You must enter a valid database name. Please check the syntax and try again.</span> </div> </div> </div> @@ -148,24 +148,24 @@ <div class="form-group"> <div class="col-sm-offset-4 col-sm-4"> <button type="submit" class="btn btn-default" style="width: 100%;"> - <?php echo $this->translate('Test Connection and Authentication'); ?> + Test Connection and Authentication </button> </div> <div class="col-sm-4" style="padding-top: 8px;"> <div ng-show="testConnection.result.success && testConnection.pressed" class="animate-show text-success"> - <span class="glyphicon glyphicon-ok-sign text-success"></span> <?php echo $this->translate('Test connection successful.'); ?> + <span class="glyphicon glyphicon-ok-sign text-success"></span> Test connection successful. </div> <div ng-show="!testConnection.result.success && testConnection.pressed" class="animate-show text-danger"> - <span class="glyphicon glyphicon-remove-sign"></span> <?php echo $this->translate('Cannot connect to server.'); ?> + <span class="glyphicon glyphicon-remove-sign"></span> Cannot connect to server. </div> </div> </div> <div class="form-group" ng-if="db.useExistingDb==0"> - <label class="col-sm-4 control-label"><?php echo $this->translate('New Database Name'); ?> <span class="required">*</span></label> + <label class="col-sm-4 control-label">New Database Name <span class="required">*</span></label> <div class="col-sm-4"> <input tooltip-placement="right" - tooltip="<?php echo $this->translate('Create sign-in credentials for your store\'s database.'); ?>" + tooltip="Create sign-in credentials for your store's database." tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -177,30 +177,30 @@ </div> <div class="form-group"> - <label class="col-sm-4 control-label"><?php echo $this->translate('Table prefix'); ?></label> + <label class="col-sm-4 control-label">Table prefix</label> <div class="col-sm-4"> <input tooltip-placement="right" - tooltip="<?php echo $this->translate('Enter a tracking prefix to be used for database tables created for this Magento installation. (ex: \'mg1_\' )'); ?>" + tooltip="Enter a tracking prefix to be used for database tables created for this Magento installation. (ex: 'mg1_' )" tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" type="text" name="dbTablePrefix" ng-model="db.tablePrefix" - placeholder="<?php echo $this->translate('(optional)'); ?>" /> + placeholder="(optional)" /> </div> </div> <div class="form-group" ng-if="db.useExistingDb==0"> - <label class="col-sm-3 control-label"><?php echo $this->translate('Data Access'); ?><span class="required">*</span></label> + <label class="col-sm-3 control-label">Data Access<span class="required">*</span></label> <div class="col-sm-9"> <div class="radio"> <label> <input type="radio" name="db.useAccess" ng-model="db.useAccess" value="0"> - <?php echo $this->translate('Enter existing credentials to create the Magento database'); ?> + Enter existing credentials to create the Magento database </label> <div class="form-group" style="margin-top: 20px;" ng-if="db.useAccess==0"> - <label class="col-sm-3 control-label"><?php echo $this->translate('Username'); ?><span class="required">*</span></label> + <label class="col-sm-3 control-label">Username<span class="required">*</span></label> <div class="col-sm-6"> <input class="form-control" style="width: 80%;" @@ -211,24 +211,24 @@ </div> </div> <div class="form-group" ng-if="db.useAccess==0"> - <label class="col-sm-3 control-label"><?php echo $this->translate('Password'); ?></label> + <label class="col-sm-3 control-label">Password</label> <div class="col-sm-6"> <input class="form-control" style="width: 80%;" type="password" name="dbGrandPassword" ng-model="db.grandPassword" - placeholder="<?php echo $this->translate('(optional)'); ?>"> + placeholder="(optional)"> </div> </div> </div> <div class="radio"> <label> <input type="radio" name="useAccess" ng-model="db.useAccess" value="1"> - <?php echo $this->translate('Enter new credentials to create the Magento database'); ?> + Enter new credentials to create the Magento database </label> <div class="form-group" style="margin-top: 20px;" ng-if="db.useAccess"> - <label class="col-sm-3 control-label"><?php echo $this->translate('New Username'); ?><span class="required">*</span></label> + <label class="col-sm-3 control-label">New Username<span class="required">*</span></label> <div class="col-sm-6"> <input class="form-control" style="width: 80%;" @@ -239,18 +239,18 @@ </div> </div> <div class="form-group" ng-if="db.useAccess"> - <label class="col-sm-3 control-label"><?php echo $this->translate('New Password'); ?></label> + <label class="col-sm-3 control-label">New Password</label> <div class="col-sm-6"> <input class="form-control" style="width: 80%;" type="password" name="dbNewPassword" ng-model="db.newPassword" - placeholder="<?php echo $this->translate('(optional)'); ?>"> + placeholder="(optional)"> </div> </div> <div class="form-group" ng-if="db.useAccess"> - <label class="col-sm-3 control-label"><?php echo $this->translate('Confirm Password'); ?></label> + <label class="col-sm-3 control-label">Confirm Password</label> <div class="col-sm-6"> <input class="form-control" style="width: 80%;" @@ -265,6 +265,6 @@ </form> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> \ No newline at end of file diff --git a/setup/module/Magento/Setup/view/magento/setup/create-admin-account.phtml b/setup/module/Magento/Setup/view/magento/setup/create-admin-account.phtml index 93ae083d8d1aac69da1f79391da54f42258c872a..cd8d043e9e6f1e0d87647d6ffb56556ee28f89cb 100644 --- a/setup/module/Magento/Setup/view/magento/setup/create-admin-account.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/create-admin-account.phtml @@ -32,27 +32,27 @@ $passwordWizard = sprintf( <div class=\'col-sm-2\'></div> </div> <p>%s</p>', - $this->translate('Password Strength:'), - $this->translate('Must be a mix of at least 7 alpha and numeric characters.(Ex.: BuyIt54).') + 'Password Strength:', + 'Must be a mix of at least 7 alpha and numeric characters.(Ex.: BuyIt54).' ); ?> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> <div class="page-header"> <h1>{{$state.current.header}}</h1> </div> -<p><?php echo $this->translate('Create a new Admin account to manage you store.'); ?></p> +<p>Create a new Admin account to manage you store.</p> <form novalidate name="account" class="form-horizontal" role="form" style="padding-top: 20px;"> <div class="form-group" ng-class="{'has-error': account.adminUsername.$invalid && account.submitted}"> - <label class="col-sm-3 control-label"><?php echo $this->translate('New Username'); ?> <span class="required">*</span></label> + <label class="col-sm-3 control-label">New Username <span class="required">*</span></label> <div class="col-sm-4"> <input tooltip-placement="right" - tooltip="<?php echo $this->translate('Must be 1 to 40 characters'); ?>" + tooltip="Must be 1 to 40 characters" tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -64,16 +64,16 @@ $passwordWizard = sprintf( </div> <div class="col-sm-offset-3 col-sm-4" ng-show="account.adminUsername.$invalid && account.submitted"> <div class="error-container"> - <span ng-show="account.adminUsername.$error.required"><?php echo $this->translate('Please enter your new username.'); ?></span> - <span ng-show="account.adminUsername.$error.maxlength"><?php echo $this->translate('Please enter a username between 1 and 40 characters.'); ?></span> + <span ng-show="account.adminUsername.$error.required">Please enter your new username.</span> + <span ng-show="account.adminUsername.$error.maxlength">Please enter a username between 1 and 40 characters.</span> </div> </div> </div> <div class="form-group" ng-class="{'has-error': account.adminEmail.$invalid && account.submitted}"> - <label class="col-sm-3 control-label"><?php echo $this->translate('New E-Mail'); ?> <span class="required">*</span></label> + <label class="col-sm-3 control-label">New E-Mail <span class="required">*</span></label> <div class="col-sm-4"> <input tooltip-placement="right" - tooltip="<?php echo $this->translate('Must be a correct e-mail'); ?>" + tooltip="Must be a correct e-mail" tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -84,13 +84,13 @@ $passwordWizard = sprintf( </div> <div class="col-sm-offset-3 col-sm-4" ng-show="account.adminEmail.$invalid && account.submitted"> <div class="error-container"> - <span ng-show="account.adminEmail.$error.required"><?php echo $this->translate('Please enter your new e-mail.'); ?></span> - <span ng-show="account.adminEmail.$error.email"><?php echo $this->translate('Please enter a correct e-mail.'); ?></span> + <span ng-show="account.adminEmail.$error.required">Please enter your new e-mail.</span> + <span ng-show="account.adminEmail.$error.email">Please enter a correct e-mail.</span> </div> </div> </div> <div class="form-group" ng-class="{'has-error': account.adminPassword.$invalid && account.submitted}"> - <label class="col-sm-3 control-label"><?php echo $this->translate('New Password'); ?> <span class="required">*</span></label> + <label class="col-sm-3 control-label">New Password <span class="required">*</span></label> <div class="col-sm-4"> <input ng-change="passwordStatusChange()" tooltip-placement="right" @@ -105,15 +105,15 @@ $passwordWizard = sprintf( </div> <div class="col-sm-offset-3 col-sm-4" ng-show="account.adminPassword.$invalid && account.submitted"> <div class="error-container"> - <span ng-show="account.adminPassword.$error.required"><?php echo $this->translate('Please enter your new password.'); ?></span> + <span ng-show="account.adminPassword.$error.required">Please enter your new password.</span> </div> </div> </div> <div class="form-group" ng-class="{'has-error': account.adminConfirm.$invalid && account.submitted}"> - <label class="col-sm-3 control-label"><?php echo $this->translate('Confirm Password'); ?> <span class="required">*</span></label> + <label class="col-sm-3 control-label">Confirm Password <span class="required">*</span></label> <div class="col-sm-4"> <input tooltip-placement="right" - tooltip="<?php echo $this->translate('Please re-enter your password'); ?>" + tooltip="Please re-enter your password" tooltip-trigger="focus" tooltip-append-to-body="true" class="form-control" @@ -125,14 +125,14 @@ $passwordWizard = sprintf( </div> <div class="col-sm-offset-3 col-sm-4" ng-show="account.adminConfirm.$invalid && account.submitted"> <div class="error-container"> - <span ng-show="account.adminConfirm.$error.required"><?php echo $this->translate('Please re-enter your password.'); ?></span> - <span ng-show="account.adminConfirm.$error.confirmPassword"><?php echo $this->translate('Please make sure your passwords match.'); ?></span> + <span ng-show="account.adminConfirm.$error.required">Please re-enter your password.</span> + <span ng-show="account.adminConfirm.$error.confirmPassword">Please make sure your passwords match.</span> </div> </div> </div> </form> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> diff --git a/setup/module/Magento/Setup/view/magento/setup/customize-your-store.phtml b/setup/module/Magento/Setup/view/magento/setup/customize-your-store.phtml index 198b432a8284fe5359501bec8408ab67ea6c7607..3149fdf508946d8aa75df6083d807b5976d2981e 100644 --- a/setup/module/Magento/Setup/view/magento/setup/customize-your-store.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/customize-your-store.phtml @@ -23,8 +23,8 @@ */ ?> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> <div class="page-header"> @@ -33,27 +33,27 @@ <form class="form-horizontal" role="form"> <div class="form-group"> - <label class="col-md-3 control-label"><?php echo $this->translate('Sample Data'); ?></label> + <label class="col-md-3 control-label">Sample Data</label> <div class="col-md-6"> - <p class="form-control-static text-muted"><?php echo $this->translate('Using sample of "fake" data can be helpful, letting you automatically build your store with fictious products, tax, and payment settings. But it also creates a lot of extra data you need to remove later. Learn the pros and cons in out <a href="#">Guide to Using Sample Data</a>.'); ?></p> + <p class="form-control-static text-muted">Using sample of "fake" data can be helpful, letting you automatically build your store with fictious products, tax, and payment settings. But it also creates a lot of extra data you need to remove later. Learn the pros and cons in out <a href="#">Guide to Using Sample Data</a>.</p> </div> </div> <div class="form-group"> <div class="checkbox col-md-4 col-md-offset-3"> <label> - <input type="checkbox" ng-model="store.useSampleData" disabled> <span class="text-muted"><?php echo $this->translate('Use Sample Data'); ?></span> + <input type="checkbox" ng-model="store.useSampleData" disabled> <span class="text-muted">Use Sample Data</span> </label> </div> </div> <div class="form-group"> - <label class="col-md-3 control-label"><?php echo $this->translate('Store Default Time Zone'); ?> <span class="required">*</span></label> + <label class="col-md-3 control-label">Store Default Time Zone <span class="required">*</span></label> <div class="col-md-6"> <select class="form-control" ng-model="store.timezone" tooltip-placement="right" - tooltip-html-unsafe="<?php echo $this->translate('The time zone in which your online store operates. You can change this later in Magento Admin.'); ?>" + tooltip-html-unsafe="The time zone in which your online store operates. You can change this later in Magento Admin." tooltip-trigger="focus" tooltip-append-to-body="true"> <?php foreach ($this->timezone as $value => $label): ?> @@ -64,12 +64,12 @@ </div> <div class="form-group"> - <label class="col-md-3 control-label"><?php echo $this->translate('Store Default Currency'); ?> <span class="required">*</span></label> + <label class="col-md-3 control-label">Store Default Currency <span class="required">*</span></label> <div class="col-md-5"> <select class="form-control" ng-model="store.currency" tooltip-placement="right" - tooltip-html-unsafe="<?php echo $this->translate('The currency your store uses for price labeling, checkout, returns, credit and gift cards. You can change this later in Magento Admin.'); ?>" + tooltip-html-unsafe="The currency your store uses for price labeling, checkout, returns, credit and gift cards. You can change this later in Magento Admin." tooltip-trigger="focus" tooltip-append-to-body="true"> <?php foreach ($this->currency as $value => $label): ?> @@ -80,12 +80,12 @@ </div> <div class="form-group"> - <label class="col-md-3 control-label"><?php echo $this->translate('Store Default Language'); ?> <span class="required">*</span></label> + <label class="col-md-3 control-label">Store Default Language <span class="required">*</span></label> <div class="col-md-4"> <select class="form-control" ng-model="store.language" tooltip-placement="right" - tooltip-html-unsafe="<?php echo $this->translate('The language customers will see in your store. You can change this later in Magento Set Up Tool.'); ?>" + tooltip-html-unsafe="The language customers will see in your store. You can change this later in Magento Set Up Tool." tooltip-trigger="focus" tooltip-append-to-body="true"> <?php foreach ($this->language as $value => $label): ?> @@ -97,6 +97,6 @@ </form> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> diff --git a/setup/module/Magento/Setup/view/magento/setup/install.phtml b/setup/module/Magento/Setup/view/magento/setup/install.phtml index 6e95df09c95658929122f65336134d45896d1628..2f340c5f29c850cae5ab0cd8693dc9f6c2215645 100644 --- a/setup/module/Magento/Setup/view/magento/setup/install.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/install.phtml @@ -23,8 +23,8 @@ */ ?> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="start()" ng-show="isStarted"><?php echo $this->translate('Try Again'); ?></a> + <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="start()" ng-show="isStarted">Try Again</a> </div> <div class="page-header"> @@ -32,7 +32,7 @@ </div> <div ng-show="!isStarted" class="text-center" style="padding-top: 50px; padding-bottom: 50px;"> - <p><?php echo $this->translate('You\'re ready!'); ?></p> + <p>You're ready!</p> <button ng-click="start()" class="btn btn-primary">Install Now</button> </div> @@ -40,10 +40,10 @@ <div class="progress"><div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="{{progress}}" aria-valuemin="0" aria-valuemax="100" style="width: {{progress}}%; min-width: 5em;">{{progressText}}</div></div> <div ng-show="isFailed" class="error-container"> <span class="glyphicon glyphicon-remove-sign "></span> - <span><?php echo $this->translate('Installation is incomplete. Check the console log for errors before trying again.'); ?></span> + <span>Installation is incomplete. Check the console log for errors before trying again.</span> </div> <div class="collapsed-options"> - <a href="#" class="collapsed-options" ng-click="toggleConsole()"><?php echo $this->translate('Console Log'); ?></a> + <a href="#" class="collapsed-options" ng-click="toggleConsole()">Console Log</a> <span class="caret"></span> </div> <div ng-show="isConsole" id="console"> @@ -52,6 +52,6 @@ </div> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="start()" ng-show="isStarted"><?php echo $this->translate('Try Again'); ?></a> + <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-disabled="isDisabled" ng-click="start()" ng-show="isStarted">Try Again</a> </div> diff --git a/setup/module/Magento/Setup/view/magento/setup/landing.phtml b/setup/module/Magento/Setup/view/magento/setup/landing.phtml index b7e62a452588148d50ff544b00c1febbed9e35eb..8130e38842cdd416a7ce5c17526b18437be3aee4 100644 --- a/setup/module/Magento/Setup/view/magento/setup/landing.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/landing.phtml @@ -23,14 +23,14 @@ */ ?> <div class="text-center"> - <h1><?php echo $this->translate('Magento'); ?></h1> + <h1>Magento</h1> <br/> - <p><?php echo $this->translate('Version') . ' ' . $this->version; ?></p> + <p><?php echo 'Version' . ' ' . $this->version; ?></p> <br/> <br/> <br/> - <p><?php echo $this->translate('Welcome to Magento Admin, your online store headquarters. - Click \'Agree and Set Up Magento\' or read <a href="#/getting-started">Getting Started</a> to learn more.'); ?></p> + <p>Welcome to Magento Admin, your online store headquarters. + Click 'Agree and Set Up Magento' or read <a href="#/getting-started">Getting Started</a> to learn more.</p> <br/> <?php /* not implemented yet @@ -48,8 +48,8 @@ ?> <br/> <div> - <a href="#" ng-click="previousState()"><?php echo $this->translate('Terms & Agreement'); ?></a> + <a href="#" ng-click="previousState()">Terms & Agreement</a> </div> <br/> - <button type="button" class="btn-lg btn-primary" ng-click="nextState()"><?php echo $this->translate('Agree and Set Up Magento'); ?></button> + <button type="button" class="btn-lg btn-primary" ng-click="nextState()">Agree and Set Up Magento</button> </div> diff --git a/setup/module/Magento/Setup/view/magento/setup/license.phtml b/setup/module/Magento/Setup/view/magento/setup/license.phtml index 13c5ce8cc085e58201f8de4758eacfc10cf47c76..9a0915cfd194796402070b744fddc301bbd1dcaf 100644 --- a/setup/module/Magento/Setup/view/magento/setup/license.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/license.phtml @@ -24,10 +24,10 @@ ?> <div class="col-xs-9"> <br/> - <a href="#" class="btn btn-primary" ng-click="nextState()"> <?php echo $this->translate('Go Back'); ?></a> + <a href="#" class="btn btn-primary" ng-click="nextState()"> Go Back</a> <br/><br/> <?php echo nl2br(htmlspecialchars($this->license, ENT_COMPAT, 'UTF-8')); ?> <br/><br/><br/> - <a href="#" class="btn btn-primary" ng-click="nextState()"> <?php echo $this->translate('Go Back'); ?></a> + <a href="#" class="btn btn-primary" ng-click="nextState()"> Go Back</a> <br/><br/> </div> diff --git a/setup/module/Magento/Setup/view/magento/setup/readiness-check.phtml b/setup/module/Magento/Setup/view/magento/setup/readiness-check.phtml index 957123e8f988d468b87427f7f598314566e95c87..0690608920ec63cddb5be82bc06f205e95f9b9c0 100644 --- a/setup/module/Magento/Setup/view/magento/setup/readiness-check.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/readiness-check.phtml @@ -23,8 +23,8 @@ */ ?> <div class="step-controls" ng-show="$state.is('root.readiness-check.progress')"> - <a href="#" class="btn btn-primary" ng-click="$state.forceReload()" ng-disabled="checkingInProgress()"><?php echo $this->translate('Try Again'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()" ng-disabled="checkingInProgress() || hasErrors"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="$state.forceReload()" ng-disabled="checkingInProgress()">Try Again</a> + <a href="#" class="btn btn-primary" ng-click="nextState()" ng-disabled="checkingInProgress() || hasErrors">Next</a> </div> <div class="page-header"> @@ -32,15 +32,15 @@ </div> <div ng-show="$state.is('root.readiness-check')" class="readiness-check-landing"> - <p><?php echo $this->translate('Let\'s check your environment for the corrent PHP version, PHP extensions, file permissions and compatibility.'); ?></p> + <p>Let's check your environment for the correct PHP version, PHP extensions, file permissions and compatibility.</p> <div> - <a href="#" ng-click="$state.go('.progress')" class="btn btn-primary"><?php echo $this->translate('Start Readiness Check'); ?></a> + <a href="#" ng-click="$state.go('.progress')" class="btn btn-primary">Start Readiness Check</a> </div> </div> <div ui-view></div> <div class="step-controls" ng-show="$state.is('root.readiness-check.progress')"> - <a href="#" class="btn btn-primary" ng-click="$state.forceReload()" ng-disabled="checkingInProgress()"><?php echo $this->translate('Try Again'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()" ng-disabled="checkingInProgress() || hasErrors"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="$state.forceReload()" ng-disabled="checkingInProgress()">Try Again</a> + <a href="#" class="btn btn-primary" ng-click="nextState()" ng-disabled="checkingInProgress() || hasErrors">Next</a> </div> \ No newline at end of file diff --git a/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml b/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml index a624d1228643d14a9a771e5ee68ca2d6e0efce0f..4224ecf4515451d4cdfd3b70dcce1d25656d911e 100644 --- a/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml @@ -25,45 +25,45 @@ <div class="rediness-check-items"> <div class="bg-info" ng-switch="isCompleted()"> <div ng-switch-when="true" ng-switch="hasErrors"> - <span ng-switch-when="true"><?php echo $this->translate('Completed! You need to resolve these issues to continue.'); ?></span> - <span ng-switch-default><?php echo $this->translate('Completed!'); ?></span> + <span ng-switch-when="true">Completed! You need to resolve these issues to continue.</span> + <span ng-switch-default>Completed!</span> </div> <div ng-switch-default> <img src="pub/images/ajax-loader.gif" /> - <span><?php echo $this->translate('We\'re making sure your server environment is ready for Magento to be installed.'); ?></span> + <span>We're making sure your server environment is ready for Magento to be installed.</span> </div> </div> <div id="php-version" ng-show="version.visible"> <div ng-hide="version.processed"> - <span><?php echo $this->translate('Checking PHP Version...'); ?></span> + <span>Checking PHP Version...</span> </div> <div ng-show="version.processed" ng-switch="version.responseType"> <div ng-switch-when="success" ng-init="updateOnSuccess(version)"> <span class="glyphicon glyphicon-ok-sign text-success"></span> - <span><?php echo $this->translate('PHP Version Check'); ?></span> + <span>PHP Version Check</span> <div class="rediness-check-info"> - <?php echo $this->translate('Your PHP version is correct ({{version.data.current}}).'); ?> + Your PHP version is correct ({{version.data.current}}). </div> </div> <div ng-switch-default ng-init="updateOnError(version)"> <div class="rediness-check-panel-right"> - <p><?php echo $this->translate('Need Help?'); ?></p> - <p><a href="http://www.php.net/docs.php" target="_blank"><?php echo $this->translate('PHP Documentation'); ?></a></p> + <p>Need Help?</p> + <p><a href="http://www.php.net/docs.php" target="_blank">PHP Documentation</a></p> </div> <span class="glyphicon glyphicon-remove text-danger"></span> - <span><?php echo $this->translate('PHP Version Check'); ?></span> + <span>PHP Version Check</span> <div class="rediness-check-info"> <p> - <?php echo $this->translate('Your PHP version is {{version.data.current}}. The required PHP version is {{version.data.required}}.'); ?> + Your PHP version is {{version.data.current}}. The required PHP version is {{version.data.required}}. <a href="#" ng-click="updateOnExpand(version)"> - <span ng-hide="version.expanded"><?php echo $this->translate('More detail'); ?></span> - <span ng-show="version.expanded"><?php echo $this->translate('Less detail'); ?></span> + <span ng-hide="version.expanded">More detail</span> + <span ng-show="version.expanded">Less detail</span> </a> </p> <div class="rediness-check-block" ng-show="version.expanded"> - <p><?php echo $this->translate('Donwload and install PHP version {{version.data.required}} from <a href="http://www.php.net" target="_blank">www.php.net</a> using this <a href="http://www.php.net/docs.php" target="_blank">PHP Documentation</a>.'); ?></p> - <p><?php echo $this->translate('If you need more help please call your hosting provider.'); ?></p> + <p>Donwload and install PHP version {{version.data.required}} from <a href="http://www.php.net" target="_blank">www.php.net</a> using this <a href="http://www.php.net/docs.php" target="_blank">PHP Documentation</a>.</p> + <p>If you need more help please call your hosting provider.</p> </div> </div> </div> @@ -72,25 +72,25 @@ <div id="php-extensions" ng-show="extensions.visible"> <div ng-hide="extensions.processed"> - <span><?php echo $this->translate('Checking PHP Extensions...'); ?></span> + <span>Checking PHP Extensions...</span> </div> <div ng-show="extensions.processed" ng-switch="extensions.responseType"> <div ng-switch-when="success" ng-init="updateOnSuccess(extensions)"> <span class="glyphicon glyphicon-ok-sign text-success"></span> - <span><?php echo $this->translate('PHP Extensions Check'); ?></span> + <span>PHP Extensions Check</span> <div class="rediness-check-info"> <p> - <?php echo $this->translate('You meet {{extensions.data.current.length}} out of {{extensions.data.required.length}} PHP extensions requirements.'); ?> + You meet {{extensions.data.current.length}} out of {{extensions.data.required.length}} PHP extensions requirements. <a href="#" ng-click="updateOnExpand(extensions)"> - <span ng-hide="extensions.expanded"><?php echo $this->translate('More detail'); ?></span> - <span ng-show="extensions.expanded"><?php echo $this->translate('Less detail'); ?></span> + <span ng-hide="extensions.expanded">More detail</span> + <span ng-show="extensions.expanded">Less detail</span> </a> </p> <div class="rediness-check-block" ng-show="extensions.expanded"> <ul class="list-unstyled"> <li ng-repeat="name in extensions.data.required"> <span class="glyphicon glyphicon-ok text-success"></span> - <span><?php echo $this->translate('PHP Extension {{name}}.'); ?></span> + <span>PHP Extension {{name}}.</span> </li> </ul> </div> @@ -99,26 +99,26 @@ <div ng-switch-default ng-init="updateOnError(extensions)"> <div class="rediness-check-panel-right"> <p>Need Help?</p> - <p><a href="#" target="_blank"><?php echo $this->translate('PHP Extension Help'); ?></a></p> + <p><a href="#" target="_blank">PHP Extension Help</a></p> </div> <span class="glyphicon glyphicon-remove text-danger"></span> - <span><?php echo $this->translate('PHP Extensions Check'); ?></span> + <span>PHP Extensions Check</span> <div class="rediness-check-info"> <p> - <?php echo $this->translate('{{extensions.data.required.length - extensions.data.current.length}} missing PHP extensions.'); ?> + {{extensions.data.required.length - extensions.data.current.length}} missing PHP extensions. <a href="#" ng-click="updateOnExpand(extensions)"> - <span ng-hide="extensions.expanded"><?php echo $this->translate('More detail'); ?></span> - <span ng-show="extensions.expanded"><?php echo $this->translate('Less detail'); ?></span> + <span ng-hide="extensions.expanded">More detail</span> + <span ng-show="extensions.expanded">Less detail</span> </a> </p> - <p><?php echo $this->translate('The best way to resolve this is to install the correct missing extensions. The exact fix depends on our server, your host, and other system variables.</br>Our <a href="#">PHP Extension Help</a> can get you started.'); ?></p> - <p><?php echo $this->translate('If you need more help, please call your hosting provider.'); ?></p> + <p>The best way to resolve this is to install the correct missing extensions. The exact fix depends on our server, your host, and other system variables.</br>Our <a href="#">PHP Extension Help</a> can get you started.</p> + <p>If you need more help, please call your hosting provider.</p> <div class="rediness-check-block" ng-show="extensions.expanded"> <ul class="list-unstyled"> <li ng-repeat="name in extensions.data.required" ng-switch="hasItem(extensions.data.current, name)"> <span ng-switch-when="true" class="glyphicon glyphicon-ok text-success"></span> <span ng-switch-default class="glyphicon glyphicon-remove text-danger"></span> - <span><?php echo $this->translate('PHP Extension {{name}}.'); ?></span> + <span>PHP Extension {{name}}.</span> </li> </ul> </div> @@ -129,25 +129,25 @@ <div id="php-permissions" ng-show="permissions.visible"> <div ng-hide="permissions.processed"> - <span><?php echo $this->translate('Checking File Permissions...'); ?></span> + <span>Checking File Permissions...</span> </div> <div ng-show="permissions.processed" ng-switch="permissions.responseType"> <div ng-switch-when="success" ng-init="updateOnSuccess(permissions)"> <span class="glyphicon glyphicon-ok-sign text-success"></span> - <span><?php echo $this->translate('File Permission Check'); ?></span> + <span>File Permission Check</span> <div class="rediness-check-info"> <p> - <?php echo $this->translate('You meet {{permissions.data.current.length}} out of {{permissions.data.required.length}} writable file permission requirements.'); ?> + You meet {{permissions.data.current.length}} out of {{permissions.data.required.length}} writable file permission requirements. <a href="#" ng-click="updateOnExpand(permissions)"> - <span ng-hide="permissions.expanded"><?php echo $this->translate('More detail'); ?></span> - <span ng-show="permissions.expanded"><?php echo $this->translate('Less detail'); ?></span> + <span ng-hide="permissions.expanded">More detail</span> + <span ng-show="permissions.expanded">Less detail</span> </a> </p> <div class="rediness-check-block" ng-show="permissions.expanded"> <ul class="list-unstyled"> <li ng-repeat="name in permissions.data.required"> <span class="glyphicon glyphicon-ok text-success"></span> - <span><?php echo $this->translate('"{{name}}" writable directory permission.'); ?></span> + <span>"{{name}}" writable directory permission.</span> </li> </ul> </div> @@ -155,27 +155,27 @@ </div> <div ng-switch-default ng-init="updateOnError(permissions)"> <div class="rediness-check-panel-right"> - <p><?php echo $this->translate('Need Help?'); ?></p> - <p><a href="#" target="_blank"><?php echo $this->translate('File Permission Help'); ?></a></p> + <p>Need Help?</p> + <p><a href="#" target="_blank">File Permission Help</a></p> </div> <span class="glyphicon glyphicon-remove text-danger"></span> - <span><?php echo $this->translate('File Permission Check'); ?></span> + <span>File Permission Check</span> <div class="rediness-check-info"> <p> - <?php echo $this->translate('{{permissions.data.required.length - permissions.data.current.length}} file permission not met.'); ?> + {{permissions.data.required.length - permissions.data.current.length}} file permission not met. <a href="#" ng-click="updateOnExpand(permissions)"> - <span ng-hide="permissions.expanded"><?php echo $this->translate('More detail'); ?></span> - <span ng-show="permissions.expanded"><?php echo $this->translate('Less detail'); ?></span> + <span ng-hide="permissions.expanded">More detail</span> + <span ng-show="permissions.expanded">Less detail</span> </a> </p> - <p><?php echo $this->translate('The best way to resolve this is to allow write permissions for the following Magento directories. The exact fix depends on your server, your host, and other system variables.</br>Our <a href="#">File Permission Help</a> can get you started.'); ?></p> - <p><?php echo $this->translate('If you need more help, please call your hosting provider.'); ?></p> + <p>The best way to resolve this is to allow write permissions for the following Magento directories. The exact fix depends on your server, your host, and other system variables.</br>Our <a href="#">File Permission Help</a> can get you started.</p> + <p>If you need more help, please call your hosting provider.</p> <div class="rediness-check-block" ng-show="permissions.expanded"> <ul class="list-unstyled"> <li ng-repeat="name in permissions.data.required" ng-switch="hasItem(permissions.data.current, name)"> <span ng-switch-when="true" class="glyphicon glyphicon-ok text-success"></span> <span ng-switch-default class="glyphicon glyphicon-remove text-danger"></span> - <span><?php echo $this->translate('"{{name}}" writable directory permission.'); ?></span> + <span>"{{name}}" writable directory permission.</span> </li> </ul> </div> diff --git a/setup/module/Magento/Setup/view/magento/setup/success.phtml b/setup/module/Magento/Setup/view/magento/setup/success.phtml index 518a5952dd79eee93474ed7e0a008074bc2b7a77..20add4373b431797f28fec73dcb196a79ea9ab52 100644 --- a/setup/module/Magento/Setup/view/magento/setup/success.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/success.phtml @@ -22,51 +22,51 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<h1 class="text-center"><span class="glyphicon glyphicon-ok-sign text-success"></span> <?php echo $this->translate('Success'); ?></h1> -<p><?php echo $this->translate('Please keep this information for your records'); ?>:</p> +<h1 class="text-center"><span class="glyphicon glyphicon-ok-sign text-success"></span> Success</h1> +<p>Please keep this information for your records:</p> <div id="admin-info" class="col-lg-12 p-top-10"> - <div class="col-sm-12 bold p-top-10"><?php echo $this->translate('Magento Admin Info'); ?>:</div> + <div class="col-sm-12 bold p-top-10">Magento Admin Info:</div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Username'); ?>:</div> + <div class="col-sm-6">Username:</div> <div class="col-sm-6">{{admin.username}}</div> </div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('E-Mail'); ?>:</div> + <div class="col-sm-6">E-Mail:</div> <div class="col-sm-6">{{admin.email}}</div> </div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Password'); ?>:</div> + <div class="col-sm-6">Password:</div> <div class="col-sm-6">******</div> </div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Your Store Address'); ?>:</div> + <div class="col-sm-6">Your Store Address:</div> <div class="col-sm-6"><a href="{{config.address.web}}">{{config.address.web}}</a></div> </div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Magento Admin Address'); ?>:</div> + <div class="col-sm-6">Magento Admin Address:</div> <div class="col-sm-6"><a href="{{config.address.web}}{{config.address.admin}}">{{config.address.web}}{{config.address.admin}}/</a></div> </div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Encryption Key'); ?>:</div> + <div class="col-sm-6">Encryption Key:</div> <div class="col-sm-6">{{config.encrypt.key}}</div> </div> </div> <div id="db-info" class="col-lg-12 p-top-10"> - <div class="col-sm-12 bold p-top-10"><?php echo $this->translate('Database Info'); ?>:</div> + <div class="col-sm-12 bold p-top-10">Database Info:</div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Database Name'); ?>:</div> + <div class="col-sm-6">Database Name:</div> <div class="col-sm-6">{{db.name}}</div> </div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Username'); ?>:</div> + <div class="col-sm-6">Username:</div> <div class="col-sm-6">{{db.user}}</div> </div> <div class="row p-top-10"> - <div class="col-sm-6"><?php echo $this->translate('Password'); ?>:</div> + <div class="col-sm-6">Password:</div> <div class="col-sm-6">******</div> </div> </div> <div class="text-center"> <div class="bold" ng-repeat="message in messages">{{message}}</div><br/> - <a type="button" class="btn btn-primary" href="{{config.address.web}}{{config.address.admin}}"><?php echo $this->translate('Launch Magento Admin'); ?></a> + <a type="button" class="btn btn-primary" href="{{config.address.web}}{{config.address.admin}}">Launch Magento Admin</a> </div> \ No newline at end of file diff --git a/setup/module/Magento/Setup/view/magento/setup/web-configuration.phtml b/setup/module/Magento/Setup/view/magento/setup/web-configuration.phtml index c053e44c4efde77cb3b7dc09d816fa5b21946ef7..e72a4f008039cf11e36ae88451efe67c35a038af 100644 --- a/setup/module/Magento/Setup/view/magento/setup/web-configuration.phtml +++ b/setup/module/Magento/Setup/view/magento/setup/web-configuration.phtml @@ -26,20 +26,20 @@ $hints = [ 'address_web' => sprintf( '<div><p>%s</p><p>%s</p><p><a href=\'#\'>%s</a></p></div>', - $this->translate('Enter the base URL that brings shoppers to your store (Ex. http://example.com/).'), - $this->translate('We recommend not using your actual IP address when your store goes live, otherwise all your shoppers will see it.'), - $this->translate('Detect IP Address') + 'Enter the base URL that brings shoppers to your store (Ex. http://example.com/).', + 'We recommend not using your actual IP address when your store goes live, otherwise all your shoppers will see it.', + 'Detect IP Address' ), 'encrypt_key' => sprintf( '<p>%s</p>', - $this->translate('Key to encrypt sensitive data such as passwords and personally identifiable customer informaton in the Magento database. The encryption key is stored in [your Magento install dir]/app/etc/local.xml/') + 'Key to encrypt sensitive data such as passwords and personally identifiable customer informaton in the Magento database. The encryption key is stored in [your Magento install dir]/app/etc/local.xml/' ), ]; ?> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> <div class="page-header"> @@ -48,7 +48,7 @@ $hints = [ <form novalidate name="webconfig" class="form-horizontal" role="form"> <div class="form-group" ng-class="{'has-error': webconfig.web.$invalid && webconfig.submitted}"> - <label class="col-md-3 control-label"><?php echo $this->translate('Your Store Address'); ?> <span class="required">*</span></label> + <label class="col-md-3 control-label">Your Store Address <span class="required">*</span></label> <div class="col-md-4"> <input type="text" name="web" @@ -63,13 +63,13 @@ $hints = [ </div> <div class="col-md-offset-3 col-md-4" ng-show="webconfig.web.$invalid && webconfig.submitted"> <div class="error-container"> - <span ng-show="webconfig.web.$error.required"><?php echo $this->translate('Please enter a valid base URL Admin URL path. (ex: http://www.example.com/)'); ?></span> + <span ng-show="webconfig.web.$error.required">Please enter a valid base URL Admin URL path. (ex: http://www.example.com/)</span> </div> </div> </div> <div class="form-group" ng-class="{'has-error': webconfig.admin.$invalid && webconfig.submitted}"> - <label class="col-md-3 control-label"><?php echo $this->translate('Magento Admin Address'); ?> <span class="required">*</span></label> + <label class="col-md-3 control-label">Magento Admin Address <span class="required">*</span></label> <div class="col-md-4 input-group" style="padding-left: 15px; padding-right: 15px;"> <span class="input-group-addon">{{config.address.web}}</span> <input type="text" @@ -80,55 +80,55 @@ $hints = [ </div> <div class="col-md-offset-3 col-md-4" ng-show="webconfig.admin.$invalid && webconfig.submitted"> <div class="error-container"> - <span ng-show="webconfig.admin.$error.required"><?php echo $this->translate('Please enter a valid admin URL path.'); ?></span> + <span ng-show="webconfig.admin.$error.required">Please enter a valid admin URL path.</span> </div> </div> </div> <div class="collapsed-options"> - <a href="#" class="collapsed-options" ng-click="updateOnExpand(config.advanced)"><?php echo $this->translate('Advanced Options'); ?></a> + <a href="#" class="collapsed-options" ng-click="updateOnExpand(config.advanced)">Advanced Options</a> <span class="caret"></span> </div> <div ng-show="config.advanced.expanded"> <div class="form-group"> - <label class="col-md-3 control-label"><?php echo $this->translate('HTTPS Options'); ?></label> + <label class="col-md-3 control-label">HTTPS Options</label> <div class="col-md-5"> <div class="checkbox"> <label> - <input type="checkbox" ng-model="config.https.front"> <?php echo $this->translate('Use HTTPS for Magento Storefront'); ?> + <input type="checkbox" ng-model="config.https.front"> Use HTTPS for Magento Storefront </label> </div> <div class="checkbox"> <label> - <input type="checkbox" ng-model="config.https.admin"> <?php echo $this->translate('Use HTTPS for Magento Admin'); ?> + <input type="checkbox" ng-model="config.https.admin"> Use HTTPS for Magento Admin </label> </div> </div> </div> <div class="form-group"> - <label class="col-md-3 control-label"><?php echo $this->translate('Apache Rewrites'); ?></label> + <label class="col-md-3 control-label">Apache Rewrites</label> <div class="col-md-5"> <div class="checkbox"> <label> - <input type="checkbox" ng-model="config.rewrites.allowed"> <?php echo $this->translate('Use Web Server Apache Rewrites'); ?> + <input type="checkbox" ng-model="config.rewrites.allowed"> Use Web Server Apache Rewrites </label> </div> </div> </div> <div class="form-group"> - <label class="col-md-3 control-label"><?php echo $this->translate('Encryption Key'); ?> <span class="required">*</span></label> + <label class="col-md-3 control-label">Encryption Key <span class="required">*</span></label> <div class="col-md-5"> <div class="radio"> <label> - <input type="radio" ng-model="config.encrypt.type" value="magento"> <?php echo $this->translate('I want to use a Magento generated key'); ?> + <input type="radio" ng-model="config.encrypt.type" value="magento"> I want to use a Magento generated key </label> </div> <div class="radio"> <label> - <input type="radio" ng-model="config.encrypt.type" value="user"> <?php echo $this->translate('I want to use my own encryption key'); ?> + <input type="radio" ng-model="config.encrypt.type" value="user"> I want to use my own encryption key </label> </div> </div> @@ -151,8 +151,8 @@ $hints = [ </div> <div class="col-md-offset-3 col-md-4" ng-show="webconfig.key.$invalid && webconfig.submitted"> <div class="error-container"> - <span ng-show="webconfig.key.$error.required"><?php echo $this->translate('You must enter an encryption key.'); ?></span> - <span ng-show="webconfig.key.$error.minlength"><?php echo $this->translate('Your encryption key must be longer and stronger.'); ?></span> + <span ng-show="webconfig.key.$error.required">You must enter an encryption key.</span> + <span ng-show="webconfig.key.$error.minlength">Your encryption key must be longer and stronger.</span> </div> </div> </div> @@ -160,6 +160,6 @@ $hints = [ </form> <div class="step-controls"> - <a href="#" class="btn btn-primary" ng-click="previousState()"><?php echo $this->translate('Previous'); ?></a> - <a href="#" class="btn btn-primary" ng-click="nextState()"><?php echo $this->translate('Next'); ?></a> + <a href="#" class="btn btn-primary" ng-click="previousState()">Previous</a> + <a href="#" class="btn btn-primary" ng-click="nextState()">Next</a> </div> diff --git a/success.png b/success.png new file mode 100644 index 0000000000000000000000000000000000000000..c2853cfc0cbb8856e5baa894332e6f4063428c80 Binary files /dev/null and b/success.png differ diff --git a/success_admin.png b/success_admin.png new file mode 100644 index 0000000000000000000000000000000000000000..0901763600a4271438c4b604df881ba079dc934f Binary files /dev/null and b/success_admin.png differ