From 28dcec29a20c2fc6a7c5a208b67043ead03edf89 Mon Sep 17 00:00:00 2001 From: mage2-team Date: Fri, 6 Dec 2013 09:33:16 -0800 Subject: [PATCH] 2.0.0.0-dev55 * Modularity improvements: * Session configuration moved to library * FormKey logic was moved from Session * SessionIdFlags from Session was removed * Move Page logic to the Theme module and library * Created integration module UX * Created authorization service (Magento_Authz module) * Fixed bugs: * Fixed the issue that prevented a customer group's shopping cart rules from applying properly to prices. The issue occurred when a customer was manually assigned to a customer group and automatic group assignment was enabled. * Fixed the bug with schema upgrade scripts not running after installation * Fixed the error with a blank page when user tries to get access to a restricted resource via URL (add Secret Key for URL set to "No") --- CHANGELOG.md | 14 + .../Block/System/Messages.php | 22 +- .../System/Messages/UnreadMessagePopup.php | 22 +- .../AdminNotification/Block/ToolbarEntry.php | 22 +- .../AdminNotification/Block/Window.php | 26 +- .../Resource/System/Message/Collection.php | 12 +- .../Magento/AdminNotification/etc/module.xml | 2 +- .../view/adminhtml/layout/default.xml | 6 +- .../view/adminhtml/notification/window.phtml | 2 +- .../adminhtml/system/messages/popup.phtml | 13 +- .../view/adminhtml/toolbar_entry.js | 11 +- .../Magento/Adminhtml/Block/Urlrewrite.php | 22 +- .../Urlrewrite/Catalog/Category/Edit.php | 30 +- .../Urlrewrite/Catalog/Category/Tree.php | 48 +- .../Block/Urlrewrite/Catalog/Edit/Form.php | 3 - .../Block/Urlrewrite/Catalog/Product/Edit.php | 34 +- .../Block/Urlrewrite/Cms/Page/Edit.php | 30 +- .../Block/Urlrewrite/Cms/Page/Edit/Form.php | 3 - .../Adminhtml/Block/Urlrewrite/Edit.php | 26 +- .../Adminhtml/Block/Urlrewrite/Edit/Form.php | 4 +- .../Adminhtml/Block/Urlrewrite/Link.php | 2 +- .../Adminhtml/Block/Urlrewrite/Selector.php | 2 +- .../Magento/Adminhtml/Model/Session/Quote.php | 8 +- .../adminhtml/urlrewrite/categories.phtml | 2 +- .../view/adminhtml/urlrewrite/selector.phtml | 2 +- .../Authorizenet/Block/Directpost/Form.php | 8 +- .../Authorizenet/Block/Directpost/Iframe.php | 12 +- .../Authorizenet/Directpost/Payment.php | 4 +- .../Model/Directpost/Observer.php | 2 +- .../Authorizenet/Model/Directpost/Session.php | 8 +- app/code/Magento/Authorizenet/etc/module.xml | 2 +- .../layout/sales_order_create_index.xml | 2 +- .../layout/checkout_onepage_index.xml | 2 +- .../Magento/Authz/Model/UserIdentifier.php | 130 ++++ .../Authz/Model/UserIdentifier/Factory.php | 42 +- .../Magento/Authz/Model/UserLocator/Admin.php | 64 ++ .../Magento/Authz/Model/UserLocator/Guest.php | 50 ++ .../Model/UserLocatorInterface.php} | 25 +- .../Magento/Authz/Service/AuthorizationV1.php | 254 +++++++ .../Service/AuthorizationV1Interface.php | 72 ++ app/code/Magento/Authz/etc/adminhtml/di.xml | 28 + app/code/Magento/Authz/etc/di.xml | 29 + .../Magento/{Page => Authz}/etc/module.xml | 10 +- .../Magento/Backend/App/AbstractAction.php | 22 +- .../Magento/Backend/App/Action/Context.php | 2 +- .../Magento/Backend/Block/AbstractBlock.php | 2 +- .../Magento/Backend/Block/Admin/Formkey.php | 2 +- .../Block/Cache/Grid/Column/Statuses.php | 4 +- app/code/Magento/Backend/Block/Context.php | 31 +- .../Block/Dashboard/AbstractDashboard.php | 22 +- .../Magento/Backend/Block/Dashboard/Graph.php | 26 +- .../Backend/Block/Dashboard/Orders/Grid.php | 36 +- .../Magento/Backend/Block/Dashboard/Sales.php | 25 +- .../Backend/Block/Dashboard/Searches/Last.php | 36 +- .../Backend/Block/Dashboard/Searches/Top.php | 36 +- .../Block/Dashboard/Tab/Customers/Most.php | 26 +- .../Block/Dashboard/Tab/Customers/Newest.php | 26 +- .../Block/Dashboard/Tab/Products/Ordered.php | 36 +- .../Block/Dashboard/Tab/Products/Viewed.php | 26 +- .../Backend/Block/Dashboard/Totals.php | 25 +- app/code/Magento/Backend/Block/Denied.php | 22 +- .../Magento/Backend/Block/Media/Uploader.php | 6 +- app/code/Magento/Backend/Block/Menu.php | 34 +- app/code/Magento/Backend/Block/Page/Head.php | 33 +- .../Magento/Backend/Block/Page/Header.php | 26 +- .../Block/Page/System/Config/Robots/Reset.php | 35 +- .../Magento/Backend/Block/Store/Switcher.php | 30 +- .../Block/System/Account/Edit/Form.php | 34 +- .../Backend/Block/System/Cache/Form.php | 23 + .../Backend/Block/System/Config/Edit.php | 25 +- .../Backend/Block/System/Config/Form.php | 6 +- .../Field/FieldArray/AbstractFieldArray.php | 2 +- .../Config/Form/Field/Regexceptions.php | 26 +- .../Backend/Block/System/Config/Switcher.php | 6 +- .../System/Storage/Media/Synchronize.php | 22 +- .../Backend/Block/System/Config/Tabs.php | 22 +- .../Backend/Block/System/Design/Edit.php | 22 +- .../Block/System/Design/Edit/Tab/General.php | 34 +- .../Backend/Block/System/Shipping/Ups.php | 26 +- .../Backend/Block/System/Store/Edit.php | 22 +- .../Block/System/Store/Edit/Form/Group.php | 38 +- .../Block/System/Store/Edit/Form/Store.php | 34 +- .../Block/System/Store/Edit/Form/Website.php | 30 +- .../Backend/Block/System/Variable/Edit.php | 22 +- app/code/Magento/Backend/Block/Template.php | 14 +- .../Backend/Block/Template/Context.php | 22 +- .../Magento/Backend/Block/Text/ListText.php | 2 +- .../Backend/Block/Widget/Accordion.php | 2 +- .../Backend/Block/Widget/Accordion/Item.php | 2 +- .../Magento/Backend/Block/Widget/Button.php | 2 +- .../Backend/Block/Widget/Container.php | 2 +- .../Magento/Backend/Block/Widget/Form.php | 22 +- .../Backend/Block/Widget/Form/Container.php | 2 +- .../Block/Widget/Form/Element/Dependence.php | 52 +- .../Backend/Block/Widget/Form/Generic.php | 26 +- .../Magento/Backend/Block/Widget/Grid.php | 12 +- .../Block/Widget/Grid/Column/Extended.php | 18 +- .../Block/Widget/Grid/Column/Multistore.php | 4 +- .../Widget/Grid/Column/Renderer/Action.php | 32 +- .../Backend/Block/Widget/Grid/ColumnSet.php | 12 +- .../Backend/Block/Widget/Grid/Export.php | 24 +- .../Backend/Block/Widget/Grid/Extended.php | 4 +- .../Grid/Massaction/AbstractMassaction.php | 23 +- .../Widget/Grid/Massaction/Additional.php | 30 +- .../Block/Widget/Grid/Massaction/Extended.php | 34 +- .../Block/Widget/Grid/Massaction/Item.php | 6 +- .../Backend/Block/Widget/Grid/Serializer.php | 25 +- .../Magento/Backend/Block/Widget/Tabs.php | 31 +- .../Backend/Controller/Adminhtml/Cache.php | 44 +- .../Controller/Adminhtml/System/Variable.php | 2 +- .../Magento/Backend/Model/Auth/Session.php | 27 +- .../Model/Cache/Resource/Grid/Collection.php | 6 +- .../Model/Config/Backend/Admin/Observer.php | 3 +- .../Backend/Model/Config/Backend/Baseurl.php | 6 +- .../Backend/Model/Config/Backend/File.php | 6 +- .../Backend/Model/Config/Backend/Secure.php | 6 +- .../Config/Backend/Storage/Media/Database.php | 4 +- app/code/Magento/Backend/Model/Session.php | 24 +- app/code/Magento/Backend/Model/Url.php | 30 +- app/code/Magento/Backend/etc/adminhtml/di.xml | 28 - app/code/Magento/Backend/etc/di.xml | 31 + app/code/Magento/Backend/etc/module.xml | 2 +- .../Backend/view/adminhtml/admin/login.phtml | 6 +- .../view/adminhtml/admin/overlay_popup.phtml | 4 +- .../Backend/view/adminhtml/admin/page.phtml | 2 +- .../Backend/view/adminhtml/admin/popup.phtml | 10 +- .../adminhtml/layout/adminhtml_noroute.xml | 2 +- .../layout/adminhtml_system_config_edit.xml | 2 +- .../Backend/view/adminhtml/layout/default.xml | 94 +-- .../Backend/view/adminhtml/layout/editor.xml | 18 +- .../Backend/view/adminhtml/page/head.phtml | 6 +- .../view/adminhtml/page/js/calendar.phtml | 2 +- .../view/adminhtml/page/js/components.phtml | 2 +- .../view/adminhtml/page/js/translate.phtml | 2 +- .../Backend/view/adminhtml/widget/grid.phtml | 2 +- .../view/adminhtml/widget/grid/extended.phtml | 2 +- .../Backup/Block/Adminhtml/Dialogs.php | 4 +- .../Backup/Controller/Adminhtml/Index.php | 3 +- .../Magento/Backup/Model/Fs/Collection.php | 4 +- .../Product/Composite/Fieldset/Bundle.php | 7 +- .../Product/Edit/Tab/Attributes/Extend.php | 22 +- .../Catalog/Product/Edit/Tab/Bundle.php | 22 +- .../Product/Edit/Tab/Bundle/Option.php | 8 +- .../Edit/Tab/Bundle/Option/Search/Grid.php | 30 +- .../Edit/Tab/Bundle/Option/Selection.php | 8 +- .../Bundle/Block/Catalog/Product/Price.php | 10 +- .../Catalog/Product/View/Type/Bundle.php | 60 +- .../Block/Checkout/Cart/Item/Renderer.php | 8 +- .../Helper/Catalog/Product/Configuration.php | 4 +- app/code/Magento/Bundle/Model/Price/Index.php | 8 +- .../Magento/Bundle/Model/Resource/Bundle.php | 8 +- .../Bundle/Model/Resource/Price/Index.php | 8 +- .../Sales/Order/Pdf/Items/Creditmemo.php | 14 +- .../Model/Sales/Order/Pdf/Items/Invoice.php | 14 +- .../Model/Sales/Order/Pdf/Items/Shipment.php | 14 +- app/code/Magento/Bundle/Model/Selection.php | 4 +- app/code/Magento/Bundle/etc/module.xml | 2 +- .../layout/catalog_product_bundle.xml | 2 +- .../composite/fieldset/options/bundle.phtml | 20 +- .../fieldset/options/type/checkbox.phtml | 51 +- .../fieldset/options/type/multi.phtml | 37 +- .../fieldset/options/type/radio.phtml | 81 ++- .../fieldset/options/type/select.phtml | 56 +- .../catalog_product_view_type_bundle.xml | 4 +- .../Adminhtml/Captcha/DefaultCaptcha.php | 8 +- app/code/Magento/Captcha/Block/Captcha.php | 10 +- .../Captcha/Block/Captcha/DefaultCaptcha.php | 10 +- app/code/Magento/Captcha/etc/module.xml | 2 +- .../layout/checkout_onepage_index.xml | 2 +- .../Adminhtml/Category/AbstractCategory.php | 26 +- .../Block/Adminhtml/Category/Edit/Form.php | 29 +- .../Adminhtml/Category/Tab/Attributes.php | 30 +- .../Block/Adminhtml/Category/Tab/Product.php | 30 +- .../Catalog/Block/Adminhtml/Category/Tabs.php | 36 +- .../Catalog/Block/Adminhtml/Category/Tree.php | 52 +- .../Form/Renderer/Attribute/Urlkey.php | 26 +- .../Adminhtml/Helper/Form/Wysiwyg/Content.php | 30 +- .../Catalog/Block/Adminhtml/Product.php | 26 +- .../Adminhtml/Product/Attribute/Edit.php | 22 +- .../Product/Attribute/Edit/Tab/Advanced.php | 34 +- .../Product/Attribute/Edit/Tab/Front.php | 30 +- .../Adminhtml/Product/Attribute/Grid.php | 26 +- .../NewAttribute/Product/Created.php | 40 +- .../Adminhtml/Product/Attribute/Set/Main.php | 54 +- .../Product/Attribute/Set/Main/Formgroup.php | 30 +- .../Product/Attribute/Set/Main/Formset.php | 30 +- .../Attribute/Set/Toolbar/Main/Filter.php | 30 +- .../Adminhtml/Product/Composite/Configure.php | 26 +- .../Adminhtml/Product/Composite/Error.php | 34 +- .../Adminhtml/Product/Composite/Fieldset.php | 4 +- .../Product/Composite/Fieldset/Grouped.php | 8 +- .../Product/Composite/Fieldset/Qty.php | 24 +- .../Product/Composite/Update/Result.php | 38 +- .../Block/Adminhtml/Product/Created.php | 32 +- .../Catalog/Block/Adminhtml/Product/Edit.php | 36 +- .../Product/Edit/Action/Attribute.php | 22 +- .../Edit/Action/Attribute/Tab/Attributes.php | 4 +- .../Edit/Action/Attribute/Tab/Inventory.php | 22 +- .../Adminhtml/Product/Edit/AttributeSet.php | 22 +- .../Block/Adminhtml/Product/Edit/Js.php | 22 +- .../Adminhtml/Product/Edit/NewCategory.php | 40 +- .../Product/Edit/Tab/Ajax/Serializer.php | 2 +- .../Product/Edit/Tab/Alerts/Price.php | 30 +- .../Product/Edit/Tab/Alerts/Stock.php | 30 +- .../Adminhtml/Product/Edit/Tab/Attributes.php | 34 +- .../Product/Edit/Tab/Attributes/Search.php | 30 +- .../Adminhtml/Product/Edit/Tab/Crosssell.php | 50 +- .../Adminhtml/Product/Edit/Tab/Inventory.php | 36 +- .../Product/Edit/Tab/Options/Option.php | 8 +- .../Edit/Tab/Options/Type/AbstractType.php | 6 +- .../Edit/Tab/Price/Group/AbstractGroup.php | 34 +- .../Product/Edit/Tab/Price/Recurring.php | 22 +- .../Adminhtml/Product/Edit/Tab/Related.php | 50 +- .../Product/Edit/Tab/Super/Config.php | 13 +- .../Super/Config/Grid/Renderer/Checkbox.php | 34 +- .../Product/Edit/Tab/Super/Config/Matrix.php | 35 +- .../Product/Edit/Tab/Super/Config/Simple.php | 38 +- .../Product/Edit/Tab/Super/Settings.php | 30 +- .../Adminhtml/Product/Edit/Tab/Upsell.php | 50 +- .../Adminhtml/Product/Edit/Tab/Websites.php | 34 +- .../Block/Adminhtml/Product/Edit/Tabs.php | 50 +- .../Product/Frontend/Product/Watermark.php | 30 +- .../Catalog/Block/Adminhtml/Product/Grid.php | 50 +- .../Product/Helper/Form/Category.php | 13 +- .../Product/Helper/Form/Gallery/Content.php | 18 +- .../Block/Adminhtml/Product/Options/Ajax.php | 36 +- .../Adminhtml/Product/Widget/Chooser.php | 38 +- .../Catalog/Block/Adminhtml/Search/Edit.php | 22 +- .../Block/Adminhtml/Search/Edit/Form.php | 30 +- .../Magento/Catalog/Block/Breadcrumbs.php | 10 +- .../Magento/Catalog/Block/Category/View.php | 12 +- .../Catalog/Block/Category/Widget/Link.php | 8 +- .../Block/Layer/Filter/AbstractFilter.php | 10 +- .../Magento/Catalog/Block/Layer/State.php | 10 +- app/code/Magento/Catalog/Block/Layer/View.php | 10 +- app/code/Magento/Catalog/Block/Navigation.php | 10 +- app/code/Magento/Catalog/Block/Product.php | 10 +- .../Catalog/Block/Product/AbstractProduct.php | 14 +- .../Block/Product/Compare/AbstractCompare.php | 8 +- .../Block/Product/Compare/ListCompare.php | 13 +- .../Backend/Grid/ColumnSet.php | 8 +- .../Configurable/AttributeSelector.php | 26 +- .../Magento/Catalog/Block/Product/Gallery.php | 10 +- .../ListAssociatedProducts.php | 22 +- .../Magento/Catalog/Block/Product/Image.php | 10 +- .../Catalog/Block/Product/ListProduct.php | 8 +- .../Catalog/Block/Product/NewProduct.php | 10 +- .../Magento/Catalog/Block/Product/Price.php | 20 +- .../Catalog/Block/Product/Price/Template.php | 2 +- .../Block/Product/ProductList/Promotion.php | 7 +- .../Block/Product/ProductList/Random.php | 7 +- .../Block/Product/ProductList/Related.php | 8 +- .../Block/Product/ProductList/Toolbar.php | 12 +- .../Block/Product/ProductList/Upsell.php | 8 +- .../Magento/Catalog/Block/Product/Send.php | 8 +- .../Block/Product/TemplateSelector.php | 10 +- .../Magento/Catalog/Block/Product/View.php | 28 +- .../Block/Product/View/AbstractView.php | 8 +- .../Catalog/Block/Product/View/Additional.php | 2 +- .../Catalog/Block/Product/View/Attributes.php | 10 +- .../Block/Product/View/Description.php | 10 +- .../Catalog/Block/Product/View/Options.php | 24 +- .../Product/View/Options/AbstractOptions.php | 10 +- .../Block/Product/View/Options/Type/Date.php | 14 +- .../Product/View/Options/Type/Select.php | 2 +- .../Catalog/Block/Product/View/Price.php | 10 +- .../Catalog/Block/Product/View/Tabs.php | 2 +- .../Block/Product/View/Type/Configurable.php | 28 +- .../Block/Product/Widget/Html/Pager.php | 2 +- .../Catalog/Block/Product/Widget/Link.php | 8 +- .../Block/Product/Widget/NewWidget.php | 2 +- .../Magento/Catalog/Block/Widget/Link.php | 18 +- .../Catalog/Controller/Adminhtml/Category.php | 4 +- .../Controller/Adminhtml/Product/Set.php | 4 +- .../Magento/Catalog/Controller/Category.php | 2 +- app/code/Magento/Catalog/Helper/Catalog.php | 4 +- app/code/Magento/Catalog/Helper/Category.php | 6 +- .../Magento/Catalog/Helper/Category/Flat.php | 2 - app/code/Magento/Catalog/Helper/Data.php | 8 +- .../Catalog/Helper/Flat/AbstractFlat.php | 2 - app/code/Magento/Catalog/Helper/Image.php | 6 +- app/code/Magento/Catalog/Helper/Output.php | 6 +- app/code/Magento/Catalog/Helper/Product.php | 12 +- .../Catalog/Helper/Product/Compare.php | 12 +- .../Catalog/Helper/Product/Composite.php | 4 +- .../Catalog/Helper/Product/Configuration.php | 4 +- .../Magento/Catalog/Helper/Product/Flat.php | 2 - .../Magento/Catalog/Helper/Product/Url.php | 8 +- .../Magento/Catalog/Helper/Product/View.php | 10 +- .../Magento/Catalog/Model/AbstractModel.php | 6 +- app/code/Magento/Catalog/Model/Category.php | 18 +- .../Category/Attribute/Source/Layout.php | 6 +- .../Catalog/Model/Category/Indexer/Flat.php | 10 +- .../Catalog/Model/Config/Backend/Category.php | 6 +- .../Model/Config/CatalogClone/Media/Image.php | 10 +- app/code/Magento/Catalog/Model/Design.php | 10 +- .../Magento/Catalog/Model/Indexer/Url.php | 10 +- .../Catalog/Model/Layer/Filter/Category.php | 2 +- .../Catalog/Model/Layer/Filter/Item.php | 6 +- app/code/Magento/Catalog/Model/Product.php | 46 +- .../Magento/Catalog/Model/Product/Action.php | 10 +- .../Catalog/Model/Product/Attribute/Group.php | 6 +- .../Model/Product/Attribute/Source/Layout.php | 6 +- .../Catalog/Model/Product/Compare/Item.php | 10 +- .../Catalog/Model/Product/Flat/Indexer.php | 10 +- .../Magento/Catalog/Model/Product/Image.php | 12 +- .../Catalog/Model/Product/Indexer/Eav.php | 6 +- .../Catalog/Model/Product/Indexer/Flat.php | 10 +- .../Magento/Catalog/Model/Product/Link.php | 10 +- .../Magento/Catalog/Model/Product/Option.php | 6 +- .../Catalog/Model/Product/Option/Value.php | 6 +- .../Magento/Catalog/Model/Product/Status.php | 10 +- .../Category/Attribute/Collection.php | 18 +- .../Resource/Category/Flat/Collection.php | 18 +- .../Resource/Category/Indexer/Product.php | 10 +- .../Collection/AbstractCollection.php | 30 +- .../Magento/Catalog/Model/Resource/Config.php | 8 +- .../Model/Resource/Layer/Filter/Price.php | 12 +- .../Resource/Product/Attribute/Collection.php | 18 +- .../Model/Resource/Product/Collection.php | 35 +- .../Product/Collection/AssociatedProduct.php | 40 +- .../Product/Compare/Item/Collection.php | 41 +- .../Catalog/Model/Resource/Product/Flat.php | 8 +- .../Model/Resource/Product/Flat/Indexer.php | 8 +- .../Model/Resource/Product/Indexer/Eav.php | 12 +- .../Model/Resource/Product/Indexer/Price.php | 6 +- .../Catalog/Model/Resource/Product/Link.php | 8 +- .../Resource/Product/Option/Collection.php | 22 +- .../Catalog/Model/Resource/Product/Status.php | 8 +- .../Resource/Product/Type/Configurable.php | 8 +- .../Product/Type/Configurable/Attribute.php | 8 +- .../Configurable/Attribute/Collection.php | 24 +- .../Grouped/AssociatedProductsCollection.php | 43 +- .../Model/Resource/Product/Website.php | 8 +- .../Magento/Catalog/Model/Resource/Setup.php | 8 +- .../Magento/Catalog/Model/Resource/Url.php | 6 +- app/code/Magento/Catalog/Model/Session.php | 8 +- .../Config/Backend/Catalog/Category/Flat.php | 6 +- .../Config/Backend/Catalog/Product/Flat.php | 6 +- .../Backend/Catalog/Url/Rewrite/Suffix.php | 4 +- app/code/Magento/Catalog/etc/module.xml | 2 +- .../edit/super/attribute-js-template.phtml | 2 +- .../edit/super/attribute-template.phtml | 2 +- .../CATALOG_PRODUCT_COMPOSITE_CONFIGURE.xml | 2 +- .../layout/catalog_category_edit.xml | 14 +- .../layout/catalog_product_grouped.xml | 4 +- .../adminhtml/layout/catalog_product_new.xml | 38 +- .../layout/catalog_product_review_new.xml | 2 +- .../form.phtml | 2 +- .../adminhtml/product/grouped/grouped.phtml | 4 +- .../category/widget/link/link_block.phtml | 2 +- .../category/widget/link/link_inline.phtml | 2 +- .../view/frontend/layout/MAP_popup.xml | 2 +- .../frontend/layout/catalog_category_view.xml | 2 +- .../frontend/layout/catalog_product_view.xml | 8 +- .../product/widget/link/link_block.phtml | 2 +- .../product/widget/link/link_inline.phtml | 2 +- .../Adminhtml/Form/Field/Customergroup.php | 6 +- .../CatalogInventory/Block/Qtyincrements.php | 10 +- .../Block/Stockqty/AbstractStockqty.php | 10 +- .../Model/Config/Backend/Managestock.php | 4 +- .../CatalogInventory/Model/Indexer/Stock.php | 4 +- .../Model/Resource/Stock/Item/Collection.php | 12 +- .../Magento/CatalogInventory/Model/Stock.php | 4 +- .../CatalogInventory/Model/Stock/Item.php | 10 +- .../System/Config/Backend/Minsaleqty.php | 4 +- .../Block/Adminhtml/Promo/Catalog/Edit.php | 22 +- .../Promo/Catalog/Edit/Tab/Conditions.php | 34 +- .../Adminhtml/Promo/Catalog/Edit/Tab/Main.php | 4 +- .../Block/Adminhtml/Promo/Widget/Chooser.php | 26 +- .../Adminhtml/Promo/Widget/Chooser/Sku.php | 38 +- app/code/Magento/CatalogRule/Model/Rule.php | 24 +- .../CatalogSearch/Block/Advanced/Form.php | 14 +- .../CatalogSearch/Block/Advanced/Result.php | 10 +- .../CatalogSearch/Block/Autocomplete.php | 2 +- .../Magento/CatalogSearch/Block/Layer.php | 8 +- .../Magento/CatalogSearch/Block/Result.php | 10 +- app/code/Magento/CatalogSearch/Block/Term.php | 10 +- .../Model/Config/Backend/Search/Type.php | 6 +- .../Magento/CatalogSearch/Model/Fulltext.php | 4 +- .../Model/Resource/Advanced/Collection.php | 42 +- .../Model/Resource/Fulltext/Collection.php | 42 +- .../Model/Resource/Query/Collection.php | 14 +- .../Model/Resource/Search/Collection.php | 41 +- app/code/Magento/CatalogSearch/etc/module.xml | 2 +- .../view/frontend/form.mini.phtml | 2 +- .../layout/catalogsearch_advanced_index.xml | 2 +- .../layout/catalogsearch_advanced_result.xml | 2 +- .../layout/catalogsearch_result_index.xml | 2 +- .../view/frontend/layout/default.xml | 6 +- .../Magento/Centinel/Block/Authentication.php | 10 +- .../Block/Authentication/Complete.php | 10 +- .../Centinel/Block/Authentication/Start.php | 10 +- app/code/Magento/Centinel/Block/Logo.php | 2 +- app/code/Magento/Centinel/Model/Service.php | 20 +- app/code/Magento/Centinel/etc/module.xml | 2 +- .../layout/sales_order_create_index.xml | 2 +- .../checkout_multishipping_overview.xml | 2 +- .../layout/checkout_onepage_index.xml | 2 +- .../Block/Adminhtml/Agreement/Edit.php | 22 +- .../Block/Adminhtml/Agreement/Edit/Form.php | 30 +- .../Block/Adminhtml/Agreement/Grid.php | 26 +- .../Magento/Checkout/Block/Agreements.php | 10 +- app/code/Magento/Checkout/Block/Cart.php | 8 +- .../Checkout/Block/Cart/AbstractCart.php | 12 +- .../Magento/Checkout/Block/Cart/Crosssell.php | 8 +- .../Checkout/Block/Cart/Item/Configure.php | 2 +- .../Checkout/Block/Cart/Item/Renderer.php | 12 +- app/code/Magento/Checkout/Block/Cart/Link.php | 10 +- .../Magento/Checkout/Block/Cart/Shipping.php | 8 +- .../Magento/Checkout/Block/Cart/Sidebar.php | 10 +- .../Magento/Checkout/Block/Cart/Totals.php | 8 +- app/code/Magento/Checkout/Block/Link.php | 10 +- .../Multishipping/AbstractMultishipping.php | 10 +- .../Block/Multishipping/Addresses.php | 10 +- .../Checkout/Block/Multishipping/Billing.php | 8 +- .../Block/Multishipping/Billing/Items.php | 8 +- .../Checkout/Block/Multishipping/Link.php | 10 +- .../Checkout/Block/Multishipping/Overview.php | 10 +- .../Block/Multishipping/Payment/Info.php | 8 +- .../Checkout/Block/Multishipping/Shipping.php | 8 +- .../Checkout/Block/Multishipping/State.php | 10 +- .../Checkout/Block/Multishipping/Success.php | 8 +- .../Block/Onepage/AbstractOnepage.php | 20 +- .../Checkout/Block/Onepage/Billing.php | 4 +- .../Checkout/Block/Onepage/Failure.php | 10 +- .../Magento/Checkout/Block/Onepage/Link.php | 10 +- .../Magento/Checkout/Block/Onepage/Login.php | 4 +- .../Checkout/Block/Onepage/Payment/Info.php | 8 +- .../Block/Onepage/Payment/Methods.php | 8 +- .../Checkout/Block/Onepage/Review/Info.php | 8 +- .../Checkout/Block/Onepage/Shipping.php | 4 +- .../Onepage/Shipping/Method/Available.php | 4 +- .../Checkout/Block/Onepage/Success.php | 10 +- app/code/Magento/Checkout/Block/Success.php | 10 +- .../Checkout/Controller/Multishipping.php | 4 +- .../Magento/Checkout/Controller/Onepage.php | 2 +- app/code/Magento/Checkout/Model/Observer.php | 2 +- .../Checkout/Model/Resource/Agreement.php | 8 +- .../Magento/Checkout/Model/Resource/Setup.php | 6 +- app/code/Magento/Checkout/Model/Session.php | 40 +- app/code/Magento/Checkout/etc/module.xml | 1 - .../frontend/layout/checkout_cart_index.xml | 2 +- .../checkout_multishipping_addresses.xml | 2 +- .../checkout_multishipping_overview.xml | 2 +- .../checkout_multishipping_shipping.xml | 2 +- .../layout/checkout_onepage_index.xml | 4 +- .../layout/checkout_onepage_paymentmethod.xml | 4 +- .../layout/checkout_onepage_review.xml | 4 +- .../Checkout/view/frontend/layout/default.xml | 2 +- .../Cms/Block/Adminhtml/Block/Edit.php | 22 +- .../Cms/Block/Adminhtml/Block/Edit/Form.php | 34 +- .../Block/Adminhtml/Block/Widget/Chooser.php | 30 +- .../Magento/Cms/Block/Adminhtml/Page/Edit.php | 24 +- .../Block/Adminhtml/Page/Edit/Tab/Content.php | 30 +- .../Block/Adminhtml/Page/Edit/Tab/Design.php | 36 +- .../Block/Adminhtml/Page/Edit/Tab/Main.php | 30 +- .../Magento/Cms/Block/Adminhtml/Page/Grid.php | 36 +- .../Block/Adminhtml/Page/Widget/Chooser.php | 40 +- .../Adminhtml/Wysiwyg/Images/Content.php | 23 +- .../Wysiwyg/Images/Content/Files.php | 26 +- .../Wysiwyg/Images/Content/Uploader.php | 26 +- .../Block/Adminhtml/Wysiwyg/Images/Tree.php | 26 +- app/code/Magento/Cms/Block/Block.php | 8 +- app/code/Magento/Cms/Block/Page.php | 8 +- app/code/Magento/Cms/Block/Widget/Block.php | 10 +- .../Magento/Cms/Block/Widget/Page/Link.php | 14 +- app/code/Magento/Cms/Helper/Page.php | 6 +- .../Cms/Model/Resource/Page/Collection.php | 14 +- app/code/Magento/Cms/Model/Resource/Setup.php | 2 +- .../Cms/Model/Wysiwyg/Images/Storage.php | 2 +- .../Wysiwyg/Images/Storage/Collection.php | 10 +- app/code/Magento/Cms/etc/module.xml | 4 +- .../view/adminhtml/layout/cms_block_edit.xml | 12 +- .../view/adminhtml/layout/cms_page_edit.xml | 14 +- .../layout/cms_index_defaultindex.xml | 2 +- .../layout/cms_index_defaultnoroute.xml | 2 +- .../view/frontend/layout/cms_page_view.xml | 2 +- .../frontend/widget/link/link_block.phtml | 2 +- .../frontend/widget/link/link_inline.phtml | 2 +- .../Extension/Custom/Edit/Tab/AbstractTab.php | 30 +- .../Extension/Custom/Edit/Tab/Authors.php | 29 +- .../Extension/Custom/Edit/Tab/Contents.php | 34 +- .../Extension/Custom/Edit/Tab/Grid.php | 26 +- .../Connect/Model/Extension/Collection.php | 6 +- app/code/Magento/Connect/Model/Session.php | 8 +- app/code/Magento/Contacts/etc/frontend/di.xml | 2 +- .../frontend/layout/contacts_index_index.xml | 2 +- .../Contacts/view/frontend/layout/default.xml | 2 +- .../Core/App/Action/FormKeyValidator.php | 14 +- .../Core/App/Action/Plugin/Session.php | 27 +- .../Magento/Core/App/Response/Redirect.php | 10 +- app/code/Magento/Core/App/Router/Base.php | 13 +- app/code/Magento/Core/Block/Formkey.php | 23 +- .../Magento/Core/Block/Store/Switcher.php | 10 +- .../Magento/{Page => Core}/Block/Switcher.php | 6 +- app/code/Magento/Core/Helper/Cookie.php | 34 +- app/code/Magento/Core/Helper/File/Storage.php | 4 +- app/code/Magento/Core/Helper/Js.php | 6 +- app/code/Magento/Core/Helper/Theme.php | 6 +- app/code/Magento/Core/Model/App.php | 8 +- app/code/Magento/Core/Model/AppInterface.php | 2 +- app/code/Magento/Core/Model/Asset/Config.php | 108 +++ .../Model/Asset/Plugin/CleanMergedJsCss.php | 65 ++ app/code/Magento/Core/Model/Cookie.php | 349 ---------- .../Core/Model/Design/Backend/Exceptions.php | 4 +- .../Core/Model/Design/Backend/Theme.php | 4 +- app/code/Magento/Core/Model/File/Storage.php | 4 +- .../Core/Model/File/Storage/Database.php | 14 +- .../Storage/Database/AbstractDatabase.php | 8 +- .../Model/File/Storage/Directory/Database.php | 8 +- app/code/Magento/Core/Model/Layout.php | 122 ++-- .../Core/Model/Layout/PageType/Config.php | 2 - app/code/Magento/Core/Model/Observer.php | 14 +- .../Config/Value/Collection/Scoped.php | 16 +- .../Db/Collection/AbstractCollection.php | 12 +- .../Magento/Core/Model/Resource/Design.php | 8 +- .../Core/Model/Resource/Design/Collection.php | 12 +- .../Model/Resource/Layout/Link/Collection.php | 12 +- .../Resource/Layout/Update/Collection.php | 12 +- .../Core/Model/Resource/Setup/Migration.php | 8 +- .../Model/Resource/Url/Rewrite/Collection.php | 12 +- app/code/Magento/Core/Model/Session.php | 34 +- .../Core/Model/Session/AbstractSession.php | 394 +++++------ .../Magento/Core/Model/Session/Config.php | 626 ++++++++++++++++++ .../Magento/Core/Model/Session/Context.php | 106 +-- .../Magento/Core/Model/Session/Generic.php | 8 +- .../Core/Model/Session/SidResolver.php | 113 ++++ .../Magento/Core/Model/Session/Validator.php | 2 +- app/code/Magento/Core/Model/Store.php | 39 +- .../Magento/Core/Model/Store/Storage/Db.php | 7 +- .../Core/Model/Store/StorageFactory.php | 2 +- app/code/Magento/Core/Model/Template.php | 4 +- .../Magento/Core/Model/Theme/Collection.php | 6 +- .../Magento/Core/Model/Translate/Inline.php | 4 +- app/code/Magento/Core/Model/Url.php | 28 +- app/code/Magento/Core/Model/Variable.php | 4 +- app/code/Magento/Core/etc/di.xml | 20 +- app/code/Magento/Core/etc/module.xml | 1 - .../Core/view/adminhtml/prototype/magento.css | 5 + .../view/frontend/switch/flags.phtml | 0 .../view/frontend/switch/languages.phtml | 4 +- .../view/frontend/switch/stores.phtml | 0 .../Model/Config/Backend/Product/Alert.php | 4 +- .../Cron/Model/Config/Backend/Sitemap.php | 4 +- app/code/Magento/Cron/Model/Schedule.php | 4 +- .../Adminhtml/System/Currency/Rate/Matrix.php | 22 +- .../System/Currency/Rate/Services.php | 8 +- .../Block/Adminhtml/System/Currencysymbol.php | 26 +- .../Block/Account/AuthorizationLink.php | 10 +- .../Customer/Block/Account/Customer.php | 10 +- .../Customer/Block/Account/Dashboard.php | 10 +- .../Block/Account/Dashboard/Address.php | 10 +- .../Block/Account/Dashboard/Block.php | 2 +- .../Block/Account/Dashboard/Hello.php | 10 +- .../Customer/Block/Account/Dashboard/Info.php | 10 +- .../Block/Account/Dashboard/Newsletter.php | 10 +- .../Block/Account/Dashboard/Sidebar.php | 10 +- .../Customer/Block/Account/Forgotpassword.php | 2 +- .../Magento/Customer/Block/Account/Link.php | 2 +- .../Customer/Block/Account/RegisterLink.php | 10 +- .../Customer/Block/Account/Resetpassword.php | 2 +- .../Magento/Customer/Block/Address/Book.php | 10 +- .../Magento/Customer/Block/Address/Edit.php | 10 +- .../Address/Renderer/DefaultRenderer.php | 6 +- .../Magento/Customer/Block/Adminhtml/Edit.php | 22 +- .../Edit/Renderer/Attribute/Group.php | 26 +- .../Block/Adminhtml/Edit/Tab/Account.php | 44 +- .../Block/Adminhtml/Edit/Tab/Addresses.php | 64 +- .../Block/Adminhtml/Edit/Tab/Cart.php | 34 +- .../Block/Adminhtml/Edit/Tab/Carts.php | 22 +- .../Block/Adminhtml/Edit/Tab/Newsletter.php | 30 +- .../Adminhtml/Edit/Tab/Newsletter/Grid.php | 30 +- .../Block/Adminhtml/Edit/Tab/Orders.php | 34 +- .../Block/Adminhtml/Edit/Tab/View.php | 39 +- .../Adminhtml/Edit/Tab/View/Accordion.php | 30 +- .../Block/Adminhtml/Edit/Tab/View/Cart.php | 34 +- .../Block/Adminhtml/Edit/Tab/View/Orders.php | 30 +- .../Block/Adminhtml/Edit/Tab/View/Sales.php | 31 +- .../Adminhtml/Edit/Tab/View/Wishlist.php | 30 +- .../Customer/Block/Adminhtml/Edit/Tabs.php | 28 +- .../Magento/Customer/Block/Adminhtml/Grid.php | 34 +- .../Customer/Block/Adminhtml/Group/Edit.php | 22 +- .../Block/Adminhtml/Group/Edit/Form.php | 30 +- .../Sales/Order/Address/Form/Renderer/Vat.php | 23 +- .../Magento/Customer/Block/Form/Login.php | 10 +- .../Magento/Customer/Block/Form/Register.php | 20 +- .../Magento/Customer/Block/Newsletter.php | 2 +- .../Customer/Block/Widget/AbstractWidget.php | 10 +- .../Magento/Customer/Block/Widget/Gender.php | 8 +- .../Magento/Customer/Block/Widget/Taxvat.php | 8 +- .../Magento/Customer/Controller/Account.php | 2 +- .../Customer/Controller/Adminhtml/Group.php | 16 +- app/code/Magento/Customer/Helper/Data.php | 4 +- app/code/Magento/Customer/Model/Address.php | 18 +- .../Model/Address/AbstractAddress.php | 4 +- app/code/Magento/Customer/Model/Customer.php | 9 +- .../Customer/Model/Renderer/Region.php | 6 +- .../Model/Resource/Customer/Collection.php | 19 +- .../Magento/Customer/Model/Resource/Group.php | 6 +- .../Magento/Customer/Model/Resource/Setup.php | 6 +- app/code/Magento/Customer/Model/Session.php | 31 +- app/code/Magento/Customer/etc/module.xml | 2 +- .../adminhtml/layout/customer_index_edit.xml | 6 +- .../view/frontend/account/navigation.phtml | 2 +- .../view/frontend/layout/customer_account.xml | 8 +- .../layout/customer_account_confirmation.xml | 2 +- .../layout/customer_account_index.xml | 2 +- .../layout/customer_account_logoutsuccess.xml | 2 +- .../Form/Renderer/BackgroundUploader.php | 22 +- .../Editor/Form/Renderer/LogoUploader.php | 26 +- .../Adminhtml/Editor/Toolbar/Buttons/Edit.php | 26 +- .../Block/Adminhtml/Editor/Tools.php | 22 +- .../Block/Adminhtml/Editor/Tools/Block.php | 2 +- .../Block/Adminhtml/Editor/Tools/Code/Css.php | 2 +- .../Adminhtml/Editor/Tools/Code/Custom.php | 30 +- .../Editor/Tools/Code/ImageSizing.php | 38 +- .../Block/Adminhtml/Editor/Tools/Code/Js.php | 34 +- .../Editor/Tools/QuickStyles/AbstractTab.php | 26 +- .../Block/Adminhtml/Editor/Tools/Settings.php | 2 +- .../Editor/Tools/Tabs/AbstractTabs.php | 2 +- .../Adminhtml/Editor/Tools/Tabs/Body.php | 2 +- .../Block/Adminhtml/Theme/Button.php | 2 +- .../Adminhtml/Theme/Selector/StoreView.php | 26 +- .../Magento/DesignEditor/Model/Observer.php | 9 +- .../Model/Theme/Resource/Change.php | 4 +- .../Model/Translate/InlineVde.php | 4 +- .../DesignEditor/Model/Url/NavigationMode.php | 13 +- app/code/Magento/DesignEditor/etc/module.xml | 2 - .../view/adminhtml/editor/toolbar.phtml | 2 +- ...tml_system_design_editor_firstentrance.xml | 12 +- .../adminhtml_system_design_editor_index.xml | 14 +- .../adminhtml_system_design_editor_launch.xml | 42 +- .../view/frontend/translate_inline.phtml | 2 +- app/code/Magento/Directory/Block/Currency.php | 10 +- app/code/Magento/Directory/Block/Data.php | 28 +- app/code/Magento/Directory/Helper/Url.php | 6 +- .../Model/Resource/Country/Collection.php | 12 +- .../Model/Resource/Region/Collection.php | 14 +- .../Directory/Model/Resource/Setup.php | 4 +- .../Catalog/Product/Edit/Tab/Downloadable.php | 22 +- .../Product/Edit/Tab/Downloadable/Links.php | 23 +- .../Product/Edit/Tab/Downloadable/Samples.php | 53 +- .../Sales/Items/Column/Downloadable/Name.php | 30 +- .../Block/Catalog/Product/Links.php | 28 +- .../Block/Checkout/Cart/Item/Renderer.php | 8 +- .../Block/Customer/Products/ListProducts.php | 12 +- .../Sales/Order/Email/Items/Downloadable.php | 10 +- .../Order/Email/Items/Order/Downloadable.php | 10 +- .../Order/Item/Renderer/Downloadable.php | 8 +- .../Adminhtml/Downloadable/File.php | 2 +- .../Helper/Catalog/Product/Configuration.php | 6 +- .../Magento/Downloadable/Helper/Download.php | 4 +- app/code/Magento/Downloadable/Helper/File.php | 4 +- .../Downloadable/Model/Resource/Link.php | 4 +- .../Sales/Order/Pdf/Items/AbstractItems.php | 6 +- .../Sales/Order/Pdf/Items/Creditmemo.php | 10 +- .../Model/Sales/Order/Pdf/Items/Invoice.php | 10 +- app/code/Magento/Downloadable/etc/module.xml | 2 +- .../composite/fieldset/downloadable.phtml | 75 +-- .../view/frontend/catalog/product/links.phtml | 4 +- .../view/frontend/layout/customer_account.xml | 2 +- .../Attribute/Edit/Main/AbstractMain.php | 42 +- .../Edit/Options/AbstractOptions.php | 2 +- .../Attribute/Edit/Options/Labels.php | 22 +- .../Attribute/Edit/Options/Options.php | 30 +- .../Entity/Collection/AbstractCollection.php | 14 +- app/code/Magento/Eav/Model/Entity/Setup.php | 4 +- .../Model/Resource/Attribute/Collection.php | 12 +- .../Entity/Attribute/Grid/Collection.php | 12 +- .../Entity/Attribute/Option/Collection.php | 12 +- .../Resource/Form/Attribute/Collection.php | 12 +- .../Resource/Form/Fieldset/Collection.php | 12 +- .../Email/Block/Adminhtml/Template.php | 2 +- .../Email/Block/Adminhtml/Template/Edit.php | 14 +- .../Block/Adminhtml/Template/Edit/Form.php | 12 +- .../Block/Adminhtml/Template/Preview.php | 4 +- .../Magento/Email/Model/BackendTemplate.php | 12 +- .../Magento/Email/Model/Resource/Template.php | 4 +- app/code/Magento/Email/Model/Template.php | 10 +- .../Magento/Email/Model/Template/Filter.php | 2 +- .../view/adminhtml/layout/systemPreview.xml | 2 +- .../Adminhtml/Sales/Order/Create/Form.php | 22 +- .../Block/Adminhtml/Sales/Order/View/Form.php | 22 +- .../GiftMessage/Block/Message/Inline.php | 10 +- .../GiftMessage/Model/Resource/Setup.php | 12 +- app/code/Magento/GiftMessage/etc/module.xml | 2 +- .../adminhtml/layout/sales_order_view.xml | 2 +- app/code/Magento/GoogleAdwords/Block/Code.php | 10 +- .../Config/Backend/AbstractConversion.php | 13 +- app/code/Magento/GoogleAnalytics/Block/Ga.php | 10 +- .../Block/Adminhtml/Shipping/Merchant.php | 30 +- .../Magento/GoogleCheckout/Block/Link.php | 10 +- .../Magento/GoogleCheckout/Block/Redirect.php | 33 +- .../GoogleCheckout/Controller/Redirect.php | 3 +- .../Magento/GoogleCheckout/etc/module.xml | 1 - .../googlecheckout_redirect_redirect.xml | 2 +- .../GoogleOptimizer/Block/AbstractCode.php | 10 +- .../Block/Adminhtml/AbstractTab.php | 38 +- .../Category/Edit/Tab/Googleoptimizer.php | 34 +- .../GoogleOptimizer/Block/Code/Page.php | 8 +- .../GoogleShopping/Block/Adminhtml/Items.php | 22 +- .../Block/Adminhtml/Items/Item.php | 26 +- .../Block/Adminhtml/Items/Product.php | 38 +- .../Block/Adminhtml/Types/Edit.php | 24 +- .../Block/Adminhtml/Types/Edit/Attributes.php | 18 +- .../Block/Adminhtml/Types/Edit/Form.php | 50 +- .../GoogleShopping/Block/SiteVerification.php | 7 +- .../Magento/GoogleShopping/Helper/Data.php | 6 +- .../GoogleShopping/Model/Attribute.php | 8 +- .../Model/Attribute/ContentLanguage.php | 25 +- .../Model/Attribute/Destinations.php | 25 +- .../Model/Attribute/GoogleProductCategory.php | 29 +- .../Model/Attribute/ImageLink.php | 25 +- .../GoogleShopping/Model/Attribute/Link.php | 25 +- .../GoogleShopping/Model/Attribute/Price.php | 33 +- .../Model/Attribute/ProductType.php | 25 +- .../Model/Attribute/TargetCountry.php | 25 +- .../GoogleShopping/Model/Attribute/Tax.php | 29 +- .../Magento/GoogleShopping/Model/Item.php | 12 +- .../Model/Resource/Item/Collection.php | 20 +- .../GoogleShopping/Model/Resource/Setup.php | 4 +- .../Magento/GoogleShopping/Model/Type.php | 8 +- .../Magento/GoogleShopping/etc/module.xml | 2 +- .../adminhtml_googleshopping_items_index.xml | 2 +- .../Block/Adminhtml/Export/Edit/Form.php | 34 +- .../Block/Adminhtml/Export/Filter.php | 38 +- .../Block/Adminhtml/Form/After.php | 22 +- .../Block/Adminhtml/Import/Edit/Before.php | 34 +- .../Block/Adminhtml/Import/Edit/Form.php | 38 +- .../Block/Adminhtml/Import/Frame/Result.php | 27 +- .../layout/adminhtml_import_busy.xml | 2 +- .../Index/Block/Adminhtml/Process/Edit.php | 22 +- .../Index/Block/Adminhtml/Process/Grid.php | 34 +- app/code/Magento/Index/Model/Event.php | 4 +- app/code/Magento/Index/Model/Process.php | 10 +- .../Magento/Index/Model/Resource/Process.php | 4 +- .../Magento/Index/Model/Resource/Setup.php | 4 +- .../Magento/Install/Block/AbstractBlock.php | 10 +- app/code/Magento/Install/Block/Begin.php | 15 +- app/code/Magento/Install/Block/Config.php | 10 +- app/code/Magento/Install/Block/Db/Main.php | 12 +- app/code/Magento/Install/Block/Db/Type.php | 10 +- app/code/Magento/Install/Block/Download.php | 8 +- app/code/Magento/Install/Block/End.php | 8 +- app/code/Magento/Install/Block/Locale.php | 6 +- app/code/Magento/Install/Block/State.php | 40 +- .../Magento/Install/Controller/Wizard.php | 2 +- app/code/Magento/Install/etc/module.xml | 1 - .../Magento/Install/view/install/begin.phtml | 4 +- .../Magento/Install/view/install/config.phtml | 2 +- .../Install/view/install/create_admin.phtml | 2 +- .../Install/view/install/download.phtml | 2 +- .../view/install/layout/install_wizard.xml | 2 +- .../Magento/Install/view/install/locale.phtml | 2 +- .../Magento/Install/view/install/page.phtml | 6 +- .../Integration/Activate/Permissions/Tabs.php | 39 ++ .../Block/Adminhtml/Integration/Edit.php | 24 +- .../Adminhtml/Integration/Edit/Tab/Info.php | 71 +- .../Block/Adminhtml/Integration/Edit/Tabs.php | 2 +- .../Adminhtml/Integration/Grid.php} | 32 +- .../Block/Adminhtml/Integration/Token.php | 82 +++ .../Widget/Grid/Column/Renderer/Button.php | 122 ++++ .../Grid/Column/Renderer/Button/Delete.php | 54 ++ .../Grid/Column/Renderer/Button/Edit.php | 54 ++ .../Renderer/Button/IntegrationAbstract.php | 46 ++ .../Widget/Grid/Column/Renderer/Link.php | 164 +++++ .../Grid/Column/Renderer/Link/Activate.php | 78 +++ .../Grid/Column/Renderer/Link/Reauthorize.php | 41 ++ .../Controller/Adminhtml/Integration.php | 125 +++- app/code/Magento/Integration/Helper/Data.php | 25 +- .../Magento/Integration/Model/Cache/Type.php | 35 +- app/code/Magento/Integration/Model/Config.php | 85 +++ .../Integration/Model/Config/Converter.php | 30 +- .../Integration/Model/Config/Reader.php | 3 +- .../Magento/Integration/Model/Integration.php | 28 +- .../Magento/Integration/Model/Manager.php | 100 +++ .../Integration/Model/Oauth/Consumer.php | 8 +- .../Magento/Integration/Model/Oauth/Nonce.php | 4 +- .../Magento/Integration/Model/Oauth/Token.php | 9 +- .../Model/Resource/Integration.php | 5 +- .../Model/Resource/Oauth/Consumer.php | 4 +- .../Model/Resource/Oauth/Token.php | 4 +- .../Integration/Model/Resource/Setup.php | 69 ++ .../Integration/Service/IntegrationV1.php | 123 +++- .../Service/IntegrationV1Interface.php | 9 + app/code/Magento/Integration/etc/cache.xml | 31 + .../Integration/etc/integration/config.xsd | 20 +- app/code/Magento/Integration/etc/module.xml | 2 +- .../sql/integration_setup/install-1.0.0.0.php | 43 +- .../upgrade-1.0.0.0-1.0.0.1.php | 39 ++ .../view/adminhtml/integration.css | 91 +++ .../integration/activate/permissions.phtml} | 25 +- .../integration/popup_container.phtml | 37 ++ .../view/adminhtml/js/integration.js | 159 +++-- ...integration_activate_permissions_popup.xml | 32 + ...html_integration_activate_tokens_popup.xml | 29 + .../layout/adminhtml_integration_edit.xml | 7 - .../adminhtml_integration_grid_block.xml | 46 +- .../layout/adminhtml_integration_index.xml | 15 + .../layout/adminhtml_integration_new.xml | 7 - app/code/Magento/Log/Model/Aggregation.php | 4 +- app/code/Magento/Log/Model/Cron.php | 8 +- app/code/Magento/Log/Model/Resource/Log.php | 6 +- .../Magento/Log/Model/Resource/Visitor.php | 6 +- .../Log/Model/Resource/Visitor/Online.php | 8 +- .../Resource/Visitor/Online/Collection.php | 16 +- .../Visitor/Online/Grid/Collection.php | 28 +- app/code/Magento/Log/Model/Visitor.php | 14 +- .../Newsletter/Block/Adminhtml/Problem.php | 22 +- .../Newsletter/Block/Adminhtml/Queue/Edit.php | 26 +- .../Block/Adminhtml/Queue/Edit/Form.php | 38 +- .../Block/Adminhtml/Queue/Preview.php | 30 +- .../Newsletter/Block/Adminhtml/Subscriber.php | 22 +- .../Block/Adminhtml/Subscriber/Grid.php | 26 +- .../Subscriber/Grid/Filter/Website.php | 30 +- .../Block/Adminhtml/Template/Edit.php | 26 +- .../Block/Adminhtml/Template/Edit/Form.php | 30 +- .../Block/Adminhtml/Template/Grid.php | 26 +- .../Block/Adminhtml/Template/Preview.php | 26 +- .../Magento/Newsletter/Block/Subscribe.php | 10 +- .../Controller/Adminhtml/Problem.php | 27 +- app/code/Magento/Newsletter/Model/Queue.php | 8 +- .../Model/Resource/Problem/Collection.php | 14 +- .../Model/Resource/Queue/Collection.php | 14 +- .../Model/Resource/Subscriber/Collection.php | 14 +- .../Newsletter/Model/Resource/Template.php | 8 +- app/code/Magento/Newsletter/Model/Session.php | 8 +- .../Magento/Newsletter/Model/Template.php | 10 +- app/code/Magento/Newsletter/etc/module.xml | 1 - .../layout/newsletter_queue_edit.xml | 8 +- .../layout/newsletter_queue_preview_popup.xml | 2 +- .../layout/newsletter_template_edit.xml | 12 +- .../newsletter_template_preview_popup.xml | 2 +- .../view/adminhtml/layout/preview.xml | 2 +- .../view/frontend/layout/customer_account.xml | 2 +- app/code/Magento/Ogone/Block/Paypage.php | 2 +- app/code/Magento/Ogone/Block/Placeform.php | 10 +- app/code/Magento/Ogone/Controller/Api.php | 2 +- .../Page/Block/Template/Links/Block.php | 195 ------ app/code/Magento/Page/Helper/Robots.php | 70 -- app/code/Magento/Page/etc/config.xml | 80 --- app/code/Magento/Page/etc/di.xml | 57 -- .../Page/view/frontend/js/splitbutton.js | 74 --- .../Block/Adminhtml/Cache/Additional.php | 22 +- app/code/Magento/PageCache/Helper/Data.php | 16 +- .../frontend/layout/catalog_product_view.xml | 2 +- .../Paygate/Block/Authorizenet/Info/Cc.php | 23 + .../Block/Catalog/Product/View/Profile.php | 12 +- app/code/Magento/Payment/Block/Form.php | 2 +- app/code/Magento/Payment/Block/Form/Cc.php | 8 +- .../Magento/Payment/Block/Form/Container.php | 2 +- app/code/Magento/Payment/Block/Info.php | 2 +- .../Payment/Block/Info/AbstractContainer.php | 10 +- app/code/Magento/Payment/Block/Info/Cc.php | 8 +- app/code/Magento/Payment/Helper/Data.php | 2 +- .../Model/Billing/AbstractAgreement.php | 4 +- app/code/Magento/Payment/Model/Info.php | 4 +- .../Payment/Model/Recurring/Profile.php | 4 +- .../Adminhtml/Settlement/Details/Form.php | 30 +- .../System/Config/Fieldset/Store.php | 4 +- .../Magento/Paypal/Block/Express/Form.php | 10 +- .../Magento/Paypal/Block/Express/Review.php | 2 +- .../Magento/Paypal/Block/Express/Shortcut.php | 12 +- app/code/Magento/Paypal/Block/Iframe.php | 10 +- app/code/Magento/Paypal/Block/Logo.php | 10 +- .../Paypal/Block/Payflow/Link/Iframe.php | 8 +- .../Magento/Paypal/Block/Payment/Info.php | 8 +- .../Magento/Paypal/Block/Standard/Form.php | 12 +- .../Paypal/Block/Standard/Redirect.php | 6 +- app/code/Magento/Paypal/Helper/Checkout.php | 2 +- app/code/Magento/Paypal/Helper/Data.php | 4 +- app/code/Magento/Paypal/Model/Observer.php | 5 +- .../System/Config/Backend/MerchantCountry.php | 4 +- app/code/Magento/Paypal/etc/module.xml | 2 +- .../layout/adminhtml_system_config_edit.xml | 2 +- .../Paypal/view/frontend/express/review.phtml | 2 +- .../frontend/layout/paypal_express_review.xml | 2 +- .../Persistent/Block/Form/Remember.php | 10 +- .../Persistent/Block/Header/Additional.php | 10 +- .../Magento/Persistent/Controller/Index.php | 2 +- .../Magento/Persistent/Model/Observer.php | 10 +- .../Persistent/Model/Observer/Session.php | 6 +- app/code/Magento/Persistent/Model/Session.php | 13 +- .../Magento/Persistent/etc/persistent.xml | 4 +- .../layout/checkout_onepage_index.xml | 4 +- .../layout/customer_account_create.xml | 2 +- .../layout/customer_account_login.xml | 2 +- .../view/frontend/remember_me_tooltip.phtml | 2 +- .../Block/Email/AbstractEmail.php | 2 +- .../ProductAlert/Block/Product/View.php | 10 +- app/code/Magento/ProductAlert/Helper/Data.php | 6 +- app/code/Magento/ProductAlert/Model/Email.php | 4 +- .../Magento/Rating/Block/Adminhtml/Edit.php | 26 +- .../Rating/Block/Adminhtml/Edit/Tab/Form.php | 4 +- .../Block/Adminhtml/Edit/Tab/Options.php | 30 +- .../Magento/Rating/Block/Entity/Detailed.php | 10 +- .../Magento/Rating/Model/Resource/Rating.php | 4 +- .../Model/Resource/Rating/Collection.php | 12 +- .../Model/Resource/Rating/Grid/Collection.php | 22 +- .../Rating/Option/Vote/Collection.php | 12 +- .../Block/Adminhtml/Grid/AbstractGrid.php | 4 +- .../Adminhtml/Product/Downloads/Grid.php | 26 +- .../Reports/Block/Adminhtml/Product/Grid.php | 26 +- .../Block/Adminhtml/Product/Lowstock/Grid.php | 26 +- .../Reports/Block/Adminhtml/Review/Detail.php | 22 +- .../Block/Adminhtml/Review/Detail/Grid.php | 26 +- .../Block/Adminhtml/Sales/Tax/Grid.php | 38 +- .../Adminhtml/Shopcart/Abandoned/Grid.php | 26 +- .../Adminhtml/Shopcart/Customer/Grid.php | 26 +- .../Block/Adminhtml/Shopcart/Product/Grid.php | 26 +- .../Reports/Block/Adminhtml/Wishlist.php | 22 +- .../Reports/Block/Adminhtml/Wishlist/Grid.php | 26 +- .../Reports/Block/Product/AbstractProduct.php | 8 +- .../Reports/Model/Product/Index/Compared.php | 17 +- .../Model/Resource/Customer/Collection.php | 27 +- .../Summary/Collection/AbstractCollection.php | 8 +- .../Model/Resource/Order/Collection.php | 24 +- .../Model/Resource/Product/Collection.php | 43 +- .../Index/Collection/AbstractCollection.php | 43 +- .../Resource/Product/Lowstock/Collection.php | 47 +- .../Model/Resource/Quote/Collection.php | 7 +- .../Model/Resource/Report/AbstractReport.php | 4 +- .../Model/Resource/Report/Collection.php | 8 +- .../Model/Resource/Report/Product/Viewed.php | 6 +- .../Report/Product/Viewed/Collection.php | 14 +- .../Resource/Review/Customer/Collection.php | 25 +- .../Magento/Reports/Model/Resource/Setup.php | 4 +- .../Model/Resource/Wishlist/Collection.php | 12 +- .../Magento/Reports/view/adminhtml/grid.phtml | 33 +- .../Review/Block/Adminhtml/Add/Form.php | 34 +- .../Magento/Review/Block/Adminhtml/Edit.php | 30 +- .../Review/Block/Adminhtml/Edit/Form.php | 42 +- .../Magento/Review/Block/Adminhtml/Grid.php | 42 +- .../Magento/Review/Block/Adminhtml/Main.php | 30 +- .../Review/Block/Adminhtml/Product/Grid.php | 3 - .../Block/Adminhtml/Rating/Detailed.php | 30 +- .../Review/Block/Adminhtml/Rating/Summary.php | 30 +- .../Review/Block/Customer/ListCustomer.php | 14 +- .../Magento/Review/Block/Customer/Recent.php | 10 +- .../Magento/Review/Block/Customer/View.php | 8 +- app/code/Magento/Review/Block/Form.php | 14 +- app/code/Magento/Review/Block/Helper.php | 10 +- .../Magento/Review/Block/Product/View.php | 11 +- .../Review/Block/Product/View/Other.php | 10 +- app/code/Magento/Review/Block/View.php | 8 +- .../Magento/Review/Controller/Product.php | 4 +- .../Magento/Review/Helper/Action/Pager.php | 6 +- .../Model/Resource/Review/Collection.php | 16 +- .../Resource/Review/Product/Collection.php | 41 +- .../Resource/Review/Summary/Collection.php | 6 +- app/code/Magento/Review/etc/module.xml | 2 +- .../view/frontend/layout/customer_account.xml | 2 +- .../frontend/layout/review_product_list.xml | 6 +- .../Rss/App/Action/Plugin/Authentication.php | 2 +- app/code/Magento/Rss/Block/AbstractBlock.php | 10 +- .../Rss/Block/Catalog/AbstractCatalog.php | 10 +- .../Magento/Rss/Block/Catalog/Category.php | 8 +- .../Magento/Rss/Block/Catalog/NewCatalog.php | 8 +- .../Magento/Rss/Block/Catalog/Salesrule.php | 8 +- .../Magento/Rss/Block/Catalog/Special.php | 14 +- app/code/Magento/Rss/Block/ListBlock.php | 10 +- app/code/Magento/Rss/Block/Order/Details.php | 2 +- app/code/Magento/Rss/Block/Order/Status.php | 10 +- app/code/Magento/Rss/Block/Wishlist.php | 13 +- .../Rss/Model/System/Config/Backend/Links.php | 2 +- app/code/Magento/Rss/etc/module.xml | 1 - .../Rss/view/frontend/layout/default.xml | 2 +- app/code/Magento/Rule/Block/Editable.php | 25 +- app/code/Magento/Rule/Block/Newchild.php | 2 +- app/code/Magento/Rule/Block/Rule.php | 2 +- app/code/Magento/Rule/Model/AbstractModel.php | 4 +- app/code/Magento/Rule/Model/Rule.php | 6 +- .../Adminhtml/Billing/Agreement/Grid.php | 34 +- .../Adminhtml/Billing/Agreement/View.php | 22 +- .../Billing/Agreement/View/Tab/Info.php | 26 +- .../Billing/Agreement/View/Tab/Orders.php | 2 +- .../Sales/Block/Adminhtml/Creditmemo/Grid.php | 30 +- .../Adminhtml/Customer/Edit/Tab/Agreement.php | 38 +- .../Customer/Edit/Tab/Recurring/Profile.php | 38 +- .../Sales/Block/Adminhtml/Invoice/Grid.php | 30 +- .../Block/Adminhtml/Items/AbstractItems.php | 32 +- .../Adminhtml/Items/Column/DefaultColumn.php | 22 +- .../Block/Adminhtml/Order/AbstractOrder.php | 22 +- .../Sales/Block/Adminhtml/Order/Address.php | 22 +- .../Block/Adminhtml/Order/Address/Form.php | 69 +- .../Block/Adminhtml/Order/Comments/View.php | 22 +- .../Sales/Block/Adminhtml/Order/Create.php | 22 +- .../Adminhtml/Order/Create/AbstractCreate.php | 15 +- .../Order/Create/Billing/Method/Form.php | 8 +- .../Block/Adminhtml/Order/Create/Data.php | 30 +- .../Block/Adminhtml/Order/Create/Form.php | 40 +- .../Order/Create/Form/AbstractForm.php | 30 +- .../Adminhtml/Order/Create/Form/Account.php | 38 +- .../Adminhtml/Order/Create/Form/Address.php | 60 +- .../Adminhtml/Order/Create/Giftmessage.php | 4 +- .../Order/Create/Giftmessage/Form.php | 4 +- .../Adminhtml/Order/Create/Items/Grid.php | 6 +- .../Block/Adminhtml/Order/Create/Load.php | 20 +- .../Block/Adminhtml/Order/Create/Messages.php | 12 +- .../Adminhtml/Order/Create/Search/Grid.php | 38 +- .../Order/Create/Shipping/Method/Form.php | 30 +- .../Order/Create/Sidebar/AbstractSidebar.php | 4 +- .../Order/Create/Sidebar/Pcompared.php | 38 +- .../Order/Create/Sidebar/Pviewed.php | 38 +- .../Order/Create/Sidebar/Reorder.php | 34 +- .../Block/Adminhtml/Order/Create/Totals.php | 34 +- .../Order/Create/Totals/Discount.php | 38 +- .../Order/Create/Totals/Grandtotal.php | 38 +- .../Order/Create/Totals/Shipping.php | 38 +- .../Order/Create/Totals/Subtotal.php | 38 +- .../Adminhtml/Order/Creditmemo/Create.php | 22 +- .../Order/Creditmemo/Create/Adjustments.php | 22 +- .../Order/Creditmemo/Create/Items.php | 30 +- .../Block/Adminhtml/Order/Creditmemo/View.php | 22 +- .../Order/Creditmemo/View/Comments.php | 4 +- .../Block/Adminhtml/Order/Invoice/Create.php | 22 +- .../Adminhtml/Order/Invoice/Create/Items.php | 30 +- .../Order/Invoice/Create/Tracking.php | 26 +- .../Block/Adminhtml/Order/Invoice/View.php | 26 +- .../Adminhtml/Order/Invoice/View/Comments.php | 4 +- .../Sales/Block/Adminhtml/Order/Payment.php | 22 +- .../Block/Adminhtml/Order/Shipment/Create.php | 22 +- .../Adminhtml/Order/Shipment/Create/Items.php | 30 +- .../Order/Shipment/Create/Tracking.php | 26 +- .../Adminhtml/Order/Shipment/Packaging.php | 36 +- .../Order/Shipment/Packaging/Grid.php | 26 +- .../Block/Adminhtml/Order/Shipment/View.php | 22 +- .../Order/Shipment/View/Comments.php | 4 +- .../Order/Shipment/View/Tracking.php | 4 +- .../Adminhtml/Order/Status/Assign/Form.php | 34 +- .../Block/Adminhtml/Order/Totals/Tax.php | 4 +- .../Sales/Block/Adminhtml/Order/View.php | 26 +- .../Adminhtml/Order/View/Giftmessage.php | 4 +- .../Block/Adminhtml/Order/View/History.php | 26 +- .../Sales/Block/Adminhtml/Order/View/Info.php | 38 +- .../Block/Adminhtml/Order/View/Messages.php | 10 +- .../Adminhtml/Order/View/Tab/Creditmemos.php | 34 +- .../Adminhtml/Order/View/Tab/History.php | 22 +- .../Adminhtml/Order/View/Tab/Invoices.php | 34 +- .../Adminhtml/Order/View/Tab/Shipments.php | 30 +- .../Sales/Block/Adminhtml/Order/View/Tabs.php | 28 +- .../Adminhtml/Recurring/Profile/Grid.php | 34 +- .../Adminhtml/Recurring/Profile/View.php | 4 +- .../Recurring/Profile/View/Getawayinfo.php | 22 +- .../Adminhtml/Recurring/Profile/View/Info.php | 22 +- .../Recurring/Profile/View/Tab/Orders.php | 34 +- .../Block/Adminhtml/Report/Filter/Form.php | 30 +- .../Adminhtml/Report/Filter/Form/Coupon.php | 34 +- .../Sales/Block/Adminhtml/Shipment/Grid.php | 26 +- .../Block/Adminhtml/Transactions/Detail.php | 22 +- .../Adminhtml/Transactions/Detail/Grid.php | 30 +- .../Block/Adminhtml/Transactions/Grid.php | 38 +- .../Sales/Block/Billing/Agreement/View.php | 14 +- .../Sales/Block/Billing/Agreements.php | 14 +- app/code/Magento/Sales/Block/Guest/Link.php | 12 +- .../Sales/Block/Items/AbstractItems.php | 8 +- .../Magento/Sales/Block/Order/Comments.php | 10 +- .../Magento/Sales/Block/Order/Creditmemo.php | 8 +- .../Sales/Block/Order/Creditmemo/Items.php | 8 +- .../Block/Order/Email/Creditmemo/Items.php | 4 +- .../Sales/Block/Order/Email/Invoice/Items.php | 4 +- .../Block/Order/Email/Items/DefaultItems.php | 4 +- .../Order/Email/Items/Order/DefaultOrder.php | 4 +- .../Block/Order/Email/Shipment/Items.php | 4 +- .../Magento/Sales/Block/Order/History.php | 14 +- app/code/Magento/Sales/Block/Order/Info.php | 10 +- .../Sales/Block/Order/Info/Buttons.php | 10 +- .../Magento/Sales/Block/Order/Invoice.php | 8 +- .../Sales/Block/Order/Invoice/Items.php | 8 +- .../Order/Item/Renderer/DefaultRenderer.php | 12 +- app/code/Magento/Sales/Block/Order/Items.php | 8 +- app/code/Magento/Sales/Block/Order/Link.php | 10 +- .../Block/Order/PrintOrder/Creditmemo.php | 10 +- .../Sales/Block/Order/PrintOrder/Invoice.php | 10 +- .../Sales/Block/Order/PrintOrder/Shipment.php | 10 +- .../Sales/Block/Order/PrintShipment.php | 10 +- app/code/Magento/Sales/Block/Order/Recent.php | 10 +- .../Magento/Sales/Block/Order/Shipment.php | 10 +- .../Sales/Block/Order/Shipment/Items.php | 8 +- app/code/Magento/Sales/Block/Order/Totals.php | 10 +- app/code/Magento/Sales/Block/Order/View.php | 10 +- .../Block/Payment/Form/Billing/Agreement.php | 8 +- .../Sales/Block/Recurring/Profile/Grid.php | 10 +- .../Recurring/Profile/Related/Orders/Grid.php | 10 +- .../Sales/Block/Recurring/Profile/View.php | 10 +- .../Block/Recurring/Profile/View/Address.php | 8 +- .../Block/Recurring/Profile/View/Item.php | 8 +- .../Sales/Block/Recurring/Profiles.php | 2 +- .../Magento/Sales/Block/Reorder/Sidebar.php | 10 +- .../Sales/Block/Status/Grid/Column/State.php | 22 +- .../Magento/Sales/Block/Widget/Guest/Form.php | 12 +- .../Controller/Adminhtml/Order/Create.php | 10 +- .../Sales/Controller/Adminhtml/Order/Edit.php | 5 +- app/code/Magento/Sales/Helper/Admin.php | 4 +- app/code/Magento/Sales/Helper/Guest.php | 6 +- .../Magento/Sales/Model/Billing/Agreement.php | 6 +- app/code/Magento/Sales/Model/Observer.php | 86 --- .../Frontend/Quote/Address/CollectTotals.php | 107 +++ .../Frontend/Quote/Address/VatValidator.php | 128 ++++ app/code/Magento/Sales/Model/Order.php | 26 +- .../Magento/Sales/Model/Order/Address.php | 8 +- .../Magento/Sales/Model/Order/Creditmemo.php | 18 +- .../Magento/Sales/Model/Order/Invoice.php | 18 +- .../Magento/Sales/Model/Order/Payment.php | 6 +- .../Model/Order/Pdf/Items/AbstractItems.php | 4 +- .../Items/Creditmemo/DefaultCreditmemo.php | 10 +- .../Pdf/Items/Invoice/DefaultInvoice.php | 10 +- .../Pdf/Items/Shipment/DefaultShipment.php | 10 +- .../Magento/Sales/Model/Order/Shipment.php | 14 +- app/code/Magento/Sales/Model/Quote.php | 11 +- .../Magento/Sales/Model/Quote/Address.php | 16 +- .../Magento/Sales/Model/Recurring/Profile.php | 8 +- .../Resource/Billing/Agreement/Collection.php | 12 +- .../Model/Resource/Order/AbstractOrder.php | 4 +- .../Sales/Model/Resource/Order/Address.php | 6 +- .../Sales/Model/Resource/Order/Collection.php | 12 +- .../Sales/Model/Resource/Order/Payment.php | 6 +- .../Resource/Order/Payment/Collection.php | 12 +- .../Model/Resource/Quote/Item/Collection.php | 12 +- .../Resource/Quote/Payment/Collection.php | 12 +- .../Model/Resource/Report/Bestsellers.php | 6 +- .../Report/Bestsellers/Collection.php | 14 +- .../Report/Collection/AbstractCollection.php | 14 +- .../Report/Invoiced/Collection/Invoiced.php | 14 +- .../Report/Invoiced/Collection/Order.php | 14 +- .../Sales/Model/Resource/Report/Order.php | 10 +- .../Resource/Report/Order/Collection.php | 14 +- .../Report/Refunded/Collection/Order.php | 14 +- .../Report/Refunded/Collection/Refunded.php | 14 +- .../Report/Shipping/Collection/Order.php | 14 +- .../Report/Shipping/Collection/Shipment.php | 14 +- .../Sales/Model/Resource/Sale/Collection.php | 19 +- .../Magento/Sales/Model/Resource/Setup.php | 6 +- app/code/Magento/Sales/etc/adminhtml/menu.xml | 2 +- .../Magento/Sales/etc/frontend/events.xml | 2 +- app/code/Magento/Sales/etc/module.xml | 2 +- .../layout/sales_order_create_index.xml | 14 +- .../sales_order_create_load_block_data.xml | 2 +- .../sales_order_create_load_block_items.xml | 2 +- .../layout/sales_order_creditmemo_new.xml | 2 +- .../sales_order_creditmemo_updateqty.xml | 2 +- .../layout/sales_order_creditmemo_view.xml | 2 +- .../layout/sales_order_invoice_new.xml | 2 +- .../layout/sales_order_invoice_updateqty.xml | 2 +- .../layout/sales_order_invoice_view.xml | 2 +- .../layout/sales_order_shipment_new.xml | 4 +- .../layout/sales_order_shipment_view.xml | 4 +- .../adminhtml/layout/sales_order_view.xml | 6 +- .../adminhtml/order/create/giftmessage.phtml | 24 +- .../view/adminhtml/order/giftoptions.phtml | 4 +- .../adminhtml/order/view/giftmessage.phtml | 61 +- .../Sales/view/email/shipment_new.html | 4 +- .../Sales/view/email/shipment_new_guest.html | 4 +- .../view/frontend/layout/customer_account.xml | 6 +- .../sales_email_order_creditmemo_items.xml | 2 +- .../sales_email_order_invoice_items.xml | 2 +- .../layout/sales_email_order_items.xml | 2 +- .../sales_email_order_shipment_items.xml | 2 +- .../layout/sales_order_creditmemo.xml | 2 +- .../layout/sales_order_guest_info_links.xml | 2 +- .../layout/sales_order_info_links.xml | 2 +- .../frontend/layout/sales_order_invoice.xml | 2 +- .../frontend/layout/sales_order_print.xml | 2 +- .../layout/sales_order_printcreditmemo.xml | 2 +- .../layout/sales_order_printinvoice.xml | 2 +- .../layout/sales_order_printshipment.xml | 2 +- .../frontend/layout/sales_order_shipment.xml | 2 +- .../view/frontend/layout/sales_order_view.xml | 2 +- .../sales_recurring_profile_view__tabs.xml | 8 +- .../Sales/view/frontend/recurring/grid.phtml | 2 +- .../Block/Adminhtml/Promo/Quote/Edit.php | 22 +- .../Promo/Quote/Edit/Tab/Actions.php | 38 +- .../Promo/Quote/Edit/Tab/Conditions.php | 34 +- .../Promo/Quote/Edit/Tab/Coupons.php | 4 +- .../Promo/Quote/Edit/Tab/Coupons/Form.php | 30 +- .../Promo/Quote/Edit/Tab/Coupons/Grid.php | 30 +- .../Adminhtml/Promo/Quote/Edit/Tab/Labels.php | 4 +- .../Adminhtml/Promo/Quote/Edit/Tab/Main.php | 4 +- .../SalesRule/Model/Coupon/Massgenerator.php | 4 +- .../Model/Resource/Report/Collection.php | 18 +- .../SalesRule/Model/Resource/Report/Rule.php | 10 +- .../Model/Resource/Rule/Collection.php | 12 +- app/code/Magento/SalesRule/Model/Rule.php | 10 +- .../Magento/SalesRule/Model/Validator.php | 8 +- app/code/Magento/Sendfriend/Block/Send.php | 10 +- .../Magento/Sendfriend/Controller/Product.php | 4 +- .../Magento/Sendfriend/Model/Sendfriend.php | 14 +- app/code/Magento/Sendfriend/etc/module.xml | 1 - .../Sendfriend/view/frontend/send.phtml | 2 +- .../Adminhtml/Carrier/Tablerate/Grid.php | 30 +- .../Magento/Shipping/Block/Tracking/Ajax.php | 2 +- .../Magento/Shipping/Block/Tracking/Popup.php | 10 +- .../Magento/Shipping/Controller/Tracking.php | 4 +- app/code/Magento/Shipping/Helper/Data.php | 4 +- .../Model/Resource/Carrier/Tablerate.php | 4 +- .../Magento/Sitemap/Block/Adminhtml/Edit.php | 22 +- .../Sitemap/Block/Adminhtml/Edit/Form.php | 30 +- .../Block/Adminhtml/Grid/Renderer/Link.php | 22 +- .../Block/Adminhtml/Grid/Renderer/Time.php | 18 +- .../Model/Resource/Catalog/Product.php | 2 +- app/code/Magento/Sitemap/Model/Sitemap.php | 8 +- .../Magento/Tax/Block/Adminhtml/Rate/Form.php | 52 +- .../Tax/Block/Adminhtml/Rate/ImportExport.php | 18 +- .../Tax/Block/Adminhtml/Rate/Title.php | 10 +- .../Magento/Tax/Block/Adminhtml/Rule/Edit.php | 22 +- .../Tax/Block/Adminhtml/Rule/Edit/Form.php | 38 +- .../Magento/Tax/Block/Checkout/Discount.php | 8 +- .../Magento/Tax/Block/Checkout/Grandtotal.php | 8 +- .../Magento/Tax/Block/Checkout/Shipping.php | 8 +- .../Magento/Tax/Block/Checkout/Subtotal.php | 8 +- .../Magento/Tax/Block/Sales/Order/Tax.php | 10 +- app/code/Magento/Tax/Helper/Data.php | 4 +- app/code/Magento/Tax/Model/Calculation.php | 4 +- .../Tax/Model/Resource/Calculation.php | 8 +- .../Resource/Calculation/Rate/Collection.php | 16 +- .../Tax/Model/Resource/Report/Collection.php | 14 +- .../Magento/Tax/Model/Resource/Report/Tax.php | 10 +- app/code/Magento/Tax/Model/Resource/Setup.php | 8 +- .../view/adminhtml/layout/tax_rule_edit.xml | 10 +- .../Adminhtml/System/Design/Theme/Edit.php | 24 +- .../System/Design/Theme/Edit/AbstractTab.php | 30 +- .../System/Design/Theme/Edit/Tab/Css.php | 34 +- .../System/Design/Theme/Edit/Tab/General.php | 38 +- .../Magento/{Page => Theme}/Block/Html.php | 96 ++- .../Block/Html/Breadcrumbs.php | 65 +- .../{Page => Theme}/Block/Html/Footer.php | 50 +- .../{Page => Theme}/Block/Html/Head.php | 90 ++- .../Block/Html/Head/AssetBlockInterface.php} | 9 +- .../{Page => Theme}/Block/Html/Head/Css.php | 19 +- .../{Page => Theme}/Block/Html/Head/Link.php | 24 +- .../Block/Html/Head/Script.php | 20 +- .../{Page => Theme}/Block/Html/Header.php | 58 +- .../{Page => Theme}/Block/Html/Notices.php | 22 +- .../{Page => Theme}/Block/Html/Pager.php | 269 ++++++-- .../{Page => Theme}/Block/Html/Title.php | 13 +- .../{Page => Theme}/Block/Html/Topmenu.php | 61 +- app/code/Magento/Theme/Block/Html/Welcome.php | 41 ++ .../Magento/{Page => Theme}/Helper/Layout.php | 29 +- app/code/Magento/Theme/Helper/Storage.php | 6 +- .../Model => Theme/Model/Layout}/Config.php | 8 +- .../Model/Layout}/Config/Converter.php | 2 +- .../Model/Layout}/Config/Reader.php | 2 +- .../Model/Layout}/Config/SchemaLocator.php | 6 +- .../Model/Layout}/Source/Layout.php | 19 +- .../Magento/Theme/Model/Wysiwyg/Storage.php | 2 +- .../{Page => Theme}/etc/adminhtml/system.xml | 2 - app/code/Magento/Theme/etc/config.xml | 49 ++ app/code/Magento/Theme/etc/di.xml | 24 + app/code/Magento/Theme/etc/module.xml | 6 +- .../{Page => Theme}/etc/page_layouts.xml | 0 .../{Page => Theme}/etc/page_layouts.xsd | 0 .../{Page => Theme}/etc/page_layouts_file.xsd | 0 .../Magento/{Page => Theme}/i18n/de_DE.csv | 0 .../Magento/{Page => Theme}/i18n/en_US.csv | 0 .../Magento/{Page => Theme}/i18n/es_ES.csv | 0 .../Magento/{Page => Theme}/i18n/fr_FR.csv | 0 .../Magento/{Page => Theme}/i18n/nl_NL.csv | 0 .../Magento/{Page => Theme}/i18n/pt_BR.csv | 0 .../Magento/{Page => Theme}/i18n/zh_CN.csv | 0 .../view/adminhtml/empty.phtml | 0 .../view/adminhtml/favicon.ico | Bin .../adminhtml_system_design_theme_edit.xml | 28 +- .../view/adminhtml/title.phtml | 2 +- .../view/frontend/1column.phtml | 2 +- .../view/frontend/2columns-left.phtml | 2 +- .../view/frontend/2columns-right.phtml | 2 +- .../view/frontend/3columns.phtml | 2 +- .../{Page => Theme}/view/frontend/blank.phtml | 2 +- .../view/frontend/callouts/left_col.phtml | 0 .../view/frontend/callouts/right_col.phtml | 0 .../view/frontend/css/tabs.css | 0 .../view/frontend/css/validate.css | 0 .../{Page => Theme}/view/frontend/empty.phtml | 2 +- .../{Page => Theme}/view/frontend/favicon.ico | Bin .../view/frontend/html/block.phtml | 0 .../view/frontend/html/breadcrumbs.phtml | 0 .../view/frontend/html/bugreport.phtml | 0 .../view/frontend/html/copyright.phtml | 0 .../view/frontend/html/footer.phtml | 0 .../view/frontend/html/head.phtml | 0 .../view/frontend/html/header.phtml | 4 +- .../view/frontend/html/notices.phtml | 4 +- .../view/frontend/html/pager.phtml | 4 +- .../view/frontend/html/title.phtml | 2 +- .../view/frontend/html/topmenu.phtml | 4 +- .../frontend/images/validation_advice_bg.gif | Bin .../view/frontend/js/calendar.phtml | 2 +- .../view/frontend/js/components.phtml | 0 .../view/frontend/js/cookie.phtml | 2 +- .../view/frontend/js/notices.js | 0 .../view/frontend/js/row-builder.js | 0 .../view/frontend/js/truncate.js | 0 .../view/frontend/layout/default.xml | 66 +- .../frontend/layout/default_head_blocks.xml | 40 +- .../view/frontend/layout/page_calendar.xml | 6 +- .../view/frontend/layout/page_empty.xml | 0 .../view/frontend/layout/page_one_column.xml | 0 .../frontend/layout/page_three_columns.xml | 0 .../frontend/layout/page_two_columns_left.xml | 0 .../layout/page_two_columns_right.xml | 0 .../view/frontend/layout/print.xml | 6 +- .../{Page => Theme}/view/frontend/link.phtml | 2 +- .../{Page => Theme}/view/frontend/menu.js | 0 .../{Page => Theme}/view/frontend/page.phtml | 2 +- .../{Page => Theme}/view/frontend/popup.phtml | 2 +- .../{Page => Theme}/view/frontend/print.phtml | 2 +- .../{Page => Theme}/view/install/favicon.ico | Bin .../Usa/Block/Adminhtml/Dhl/Unitofmeasure.php | 26 +- app/code/Magento/Usa/Helper/Data.php | 8 +- app/code/Magento/User/Block/Buttons.php | 22 +- app/code/Magento/User/Block/Role/Edit.php | 28 +- .../Magento/User/Block/Role/Grid/User.php | 40 +- app/code/Magento/User/Block/Role/Tab/Edit.php | 67 +- .../Magento/User/Block/Role/Tab/Users.php | 28 +- app/code/Magento/User/Block/User.php | 22 +- app/code/Magento/User/Block/User/Edit.php | 22 +- .../Magento/User/Block/User/Edit/Tab/Main.php | 30 +- .../User/Block/User/Edit/Tab/Roles.php | 40 +- .../User/Controller/Adminhtml/User/Role.php | 14 +- .../Magento/User/Model/Acl/Loader/Role.php | 23 +- .../Magento/User/Model/Acl/Loader/Rule.php | 4 +- app/code/Magento/User/Model/Resource/Role.php | 8 +- .../User/Model/Resource/Role/Collection.php | 18 +- .../Model/Resource/Role/Grid/Collection.php | 13 +- .../Magento/User/Model/Resource/Rules.php | 14 +- .../Magento/User/Model/Resource/Setup.php | 4 +- app/code/Magento/User/Model/Resource/User.php | 7 +- app/code/Magento/User/Model/Role.php | 17 +- app/code/Magento/User/Model/Rules.php | 12 +- app/code/Magento/User/Model/User.php | 3 +- .../data/user_setup/data-install-1.6.0.0.php | 10 +- app/code/Magento/User/etc/adminhtml/di.xml | 8 - app/code/Magento/User/etc/di.xml | 9 + app/code/Magento/User/etc/module.xml | 2 +- .../user_setup/upgrade-1.6.1.4-1.6.1.5.php | 37 ++ .../view/adminhtml/admin/forgotpassword.phtml | 6 +- .../admin/resetforgottenpassword.phtml | 6 +- .../User/view/adminhtml/js/roles-tree.js | 8 + .../Activate/Permissions/Tab/Webapi.php | 180 +++++ .../Adminhtml/Integration/Edit/Tab/Webapi.php | 162 +++++ .../Adminhtml/Role/Edit/Tab/Resource.php | 30 +- .../Webapi/Block/Adminhtml/Role/Edit/Tabs.php | 2 +- .../Webapi/Block/Adminhtml/User/Edit/Tabs.php | 2 +- app/code/Magento/Webapi/Helper/Data.php | 24 + .../Webapi/Model/Cache/TypeIntegration.php | 51 ++ .../Model/Config/Integration}/Converter.php | 10 +- .../Model/Config/Integration}/Reader.php | 14 +- .../Config/Integration}/SchemaLocator.php | 4 +- .../Webapi/Model/IntegrationConfig.php | 91 +++ .../Magento/Webapi/Model/Plugin/Setup.php | 114 ++++ .../Magento/Webapi/etc/adminhtml/routes.xml | 2 +- app/code/Magento/Webapi/etc/cache.xml | 4 + app/code/Magento/Webapi/etc/di.xml | 133 ---- app/code/Magento/Webapi/etc/frontend/di.xml | 31 + .../etc/integration/api.xsd | 4 +- app/code/Magento/Webapi/etc/module.xml | 1 + app/code/Magento/Webapi/etc/webapi.xsd | 2 +- .../Magento/Webapi/etc/webapi_rest/di.xml | 125 ++++ .../Magento/Webapi/etc/webapi_soap/di.xml | 71 ++ .../activate/permissions/tab/webapi.phtml | 55 ++ ...ntegration_activate_permissions_webapi.xml | 36 + .../layout/adminhtml_integration_edit.xml | 39 ++ .../layout/adminhtml_webapi_role_edit.xml | 2 +- ..._webapi_user_edit_tab_roles_grid_block.xml | 1 + .../Webapi/view/adminhtml/resourcetree.phtml | 62 ++ .../view/adminhtml/rolesusersgridjs.phtml | 2 +- .../Activate/Permissions/Tab/Webhook.php | 64 ++ .../Block/Adminhtml/Registration/Activate.php | 22 +- .../Registration/Create/Form/Container.php | 22 +- .../Block/Adminhtml/Subscription/Edit.php | 22 +- .../Adminhtml/Subscription/Edit/Form.php | 38 +- app/code/Magento/Webhook/Model/Job.php | 10 +- .../Model/Resource/Event/Collection.php | 14 +- .../Webhook/Model/Resource/Job/Collection.php | 14 +- .../Resource/Subscription/Collection.php | 16 +- .../Resource/Subscription/Grid/Collection.php | 30 +- .../Magento/Webhook/Model/Subscription.php | 10 +- app/code/Magento/Webhook/etc/module.xml | 2 +- app/code/Magento/Webhook/etc/webapi.xml | 10 +- ...tegration_activate_permissions_webhook.xml | 36 + ...dminhtml_webhook_registration_activate.xml | 16 +- .../adminhtml_webhook_registration_failed.xml | 14 +- ...minhtml_webhook_registration_succeeded.xml | 16 +- .../adminhtml_webhook_registration_user.xml | 20 +- .../adminhtml_webhook_subscription_index.xml | 4 +- .../Magento/Weee/Block/Renderer/Weee/Tax.php | 4 +- app/code/Magento/Weee/Helper/Data.php | 4 +- app/code/Magento/Weee/Model/Observer.php | 8 +- .../Resource/Attribute/Backend/Weee/Tax.php | 6 +- app/code/Magento/Weee/Model/Tax.php | 10 +- app/code/Magento/Weee/etc/module.xml | 2 +- .../adminhtml/layout/catalog_product_new.xml | 2 +- .../Weee/view/frontend/layout/default.xml | 2 +- .../Widget/Block/Adminhtml/Widget/Chooser.php | 32 +- .../Widget/Block/Adminhtml/Widget/Form.php | 31 +- .../Block/Adminhtml/Widget/Instance/Edit.php | 22 +- .../Instance/Edit/Chooser/Container.php | 8 +- .../Edit/Chooser/DesignAbstraction.php | 8 +- .../Widget/Instance/Edit/Chooser/Layout.php | 8 +- .../Widget/Instance/Edit/Chooser/Template.php | 2 +- .../Widget/Instance/Edit/Tab/Main.php | 4 +- .../Widget/Instance/Edit/Tab/Main/Layout.php | 24 +- .../Widget/Instance/Edit/Tab/Settings.php | 30 +- .../Widget/Block/Adminhtml/Widget/Options.php | 34 +- .../Magento/Widget/Model/Widget/Instance.php | 8 +- app/code/Magento/Widget/etc/module.xml | 2 +- .../layout/adminhtml_widget_instance_edit.xml | 8 +- .../Magento/Wishlist/Block/AbstractBlock.php | 10 +- .../Wishlist/Block/Customer/Sharing.php | 10 +- .../Wishlist/Block/Customer/Wishlist.php | 7 +- .../Block/Customer/Wishlist/Button.php | 10 +- .../Block/Customer/Wishlist/Item/Options.php | 7 +- .../Block/Customer/Wishlist/Items.php | 2 +- .../Magento/Wishlist/Block/Item/Configure.php | 10 +- app/code/Magento/Wishlist/Block/Link.php | 2 +- .../Wishlist/Block/Render/Item/Price.php | 2 +- .../Wishlist/Block/Share/Email/Rss.php | 2 +- .../Magento/Wishlist/Block/Share/Wishlist.php | 7 +- app/code/Magento/Wishlist/Helper/Data.php | 4 +- app/code/Magento/Wishlist/Model/Observer.php | 4 +- .../Model/Resource/Item/Collection.php | 24 +- .../Model/Resource/Item/Collection/Grid.php | 49 +- app/code/Magento/Wishlist/Model/Wishlist.php | 16 +- app/code/Magento/Wishlist/etc/module.xml | 2 +- .../customer/edit/tab/wishlist.phtml | 2 +- .../layout/customer_index_wishlist.xml | 2 +- .../view/frontend/layout/customer_account.xml | 2 +- .../wishlist_index_configure_type_bundle.xml | 4 +- .../Magento_Adminhtml/layout/default.xml | 34 +- .../adminhtml/magento_backend/css/styles.css | 305 ++++++--- .../magento_backend/less/styles/admin.less | 26 +- .../magento_backend/less/styles/pages.less | 116 +++- .../Magento_Catalog/layout/default.xml | 2 +- .../layout/checkout_cart_index.xml | 2 +- .../Magento_Core/template.phtml | 2 +- .../Magento_Customer/layout/default.xml | 2 +- .../layout/default.xml | 20 +- .../frontend/magento_plushe/css/styles.css | 2 +- .../frontend/magento_plushe/less/styles.less | 2 +- app/etc/di.xml | 7 +- .../Magento/TestFramework/Cookie.php | 54 +- .../ObjectManager/Configurator.php | 2 +- .../TestFramework/ObjectManagerFactory.php | 3 +- .../TestCase/AbstractController.php | 2 +- .../testsuite/Magento/Test/CookieTest.php | 13 - .../Block/Widget/Form/ContainerTest.php | 5 +- .../Block/Widget/Grid/Massaction/ItemTest.php | 2 +- .../Adminhtml/Block/Widget/GridTest.php | 2 +- .../FrontController/Plugin/InstallTest.php | 82 +++ .../Authz/Service/AuthorizationV1Test.php | 237 +++++++ .../AuthorizationV1Test/UserLocatorStub.php | 28 +- .../Backend/Block/System/Config/FormTest.php | 4 +- .../Block/Widget/Grid/ColumnSetTest.php | 2 +- .../Magento/Backend/Block/Widget/GridTest.php | 3 +- .../Controller/Adminhtml/CacheTest.php | 3 +- .../Magento/Backend/Model/AuthTest.php | 16 +- .../Magento/Backend/Model/UrlTest.php | 4 +- .../Magento/Backend/Utility/Controller.php | 23 +- .../Product/Attribute/Set/Toolbar/AddTest.php | 2 +- .../Edit/Tab/Super/Config/MatrixTest.php | 2 +- .../Product/Edit/Tab/Super/ConfigTest.php | 2 +- .../Block/Adminhtml/Product/Edit/TabsTest.php | 2 +- .../Backend/Grid/ColumnSetTest.php | 1 + .../Catalog/Block/Product/ListTest.php | 6 +- .../Block/Product/ProductList/ToolbarTest.php | 4 +- .../Block/Product/View/AdditionalTest.php | 8 +- .../Catalog/Block/Product/ViewTest.php | 2 +- .../Catalog/Helper/Product/ViewTest.php | 2 +- .../Model/Layer/Filter/AttributeTest.php | 4 +- .../Model/Layer/Filter/CategoryTest.php | 4 +- .../Model/Layer/Filter/DecimalTest.php | 6 +- .../Catalog/Model/Layer/Filter/ItemTest.php | 2 +- .../Filter/Price/AlgorithmAdvancedTest.php | 2 +- .../Catalog/Model/Layer/Filter/PriceTest.php | 6 +- .../Block/Advanced/ResultTest.php | 10 +- .../CatalogSearch/Block/ResultTest.php | 4 +- .../Magento/Checkout/Block/CartTest.php | 8 +- .../Block/Onepage/Payment/MethodsTest.php | 2 +- .../Magento/Checkout/Controller/CartTest.php | 79 ++- .../_files/quote_with_bundle_product.php | 4 - .../quote_with_configurable_product.php | 4 - .../quote_with_downloadable_product.php | 4 - .../_files/quote_with_simple_product.php | 4 - ..._with_simple_product_and_custom_option.php | 4 - .../testsuite/Magento/Core/Model/AppTest.php | 2 +- .../DataService/LayoutTest/layout_update.xml | 2 +- .../Core/Model/LayoutDirectivesTest.php | 4 +- .../Magento/Core/Model/LayoutTest.php | 65 +- .../Resource/Db/Collection/AbstractTest.php | 2 +- ...stractTest.php => AbstractSessionTest.php} | 90 +-- .../Magento/Core/Model/Session/ConfigTest.php | 71 ++ .../Core/Model/Session/SidResolverTest.php | 173 +++++ .../Magento/Core/Model/StoreTest.php | 4 +- .../testsuite/Magento/Core/Model/UrlTest.php | 2 +- .../Magento/Core/Model/View/DesignTest.php | 12 +- .../layout_test_handle.xml | 2 +- .../Magento_Core/layout_test_handle_main.xml | 2 +- .../layout_test_handle_sample.xml | 6 +- .../test_test_theme/layout_test_handle.xml | 2 +- .../frontend/vendor_default/css/file.css | 2 +- .../_files/layout/container_attributes.xml | 8 +- .../action_for_anonymous_parent_block.xml | 8 +- .../layout_directives_test/arguments.xml | 2 +- .../arguments_complex_values.xml | 2 +- .../arguments_object_type.xml | 2 +- .../arguments_object_type_updaters.xml | 2 +- .../arguments_url_type.xml | 2 +- .../layout_directives_test/get_block.xml | 4 +- .../get_block_exception.xml | 2 +- .../_files/layout_directives_test/group.xml | 8 +- .../layout_directives_test/ifconfig.xml | 8 +- .../_files/layout_directives_test/move.xml | 14 +- .../move_alias_broken.xml | 4 +- .../layout_directives_test/move_broken.xml | 2 +- .../layout_directives_test/move_new_alias.xml | 4 +- .../move_the_same_alias.xml | 4 +- .../_files/layout_directives_test/remove.xml | 8 +- .../layout_directives_test/remove_broken.xml | 4 +- .../_files/layout_directives_test/render.xml | 4 +- .../sort_after_after.xml | 6 +- .../sort_after_previous.xml | 6 +- .../sort_before_after.xml | 6 +- .../sort_before_before.xml | 6 +- .../Core/Utility/_files/layout/handle_one.xml | 2 +- .../_files/layout_merged/multiple_handles.xml | 2 +- .../Controller/Adminhtml/GroupTest.php | 4 +- .../DesignEditor/Model/ObserverTest.php | 13 +- .../Edit/Tab/Downloadable/LinksTest.php | 11 +- .../Attribute/Edit/Main/AbstractTest.php | 1 - .../Email/Model/Template/FilterTest.php | 4 +- .../Magento/Email/Model/TemplateTest.php | 16 +- .../layout/email_template_test_handle.xml | 4 +- .../Block/Adminhtml/Items/ProductTest.php | 4 +- .../Controller/Adminhtml/IntegrationTest.php | 17 +- .../Integration/Model/Config/ReaderTest.php | 67 ++ .../Model/Config/_files/integration.php | 32 +- .../Model/Config/_files/integrationA.xml | 34 + .../Model/Config/_files/integrationB.xml | 34 + .../Block/Adminhtml/SubscriberTest.php | 4 +- .../Adminhtml/NewsletterTemplateTest.php | 2 +- .../Magento/Newsletter/Model/QueueTest.php | 8 +- .../Magento/Newsletter/Model/TemplateTest.php | 6 +- .../testsuite/Magento/Page/_files/robots.txt | 19 - .../Magento/PageCache/Helper/DataTest.php | 12 +- .../Magento/PageCache/Model/ObserverTest.php | 8 +- .../Magento/Payment/Block/InfoTest.php | 2 +- .../Magento/Review/Controller/ProductTest.php | 2 +- .../Block/Adminhtml/Items/AbstractTest.php | 4 +- .../Order/Create/Form/AbstractTest.php | 1 - .../Block/Order/Creditmemo/ItemsTest.php | 4 +- .../Sales/Block/Order/Invoice/ItemsTest.php | 4 +- .../Block/Order/PrintOrder/CreditmemoTest.php | 2 +- .../Block/Order/PrintOrder/InvoiceTest.php | 2 +- .../Sales/Block/Order/Shipment/ItemsTest.php | 2 +- .../Magento/Sales/Block/Order/TotalsTest.php | 8 +- .../Block/Recurring/Profile/ViewTest.php | 4 +- .../Quote/Address/CollectTotalsTest.php | 109 +++ .../Integrity/Magento/Payment/MethodsTest.php | 2 +- .../Magento/Widget/TemplateFilesTest.php | 6 +- .../Modular/BlockInstantiationTest.php | 2 +- .../Integrity/Modular/TemplateFilesTest.php | 2 +- ...FilesTest.php => ThemeConfigFilesTest.php} | 6 +- .../Modular/_files/view_files_ce.php | 6 +- .../Integrity/Theme/TemplateFilesTest.php | 2 +- .../Test/Integrity/Theme/ViewFilesTest.php | 2 +- .../Layout/Reference/_files/layoutInvalid.xml | 6 +- .../Layout/Reference/_files/layoutValid.xml | 4 +- .../_files/layoutValidExpectUpdated.xml | 4 +- .../Block/Html/BreadcrumbsTest.php | 8 +- .../{Page => Theme}/Block/Html/FooterTest.php | 6 +- .../{Page => Theme}/Block/Html/HeadTest.php | 42 +- .../{Page => Theme}/Block/HtmlTest.php | 9 +- .../Model/Layout}/Config/ReaderTest.php | 8 +- .../Model/Layout}/ConfigTest.php | 12 +- .../Model/Layout}/_files/page_layouts.xml | 2 +- .../Model/Layout}/_files/page_layouts2.xml | 2 +- .../Model/Resource/Role/CollectionTest.php | 4 +- .../testsuite/Magento/User/Model/UserTest.php | 4 +- .../Model/Page => View}/Asset/MergedTest.php | 14 +- .../{Block => Element}/AbstractBlockTest.php | 144 ++-- .../View/{Block => Element}/TemplateTest.php | 15 +- .../View/{Block => Element}/Text/ListTest.php | 18 +- .../View/{Block => Element}/TextTest.php | 6 +- .../frontend/magento_plushe/css/wrong.css | 0 .../View/Layout/_files/_layout_update.xml | 14 +- .../Magento/View/PublicationTest.php | 6 +- .../design/adminhtml/vendor_test/theme.xml | 28 + .../design/area_two/vendor_theme_one/file | 0 .../area_two/vendor_theme_one/theme.xml | 28 + .../design/design_area/vendor_theme_one/file | 0 .../design_area/vendor_theme_one/theme.xml | 28 + .../design/frontend/access_violation.php | 13 +- .../design/frontend/magento_default/theme.xml | 31 + .../frontend/magento_default_iphone/theme.xml | 35 + .../layout_test_handle.xml | 35 + .../frontend/test_cache_test_theme/theme.xml | 32 + .../Magento_Catalog/catalog_category_view.xml | 29 + .../catalog_category_view_type_default.xml | 29 + .../Magento_Catalog/catalog_product_view.xml | 29 + .../catalog_product_view_type_simple.xml | 29 + .../Magento_Catalog/theme_file.txt | 0 .../theme_file_with_2_dots..txt | 0 .../Magento_Catalog/theme_template.phtml | 14 +- .../Magento_Cms/layout_test_handle_extra.xml | 29 + .../Magento_Core/layout_test_handle_main.xml | 46 ++ .../layout_test_handle_sample.xml | 51 ++ .../test_default/Magento_Core/test.phtml | 27 + .../test_default/Namespace_Module/favicon.ico | 0 .../frontend/test_default/css/styles.css | 14 +- .../frontend/test_default/i18n/en_US.csv | 2 + .../frontend/test_default/i18n/fr_FR/logo.gif | 0 .../frontend/test_default/images/logo.gif | 0 .../test_default/images/logo_email.gif | 0 .../design/frontend/test_default/js/tabs.js | 25 + .../design/frontend/test_default/theme.xml | 31 + .../design/frontend/test_default/view.xml | 37 ++ .../test_publication/images/rectangle.gif | Bin 0 -> 52 bytes .../test_publication/images/square.gif | Bin 0 -> 46 bytes .../frontend/test_publication/style.css | 17 +- .../design/frontend/test_publication/sub.css | 26 + .../frontend/test_publication/theme.xml | 31 + .../test_test_theme/layout_test_handle.xml | 35 + .../design/frontend/test_test_theme/theme.xml | 32 + .../Fixture_Module/fixture_script.js | 26 + .../frontend/vendor_custom_theme/theme.xml | 32 + .../absolute_valid_module.gif | Bin 0 -> 810 bytes .../vendor_default/access_violation.php | 15 +- .../design/frontend/vendor_default/css/1.gif | Bin 0 -> 810 bytes .../frontend/vendor_default/css/base64.css | 29 + .../frontend/vendor_default/css/body.gif | Bin 0 -> 810 bytes .../vendor_default/css/deep/recursive.css | 26 + .../frontend/vendor_default/css/exception.css | 27 + .../frontend/vendor_default/css/file.css | 24 +- .../design/frontend/vendor_default/h1.gif | Bin 0 -> 810 bytes .../frontend/vendor_default/images/h2.gif | Bin 0 -> 810 bytes .../frontend/vendor_default/recursive.css | 26 + .../frontend/vendor_default/recursive.gif | Bin 0 -> 810 bytes .../frontend/vendor_default/recursive2.gif | Bin 0 -> 810 bytes .../design/frontend/vendor_default/scripts.js | 26 + .../design/frontend/vendor_default/theme.xml | 31 + .../Magento/View/_files/design/themes.php | 43 ++ .../Block/Adminhtml/User/Edit/TabsTest.php | 4 +- .../Model/Config/Integration/ReaderTest.php | 67 ++ .../Model/Config/Integration/_files/api.php | 46 ++ .../Model/Config/Integration/_files/apiA.xml | 42 ++ .../Model/Config/Integration/_files/apiB.xml | 40 ++ .../Webapi/Model/Config/ReaderTest.php | 67 ++ .../Webapi/Model/Config/_files/webapi.php | 93 +++ .../Webapi/Model/Config/_files/webapiA.xml | 38 ++ .../Webapi/Model/Config/_files/webapiB.xml | 38 ++ .../Adminhtml/Registration/ActivateTest.php | 4 +- .../Create/Form/ContainerTest.php | 4 +- .../Webhook/Model/SubscriptionTest.php | 9 +- .../Edit/Chooser/DesignAbstractionTest.php | 2 +- .../Instance/Edit/Chooser/LayoutTest.php | 2 +- .../Magento/Wishlist/Block/AbstractTest.php | 3 +- .../Customer/Wishlist/Item/ColumnTest.php | 2 +- .../Block/Customer/Wishlist/ItemsTest.php | 4 +- .../Magento/Wishlist/Controller/IndexTest.php | 2 +- dev/tests/performance/testsuite/checkout.jmx | 2 +- .../TestFramework/Dependency/LayoutRule.php | 2 +- .../TestFramework/Dependency/TemplateRule.php | 2 +- .../Integrity/Library/_files/blacklist.txt | 17 +- .../Persistent/_files/invalid_persistent.xml | 4 +- .../Persistent/_files/valid_persistent.xml | 4 +- .../Config/ReferentialTest.php | 2 +- .../Magento/{Page => Theme}/ConfigTest.php | 6 +- .../_files/invalid_page_layouts.xml | 2 +- .../_files/invalid_page_layouts_partial.xml | 0 .../_files/valid_page_layouts.xml | 2 +- .../_files/valid_page_layouts_partial.xml | 2 +- .../Magento/Test/Js/_files/blacklist/core.txt | 2 +- .../Magento/Test/Js/_files/whitelist/core.txt | 2 +- .../Magento/Test/Legacy/LayoutTest.php | 12 +- .../Magento/Core/Block/AbstractBlockTest.php | 2 +- .../Magento/Test/Legacy/ObsoleteCodeTest.php | 2 +- .../Test/Legacy/_files/obsolete_classes.php | 77 ++- .../Test/Legacy/_files/obsolete_constants.php | 72 +- .../Test/Legacy/_files/obsolete_methods.php | 130 +++- .../Legacy/_files/obsolete_properties.php | 72 +- .../Magento/Test/Php/LiveCodeTest.php | 1 - .../Test/Php/_files/blacklist/common.txt | 2 + .../Php/_files/phpcpd/blacklist/common.txt | 4 + .../Php/_files/phpcs/blacklist/common.txt | 2 - .../Test/Php/_files/whitelist/common.txt | 8 +- .../Magento/Test/Block/Adminhtml.php | 14 +- .../Helper/ObjectManagerTest.php | 14 +- .../Magento/Acl/Resource/ProviderTest.php | 17 +- .../Authz/Model/UserIdentifierTest.php | 93 +++ .../Page/System/Config/Robots/ResetTest.php | 38 +- .../Backend/Block/Widget/Grid/ColumnTest.php | 2 +- .../Controller/Adminhtml/CacheTest.php | 14 +- .../Model/Config/Backend/BaseurlTest.php | 2 +- .../Model/Config/Backend/SecureTest.php | 2 +- .../Magento/Backend/Model/CookieTest.php | 44 -- .../Magento/Backend/Model/UrlTest.php | 10 +- .../Catalog/Product/View/Type/BundleTest.php | 4 +- .../Magento/Captcha/Helper/DataTest.php | 6 +- .../Magento/Captcha/Model/DefaultTest.php | 6 +- .../Magento/Captcha/Model/ObserverTest.php | 9 +- .../Composite/Fieldset/OptionsTest.php | 2 +- .../Product/Helper/Form/WeightTest.php | 4 +- .../Block/Product/View/OptionsTest.php | 2 +- .../Catalog/Block/Product/View/TabsTest.php | 2 +- .../Magento/Catalog/Helper/UrlTest.php | 6 +- .../Category/Attribute/Backend/SortbyTest.php | 10 +- .../Catalog/Model/Observer/ReindexTest.php | 2 +- .../Plugin/QuoteItemProductOptionTest.php | 8 +- .../Backend/Groupprice/AbstractTest.php | 2 +- .../Product/Attribute/Backend/MediaTest.php | 11 +- .../Product/Attribute/Backend/StockTest.php | 9 +- .../Model/Product/Indexer/FlatTest.php | 10 +- .../Catalog/Model/Resource/AbstractTest.php | 6 +- .../Model/Resource/Category/FlatTest.php | 4 +- .../AssociatedProductUpdaterTest.php | 2 +- .../Model/Adminhtml/Stock/ItemTest.php | 4 +- .../Model/Resource/EngineProviderTest.php | 13 +- .../Checkout/Block/Cart/AbstractTest.php | 4 +- .../Checkout/Block/Cart/Item/RendererTest.php | 14 +- .../Magento/Checkout/Block/Cart/LinkTest.php | 10 +- .../Checkout/Block/Cart/SidebarTest.php | 2 +- .../Magento/Checkout/Block/LinkTest.php | 6 +- .../Magento/Cms/Model/Page/UrlrewriteTest.php | 2 +- .../Code/Reader/ArgumentsReaderTest.php | 4 +- .../Code/Validator/ArgumentSequenceTest.php | 48 +- .../_files/ClassesForArgumentSequence.php | 375 +---------- .../Core/App/Action/FormKeyValidatorTest.php | 10 +- .../{Page => Core}/Block/SwitchTest.php | 8 +- .../Magento/Core/Helper/CookieTest.php | 73 +- .../Magento/Core/Helper/ThemeTest.php | 38 +- .../Magento/Core/Helper/Url/RewriteTest.php | 22 - .../File/Storage/SynchronizationTest.php | 9 +- .../Magento/Core/Model/Layout/MergeTest.php | 6 +- .../_files/layout/fixture_handle_one.xml | 2 +- .../_files/layout/fixture_handle_two.xml | 2 +- .../Core/Model/Layout/_files/merged.xml | 4 +- .../Magento/Core/Model/ObserverTest.php | 9 +- .../Resource/Layout/Link/CollectionTest.php | 5 +- .../Resource/Layout/Update/CollectionTest.php | 5 +- .../Model/Resource/Setup/MigrationTest.php | 2 +- .../Magento/Core/Model/Session/ConfigTest.php | 492 ++++++++++++++ .../Core/Model/Store/Storage/DefaultTest.php | 17 +- .../Core/Model/Store/StorageFactoryTest.php | 2 +- .../Magento/Core/Model/ThemeTest.php | 8 +- .../Core/Model/Url/SecurityInfoTest.php | 8 +- .../testsuite/Magento/Core/Model/UrlTest.php | 12 +- .../Block/Account/AuthorizationLinkTest.php | 2 +- .../Customer/Block/Account/LinkTest.php | 2 +- .../Block/Account/RegisterLinkTest.php | 4 +- .../Controller/Adminhtml/IndexTest.php | 4 +- .../Magento/Data/Collection/DbTest.php | 4 +- .../unit/testsuite/Magento/Data/FormTest.php | 10 +- .../Editor/Tools/Code/CustomTest.php | 9 +- .../Adminhtml/Editor/Tools/Code/JsTest.php | 9 +- .../Adminhtml/System/Design/EditorTest.php | 11 +- .../Model/Plugin/ThemeCopyServiceTest.php | 18 +- .../Magento/DesignEditor/Model/StateTest.php | 2 +- .../DesignEditor/Model/Theme/ContextTest.php | 9 +- .../Model/Url/NavigationModeTest.php | 68 +- .../Model/Resource/Country/CollectionTest.php | 11 +- .../Downloadable/Model/ObserverTest.php | 28 +- .../Magento/Eav/Model/Entity/AbstractTest.php | 10 +- .../Entity/Attribute/Backend/AbstractTest.php | 2 +- .../Entity/Attribute/Backend/ArrayTest.php | 6 +- .../Eav/Model/Entity/AttributeTest.php | 2 +- .../Model/Validator/Attribute/DataTest.php | 4 +- .../Model/Plugin/QuoteItemTest.php | 4 +- .../GoogleOptimizer/Helper/FormTest.php | 9 +- .../Model/Observer/Product/DeleteTest.php | 8 +- .../Block/SiteVerificationTest.php | 2 +- .../Model/Export/Entity/AbstractEavTest.php | 22 +- .../Model/Import/Entity/AbstractTest.php | 31 - .../Model/Import/Entity/Eav/CustomerTest.php | 2 +- .../Import/Entity/Product/OptionTest.php | 2 +- .../CollectionByPagesIteratorTest.php | 2 +- .../Magento/Index/App/IndexerTest.php | 9 +- .../Magento/Index/Model/ProcessTest.php | 7 +- .../Controller/Adminhtml/IntegrationTest.php | 30 +- .../Integration/Model/Config/XsdTest.php | 227 ++----- .../Model/Config/_files/integration.php | 12 +- .../Model/Config/_files/integration.xml | 11 +- .../Model/Integration/FactoryTest.php | 3 +- .../Integration/Source/AuthenticationTest.php | 40 -- .../Magento/Integration/Model/ManagerTest.php | 139 ++++ .../Integration/Service/IntegrationV1Test.php | 26 +- .../Magento/Newsletter/Model/TemplateTest.php | 4 +- .../Payment/Block/Form/ContainerTest.php | 4 +- .../Block/Info/ContainerAbstractTest.php | 2 +- .../Payment/Model/Config/ConverterTest.php | 2 +- .../Magento/Paypal/Helper/CheckoutTest.php | 4 +- .../Paypal/Model/PayflowadvancedTest.php | 2 +- .../Magento/Paypal/Model/PayflowlinkTest.php | 2 +- .../Magento/Paypal/Model/ProTest.php | 2 +- .../Block/Product/View/PriceTest.php | 2 +- .../Block/Product/View/StockTest.php | 2 +- .../Review/Helper/Action/PagerTest.php | 2 +- .../Block/Adminhtml/Items/AbstractTest.php | 2 +- .../Adminhtml/Order/Create/Items/GridTest.php | 4 +- .../Adminhtml/Order/Invoice/ViewTest.php | 2 +- .../Block/Adminhtml/Order/Totals/TaxTest.php | 2 +- .../Magento/Sales/Block/Guest/LinkTest.php | 2 +- .../Sales/Block/Items/AbstractTest.php | 2 +- .../Block/Recurring/Profile/GridTest.php | 8 +- .../Profile/Related/Orders/GridTest.php | 5 +- .../Recurring/Profile/View/AddressTest.php | 6 +- .../Block/Recurring/Profile/View/DataTest.php | 2 +- .../Block/Recurring/Profile/View/FeesTest.php | 2 +- .../Block/Recurring/Profile/View/ItemTest.php | 2 +- .../Recurring/Profile/View/ReferenceTest.php | 2 +- .../Recurring/Profile/View/ScheduleTest.php | 2 +- .../Adminhtml/Order/CreditmemoTest.php | 15 +- .../Billing/Agreement/OrdersUpdaterTest.php | 2 +- .../Backend/CatalogProductQuoteTest.php | 16 +- .../Observer/Backend/CustomerQuoteTest.php | 8 +- .../Quote/Address/CollectTotalsTest.php | 263 ++++++++ .../Quote/Address/VatValidatorTest.php | 235 +++++++ .../Order/Invoice/Total/ShippingTest.php | 11 +- .../Magento/Sales/Model/Order/InvoiceTest.php | 6 +- .../Sales/Model/Order/Shipment/TrackTest.php | 8 +- .../Magento/Sales/Model/OrderTest.php | 4 +- .../Magento/Sales/Model/Quote/ItemTest.php | 17 +- .../Magento/SalesRule/Model/ValidatorTest.php | 39 +- .../Magento/Sitemap/Model/SitemapTest.php | 4 +- .../Tax/Model/TaxClass/FactoryTest.php | 16 +- .../Tax/Model/TaxClass/Type/CustomerTest.php | 2 +- .../Tax/Model/TaxClass/Type/ProductTest.php | 2 +- .../Tools/View/Generator/CopyRuleTest.php | 4 +- .../System/Design/Theme/Tab/JsTest.php | 8 +- .../System/Design/Theme/TabAbstractTest.php | 9 +- .../{Page => Theme}/Block/Html/HeadTest.php | 18 +- .../{Page => Theme}/Block/Html/HeaderTest.php | 8 +- .../Block/Html/_files/logo/default/image.gif | Bin .../Adminhtml/System/Design/ThemeTest.php | 9 +- .../Model/Layout}/Config/ConverterTest.php | 8 +- .../Layout}/Config/_files/page_layouts.xml | 2 +- .../User/Model/Acl/Loader/RoleTest.php | 12 +- .../User/Model/Acl/Loader/RuleTest.php | 13 +- .../Page => View}/Asset/CollectionTest.php | 14 +- .../Asset/GroupedCollectionTest.php | 45 +- .../Page => View}/Asset/MergeServiceTest.php | 83 +-- .../Asset/MergeStrategy/ChecksumTest.php | 8 +- .../Asset/MergeStrategy/DirectTest.php | 6 +- .../Asset/MergeStrategy/FileExistsTest.php | 8 +- .../Model/Page => View}/Asset/MergedTest.php | 32 +- .../Page => View}/Asset/MinifiedTest.php | 10 +- .../Page => View}/Asset/MinifyServiceTest.php | 75 ++- .../Asset/PropertyGroupTest.php | 9 +- .../Page => View}/Asset/PublicFileTest.php | 6 +- .../Model/Page => View}/Asset/RemoteTest.php | 6 +- .../Page => View}/Asset/ViewFileTest.php | 8 +- .../{Block => Element}/AbstractBlockTest.php | 12 +- .../Element/Html}/Link/CurrentTest.php | 18 +- .../Block => View/Element/Html}/LinksTest.php | 18 +- .../View/{Block => Element}/TemplateTest.php | 6 +- .../Magento/View/TemplateEngine/PhpTest.php | 4 +- .../Magento/View/Url/_files/result.css | 2 +- .../Magento/View/Url/_files/source.css | 2 +- .../Block/Adminhtml/Role/Edit/TabsTest.php | 6 +- .../Magento/Webapi/Model/Acl/RoleTest.php | 2 +- .../Magento/Webapi/Model/Acl/RuleTest.php | 2 +- .../Magento/Webapi/Model/Acl/UserTest.php | 2 +- .../Config/Integration}/ConverterTest.php | 4 +- .../Model/Config/Integration}/XsdTest.php | 50 +- .../Model/Config/Integration}/_files/api.php | 6 +- .../Model/Config/Integration}/_files/api.xml | 8 +- .../Magento/Webapi/Model/Plugin/SetupTest.php | 182 +++++ .../Registration/Create/FormTest.php | 5 - .../Adminhtml/Subscription/Edit/FormTest.php | 5 - .../Block/Adminhtml/Subscription/EditTest.php | 11 - .../Adminhtml/Webhook/RegistrationTest.php | 18 +- .../Adminhtml/Webhook/SubscriptionTest.php | 16 +- .../Magento/Webhook/Model/JobTest.php | 32 +- .../Magento/Webhook/Model/ObserverTest.php | 4 +- .../Model/Resource/Event/CollectionTest.php | 2 +- .../Model/Resource/Job/CollectionTest.php | 2 +- .../Resource/Subscription/CollectionTest.php | 40 +- .../Subscription/Grid/CollectionTest.php | 4 +- .../Webhook/Model/Subscription/ConfigTest.php | 2 +- .../Webhook/Model/SubscriptionTest.php | 8 +- .../Webhook/Model/Webapi/User/FactoryTest.php | 11 +- .../Wishlist/Block/Item/ConfigureTest.php | 14 +- dev/tools/Magento/Tools/View/generator.php | 2 +- dev/tools/layout/processors/headBlocks.xsl | 4 +- lib/Magento/Acl/Resource/Provider.php | 13 +- lib/Magento/App/Request/Http.php | 2 + lib/Magento/Code/Reader/ArgumentsReader.php | 16 +- .../Code/Validator/ArgumentSequence.php | 231 ++----- lib/Magento/Data/Collection/Db.php | 12 +- lib/Magento/Data/Form.php | 47 +- .../Data/Form/Element/AbstractElement.php | 2 +- lib/Magento/Data/Form/FormKey.php | 72 ++ lib/Magento/Json/Decoder.php | 40 ++ lib/Magento/Json/DecoderInterface.php | 38 ++ .../Links.php => lib/Magento/Json/Encoder.php | 37 +- lib/Magento/Json/EncoderInterface.php | 38 ++ .../Module/FrontController/Plugin/Install.php | 2 +- lib/Magento/Oauth/Helper/Oauth.php | 1 - .../Session/Config/ConfigInterface.php | 16 +- .../Magento/Session/SidResolverInterface.php | 33 +- lib/Magento/Stdlib/Cookie.php | 117 ++++ .../Magento/View}/Asset/AssetInterface.php | 6 +- .../Magento/View}/Asset/Collection.php | 24 +- lib/Magento/View/Asset/ConfigInterface.php | 61 ++ .../Magento/View}/Asset/GroupedCollection.php | 54 +- .../Magento/View}/Asset/LocalInterface.php | 6 +- .../Magento/View}/Asset/MergeService.php | 63 +- .../View}/Asset/MergeStrategy/Checksum.php | 31 +- .../View}/Asset/MergeStrategy/Direct.php | 32 +- .../View}/Asset/MergeStrategy/FileExists.php | 25 +- .../View}/Asset/MergeStrategyInterface.php | 4 +- .../View}/Asset/MergeableInterface.php | 8 +- .../Magento/View}/Asset/Merged.php | 115 ++-- .../Magento/View}/Asset/Minified.php | 62 +- .../Magento/View}/Asset/MinifyService.php | 82 ++- .../Magento/View}/Asset/PropertyGroup.php | 16 +- .../View/Asset/PropertyGroupFactory.php | 37 +- .../Magento/View}/Asset/PublicFile.php | 26 +- .../Magento/View}/Asset/Remote.php | 20 +- .../Magento/View}/Asset/ViewFile.php | 26 +- .../View/{Block => Element}/AbstractBlock.php | 199 ++---- .../View/{Block => Element}/Context.php | 18 +- .../View/{Block => Element}/Html/Calendar.php | 47 +- .../View/{Block => Element}/Html/Date.php | 4 +- .../View/{Block => Element}/Html/Link.php | 18 +- .../View/Element/Html}/Link/Current.php | 43 +- lib/Magento/View/Element/Html/Links.php | 73 ++ .../View/{Block => Element}/Html/Select.php | 4 +- .../Magento/View/Element}/Js/Components.php | 11 +- .../Magento/View/Element}/Js/Cookie.php | 41 +- .../View/{Block => Element}/Messages.php | 32 +- .../Magento/View/Element}/Redirect.php | 125 ++-- .../View/{Block => Element}/Template.php | 23 +- .../{Block => Element}/Template/Context.php | 7 +- lib/Magento/View/{Block => Element}/Text.php | 4 +- .../View/{Block => Element}/Text/ListText.php | 6 +- .../{Block => Element}/Text/TextList/Item.php | 6 +- .../{Block => Element}/Text/TextList/Link.php | 6 +- lib/Magento/View/Layout/Element.php | 9 + lib/Magento/View/LayoutInterface.php | 4 +- lib/Zend/Session/Config/ConfigInterface.php | 52 ++ pub/lib/mage/adminhtml/wysiwyg/widget.js | 4 + pub/lib/mage/bootstrap.js | 2 - 1943 files changed, 21996 insertions(+), 14989 deletions(-) create mode 100644 app/code/Magento/Authz/Model/UserIdentifier.php rename dev/tests/integration/testsuite/Magento/Page/Helper/RobotsTest.php => app/code/Magento/Authz/Model/UserIdentifier/Factory.php (55%) create mode 100644 app/code/Magento/Authz/Model/UserLocator/Admin.php create mode 100644 app/code/Magento/Authz/Model/UserLocator/Guest.php rename app/code/Magento/{Page/Block/Link.php => Authz/Model/UserLocatorInterface.php} (72%) create mode 100644 app/code/Magento/Authz/Service/AuthorizationV1.php create mode 100644 app/code/Magento/Authz/Service/AuthorizationV1Interface.php create mode 100644 app/code/Magento/Authz/etc/adminhtml/di.xml create mode 100644 app/code/Magento/Authz/etc/di.xml rename app/code/Magento/{Page => Authz}/etc/module.xml (79%) mode change 100755 => 100644 rename app/code/Magento/{Page => Core}/Block/Switcher.php (97%) create mode 100644 app/code/Magento/Core/Model/Asset/Config.php create mode 100644 app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php delete mode 100644 app/code/Magento/Core/Model/Cookie.php create mode 100644 app/code/Magento/Core/Model/Session/Config.php create mode 100644 app/code/Magento/Core/Model/Session/SidResolver.php rename app/code/Magento/{Page => Core}/view/frontend/switch/flags.phtml (100%) rename app/code/Magento/{Page => Core}/view/frontend/switch/languages.phtml (96%) rename app/code/Magento/{Page => Core}/view/frontend/switch/stores.phtml (100%) create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tabs.php rename app/code/Magento/Integration/{Model/Integration/Source/Authentication.php => Block/Adminhtml/Integration/Grid.php} (66%) create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Integration/Token.php create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Delete.php create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Edit.php create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/IntegrationAbstract.php create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link.php create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Activate.php create mode 100644 app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Reauthorize.php rename dev/tests/unit/testsuite/Magento/Core/Model/PageTest.php => app/code/Magento/Integration/Model/Cache/Type.php (60%) create mode 100644 app/code/Magento/Integration/Model/Config.php create mode 100644 app/code/Magento/Integration/Model/Manager.php create mode 100644 app/code/Magento/Integration/Model/Resource/Setup.php create mode 100644 app/code/Magento/Integration/etc/cache.xml create mode 100644 app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.0-1.0.0.1.php create mode 100644 app/code/Magento/Integration/view/adminhtml/integration.css rename app/code/Magento/{Page/view/frontend/link/current.phtml => Integration/view/adminhtml/integration/activate/permissions.phtml} (64%) create mode 100644 app/code/Magento/Integration/view/adminhtml/integration/popup_container.phtml create mode 100644 app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_permissions_popup.xml create mode 100644 app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_tokens_popup.xml delete mode 100644 app/code/Magento/Page/Block/Template/Links/Block.php delete mode 100644 app/code/Magento/Page/Helper/Robots.php delete mode 100644 app/code/Magento/Page/etc/config.xml delete mode 100644 app/code/Magento/Page/etc/di.xml delete mode 100644 app/code/Magento/Page/view/frontend/js/splitbutton.js create mode 100644 app/code/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotals.php create mode 100644 app/code/Magento/Sales/Model/Observer/Frontend/Quote/Address/VatValidator.php rename app/code/Magento/{Page => Theme}/Block/Html.php (70%) rename app/code/Magento/{Page => Theme}/Block/Html/Breadcrumbs.php (73%) rename app/code/Magento/{Page => Theme}/Block/Html/Footer.php (71%) rename app/code/Magento/{Page => Theme}/Block/Html/Head.php (80%) rename app/code/Magento/{Page/Block/Html/Head/AssetBlock.php => Theme/Block/Html/Head/AssetBlockInterface.php} (85%) rename app/code/Magento/{Page => Theme}/Block/Html/Head/Css.php (72%) rename app/code/Magento/{Page => Theme}/Block/Html/Head/Link.php (68%) rename app/code/Magento/{Page => Theme}/Block/Html/Head/Script.php (72%) rename app/code/Magento/{Page => Theme}/Block/Html/Header.php (79%) rename app/code/Magento/{Page => Theme}/Block/Html/Notices.php (78%) rename app/code/Magento/{Page => Theme}/Block/Html/Pager.php (74%) rename app/code/Magento/{Page => Theme}/Block/Html/Title.php (85%) rename app/code/Magento/{Page => Theme}/Block/Html/Topmenu.php (91%) create mode 100644 app/code/Magento/Theme/Block/Html/Welcome.php rename app/code/Magento/{Page => Theme}/Helper/Layout.php (86%) rename app/code/Magento/{Page/Model => Theme/Model/Layout}/Config.php (94%) rename app/code/Magento/{Page/Model => Theme/Model/Layout}/Config/Converter.php (97%) rename app/code/Magento/{Page/Model => Theme/Model/Layout}/Config/Reader.php (96%) rename app/code/Magento/{Page/Model => Theme/Model/Layout}/Config/SchemaLocator.php (93%) rename app/code/Magento/{Page/Model => Theme/Model/Layout}/Source/Layout.php (87%) rename app/code/Magento/{Page => Theme}/etc/adminhtml/system.xml (99%) rename app/code/Magento/{Page => Theme}/etc/page_layouts.xml (100%) rename app/code/Magento/{Page => Theme}/etc/page_layouts.xsd (100%) rename app/code/Magento/{Page => Theme}/etc/page_layouts_file.xsd (100%) rename app/code/Magento/{Page => Theme}/i18n/de_DE.csv (100%) rename app/code/Magento/{Page => Theme}/i18n/en_US.csv (100%) rename app/code/Magento/{Page => Theme}/i18n/es_ES.csv (100%) rename app/code/Magento/{Page => Theme}/i18n/fr_FR.csv (100%) rename app/code/Magento/{Page => Theme}/i18n/nl_NL.csv (100%) rename app/code/Magento/{Page => Theme}/i18n/pt_BR.csv (100%) rename app/code/Magento/{Page => Theme}/i18n/zh_CN.csv (100%) rename app/code/Magento/{Page => Theme}/view/adminhtml/empty.phtml (100%) rename app/code/Magento/{Page => Theme}/view/adminhtml/favicon.ico (100%) rename app/code/Magento/{Page => Theme}/view/adminhtml/title.phtml (97%) rename app/code/Magento/{Page => Theme}/view/frontend/1column.phtml (98%) rename app/code/Magento/{Page => Theme}/view/frontend/2columns-left.phtml (98%) rename app/code/Magento/{Page => Theme}/view/frontend/2columns-right.phtml (98%) rename app/code/Magento/{Page => Theme}/view/frontend/3columns.phtml (98%) rename app/code/Magento/{Page => Theme}/view/frontend/blank.phtml (95%) rename app/code/Magento/{Page => Theme}/view/frontend/callouts/left_col.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/callouts/right_col.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/css/tabs.css (100%) rename app/code/Magento/{Page => Theme}/view/frontend/css/validate.css (100%) rename app/code/Magento/{Page => Theme}/view/frontend/empty.phtml (97%) rename app/code/Magento/{Page => Theme}/view/frontend/favicon.ico (100%) rename app/code/Magento/{Page => Theme}/view/frontend/html/block.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/html/breadcrumbs.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/html/bugreport.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/html/copyright.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/html/footer.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/html/head.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/html/header.phtml (95%) rename app/code/Magento/{Page => Theme}/view/frontend/html/notices.phtml (96%) rename app/code/Magento/{Page => Theme}/view/frontend/html/pager.phtml (98%) rename app/code/Magento/{Page => Theme}/view/frontend/html/title.phtml (97%) rename app/code/Magento/{Page => Theme}/view/frontend/html/topmenu.phtml (92%) rename app/code/Magento/{Page => Theme}/view/frontend/images/validation_advice_bg.gif (100%) rename app/code/Magento/{Page => Theme}/view/frontend/js/calendar.phtml (98%) rename app/code/Magento/{Page => Theme}/view/frontend/js/components.phtml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/js/cookie.phtml (97%) rename app/code/Magento/{Page => Theme}/view/frontend/js/notices.js (100%) rename app/code/Magento/{Page => Theme}/view/frontend/js/row-builder.js (100%) rename app/code/Magento/{Page => Theme}/view/frontend/js/truncate.js (100%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/default.xml (68%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/default_head_blocks.xml (69%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/page_calendar.xml (81%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/page_empty.xml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/page_one_column.xml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/page_three_columns.xml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/page_two_columns_left.xml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/page_two_columns_right.xml (100%) rename app/code/Magento/{Page => Theme}/view/frontend/layout/print.xml (85%) rename app/code/Magento/{Page => Theme}/view/frontend/link.phtml (96%) rename app/code/Magento/{Page => Theme}/view/frontend/menu.js (100%) rename app/code/Magento/{Page => Theme}/view/frontend/page.phtml (98%) rename app/code/Magento/{Page => Theme}/view/frontend/popup.phtml (97%) rename app/code/Magento/{Page => Theme}/view/frontend/print.phtml (98%) rename app/code/Magento/{Page => Theme}/view/install/favicon.ico (100%) create mode 100644 app/code/Magento/User/sql/user_setup/upgrade-1.6.1.4-1.6.1.5.php create mode 100644 app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php create mode 100644 app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php create mode 100644 app/code/Magento/Webapi/Model/Cache/TypeIntegration.php rename app/code/Magento/{Integration/Model/Config/Api => Webapi/Model/Config/Integration}/Converter.php (86%) rename app/code/Magento/{Integration/Model/Config/Api => Webapi/Model/Config/Integration}/Reader.php (77%) rename app/code/Magento/{Integration/Model/Config/Api => Webapi/Model/Config/Integration}/SchemaLocator.php (95%) create mode 100644 app/code/Magento/Webapi/Model/IntegrationConfig.php create mode 100644 app/code/Magento/Webapi/Model/Plugin/Setup.php create mode 100644 app/code/Magento/Webapi/etc/frontend/di.xml rename app/code/Magento/{Integration => Webapi}/etc/integration/api.xsd (94%) create mode 100644 app/code/Magento/Webapi/view/adminhtml/integration/activate/permissions/tab/webapi.phtml create mode 100644 app/code/Magento/Webapi/view/adminhtml/layout/adminhtml_integration_activate_permissions_webapi.xml create mode 100644 app/code/Magento/Webapi/view/adminhtml/layout/adminhtml_integration_edit.xml create mode 100644 app/code/Magento/Webapi/view/adminhtml/resourcetree.phtml create mode 100644 app/code/Magento/Webhook/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webhook.php create mode 100644 app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_integration_activate_permissions_webhook.xml rename app/design/frontend/magento_plushe/{Magento_Page => Magento_Theme}/layout/default.xml (80%) create mode 100644 dev/tests/integration/testsuite/Magento/App/FrontController/Plugin/InstallTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Authz/Service/AuthorizationV1Test.php rename app/code/Magento/Backend/Model/Cookie.php => dev/tests/integration/testsuite/Magento/Authz/Service/AuthorizationV1Test/UserLocatorStub.php (73%) rename dev/tests/integration/testsuite/Magento/Core/Model/Session/{AbstractTest.php => AbstractSessionTest.php} (63%) create mode 100644 dev/tests/integration/testsuite/Magento/Core/Model/Session/ConfigTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Core/Model/Session/SidResolverTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Integration/Model/Config/ReaderTest.php rename app/code/Magento/Page/Block/Template/Container.php => dev/tests/integration/testsuite/Magento/Integration/Model/Config/_files/integration.php (69%) create mode 100644 dev/tests/integration/testsuite/Magento/Integration/Model/Config/_files/integrationA.xml create mode 100644 dev/tests/integration/testsuite/Magento/Integration/Model/Config/_files/integrationB.xml delete mode 100644 dev/tests/integration/testsuite/Magento/Page/_files/robots.txt create mode 100644 dev/tests/integration/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php rename dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/{PageConfigFilesTest.php => ThemeConfigFilesTest.php} (89%) rename dev/tests/integration/testsuite/Magento/{Page => Theme}/Block/Html/BreadcrumbsTest.php (93%) rename dev/tests/integration/testsuite/Magento/{Page => Theme}/Block/Html/FooterTest.php (93%) rename dev/tests/integration/testsuite/Magento/{Page => Theme}/Block/Html/HeadTest.php (90%) rename dev/tests/integration/testsuite/Magento/{Page => Theme}/Block/HtmlTest.php (93%) rename dev/tests/integration/testsuite/Magento/{Page/Model => Theme/Model/Layout}/Config/ReaderTest.php (94%) rename dev/tests/integration/testsuite/Magento/{Page/Model => Theme/Model/Layout}/ConfigTest.php (87%) rename dev/tests/integration/testsuite/Magento/{Page/Model => Theme/Model/Layout}/_files/page_layouts.xml (96%) rename dev/tests/integration/testsuite/Magento/{Page/Model => Theme/Model/Layout}/_files/page_layouts2.xml (96%) rename dev/tests/integration/testsuite/Magento/{Core/Model/Page => View}/Asset/MergedTest.php (93%) rename dev/tests/integration/testsuite/Magento/View/{Block => Element}/AbstractBlockTest.php (82%) rename dev/tests/integration/testsuite/Magento/View/{Block => Element}/TemplateTest.php (86%) rename dev/tests/integration/testsuite/Magento/View/{Block => Element}/Text/ListTest.php (78%) rename dev/tests/integration/testsuite/Magento/View/{Block => Element}/TextTest.php (93%) rename dev/tests/integration/testsuite/Magento/View/{Block => Element}/_files/frontend/magento_plushe/css/wrong.css (100%) create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/adminhtml/vendor_test/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/area_two/vendor_theme_one/file create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/area_two/vendor_theme_one/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/design_area/vendor_theme_one/file create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/design_area/vendor_theme_one/theme.xml rename app/code/Magento/Page/Helper/Data.php => dev/tests/integration/testsuite/Magento/View/_files/design/frontend/access_violation.php (86%) create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default_iphone/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_file.txt create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_file_with_2_dots..txt rename app/code/Magento/Page/view/frontend/links.phtml => dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml (73%) create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/test.phtml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico rename app/code/Magento/Page/view/frontend/template/container.phtml => dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/css/styles.css (81%) create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/i18n/en_US.csv create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/images/logo.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/images/logo_email.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/js/tabs.js create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/view.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/images/rectangle.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/images/square.gif rename app/code/Magento/Page/view/frontend/redirect.phtml => dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/style.css (69%) create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/sub.css create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/layout_test_handle.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_custom_theme/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif rename app/code/Magento/Page/Block/Js/Translate.php => dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/access_violation.php (75%) create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/1.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/base64.css create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/body.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/deep/recursive.css create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/exception.css rename app/code/Magento/Page/view/frontend/template/linksblock.phtml => dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/file.css (59%) create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/h1.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/images/h2.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive.css create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive2.gif create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/scripts.js create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/theme.xml create mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/themes.php create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/ReaderTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/_files/api.php create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/_files/apiA.xml create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/_files/apiB.xml create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/ReaderTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/_files/webapi.php create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/_files/webapiA.xml create mode 100644 dev/tests/integration/testsuite/Magento/Webapi/Model/Config/_files/webapiB.xml rename dev/tests/static/testsuite/Magento/Test/Integrity/Magento/{Page => Theme}/Config/ReferentialTest.php (98%) rename dev/tests/static/testsuite/Magento/Test/Integrity/Magento/{Page => Theme}/ConfigTest.php (95%) rename dev/tests/static/testsuite/Magento/Test/Integrity/Magento/{Page => Theme}/_files/invalid_page_layouts.xml (95%) rename dev/tests/static/testsuite/Magento/Test/Integrity/Magento/{Page => Theme}/_files/invalid_page_layouts_partial.xml (100%) rename dev/tests/static/testsuite/Magento/Test/Integrity/Magento/{Page => Theme}/_files/valid_page_layouts.xml (95%) rename dev/tests/static/testsuite/Magento/Test/Integrity/Magento/{Page => Theme}/_files/valid_page_layouts_partial.xml (96%) create mode 100644 dev/tests/unit/testsuite/Magento/Authz/Model/UserIdentifierTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Backend/Model/CookieTest.php rename dev/tests/unit/testsuite/Magento/{Page => Core}/Block/SwitchTest.php (93%) create mode 100644 dev/tests/unit/testsuite/Magento/Core/Model/Session/ConfigTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Integration/Model/Integration/Source/AuthenticationTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Integration/Model/ManagerTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/VatValidatorTest.php rename dev/tests/unit/testsuite/Magento/{Page => Theme}/Block/Html/HeadTest.php (77%) rename dev/tests/unit/testsuite/Magento/{Page => Theme}/Block/Html/HeaderTest.php (92%) rename dev/tests/unit/testsuite/Magento/{Page => Theme}/Block/Html/_files/logo/default/image.gif (100%) rename dev/tests/unit/testsuite/Magento/{Page/Model => Theme/Model/Layout}/Config/ConverterTest.php (89%) rename dev/tests/unit/testsuite/Magento/{Page/Model => Theme/Model/Layout}/Config/_files/page_layouts.xml (96%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/CollectionTest.php (80%) rename dev/tests/unit/testsuite/Magento/{Page/Model => View}/Asset/GroupedCollectionTest.php (78%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/MergeServiceTest.php (62%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/MergeStrategy/ChecksumTest.php (94%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/MergeStrategy/DirectTest.php (94%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/MergeStrategy/FileExistsTest.php (89%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/MergedTest.php (84%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/MinifiedTest.php (92%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/MinifyServiceTest.php (69%) rename dev/tests/unit/testsuite/Magento/{Page/Model => View}/Asset/PropertyGroupTest.php (83%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/PublicFileTest.php (90%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/RemoteTest.php (87%) rename dev/tests/unit/testsuite/Magento/{Core/Model/Page => View}/Asset/ViewFileTest.php (89%) rename dev/tests/unit/testsuite/Magento/View/{Block => Element}/AbstractBlockTest.php (87%) rename dev/tests/unit/testsuite/Magento/{Page/Block => View/Element/Html}/Link/CurrentTest.php (86%) rename dev/tests/unit/testsuite/Magento/{Page/Block => View/Element/Html}/LinksTest.php (81%) rename dev/tests/unit/testsuite/Magento/View/{Block => Element}/TemplateTest.php (96%) rename dev/tests/unit/testsuite/Magento/{Integration/Model/Config/Api => Webapi/Model/Config/Integration}/ConverterTest.php (93%) rename dev/tests/unit/testsuite/Magento/{Integration/Model/Config/Api => Webapi/Model/Config/Integration}/XsdTest.php (88%) rename dev/tests/unit/testsuite/Magento/{Integration/Model/Config/Api => Webapi/Model/Config/Integration}/_files/api.php (89%) rename dev/tests/unit/testsuite/Magento/{Integration/Model/Config/Api => Webapi/Model/Config/Integration}/_files/api.xml (87%) create mode 100644 dev/tests/unit/testsuite/Magento/Webapi/Model/Plugin/SetupTest.php create mode 100644 lib/Magento/Data/Form/FormKey.php create mode 100644 lib/Magento/Json/Decoder.php create mode 100644 lib/Magento/Json/DecoderInterface.php rename app/code/Magento/Page/Block/Links.php => lib/Magento/Json/Encoder.php (62%) create mode 100644 lib/Magento/Json/EncoderInterface.php rename app/code/Magento/Page/Helper/Html.php => lib/Magento/Session/Config/ConfigInterface.php (82%) rename app/code/Magento/Core/Model/Page.php => lib/Magento/Session/SidResolverInterface.php (63%) create mode 100644 lib/Magento/Stdlib/Cookie.php rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/AssetInterface.php (92%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/Collection.php (73%) create mode 100644 lib/Magento/View/Asset/ConfigInterface.php rename {app/code/Magento/Page/Model => lib/Magento/View}/Asset/GroupedCollection.php (61%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/LocalInterface.php (90%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/MergeService.php (58%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/MergeStrategy/Checksum.php (64%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/MergeStrategy/Direct.php (78%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/MergeStrategy/FileExists.php (68%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/MergeStrategyInterface.php (97%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/MergeableInterface.php (84%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/Merged.php (57%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/Minified.php (58%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/MinifyService.php (60%) rename {app/code/Magento/Page/Model => lib/Magento/View}/Asset/PropertyGroup.php (80%) rename app/code/Magento/Page/Block/Html/Welcome.php => lib/Magento/View/Asset/PropertyGroupFactory.php (61%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/PublicFile.php (76%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/Remote.php (79%) rename {app/code/Magento/Core/Model/Page => lib/Magento/View}/Asset/ViewFile.php (77%) rename lib/Magento/View/{Block => Element}/AbstractBlock.php (83%) rename lib/Magento/View/{Block => Element}/Context.php (94%) rename lib/Magento/View/{Block => Element}/Html/Calendar.php (65%) rename lib/Magento/View/{Block => Element}/Html/Date.php (96%) rename lib/Magento/View/{Block => Element}/Html/Link.php (86%) rename {app/code/Magento/Page/Block => lib/Magento/View/Element/Html}/Link/Current.php (71%) create mode 100644 lib/Magento/View/Element/Html/Links.php rename lib/Magento/View/{Block => Element}/Html/Select.php (98%) rename {app/code/Magento/Page/Block => lib/Magento/View/Element}/Js/Components.php (81%) rename {app/code/Magento/Page/Block => lib/Magento/View/Element}/Js/Cookie.php (62%) rename lib/Magento/View/{Block => Element}/Messages.php (92%) rename {app/code/Magento/Page/Block => lib/Magento/View/Element}/Redirect.php (54%) rename lib/Magento/View/{Block => Element}/Template.php (94%) rename lib/Magento/View/{Block => Element}/Template/Context.php (95%) rename lib/Magento/View/{Block => Element}/Text.php (95%) rename lib/Magento/View/{Block => Element}/Text/ListText.php (91%) rename lib/Magento/View/{Block => Element}/Text/TextList/Item.php (93%) rename lib/Magento/View/{Block => Element}/Text/TextList/Link.php (95%) create mode 100644 lib/Zend/Session/Config/ConfigInterface.php diff --git a/CHANGELOG.md b/CHANGELOG.md index c440cb6de5ba6..1c8730a663489 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +2.0.0.0-dev55 +============= +* Modularity improvements: + * Session configuration moved to library + * FormKey logic was moved from Session + * SessionIdFlags from Session was removed + * Move Page logic to the Theme module and library +* Created integration module UX +* Created authorization service (Magento_Authz module) +* Fixed bugs: + * Fixed the issue that prevented a customer group's shopping cart rules from applying properly to prices. The issue occurred when a customer was manually assigned to a customer group and automatic group assignment was enabled. + * Fixed the bug with schema upgrade scripts not running after installation + * Fixed the error with a blank page when user tries to get access to a restricted resource via URL (add Secret Key for URL set to "No") + 2.0.0.0-dev54 ============= * Modularity improvements: diff --git a/app/code/Magento/AdminNotification/Block/System/Messages.php b/app/code/Magento/AdminNotification/Block/System/Messages.php index ce984ccf27820..c856cf0f7b23d 100644 --- a/app/code/Magento/AdminNotification/Block/System/Messages.php +++ b/app/code/Magento/AdminNotification/Block/System/Messages.php @@ -32,19 +32,17 @@ class Messages extends \Magento\Backend\Block\Template */ protected $_messages; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, + array $data = array() + ) { + parent::__construct($context, $data); $this->_messages = $messages; } diff --git a/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php b/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php index 95635f6103cdd..977079f27a73d 100644 --- a/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php +++ b/app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php @@ -42,19 +42,17 @@ class UnreadMessagePopup extends \Magento\Backend\Block\Template */ protected $_messages; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized $messages, + array $data = array() + ) { + parent::__construct($context, $data); $this->_messages = $messages; } diff --git a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php index 3ad43a591176a..71bdb06d6b8a1 100644 --- a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php +++ b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php @@ -42,19 +42,17 @@ class ToolbarEntry extends \Magento\Backend\Block\Template */ protected $_notificationList; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\AdminNotification\Model\Resource\Inbox\Collection\Unread $notificationList, + array $data = array() + ) { + parent::__construct($context, $data); $this->_notificationList = $notificationList; } diff --git a/app/code/Magento/AdminNotification/Block/Window.php b/app/code/Magento/AdminNotification/Block/Window.php index a2116a9fb027f..fdf6faaadddb0 100644 --- a/app/code/Magento/AdminNotification/Block/Window.php +++ b/app/code/Magento/AdminNotification/Block/Window.php @@ -60,21 +60,19 @@ class Window extends \Magento\Backend\Block\Template */ protected $_latestItem; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\AdminNotification\Model\Resource\Inbox\Collection\Critical $criticalCollection, + array $data = array() + ) { + parent::__construct($context, $data); $this->_authSession = $authSession; $this->_criticalCollection = $criticalCollection; } diff --git a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php index 6ca88914496f4..64d24124c6321 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php +++ b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php @@ -42,23 +42,25 @@ class Collection protected $_countBySeverity = array(); /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\AdminNotification\Model\System\MessageList $messageList + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, \Magento\AdminNotification\Model\System\MessageList $messageList, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_messageList = $messageList; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); } /** diff --git a/app/code/Magento/AdminNotification/etc/module.xml b/app/code/Magento/AdminNotification/etc/module.xml index 8181e408161f8..8548afe579f6b 100755 --- a/app/code/Magento/AdminNotification/etc/module.xml +++ b/app/code/Magento/AdminNotification/etc/module.xml @@ -33,7 +33,7 @@ - + diff --git a/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml b/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml index 76cb3bd7b0c49..6e753a4ffcfd2 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml +++ b/app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml @@ -31,7 +31,7 @@ - + Magento_AdminNotification::system/notification.js @@ -42,12 +42,12 @@ - + Magento_Core::prototype/magento.css - + Magento_AdminNotification::toolbar_entry.js diff --git a/app/code/Magento/AdminNotification/view/adminhtml/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/notification/window.phtml index affd5c6e26674..d2f8102695e0a 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/notification/window.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/notification/window.phtml @@ -39,7 +39,7 @@ getSeverityText();?>

getNoticeMessageText(); ?>

- getReadDetailsText(); ?> + getReadDetailsText(); ?> diff --git a/app/code/Magento/AdminNotification/view/adminhtml/system/messages/popup.phtml b/app/code/Magento/AdminNotification/view/adminhtml/system/messages/popup.phtml index fe123bac70039..5d170ced6d024 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/system/messages/popup.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/system/messages/popup.phtml @@ -34,10 +34,19 @@ diff --git a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js b/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js index adf3c25e6763a..4396ec907acea 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js +++ b/app/code/Magento/AdminNotification/view/adminhtml/toolbar_entry.js @@ -39,11 +39,10 @@ showLoader: false }); }; - + var notificationCount = $('.notifications').attr('data-notification-count'); // Remove notification from the list var removeNotificationFromList = function(notificationEntry) { notificationEntry.remove(); - var notificationCount = $('.notifications').attr('data-notification-count'); notificationCount--; $('.notifications').attr('data-notification-count', notificationCount); @@ -54,6 +53,7 @@ notificationIcon.removeAttr('data-toggle'); notificationIcon.off('click.dropdown'); $('.notifications .notifications-icon .value').text(''); + $('.notifications .notifications-icon .value').hide(); } else { $('.notifications .notifications-icon .value').text(notificationCount); // Modify caption of the 'See All' link @@ -114,5 +114,12 @@ removeNotificationFromList(notificationEntry); event.stopPropagation(); }); + + // Hide notifications bubble + if (notificationCount == 0) { + $('.notifications .notifications-icon .value').hide(); + } else { + $('.notifications .notifications-icon .value').show(); + } }); })(window.jQuery); diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite.php b/app/code/Magento/Adminhtml/Block/Urlrewrite.php index cc6745ab12946..d0368dadf9719 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite.php @@ -50,20 +50,18 @@ class Urlrewrite extends \Magento\Adminhtml\Block\Widget\Grid\Container */ protected $_urlrewriteSelector; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Adminhtml\Block\Urlrewrite\Selector $urlrewriteSelector, + array $data = array() + ) { $this->_urlrewriteSelector = $urlrewriteSelector; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php index 5d36e90c52d30..d3847e57d1b25 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Edit.php @@ -45,24 +45,22 @@ class Edit */ protected $_categoryFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + array $data = array() + ) { $this->_categoryFactory = $categoryFactory; - parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data); + parent::__construct($context, $rewriteFactory, $adminhtmlData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php index 385ae7a4063d5..3d2ed64f2d12e 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Category/Tree.php @@ -61,30 +61,36 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory */ protected $_productFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param array $data + /** + * @var \Magento\Json\EncoderInterface + */ + protected $_jsonEncoder; + + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Catalog\Model\Resource\Category\Tree $categoryTree + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, - \Magento\Core\Model\Registry $registry, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Catalog\Model\Resource\Category\Tree $categoryTree, + \Magento\Core\Model\Registry $registry, + \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; $this->_categoryFactory = $categoryFactory; $this->_productFactory = $productFactory; $this->_adminhtmlData = $adminhtmlData; - parent::__construct($context, $coreData, $categoryTree, $registry, $data); + parent::__construct($context, $categoryTree, $registry, $data); } /** @@ -118,7 +124,7 @@ public function getTreeArray($parentId = null, $asJson = false, $recursionLevel } if ($asJson) { - return $this->_coreData->jsonEncode($result); + return $this->_jsonEncoder->encode($result); } $this->_allowedCategoryIds = null; diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php index bfa806ad3afb2..4bc9bb0d6d348 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Edit/Form.php @@ -62,7 +62,6 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory @@ -79,7 +78,6 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory, @@ -97,7 +95,6 @@ public function __construct( $this->_catalogUrl = $catalogUrl; parent::__construct( $context, - $coreData, $registry, $formFactory, $typesFactory, diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php index da37c7a96d35b..f43d6f80a1184 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Catalog/Product/Edit.php @@ -52,27 +52,25 @@ class Edit extends \Magento\Adminhtml\Block\Urlrewrite\Edit */ protected $_categoryFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param \Magento\Catalog\Model\ProductFactory $productFactory + * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Catalog\Model\CategoryFactory $categoryFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + \Magento\Catalog\Model\ProductFactory $productFactory, + \Magento\Catalog\Model\CategoryFactory $categoryFactory, + array $data = array() + ) { $this->_categoryFactory = $categoryFactory; $this->_productFactory = $productFactory; - parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data); + parent::__construct($context, $rewriteFactory, $adminhtmlData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php index be91545f67ac0..5c813ae2fcb00 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit.php @@ -43,24 +43,22 @@ class Edit extends \Magento\Adminhtml\Block\Urlrewrite\Edit */ protected $_pageFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param \Magento\Cms\Model\PageFactory $pageFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param \Magento\Cms\Model\PageFactory $pageFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - \Magento\Cms\Model\PageFactory $pageFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + \Magento\Cms\Model\PageFactory $pageFactory, + array $data = array() + ) { $this->_pageFactory = $pageFactory; - parent::__construct($context, $coreData, $rewriteFactory, $adminhtmlData, $data); + parent::__construct($context, $rewriteFactory, $adminhtmlData, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php index b066a10057747..3b1ffc4dfc5f6 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Cms/Page/Edit/Form.php @@ -55,7 +55,6 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory @@ -71,7 +70,6 @@ class Form extends \Magento\Adminhtml\Block\Urlrewrite\Edit\Form */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory, @@ -87,7 +85,6 @@ public function __construct( $this->_pageFactory = $pageFactory; parent::__construct( $context, - $coreData, $registry, $formFactory, $typesFactory, diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php index 62f85dd7de96d..a412712b5772a 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit.php @@ -69,23 +69,21 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Container */ protected $_rewriteFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory - * @param \Magento\Backend\Helper\Data $adminhtmlData - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url\RewriteFactory $rewriteFactory + * @param \Magento\Backend\Helper\Data $adminhtmlData + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, - \Magento\Backend\Helper\Data $adminhtmlData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url\RewriteFactory $rewriteFactory, + \Magento\Backend\Helper\Data $adminhtmlData, + array $data = array() + ) { $this->_rewriteFactory = $rewriteFactory; $this->_adminhtmlData = $adminhtmlData; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php index 640a40be19d16..2769b31300a89 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php @@ -91,7 +91,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory @@ -105,7 +104,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\Source\Urlrewrite\TypesFactory $typesFactory, @@ -120,7 +118,7 @@ public function __construct( $this->_rewriteFactory = $rewriteFactory; $this->_systemStore = $systemStore; $this->_adminhtmlData = $adminhtmlData; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php index b9e48dc84ac3e..333ffdfdd05f3 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Link.php @@ -37,7 +37,7 @@ */ namespace Magento\Adminhtml\Block\Urlrewrite; -class Link extends \Magento\View\Block\AbstractBlock +class Link extends \Magento\View\Element\AbstractBlock { /** * Render output diff --git a/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php b/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php index f9c3d2557674b..648f5d328e276 100644 --- a/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php +++ b/app/code/Magento/Adminhtml/Block/Urlrewrite/Selector.php @@ -33,7 +33,7 @@ */ namespace Magento\Adminhtml\Block\Urlrewrite; -class Selector extends \Magento\View\Block\Template +class Selector extends \Magento\View\Element\Template { /** * List of available modes from source model diff --git a/app/code/Magento/Adminhtml/Model/Session/Quote.php b/app/code/Magento/Adminhtml/Model/Session/Quote.php index dc13f7485e305..9676de45bb8cc 100644 --- a/app/code/Magento/Adminhtml/Model/Session/Quote.php +++ b/app/code/Magento/Adminhtml/Model/Session/Quote.php @@ -78,6 +78,8 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession /** * @param \Magento\Core\Model\Session\Context $context + * @param \Magento\Session\SidResolverInterface $sidResolver + * @param \Magento\Session\Config\ConfigInterface $sessionConfig * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory @@ -85,6 +87,8 @@ class Quote extends \Magento\Core\Model\Session\AbstractSession */ public function __construct( \Magento\Core\Model\Session\Context $context, + \Magento\Session\SidResolverInterface $sidResolver, + \Magento\Session\Config\ConfigInterface $sessionConfig, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Sales\Model\OrderFactory $orderFactory, @@ -93,8 +97,8 @@ public function __construct( $this->_quoteFactory = $quoteFactory; $this->_customerFactory = $customerFactory; $this->_orderFactory = $orderFactory; - parent::__construct($context, $data); - $this->init('adminhtml_quote'); + parent::__construct($context, $sidResolver, $sessionConfig, $data); + $this->start('adminhtml_quote'); if ($this->_storeManager->hasSingleStore()) { $this->setStoreId($this->_storeManager->getStore(true)->getId()); } diff --git a/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/categories.phtml b/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/categories.phtml index 0939172917c34..58e3f4248e170 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/categories.phtml +++ b/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/categories.phtml @@ -23,7 +23,7 @@ */ /** @var $this \Magento\Adminhtml\Block\Urlrewrite\Catalog\Category\Tree */ ?> -
+
diff --git a/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml b/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml index 95e2cc91ba3a9..26f397b91dc86 100644 --- a/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml +++ b/app/code/Magento/Adminhtml/view/adminhtml/urlrewrite/selector.phtml @@ -31,7 +31,7 @@ */ ?>
-
+
diff --git a/app/code/Magento/Authorizenet/Block/Directpost/Form.php b/app/code/Magento/Authorizenet/Block/Directpost/Form.php index 3c327bcd36e84..a7c619f98ca57 100644 --- a/app/code/Magento/Authorizenet/Block/Directpost/Form.php +++ b/app/code/Magento/Authorizenet/Block/Directpost/Form.php @@ -48,22 +48,20 @@ class Form extends \Magento\Payment\Block\Form\Cc protected $_checkoutModel; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Authorizenet\Model\Directpost $model * @param \Magento\Checkout\Model\Type\Onepage $checkoutModel * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Authorizenet\Model\Directpost $model, \Magento\Checkout\Model\Type\Onepage $checkoutModel, array $data = array() ) { - parent::__construct($context, $coreData, $paymentConfig, $data); + parent::__construct($context, $paymentConfig, $data); $this->_model = $model; $this->_checkoutModel = $checkoutModel; } diff --git a/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php b/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php index b5e66559d38b3..77dbcf0d00ebd 100644 --- a/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php +++ b/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php @@ -33,7 +33,7 @@ */ namespace Magento\Authorizenet\Block\Directpost; -class Iframe extends \Magento\View\Block\Template +class Iframe extends \Magento\View\Element\Template { /** * Core registry @@ -43,19 +43,17 @@ class Iframe extends \Magento\View\Block\Template protected $_coreRegistry = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -63,7 +61,7 @@ public function __construct( * * You can redefine this method in child classes for changing layout * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php index 668acee53e7a4..f9a951dd5bb4a 100644 --- a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php @@ -204,9 +204,9 @@ public function redirectAction() } } //clear sessions - $this->_getSession()->clear(); + $this->_getSession()->clearStorage(); $this->_getDirectPostSession()->removeCheckoutOrderIncrementId($redirectParams['x_invoice_num']); - $this->_objectManager->get('Magento\Adminhtml\Model\Session')->clear(); + $this->_objectManager->get('Magento\Adminhtml\Model\Session')->clearStorage(); $this->_objectManager->get('Magento\Adminhtml\Model\Session')->addSuccess(__('You created the order.')); } diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php index bf71c6b32293d..97b801df3667a 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php @@ -126,7 +126,7 @@ public function addAdditionalFieldsToResponseFrontend(\Magento\Event\Observer $o if ($payment && $payment->getMethod() == $this->_modelFactory->create()->getCode()) { $request = $observer->getEvent()->getRequest(); $response = $observer->getEvent()->getResponse(); - $result = $this->_coreData->jsonDecode($response->getBody('default'), \Zend_Json::TYPE_ARRAY); + $result = $this->_coreData->jsonDecode($response->getBody('default')); if (empty($result['error'])) { $payment = $order->getPayment(); diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Session.php b/app/code/Magento/Authorizenet/Model/Directpost/Session.php index 157f30132896a..778a9f409225e 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Session.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Session.php @@ -37,16 +37,20 @@ class Session extends \Magento\Core\Model\Session\AbstractSession { /** * @param \Magento\Core\Model\Session\Context $context + * @param \Magento\Session\SidResolverInterface $sidResolver + * @param \Magento\Session\Config\ConfigInterface $sessionConfig * @param array $data * @param string|null $sessionName */ public function __construct( \Magento\Core\Model\Session\Context $context, + \Magento\Session\SidResolverInterface $sidResolver, + \Magento\Session\Config\ConfigInterface $sessionConfig, array $data = array(), $sessionName = null ) { - parent::__construct($context, $data); - $this->init('authorizenet_directpost', $sessionName); + parent::__construct($context, $sidResolver, $sessionConfig, $data); + $this->start('authorizenet_directpost', $sessionName); } /** diff --git a/app/code/Magento/Authorizenet/etc/module.xml b/app/code/Magento/Authorizenet/etc/module.xml index 2258e1dbfd381..efba0d75d9cdd 100755 --- a/app/code/Magento/Authorizenet/etc/module.xml +++ b/app/code/Magento/Authorizenet/etc/module.xml @@ -38,7 +38,7 @@ - + diff --git a/app/code/Magento/Authorizenet/view/adminhtml/layout/sales_order_create_index.xml b/app/code/Magento/Authorizenet/view/adminhtml/layout/sales_order_create_index.xml index ffd10813b7833..6ea4c18e07e5a 100644 --- a/app/code/Magento/Authorizenet/view/adminhtml/layout/sales_order_create_index.xml +++ b/app/code/Magento/Authorizenet/view/adminhtml/layout/sales_order_create_index.xml @@ -25,7 +25,7 @@ --> - + mage/directpost.js diff --git a/app/code/Magento/Authorizenet/view/frontend/layout/checkout_onepage_index.xml b/app/code/Magento/Authorizenet/view/frontend/layout/checkout_onepage_index.xml index 213ec8a08a1b5..fe7f665571913 100644 --- a/app/code/Magento/Authorizenet/view/frontend/layout/checkout_onepage_index.xml +++ b/app/code/Magento/Authorizenet/view/frontend/layout/checkout_onepage_index.xml @@ -25,7 +25,7 @@ --> - + Magento_Authorizenet::js/directpost.js diff --git a/app/code/Magento/Authz/Model/UserIdentifier.php b/app/code/Magento/Authz/Model/UserIdentifier.php new file mode 100644 index 0000000000000..b26a6ddc58071 --- /dev/null +++ b/app/code/Magento/Authz/Model/UserIdentifier.php @@ -0,0 +1,130 @@ +getUserType(); + $userId = isset($userId) ? $userId : $userLocator->getUserId(); + if ($userType == self::USER_TYPE_GUEST && $userId) { + throw new \LogicException('Guest user must not have user ID set.'); + } + $this->_setUserId($userId); + $this->_setUserType($userType); + } + + /** + * Get user ID. Null is possible when user type is 'guest'. + * + * @return int + */ + public function getUserId() + { + return $this->_userId; + } + + /** + * Retrieve user type (admin, customer, guest, web API integration). + * + * @return string + */ + public function getUserType() + { + return $this->_userType; + } + + /** + * Set user ID. + * + * @param int + * @return UserIdentifier + * @throws \LogicException + */ + protected function _setUserId($userId) + { + $userId = is_numeric($userId) ? (int)$userId : $userId; + if (!is_integer($userId) || ($userId < 0)) { + throw new \LogicException("Invalid user ID: '{$userId}'."); + } + $this->_userId = $userId; + return $this; + } + + /** + * Set user type. + * + * @param string $userType + * @return UserIdentifier + * @throws \LogicException + */ + protected function _setUserType($userType) + { + $availableTypes = array( + self::USER_TYPE_GUEST, + self::USER_TYPE_CUSTOMER, + self::USER_TYPE_ADMIN, + self::USER_TYPE_INTEGRATION + ); + if (!in_array($userType, $availableTypes)) { + throw new \LogicException( + "Invalid user type: '{$userType}'. Allowed types: " . implode(", ", $availableTypes) + ); + } + $this->_userType = $userType; + return $this; + } +} diff --git a/dev/tests/integration/testsuite/Magento/Page/Helper/RobotsTest.php b/app/code/Magento/Authz/Model/UserIdentifier/Factory.php similarity index 55% rename from dev/tests/integration/testsuite/Magento/Page/Helper/RobotsTest.php rename to app/code/Magento/Authz/Model/UserIdentifier/Factory.php index 5c916bf7a5113..19fcfecc6b14d 100644 --- a/dev/tests/integration/testsuite/Magento/Page/Helper/RobotsTest.php +++ b/app/code/Magento/Authz/Model/UserIdentifier/Factory.php @@ -18,39 +18,47 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page - * @subpackage integration_tests * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Authz\Model\UserIdentifier; + +use Magento\ObjectManager; +use Magento\Authz\Model\UserIdentifier; + /** - * Test class for \Magento\Page\Helper\Robots + * User identifier factory. */ -namespace Magento\Page\Helper; - -class RobotsTest extends \PHPUnit_Framework_TestCase +class Factory { /** - * @var \Magento\Page\Helper\Robots + * @var \Magento\ObjectManager */ - protected $_helper; + protected $_objectManager; - protected function setUp() + /** + * Initialize dependencies + * + * @param ObjectManager $objectManager + */ + public function __construct(ObjectManager $objectManager) { - $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Page\Helper\Robots'); + $this->_objectManager = $objectManager; } /** - * @covers \Magento\Page\Helper\Robots::getRobotsDefaultCustomInstructions + * Create instance of user identifier. + * + * @param string $userType + * @param int $userId + * @return UserIdentifier */ - public function testGetRobotsDefaultCustomInstructions() + public function create($userType, $userId = 0) { - $this->assertStringEqualsFile( - __DIR__ . '/../_files/robots.txt', - $this->_helper->getRobotsDefaultCustomInstructions(), - 'robots.txt default custom instructions are invalid' + return $this->_objectManager->create( + 'Magento\Authz\Model\UserIdentifier', + array('userType' => $userType, 'userId' => $userId) ); } } diff --git a/app/code/Magento/Authz/Model/UserLocator/Admin.php b/app/code/Magento/Authz/Model/UserLocator/Admin.php new file mode 100644 index 0000000000000..8cecd7ee730ac --- /dev/null +++ b/app/code/Magento/Authz/Model/UserLocator/Admin.php @@ -0,0 +1,64 @@ +_adminSession = $adminSession; + } + + /** + * {@inheritdoc} + */ + public function getUserId() + { + return $this->_adminSession->hasUser() ? (int)$this->_adminSession->getUser()->getId() : 0; + } + + /** + * {@inheritdoc} + */ + public function getUserType() + { + return UserIdentifier::USER_TYPE_ADMIN; + } +} diff --git a/app/code/Magento/Authz/Model/UserLocator/Guest.php b/app/code/Magento/Authz/Model/UserLocator/Guest.php new file mode 100644 index 0000000000000..f27cc69b75b07 --- /dev/null +++ b/app/code/Magento/Authz/Model/UserLocator/Guest.php @@ -0,0 +1,50 @@ +getUrl($this->getPath()); - } + public function getUserType(); } diff --git a/app/code/Magento/Authz/Service/AuthorizationV1.php b/app/code/Magento/Authz/Service/AuthorizationV1.php new file mode 100644 index 0000000000000..cce2256d61a24 --- /dev/null +++ b/app/code/Magento/Authz/Service/AuthorizationV1.php @@ -0,0 +1,254 @@ +_aclBuilder = $aclBuilder; + $this->_userIdentifier = $userIdentifier; + $this->_roleFactory = $roleFactory; + $this->_rulesFactory = $rulesFactory; + $this->_rulesCollectionFactory = $rulesCollectionFactory; + $this->_roleCollectionFactory = $roleCollectionFactory; + $this->_logger = $logger; + $this->_rootAclResource = $rootAclResource; + } + + /** + * {@inheritdoc} + */ + public function isAllowed($resources, UserIdentifier $userIdentifier = null) + { + $resources = is_array($resources) ? $resources : array($resources); + $userIdentifier = $userIdentifier ? $userIdentifier : $this->_userIdentifier; + try { + $role = $this->_getUserRole($userIdentifier); + if (!$role) { + throw new ResourceNotFoundException( + __( + 'Role for user with ID "%1" and user type "%2" cannot be found.', + $userIdentifier->getUserId(), + $userIdentifier->getUserType() + ) + ); + } + foreach ($resources as $resource) { + if (!$this->_aclBuilder->getAcl()->isAllowed($role->getId(), $resource)) { + return false; + } + } + return true; + } catch (\Exception $e) { + $this->_logger->logException($e); + return false; + } + } + + /** + * {@inheritdoc} + */ + public function grantPermissions(UserIdentifier $userIdentifier, array $resources) + { + try { + $role = $this->_getUserRole($userIdentifier); + if (!$role) { + $role = $this->_createRole($userIdentifier); + } + $this->_associateResourcesWithRole($role, $resources); + } catch (ServiceException $e) { + throw $e; + } catch (\Exception $e) { + $this->_logger->logException($e); + throw new ServiceException( + __('Error happened while granting permissions. Check exception log for details.') + ); + } + } + + /** + * {@inheritdoc} + */ + public function grantAllPermissions(UserIdentifier $userIdentifier) + { + $this->grantPermissions($userIdentifier, array($this->_rootAclResource->getId())); + } + + /** + * {@inheritdoc} + */ + public function getAllowedResources(UserIdentifier $userIdentifier) + { + $allowedResources = array(); + try { + $role = $this->_getUserRole($userIdentifier); + if (!$role) { + throw new ServiceException(__('The role associated with the specified user cannot be found.')); + } + $rulesCollection = $this->_rulesCollectionFactory->create(); + $rulesCollection->getByRoles($role->getId())->load(); + $acl = $this->_aclBuilder->getAcl(); + /** @var \Magento\User\Model\Rules $ruleItem */ + foreach ($rulesCollection->getItems() as $ruleItem) { + $resourceId = $ruleItem->getResourceId(); + if ($acl->has($resourceId) && $acl->isAllowed($role->getId(), $resourceId)) { + $allowedResources[] = $resourceId; + } + } + } catch (ServiceException $e) { + throw $e; + } catch (\Exception $e) { + $this->_logger->logException($e); + throw new ServiceException( + __('Error happened while getting a list of allowed resources. Check exception log for details.') + ); + } + return $allowedResources; + } + + /** + * Create new ACL role. + * + * @param UserIdentifier $userIdentifier + * @return Role + * @throws \LogicException + */ + protected function _createRole($userIdentifier) + { + $userType = $userIdentifier->getUserType(); + $userId = $userIdentifier->getUserId(); + switch ($userType) { + case UserIdentifier::USER_TYPE_INTEGRATION: + $roleName = $userType . $userId; + $roleType = \Magento\User\Model\Acl\Role\User::ROLE_TYPE; + $parentId = 0; + $userId = $userIdentifier->getUserId(); + break; + default: + throw new \LogicException("Unknown user type: '{$userType}'."); + } + $role = $this->_roleFactory->create(); + $role->setRoleName($roleName) + ->setUserType($userType) + ->setUserId($userId) + ->setRoleType($roleType) + ->setParentId($parentId) + ->save(); + return $role; + } + + /** + * Identify user role from user identifier. + * + * @param UserIdentifier $userIdentifier + * @return Role|false Return false in case when no role associated with provided user was found. + */ + protected function _getUserRole($userIdentifier) + { + $roleCollection = $this->_roleCollectionFactory->create(); + $userType = $userIdentifier->getUserType(); + $userId = $userIdentifier->getUserId(); + /** @var Role $role */ + $role = $roleCollection->setUserFilter($userId, $userType)->getFirstItem(); + return $role->getId() ? $role : false; + } + + /** + * Associate resources with the specified role. All resources previously assigned to the role will be unassigned. + * + * @param Role $role + * @param string[] $resources + */ + protected function _associateResourcesWithRole($role, array $resources) + { + /** @var \Magento\User\Model\Rules $rules */ + $rules = $this->_rulesFactory->create(); + $rules->setRoleId($role->getId())->setResources($resources)->saveRel(); + } +} diff --git a/app/code/Magento/Authz/Service/AuthorizationV1Interface.php b/app/code/Magento/Authz/Service/AuthorizationV1Interface.php new file mode 100644 index 0000000000000..02b6f60d2c140 --- /dev/null +++ b/app/code/Magento/Authz/Service/AuthorizationV1Interface.php @@ -0,0 +1,72 @@ + + + + + diff --git a/app/code/Magento/Authz/etc/di.xml b/app/code/Magento/Authz/etc/di.xml new file mode 100644 index 0000000000000..4dbaf698ee87b --- /dev/null +++ b/app/code/Magento/Authz/etc/di.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/app/code/Magento/Page/etc/module.xml b/app/code/Magento/Authz/etc/module.xml old mode 100755 new mode 100644 similarity index 79% rename from app/code/Magento/Page/etc/module.xml rename to app/code/Magento/Authz/etc/module.xml index cc66376f9c66d..91159766258e5 --- a/app/code/Magento/Page/etc/module.xml +++ b/app/code/Magento/Authz/etc/module.xml @@ -24,15 +24,11 @@ */ --> - - - - + - - - + + diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php index 308a1c84d8479..58259d8b1fe21 100644 --- a/app/code/Magento/Backend/App/AbstractAction.php +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -166,28 +166,28 @@ protected function _addBreadcrumb($label, $title, $link=null) } /** - * @param \Magento\View\Block\AbstractBlock $block + * @param \Magento\View\Element\AbstractBlock $block * @return \Magento\Backend\App\AbstractAction */ - protected function _addContent(\Magento\View\Block\AbstractBlock $block) + protected function _addContent(\Magento\View\Element\AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'content'); } /** - * @param \Magento\View\Block\AbstractBlock $block + * @param \Magento\View\Element\AbstractBlock $block * @return \Magento\Backend\App\AbstractAction */ - protected function _addLeft(\Magento\View\Block\AbstractBlock $block) + protected function _addLeft(\Magento\View\Element\AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'left'); } /** - * @param \Magento\View\Block\AbstractBlock $block + * @param \Magento\View\Element\AbstractBlock $block * @return \Magento\Backend\App\AbstractAction */ - protected function _addJs(\Magento\View\Block\AbstractBlock $block) + protected function _addJs(\Magento\View\Element\AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'js'); } @@ -197,11 +197,11 @@ protected function _addJs(\Magento\View\Block\AbstractBlock $block) * * The block will be moved to the container from previous parent after all other elements * - * @param \Magento\View\Block\AbstractBlock $block + * @param \Magento\View\Element\AbstractBlock $block * @param string $containerName * @return \Magento\Backend\App\AbstractAction */ - private function _moveBlockToContainer(\Magento\View\Block\AbstractBlock $block, $containerName) + private function _moveBlockToContainer(\Magento\View\Element\AbstractBlock $block, $containerName) { $this->_view->getLayout()->setChild($containerName, $block->getNameInLayout(), ''); return $this; @@ -218,9 +218,7 @@ public function dispatch(\Magento\App\RequestInterface $request) } if ($request->isDispatched() && $request->getActionName() !== 'denied' && !$this->_isAllowed()) { - $this->_forward('denied'); - $this->_actionFlag->set('', self::FLAG_NO_DISPATCH, true); - return parent::dispatch($request); + return $this->_forward('denied'); } if ($this->_isUrlChecked()) { @@ -393,4 +391,4 @@ protected function _outTemplate($tplName, $data = array()) $this->_objectManager->get('Magento\Core\Model\Translate')->processResponseBody($html); $this->getResponse()->setBody($html); } -} \ No newline at end of file +} diff --git a/app/code/Magento/Backend/App/Action/Context.php b/app/code/Magento/Backend/App/Action/Context.php index 7774862ce1207..1eec150730b63 100644 --- a/app/code/Magento/Backend/App/Action/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -206,4 +206,4 @@ public function getSession() { return $this->_session; } -} \ No newline at end of file +} diff --git a/app/code/Magento/Backend/Block/AbstractBlock.php b/app/code/Magento/Backend/Block/AbstractBlock.php index d2f15309be743..454167989a735 100644 --- a/app/code/Magento/Backend/Block/AbstractBlock.php +++ b/app/code/Magento/Backend/Block/AbstractBlock.php @@ -31,7 +31,7 @@ * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class AbstractBlock extends \Magento\View\Block\AbstractBlock +class AbstractBlock extends \Magento\View\Element\AbstractBlock { /** * @var \Magento\AuthorizationInterface diff --git a/app/code/Magento/Backend/Block/Admin/Formkey.php b/app/code/Magento/Backend/Block/Admin/Formkey.php index 0d5e6c6b70624..ec71ca7190895 100644 --- a/app/code/Magento/Backend/Block/Admin/Formkey.php +++ b/app/code/Magento/Backend/Block/Admin/Formkey.php @@ -38,6 +38,6 @@ class Formkey extends \Magento\Backend\Block\Template */ public function getFormKey() { - return $this->_session->getFormKey(); + return $this->formKey->getFormKey(); } } diff --git a/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php b/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php index 5fbf20e5c8f90..bbe32dd6fc456 100644 --- a/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php +++ b/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php @@ -34,17 +34,15 @@ class Statuses extends \Magento\Backend\Block\Widget\Grid\Column /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\App\Cache\TypeListInterface $cacheTypeList, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->_cacheTypeList = $cacheTypeList; } diff --git a/app/code/Magento/Backend/Block/Context.php b/app/code/Magento/Backend/Block/Context.php index 55880dc9e89c5..be933a5adb5a5 100644 --- a/app/code/Magento/Backend/Block/Context.php +++ b/app/code/Magento/Backend/Block/Context.php @@ -28,7 +28,7 @@ * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Context extends \Magento\View\Block\Context +class Context extends \Magento\View\Element\Context { /** * @var \Magento\AuthorizationInterface @@ -44,6 +44,7 @@ class Context extends \Magento\View\Block\Context * @param \Magento\App\CacheInterface $cache * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Session\AbstractSession $session + * @param \Magento\Session\SidResolverInterface $sidResolver * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\App\FrontController $frontController * @param \Magento\App\Helper\HelperFactory $helperFactory @@ -57,7 +58,7 @@ class Context extends \Magento\View\Block\Context * @param \Magento\Filter\FilterManager $filterManager * @param \Magento\Core\Model\LocaleInterface $locale * @param array $data - * + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( @@ -69,6 +70,7 @@ public function __construct( \Magento\App\CacheInterface $cache, \Magento\View\DesignInterface $design, \Magento\Core\Model\Session\AbstractSession $session, + \Magento\Session\SidResolverInterface $sidResolver, \Magento\Core\Model\Store\Config $storeConfig, \Magento\App\FrontController $frontController, \Magento\App\Helper\HelperFactory $helperFactory, @@ -84,9 +86,28 @@ public function __construct( array $data = array() ) { $this->_authorization = $authorization; - parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $design, - $session, $storeConfig, $frontController, $helperFactory, $viewUrl, $viewConfig, $cacheState, $logger, $app, - $escaper, $filterManager, $locale, $data + parent::__construct( + $request, + $layout, + $eventManager, + $urlBuilder, + $translator, + $cache, + $design, + $session, + $sidResolver, + $storeConfig, + $frontController, + $helperFactory, + $viewUrl, + $viewConfig, + $cacheState, + $logger, + $app, + $escaper, + $filterManager, + $locale, + $data ); } diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php index 123848b6717a7..ef09ab5fc0844 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -43,20 +43,18 @@ abstract class AbstractDashboard extends \Magento\Adminhtml\Block\Widget */ protected $_collectionFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } public function getCollection() diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 797aaec69a2ac..ee642713d2155 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -120,22 +120,20 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard */ protected $_dashboardData = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param \Magento\Backend\Helper\Dashboard\Data $dashboardData - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param \Magento\Backend\Helper\Dashboard\Data $dashboardData + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - \Magento\Backend\Helper\Dashboard\Data $dashboardData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + \Magento\Backend\Helper\Dashboard\Data $dashboardData, + array $data = array() + ) { $this->_dashboardData = $dashboardData; - parent::__construct($context, $coreData, $collectionFactory, $data); + parent::__construct($context, $collectionFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php index 05cd859d92c44..e2225b40488c6 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -41,22 +41,28 @@ class Grid extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param array $data + /** + * @var \Magento\Module\Manager + */ + protected $_moduleManager; + + /** + * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Module\Manager $moduleManager, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + array $data = array() + ) { + $this->_moduleManager = $moduleManager; $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); } protected function _construct() @@ -67,7 +73,7 @@ protected function _construct() protected function _prepareCollection() { - if (!$this->_coreData->isModuleEnabled('Magento_Reports')) { + if (!$this->_moduleManager->isEnabled('Magento_Reports')) { return $this; } $collection = $this->_collectionFactory->create() diff --git a/app/code/Magento/Backend/Block/Dashboard/Sales.php b/app/code/Magento/Backend/Block/Dashboard/Sales.php index 48893c077f2bd..a5366e2fe25b3 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Sales.php +++ b/app/code/Magento/Backend/Block/Dashboard/Sales.php @@ -34,13 +34,36 @@ namespace Magento\Backend\Block\Dashboard; +use Magento\Adminhtml\Block\Widget; + class Sales extends \Magento\Backend\Block\Dashboard\Bar { protected $_template = 'dashboard/salebar.phtml'; + /** + * @var \Magento\Module\Manager + */ + protected $_moduleManager; + + /** + * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + \Magento\Module\Manager $moduleManager, + array $data = array() + ) { + $this->_moduleManager = $moduleManager; + parent::__construct($context, $collectionFactory, $data); + } + protected function _prepareLayout() { - if (!$this->_coreData->isModuleEnabled('Magento_Reports')) { + if (!$this->_moduleManager->isEnabled('Magento_Reports')) { return $this; } $isFilter = $this->getRequest()->getParam('store') diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php index c340713e2b231..e6e83587bf9c2 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php @@ -43,22 +43,28 @@ class Last extends \Magento\Backend\Block\Dashboard\Grid */ protected $_queriesFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory - * @param array $data + /** + * @var \Magento\Module\Manager + */ + protected $_moduleManager; + + /** + * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Module\Manager $moduleManager, + \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, + array $data = array() + ) { + $this->_moduleManager = $moduleManager; $this->_queriesFactory = $queriesFactory; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); } protected function _construct() @@ -69,7 +75,7 @@ protected function _construct() protected function _prepareCollection() { - if (!$this->_coreData->isModuleEnabled('Magento_CatalogSearch')) { + if (!$this->_moduleManager->isEnabled('Magento_CatalogSearch')) { return parent::_prepareCollection(); } $this->_collection = $this->_queriesFactory->create(); diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php index a525d9e837227..2205271431890 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php @@ -43,22 +43,28 @@ class Top extends \Magento\Backend\Block\Dashboard\Grid */ protected $_queriesFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory - * @param array $data + /** + * @var \Magento\Module\Manager + */ + protected $_moduleManager; + + /** + * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Module\Manager $moduleManager, + \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, + array $data = array() + ) { + $this->_moduleManager = $moduleManager; $this->_queriesFactory = $queriesFactory; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); } protected function _construct() @@ -69,7 +75,7 @@ protected function _construct() protected function _prepareCollection() { - if (!$this->_coreData->isModuleEnabled('Magento_CatalogSearch')) { + if (!$this->_moduleManager->isEnabled('Magento_CatalogSearch')) { return parent::_prepareCollection(); } $this->_collection = $this->_queriesFactory->create(); diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php index 86fe59f32fe07..1c0f19b593c2a 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php @@ -41,22 +41,20 @@ class Most extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php index 237218ec3db66..82289d9f94d09 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Newest.php @@ -41,22 +41,20 @@ class Newest extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Customer\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php index 24166c3530e56..d93d9c02b117b 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -41,22 +41,28 @@ class Ordered extends \Magento\Backend\Block\Dashboard\Grid */ protected $_collectionFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory - * @param array $data + /** + * @var \Magento\Module\Manager + */ + protected $_moduleManager; + + /** + * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Module\Manager $moduleManager, + \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $coreData, $urlModel, $data); + $this->_moduleManager = $moduleManager; + parent::__construct($context, $urlModel, $data); } protected function _construct() @@ -67,7 +73,7 @@ protected function _construct() protected function _prepareCollection() { - if (!$this->_coreData->isModuleEnabled('Magento_Sales')) { + if (!$this->_moduleManager->isEnabled('Magento_Sales')) { return $this; } if ($this->getParam('website')) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php index ac246a749d41e..a1298bdac49cf 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Viewed.php @@ -41,22 +41,20 @@ class Viewed extends \Magento\Backend\Block\Dashboard\Grid */ protected $_productsFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Reports\Model\Resource\Product\CollectionFactory $productsFactory, + array $data = array() + ) { $this->_productsFactory = $productsFactory; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php index 3f6879a491ebd..6fdbcad87a007 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Totals.php +++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php @@ -34,13 +34,36 @@ */ namespace Magento\Backend\Block\Dashboard; +use Magento\Adminhtml\Block\Widget; + class Totals extends \Magento\Backend\Block\Dashboard\Bar { protected $_template = 'dashboard/totalbar.phtml'; + /** + * @var \Magento\Module\Manager + */ + protected $_moduleManager; + + /** + * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, + \Magento\Module\Manager $moduleManager, + array $data = array() + ) { + $this->_moduleManager = $moduleManager; + parent::__construct($context, $collectionFactory, $data); + } + protected function _prepareLayout() { - if (!$this->_coreData->isModuleEnabled('Magento_Reports')) { + if (!$this->_moduleManager->isEnabled('Magento_Reports')) { return $this; } $isFilter = $this->getRequest()->getParam('store') diff --git a/app/code/Magento/Backend/Block/Denied.php b/app/code/Magento/Backend/Block/Denied.php index 8de1d49d47587..9070dc570f8e3 100644 --- a/app/code/Magento/Backend/Block/Denied.php +++ b/app/code/Magento/Backend/Block/Denied.php @@ -33,20 +33,18 @@ class Denied extends \Magento\Backend\Block\Template */ protected $_authSession; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Auth\Session $authSession, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Backend\Model\Auth\Session $authSession, + array $data = array() + ) { $this->_authSession = $authSession; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } public function hasAvailableResources() diff --git a/app/code/Magento/Backend/Block/Media/Uploader.php b/app/code/Magento/Backend/Block/Media/Uploader.php index 19418d994a029..8a393e0590302 100644 --- a/app/code/Magento/Backend/Block/Media/Uploader.php +++ b/app/code/Magento/Backend/Block/Media/Uploader.php @@ -48,18 +48,16 @@ class Uploader extends \Magento\Adminhtml\Block\Widget /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\File\Size $fileSize * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\File\Size $fileSize, array $data = array() ) { $this->_fileSizeService = $fileSize; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _construct() @@ -109,7 +107,7 @@ protected function _prepareLayout() if ($head) { $head->addChild( 'jquery-fileUploader-css-jquery-fileupload-ui-css', - 'Magento\Page\Block\Html\Head\Css', + 'Magento\Theme\Block\Html\Head\Css', array( 'file' => 'jquery/fileUploader/css/jquery.fileupload-ui.css' ) diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index d7e946f5d270b..2897995077c6c 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -75,29 +75,27 @@ class Menu extends \Magento\Backend\Block\Template */ protected $_menuConfig; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Url $url - * @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Backend\Model\Menu\Config $menuConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Backend\Model\Url $url + * @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Backend\Model\Menu\Config $menuConfig + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Url $url, - \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Backend\Model\Menu\Config $menuConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Backend\Model\Url $url, + \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Backend\Model\Menu\Config $menuConfig, + array $data = array() + ) { $this->_url = $url; $this->_iteratorFactory = $iteratorFactory; $this->_authSession = $authSession; $this->_menuConfig = $menuConfig; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Backend/Block/Page/Head.php b/app/code/Magento/Backend/Block/Page/Head.php index db71c6f792b87..96505249f40d9 100644 --- a/app/code/Magento/Backend/Block/Page/Head.php +++ b/app/code/Magento/Backend/Block/Page/Head.php @@ -33,7 +33,7 @@ */ namespace Magento\Backend\Block\Page; -class Head extends \Magento\Page\Block\Html\Head +class Head extends \Magento\Theme\Block\Html\Head { /** * @var string @@ -46,34 +46,39 @@ class Head extends \Magento\Page\Block\Html\Head protected $_titles; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @var \Magento\Data\Form\FormKey + */ + protected $formKey; + + /** + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase * @param \Magento\ObjectManager $objectManager - * @param \Magento\Core\Model\Page $page - * @param \Magento\Core\Model\Page\Asset\MergeService $assetMergeService - * @param \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService + * @param \Magento\View\Asset\GroupedCollection $assets + * @param \Magento\View\Asset\MergeService $assetMergeService + * @param \Magento\View\Asset\MinifyService $assetMinifyService * @param \Magento\App\Action\Title $titles + * @param \Magento\Data\Form\FormKey $formKey * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase, \Magento\ObjectManager $objectManager, - \Magento\Core\Model\Page $page, - \Magento\Core\Model\Page\Asset\MergeService $assetMergeService, - \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService, + \Magento\View\Asset\GroupedCollection $assets, + \Magento\View\Asset\MergeService $assetMergeService, + \Magento\View\Asset\MinifyService $assetMinifyService, \Magento\App\Action\Title $titles, + \Magento\Data\Form\FormKey $formKey, array $data = array() ) { $this->_titles = $titles; + $this->formKey = $formKey; parent::__construct( $context, - $coreData, $fileStorageDatabase, $objectManager, - $page, + $assets, $assetMergeService, $assetMinifyService, $data @@ -87,7 +92,7 @@ public function __construct( */ public function getFormKey() { - return $this->_session->getFormKey(); + return $this->formKey->getFormKey(); } /** diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php index 953723bfeb268..59b864a1ecc27 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -49,23 +49,21 @@ class Header extends \Magento\Backend\Block\Template */ protected $_authSession; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Backend\Helper\Data $backendData - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Backend\Helper\Data $backendData + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Backend\Helper\Data $backendData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Backend\Helper\Data $backendData, + array $data = array() + ) { $this->_backendData = $backendData; $this->_authSession = $authSession; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } public function getHomeLink() diff --git a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php index 9b039a8957798..f1434842a1196 100644 --- a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php @@ -35,27 +35,30 @@ class Reset extends \Magento\Backend\Block\System\Config\Form\Field { + /** + * Pasge robots default instructions + */ + const XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS = 'design/search_engine_robots/default_custom_instructions'; + /** * Page robots * - * @var \Magento\Page\Helper\Robots + * @var \Magento\Theme\Helper\Robots */ - protected $_pageRobots = null; + protected $coreConfig; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Page\Helper\Robots $pageRobots - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\ConfigInterface $coreConfig + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Page\Helper\Robots $pageRobots, - array $data = array() - ) { - $this->_pageRobots = $pageRobots; - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\ConfigInterface $coreConfig, + array $data = array() + ) { + $this->coreConfig = $coreConfig; + parent::__construct($context, $data); } /* @@ -74,7 +77,7 @@ protected function _construct() */ public function getRobotsDefaultCustomInstructions() { - return $this->_pageRobots->getRobotsDefaultCustomInstructions(); + return trim((string)$this->coreConfig->getValue(self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, 'default')); } /** diff --git a/app/code/Magento/Backend/Block/Store/Switcher.php b/app/code/Magento/Backend/Block/Store/Switcher.php index 9644f6152111a..159801a751060 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher.php +++ b/app/code/Magento/Backend/Block/Store/Switcher.php @@ -95,23 +95,21 @@ class Switcher extends \Magento\Backend\Block\Template */ protected $_storeFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param \Magento\Core\Model\Store\Group\Factory $storeGroupFactory - * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param \Magento\Core\Model\Store\Group\Factory $storeGroupFactory + * @param \Magento\Core\Model\StoreFactory $storeFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Website\Factory $websiteFactory, - \Magento\Core\Model\Store\Group\Factory $storeGroupFactory, - \Magento\Core\Model\StoreFactory $storeFactory, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Website\Factory $websiteFactory, + \Magento\Core\Model\Store\Group\Factory $storeGroupFactory, + \Magento\Core\Model\StoreFactory $storeFactory, + array $data = array() + ) { + parent::__construct($context, $data); $this->_websiteFactory = $websiteFactory; $this->_storeGroupFactory = $storeGroupFactory; $this->_storeFactory = $storeFactory; diff --git a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php index 3f2a19901c1d9..a5b5f19a4735b 100644 --- a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php +++ b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php @@ -46,27 +46,25 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_userFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\User\Model\UserFactory $userFactory - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\User\Model\UserFactory $userFactory + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\User\Model\UserFactory $userFactory, - \Magento\Backend\Model\Auth\Session $authSession, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\User\Model\UserFactory $userFactory, + \Magento\Backend\Model\Auth\Session $authSession, + array $data = array() + ) { $this->_userFactory = $userFactory; $this->_authSession = $authSession; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } protected function _prepareForm() diff --git a/app/code/Magento/Backend/Block/System/Cache/Form.php b/app/code/Magento/Backend/Block/System/Cache/Form.php index 2cf01c41a9e24..43470b7b2a422 100644 --- a/app/code/Magento/Backend/Block/System/Cache/Form.php +++ b/app/code/Magento/Backend/Block/System/Cache/Form.php @@ -36,6 +36,29 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic { + /** + * @var \Magento\Core\Helper\Data + */ + protected $_coreData; + + /** + * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Helper\Data $coreData, + array $data = array() + ) { + $this->_coreData = $coreData; + parent::__construct($context, $registry, $formFactory, $data); + } + /** * Initialize cache management form * diff --git a/app/code/Magento/Backend/Block/System/Config/Edit.php b/app/code/Magento/Backend/Block/System/Config/Edit.php index 81f16df269312..a5733b6c49b4c 100644 --- a/app/code/Magento/Backend/Block/System/Config/Edit.php +++ b/app/code/Magento/Backend/Block/System/Config/Edit.php @@ -61,26 +61,24 @@ class Edit extends \Magento\Backend\Block\Widget */ protected $_configStructure; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Config\Structure $configStructure - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Backend\Model\Config\Structure $configStructure + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Config\Structure $configStructure, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Backend\Model\Config\Structure $configStructure, + array $data = array() + ) { $this->_configStructure = $configStructure; + parent::__construct($context, $data); } /** * Prepare layout object * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { @@ -94,6 +92,7 @@ protected function _prepareLayout() $this->setHeaderCss($section->getHeaderCss()); $this->addChild('save_button', 'Magento\Backend\Block\Widget\Button', array( + 'id' => 'save', 'label' => __('Save Config'), 'class' => 'save primary', 'data_attribute' => array( diff --git a/app/code/Magento/Backend/Block/System/Config/Form.php b/app/code/Magento/Backend/Block/System/Config/Form.php index 20cc7cd2df27e..b0e931d649d7d 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form.php +++ b/app/code/Magento/Backend/Block/System/Config/Form.php @@ -126,7 +126,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Backend\Model\Config\Factory $configFactory @@ -138,7 +137,6 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, \Magento\Backend\Model\Config\Factory $configFactory, @@ -148,7 +146,7 @@ public function __construct( \Magento\Core\Model\Config $coreConfig, array $data = array() ) { - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); $this->_configFactory = $configFactory; $this->_configStructure = $configStructure; $this->_fieldsetFactory = $fieldsetFactory; @@ -461,7 +459,7 @@ public function getConfigValue($path) /** * * - * @return \Magento\Backend\Block\Widget\Form|\Magento\View\Block\AbstractBlock|void + * @return \Magento\Backend\Block\Widget\Form|\Magento\View\Element\AbstractBlock|void */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php index adc4ed43bd7fa..42e8ff8570813 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php @@ -101,7 +101,7 @@ public function addColumn($name, $params) 'class' => $this->_getParam($params, 'class'), 'renderer' => false, ); - if ((!empty($params['renderer'])) && ($params['renderer'] instanceof \Magento\View\Block\AbstractBlock)) { + if ((!empty($params['renderer'])) && ($params['renderer'] instanceof \Magento\View\Element\AbstractBlock)) { $this->_columns[$name]['renderer'] = $params['renderer']; } } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php index 28fd6d6b07483..933a2a1986e62 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php @@ -42,23 +42,21 @@ class Regexceptions */ protected $_labelFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\Core\Model\Theme\LabelFactory $labelFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Data\Form\Element\Factory $elementFactory, + \Magento\Core\Model\Theme\LabelFactory $labelFactory, + array $data = array() + ) { $this->_elementFactory = $elementFactory; $this->_labelFactory = $labelFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Config/Switcher.php b/app/code/Magento/Backend/Block/System/Config/Switcher.php index 6ab009aeb2030..4b01635ab02a7 100644 --- a/app/code/Magento/Backend/Block/System/Config/Switcher.php +++ b/app/code/Magento/Backend/Block/System/Config/Switcher.php @@ -35,22 +35,20 @@ class Switcher extends \Magento\Backend\Block\Template /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\System\Store $systemStore * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\System\Store $systemStore, array $data = array() ) { $this->_systemStore = $systemStore; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php index ca8c823a68fe9..d888cac68e3bf 100644 --- a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php +++ b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php @@ -39,20 +39,18 @@ class Synchronize */ protected $_fileStorage; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\File\Storage $fileStorage - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\File\Storage $fileStorage + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\File\Storage $fileStorage, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\File\Storage $fileStorage, + array $data = array() + ) { $this->_fileStorage = $fileStorage; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Config/Tabs.php b/app/code/Magento/Backend/Block/System/Config/Tabs.php index 83728b75fab63..a59c7cc7f8a3e 100644 --- a/app/code/Magento/Backend/Block/System/Config/Tabs.php +++ b/app/code/Magento/Backend/Block/System/Config/Tabs.php @@ -76,19 +76,17 @@ class Tabs extends \Magento\Backend\Block\Widget */ protected $_storeCode; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Config\Structure $configStructure - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Backend\Model\Config\Structure $configStructure + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Config\Structure $configStructure, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Backend\Model\Config\Structure $configStructure, + array $data = array() + ) { + parent::__construct($context, $data); $this->_tabs = $configStructure->getTabs(); $this->setId('system_config_tabs'); diff --git a/app/code/Magento/Backend/Block/System/Design/Edit.php b/app/code/Magento/Backend/Block/System/Design/Edit.php index 751ea6b97c9b0..104d359393b75 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit.php @@ -38,20 +38,18 @@ class Edit extends \Magento\Adminhtml\Block\Widget */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _construct() diff --git a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php index 32a3ef650fe1f..f41d6865deaad 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php @@ -37,27 +37,25 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_systemStore; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory - * @param \Magento\Core\Model\System\Store $systemStore - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Theme\LabelFactory $labelFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Theme\LabelFactory $labelFactory, - \Magento\Core\Model\System\Store $systemStore, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Theme\LabelFactory $labelFactory, + \Magento\Core\Model\System\Store $systemStore, + array $data = array() + ) { $this->_labelFactory = $labelFactory; $this->_systemStore = $systemStore; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Shipping/Ups.php b/app/code/Magento/Backend/Block/System/Shipping/Ups.php index 39c77447a8d0d..1c85a66774e6a 100644 --- a/app/code/Magento/Backend/Block/System/Shipping/Ups.php +++ b/app/code/Magento/Backend/Block/System/Shipping/Ups.php @@ -41,23 +41,21 @@ class Ups extends \Magento\Backend\Block\Template */ protected $_websiteModel; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel - * @param \Magento\Core\Model\Website $websiteModel - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel + * @param \Magento\Core\Model\Website $websiteModel + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel, - \Magento\Core\Model\Website $websiteModel, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Usa\Model\Shipping\Carrier\Ups $shippingModel, + \Magento\Core\Model\Website $websiteModel, + array $data = array() + ) { $this->_shippingModel = $shippingModel; $this->_websiteModel = $websiteModel; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit.php b/app/code/Magento/Backend/Block/System/Store/Edit.php index e43f5746b0fcf..519293e54428c 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit.php @@ -39,20 +39,18 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php index 65fce16e9cb3f..b5ecebb8e411b 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php @@ -54,30 +54,28 @@ class Group */ protected $_websiteFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Catalog\Model\Config\Source\Category $category - * @param \Magento\Core\Model\StoreFactory $storeFactory - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Catalog\Model\Config\Source\Category $category + * @param \Magento\Core\Model\StoreFactory $storeFactory + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Catalog\Model\Config\Source\Category $category, - \Magento\Core\Model\StoreFactory $storeFactory, - \Magento\Core\Model\Website\Factory $websiteFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Catalog\Model\Config\Source\Category $category, + \Magento\Core\Model\StoreFactory $storeFactory, + \Magento\Core\Model\Website\Factory $websiteFactory, + array $data = array() + ) { $this->_category = $category; $this->_storeFactory = $storeFactory; $this->_websiteFactory = $websiteFactory; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php index 43006b0954ae2..8ecc56346b093 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php @@ -49,27 +49,25 @@ class Store */ protected $_groupFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Store\Group\Factory $groupFactory - * @param \Magento\Core\Model\Website\Factory $websiteFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Store\Group\Factory $groupFactory + * @param \Magento\Core\Model\Website\Factory $websiteFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Store\Group\Factory $groupFactory, - \Magento\Core\Model\Website\Factory $websiteFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Store\Group\Factory $groupFactory, + \Magento\Core\Model\Website\Factory $websiteFactory, + array $data = array() + ) { $this->_groupFactory = $groupFactory; $this->_websiteFactory = $websiteFactory; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php index 284e0d7c0b764..fadb2f024df7d 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php @@ -44,24 +44,22 @@ class Website */ protected $_groupFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Store\GroupFactory $groupFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Store\GroupFactory $groupFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Store\GroupFactory $groupFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Store\GroupFactory $groupFactory, + array $data = array() + ) { $this->_groupFactory = $groupFactory; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Backend/Block/System/Variable/Edit.php b/app/code/Magento/Backend/Block/System/Variable/Edit.php index c1c4668a1ff6f..09b71ed2bcaf9 100644 --- a/app/code/Magento/Backend/Block/System/Variable/Edit.php +++ b/app/code/Magento/Backend/Block/System/Variable/Edit.php @@ -38,20 +38,18 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Backend/Block/Template.php b/app/code/Magento/Backend/Block/Template.php index f7f0f0dbb6bca..e13c3daf2d7b0 100644 --- a/app/code/Magento/Backend/Block/Template.php +++ b/app/code/Magento/Backend/Block/Template.php @@ -31,7 +31,7 @@ * * @SuppressWarnings(PHPMD.NumberOfChildren) */ -class Template extends \Magento\View\Block\Template +class Template extends \Magento\View\Element\Template { /** * @var \Magento\AuthorizationInterface @@ -53,21 +53,25 @@ class Template extends \Magento\View\Block\Template */ protected $_backendSession; + /** + * @var \Magento\Data\Form\FormKey + */ + protected $formKey; + /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, array $data = array() ) { $this->_locale = $context->getLocale(); $this->_authorization = $context->getAuthorization(); $this->mathRandom = $context->getMathRandom(); $this->_backendSession = $context->getBackendSession(); - parent::__construct($context, $coreData, $data); + $this->formKey = $context->getFormKey(); + parent::__construct($context, $data); } /** @@ -77,7 +81,7 @@ public function __construct( */ public function getFormKey() { - return $this->_session->getFormKey(); + return $this->formKey->getFormKey(); } /** diff --git a/app/code/Magento/Backend/Block/Template/Context.php b/app/code/Magento/Backend/Block/Template/Context.php index ca04a1cafaa06..cc5d8166fb1eb 100644 --- a/app/code/Magento/Backend/Block/Template/Context.php +++ b/app/code/Magento/Backend/Block/Template/Context.php @@ -28,7 +28,7 @@ * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Context extends \Magento\View\Block\Template\Context +class Context extends \Magento\View\Element\Template\Context { /** * @var \Magento\AuthorizationInterface @@ -45,6 +45,11 @@ class Context extends \Magento\View\Block\Template\Context */ protected $_backendSession; + /** + * @var \Magento\Data\Form\FormKey + */ + protected $formKey; + /** * @param \Magento\App\RequestInterface $request * @param \Magento\View\LayoutInterface $layout @@ -54,6 +59,7 @@ class Context extends \Magento\View\Block\Template\Context * @param \Magento\App\CacheInterface $cache * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Session $session + * @param \Magento\Session\SidResolverInterface $sidResolver * @param \Magento\Core\Model\Store\Config $storeConfig * @param \Magento\App\FrontController $frontController * @param \Magento\App\Helper\HelperFactory $helperFactory @@ -74,6 +80,7 @@ class Context extends \Magento\View\Block\Template\Context * @param \Magento\AuthorizationInterface $authorization * @param \Magento\Backend\Model\Session $backendSession * @param \Magento\Math\Random $mathRandom + * @param \Magento\Data\Form\FormKey $formKey * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -87,6 +94,7 @@ public function __construct( \Magento\App\CacheInterface $cache, \Magento\View\DesignInterface $design, \Magento\Core\Model\Session $session, + \Magento\Session\SidResolverInterface $sidResolver, \Magento\Core\Model\Store\Config $storeConfig, \Magento\App\FrontController $frontController, \Magento\App\Helper\HelperFactory $helperFactory, @@ -107,11 +115,13 @@ public function __construct( \Magento\AuthorizationInterface $authorization, \Magento\Backend\Model\Session $backendSession, \Magento\Math\Random $mathRandom, + \Magento\Data\Form\FormKey $formKey, array $data = array() ) { $this->_authorization = $authorization; $this->_backendSession = $backendSession; $this->mathRandom = $mathRandom; + $this->formKey = $formKey; parent::__construct( $request, $layout, @@ -121,6 +131,7 @@ public function __construct( $cache, $design, $session, + $sidResolver, $storeConfig, $frontController, $helperFactory, @@ -142,7 +153,6 @@ public function __construct( ); } - /** * Get store manager * @@ -186,4 +196,12 @@ public function getMathRandom() { return $this->mathRandom; } + + /** + * @return \Magento\Data\Form\FormKey + */ + public function getFormKey() + { + return $this->formKey; + } } diff --git a/app/code/Magento/Backend/Block/Text/ListText.php b/app/code/Magento/Backend/Block/Text/ListText.php index cff54dcb7ad3a..6467570d39b21 100644 --- a/app/code/Magento/Backend/Block/Text/ListText.php +++ b/app/code/Magento/Backend/Block/Text/ListText.php @@ -34,6 +34,6 @@ */ namespace Magento\Backend\Block\Text; -class ListText extends \Magento\View\Block\Text\ListText +class ListText extends \Magento\View\Element\Text\ListText { } diff --git a/app/code/Magento/Backend/Block/Widget/Accordion.php b/app/code/Magento/Backend/Block/Widget/Accordion.php index 7de430c0a747f..092744bedd427 100644 --- a/app/code/Magento/Backend/Block/Widget/Accordion.php +++ b/app/code/Magento/Backend/Block/Widget/Accordion.php @@ -57,7 +57,7 @@ public function addItem($itemId, $config) ->setData($config) ->setAccordion($this) ->setId($itemId); - if (isset($config['content']) && $config['content'] instanceof \Magento\View\Block\AbstractBlock) { + if (isset($config['content']) && $config['content'] instanceof \Magento\View\Element\AbstractBlock) { $this->_items[$itemId]->setChild($itemId.'_content', $config['content']); } diff --git a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php index 85b65c92a2183..63b55d67dd37a 100644 --- a/app/code/Magento/Backend/Block/Widget/Accordion/Item.php +++ b/app/code/Magento/Backend/Block/Widget/Accordion/Item.php @@ -64,7 +64,7 @@ public function getContent() if (is_string($content)) { return $content; } - if ($content instanceof \Magento\View\Block\AbstractBlock) { + if ($content instanceof \Magento\View\Element\AbstractBlock) { return $content->toHtml(); } return null; diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php index bcb67e4605121..4abea54585f5e 100644 --- a/app/code/Magento/Backend/Block/Widget/Button.php +++ b/app/code/Magento/Backend/Block/Widget/Button.php @@ -113,7 +113,7 @@ protected function _prepareAttributes($title, $classes, $disabled) 'onclick' => $this->getOnClick(), 'style' => $this->getStyle(), 'value' => $this->getValue(), - 'disabled' => $disabled + 'disabled' => $disabled, ); if ($this->getDataAttribute()) { foreach ($this->getDataAttribute() as $key => $attr) { diff --git a/app/code/Magento/Backend/Block/Widget/Container.php b/app/code/Magento/Backend/Block/Widget/Container.php index 3cdb73c67b403..558184496dbe1 100644 --- a/app/code/Magento/Backend/Block/Widget/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Container.php @@ -202,7 +202,7 @@ public function updateButton($buttonId, $key = null, $data) /** * Preparing child blocks for each added button * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/Widget/Form.php b/app/code/Magento/Backend/Block/Widget/Form.php index d3f6dd06e7a79..f1a5f5a57799d 100644 --- a/app/code/Magento/Backend/Block/Widget/Form.php +++ b/app/code/Magento/Backend/Block/Widget/Form.php @@ -47,18 +47,16 @@ class Form extends \Magento\Backend\Block\Widget */ protected $_locale; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + array $data = array() + ) { $this->_locale = $context->getLocale(); - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -78,7 +76,7 @@ protected function _construct() * * You can redefine this method in child classes for changing layout * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { @@ -154,7 +152,7 @@ protected function _prepareForm() /** * This method is called before rendering HTML * - * @return \Magento\Backend\Block\Widget\Form|\Magento\View\Block\AbstractBlock + * @return \Magento\Backend\Block\Widget\Form|\Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Form/Container.php b/app/code/Magento/Backend/Block/Widget/Form/Container.php index a2494e34954da..17a5670c42828 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Container.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php @@ -84,7 +84,7 @@ protected function _construct() /** * Create form block * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php index 8d9d9de344b37..0a0f635a0ba20 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php @@ -60,41 +60,39 @@ class Dependence extends \Magento\Backend\Block\AbstractBlock protected $_configOptions = array(); /** - * Add name => id mapping - * - * @param string $fieldId - element ID in DOM - * @param string $fieldName - element name in their fieldset/form namespace - * @return \Magento\Backend\Block\Widget\Form\Element\Dependence - */ - /** - * Core data - * - * @var \Magento\Core\Helper\Data + * @var \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory */ - protected $_coreData; + protected $_fieldFactory; /** - * @var \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory + * @var \Magento\Json\EncoderInterface */ - protected $_fieldFactory; + protected $_jsonEncoder; - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory, - array $data = array() - ) { - $this->_coreData = $coreData; + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Backend\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; $this->_fieldFactory = $fieldFactory; parent::__construct($context, $data); } + /** + * Add name => id mapping + * + * @param string $fieldId - element ID in DOM + * @param string $fieldName - element name in their fieldset/form namespace + * @return \Magento\Backend\Block\Widget\Form\Element\Dependence + */ public function addFieldMap($fieldId, $fieldName) { $this->_fields[$fieldName] = $fieldId; @@ -146,7 +144,7 @@ protected function _toHtml() return ''; } @@ -166,6 +164,6 @@ protected function _getDependsJson() ); } } - return $this->_coreData->jsonEncode($result); + return $this->_jsonEncoder->encode($result); } } diff --git a/app/code/Magento/Backend/Block/Widget/Form/Generic.php b/app/code/Magento/Backend/Block/Widget/Form/Generic.php index 713f3e1216149..383fb366ad5e2 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Generic.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Generic.php @@ -47,22 +47,20 @@ class Generic extends \Magento\Backend\Block\Widget\Form */ protected $_coreRegistry; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_formFactory = $formFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } } diff --git a/app/code/Magento/Backend/Block/Widget/Grid.php b/app/code/Magento/Backend/Block/Widget/Grid.php index 1ccbc22101f6f..87423d607b7db 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid.php +++ b/app/code/Magento/Backend/Block/Widget/Grid.php @@ -121,19 +121,17 @@ class Grid extends \Magento\Backend\Block\Widget /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Url $urlModel * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Url $urlModel, array $data = array() ) { $this->_urlModel = $urlModel; $this->_backendSession = $context->getBackendSession(); - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _construct() @@ -208,7 +206,7 @@ public function getColumnSet() * Retrieve export block * * @throws \Magento\Core\Exception - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ public function getExportBlock() { @@ -242,7 +240,7 @@ public function getColumnCount() * Retrieve column by id * * @param string $columnId - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ public function getColumn($columnId) { @@ -404,7 +402,7 @@ protected function _prepareGrid() /** * Get massaction block * - * @return bool|\Magento\View\Block\AbstractBlock + * @return bool|\Magento\View\Element\AbstractBlock */ public function getMassactionBlock() { @@ -436,7 +434,7 @@ protected function _prepareFilterButtons() /** * Initialize grid before rendering * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php index 4351f21f1adb9..a56ea489a55ba 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Extended.php @@ -25,22 +25,20 @@ class Extended extends \Magento\Backend\Block\Widget\Grid\Column { - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + array $data = array() + ) { $this->_rendererTypes['options'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Extended'; $this->_filterTypes['options'] = 'Magento\Backend\Block\Widget\Grid\Column\Filter\Select\Extended'; $this->_rendererTypes['select'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Select\Extended'; $this->_rendererTypes['checkbox'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Checkboxes\Extended'; $this->_rendererTypes['radio'] = 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Radio\Extended'; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php index 848a262308cb4..139159622f114 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php @@ -37,15 +37,13 @@ class Multistore extends \Magento\Backend\Block\Widget\Grid\Column { /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php index 8c88e4caf3b72..d6c8d66804524 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php @@ -33,28 +33,24 @@ */ namespace Magento\Backend\Block\Widget\Grid\Column\Renderer; -class Action - extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text +class Action extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text { - /** - * Core data - * - * @var \Magento\Core\Helper\Data + * @var \Magento\Json\EncoderInterface */ - protected $_coreData = null; + protected $_jsonEncoder; - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Core\Helper\Data $coreData, - array $data = array() - ) { - $this->_coreData = $coreData; + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; parent::__construct($context, $data); } @@ -106,7 +102,7 @@ protected function _toOptionHtml($action, \Magento\Object $row) $actionCaption = ''; $this->_transformActionData($action, $actionCaption, $row); - $htmlAttibutes = array('value'=>$this->escapeHtml($this->_coreData->jsonEncode($action))); + $htmlAttibutes = array('value'=>$this->escapeHtml($this->_jsonEncoder->encode($action))); $actionAttributes->setData($htmlAttibutes); return ''; } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php index 20771cbace8a0..051f06d6f57a9 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/ColumnSet.php @@ -34,7 +34,7 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class ColumnSet extends \Magento\View\Block\Template +class ColumnSet extends \Magento\View\Element\Template { /** * @var \Magento\Backend\Model\Widget\Grid\Row\UrlGenerator @@ -120,16 +120,14 @@ class ColumnSet extends \Magento\View\Block\Template protected $_totals = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory $generatorFactory * @param \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals * @param \Magento\Backend\Model\Widget\Grid\Totals $totals * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory $generatorFactory, \Magento\Backend\Model\Widget\Grid\SubTotals $subtotals, \Magento\Backend\Model\Widget\Grid\Totals $totals, @@ -149,7 +147,7 @@ public function __construct( array_key_exists('filter_visibility', $data) ? (bool) $data['filter_visibility'] : true ); - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->setEmptyText(__( isset($data['empty_text'])? $data['empty_text'] : 'We couldn\'t find any records.' @@ -242,7 +240,7 @@ public function setFilterType($type, $className) /** * Prepare block for rendering * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Export.php b/app/code/Magento/Backend/Block/Widget/Grid/Export.php index 1c7ea433520bc..c4a194c43cf96 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php @@ -64,20 +64,18 @@ class Export */ protected $_collectionFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Data\CollectionFactory $collectionFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Data\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Data\CollectionFactory $collectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Data\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _construct() @@ -157,7 +155,7 @@ public function getId() /** * Prepare export button * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php index c2a02a878227d..27710cfc645e0 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -190,7 +190,7 @@ protected function _construct() /** * Initialize child blocks * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { @@ -223,7 +223,7 @@ protected function _prepareLayout() /** * Retrieve column set block * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ public function getColumnSet() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php index 88c70aad1f0c2..2b9c927caf667 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php @@ -35,8 +35,15 @@ */ namespace Magento\Backend\Block\Widget\Grid\Massaction; +use Magento\View\Element\Template; + abstract class AbstractMassaction extends \Magento\Backend\Block\Widget { + /** + * @var \Magento\Json\EncoderInterface + */ + protected $_jsonEncoder; + /** * Backend data helper * @@ -53,6 +60,20 @@ abstract class AbstractMassaction extends \Magento\Backend\Block\Widget protected $_template = 'Magento_Backend::widget/grid/massaction.phtml'; + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; + parent::__construct($context, $data); + } + protected function _construct() { parent::_construct(); @@ -134,7 +155,7 @@ public function getItemsJson() $result[$itemId] = $item->toArray(); } - return $this->_coreData->jsonEncode($result); + return $this->_jsonEncoder->encode($result); } /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php index 5695da8fee3e5..94ccea59c988d 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Additional.php @@ -44,23 +44,21 @@ class Additional extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_handlerFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory, - array $data = array() - ) { - parent::__construct($context, $coreData, $registry, $formFactory, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Layout\Argument\HandlerFactory $handlerFactory, + array $data = array() + ) { + parent::__construct($context, $registry, $formFactory, $data); $this->_handlerFactory = $handlerFactory; } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php index f706254a356de..66f34d6e07ce9 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -59,20 +59,26 @@ class Extended extends \Magento\Backend\Block\Widget */ protected $_backendData = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Helper\Data $backendData - * @param array $data + /** + * @var \Magento\Json\EncoderInterface + */ + protected $_jsonEncoder; + + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Backend\Helper\Data $backendData + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Helper\Data $backendData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Backend\Helper\Data $backendData, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; $this->_backendData = $backendData; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -92,7 +98,7 @@ public function _construct() * 'complete' => string, // Only for ajax enabled grid (optional) * 'url' => string, * 'confirm' => string, // text of confirmation of this action (optional) - * 'additional' => string|array|\Magento\View\Block\AbstractBlock // (optional) + * 'additional' => string|array|\Magento\View\Element\AbstractBlock // (optional) * ); * * @param string $itemId @@ -151,7 +157,7 @@ public function getItemsJson() $result[$itemId] = $item->toArray(); } - return $this->_coreData->jsonEncode($result); + return $this->_jsonEncoder->encode($result); } /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php index e573b5a3ce26c..04f17c8c808e5 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Item.php @@ -64,7 +64,7 @@ public function getMassaction() /** * Set additional action block for this item * - * @param string|\Magento\View\Block\AbstractBlock $block + * @param string|\Magento\View\Element\AbstractBlock $block * @return \Magento\Backend\Block\Widget\Grid\Massaction\Item * @throws \Magento\Core\Exception */ @@ -74,7 +74,7 @@ public function setAdditionalActionBlock($block) $block = $this->getLayout()->createBlock($block); } elseif (is_array($block)) { $block = $this->_createFromConfig($block); - } elseif (!($block instanceof \Magento\View\Block\AbstractBlock)) { + } elseif (!($block instanceof \Magento\View\Element\AbstractBlock)) { throw new \Magento\Core\Exception('Unknown block type'); } @@ -99,7 +99,7 @@ protected function _createFromConfig(array $config) /** * Retrieve additional action block for this item * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ public function getAdditionalActionBlock() { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php b/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php index c28b6ef2cdc8d..e58e38e98e8b6 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Serializer.php @@ -33,8 +33,27 @@ */ namespace Magento\Backend\Block\Widget\Grid; -class Serializer extends \Magento\View\Block\Template +class Serializer extends \Magento\View\Element\Template { + /** + * @var \Magento\Json\EncoderInterface + */ + protected $_jsonEncoder; + + /** + * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param array $data + */ + public function __construct( + \Magento\View\Element\Template\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; + parent::__construct($context, $data); + } + /** * Preparing global layout * @@ -72,7 +91,7 @@ public function _construct() public function getColumnInputNames($asJSON = false) { if ($asJSON) { - return $this->_coreData->jsonEncode((array)$this->getInputNames()); + return $this->_jsonEncoder->encode((array)$this->getInputNames()); } return (array)$this->getInputNames(); } @@ -91,6 +110,6 @@ public function getDataAsJSON() } elseif (!empty($inputNames)) { return '{}'; } - return $this->_coreData->jsonEncode($result); + return $this->_jsonEncoder->encode($result); } } diff --git a/app/code/Magento/Backend/Block/Widget/Tabs.php b/app/code/Magento/Backend/Block/Widget/Tabs.php index 076d838ef9af7..36ee1a2579fec 100644 --- a/app/code/Magento/Backend/Block/Widget/Tabs.php +++ b/app/code/Magento/Backend/Block/Widget/Tabs.php @@ -59,21 +59,26 @@ class Tabs extends \Magento\Backend\Block\Widget * @var \Magento\Backend\Model\Auth\Session */ protected $_authSession; + /** + * @var \Magento\Json\EncoderInterface + */ + private $_jsonEncoder; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Backend\Model\Auth\Session $authSession - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Backend\Model\Auth\Session $authSession + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Backend\Model\Auth\Session $authSession, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Backend\Model\Auth\Session $authSession, + array $data = array() + ) { $this->_authSession = $authSession; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); + $this->_jsonEncoder = $jsonEncoder; } /** @@ -402,7 +407,7 @@ public function getAllShadowTabs($asJson = true) } } if ($asJson) { - return $this->_coreData->jsonEncode($result); + return $this->_jsonEncoder->encode($result); } return $result; } diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Cache.php b/app/code/Magento/Backend/Controller/Adminhtml/Cache.php index 51c97b9f6e3ca..5668dce84c584 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Cache.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Cache.php @@ -70,7 +70,7 @@ public function __construct( */ protected function _getSession() { - return $this->_objectManager->get('Magento\Adminhtml\Model\Session'); + return $this->_objectManager->get('Magento\Core\Model\Session\AbstractSession'); } /** @@ -125,6 +125,9 @@ public function massEnableAction() try { $types = $this->getRequest()->getParam('types'); $updatedTypes = 0; + if (!is_array($types)) { + $types = array(); + } $this->_validateTypes($types); foreach ($types as $code) { if (!$this->_cacheState->isEnabled($code)) { @@ -158,6 +161,9 @@ public function massDisableAction() try { $types = $this->getRequest()->getParam('types'); $updatedTypes = 0; + if (!is_array($types)) { + $types = array(); + } $this->_validateTypes($types); foreach ($types as $code) { if ($this->_cacheState->isEnabled($code)) { @@ -174,8 +180,7 @@ public function massDisableAction() } } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); - } - catch (\Exception $e) { + } catch (\Exception $e) { $this->_getSession()->addException( $e, __('An error occurred while disabling cache.') @@ -192,6 +197,9 @@ public function massRefreshAction() try { $types = $this->getRequest()->getParam('types'); $updatedTypes = 0; + if (!is_array($types)) { + $types = array(); + } $this->_validateTypes($types); foreach ($types as $type) { $this->_cacheTypeList->cleanType($type); @@ -199,18 +207,12 @@ public function massRefreshAction() $updatedTypes++; } if ($updatedTypes > 0) { - $this->_getSession()->addSuccess( - __("%1 cache type(s) refreshed.", $updatedTypes) - ); + $this->_getSession()->addSuccess(__("%1 cache type(s) refreshed.", $updatedTypes)); } } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); - } - catch (\Exception $e) { - $this->_getSession()->addException( - $e, - __('An error occurred while refreshing cache.') - ); + } catch (\Exception $e) { + $this->_getSession()->addException($e, __('An error occurred while refreshing cache.')); } $this->_redirect('adminhtml/*'); } @@ -238,17 +240,13 @@ protected function _validateTypes(array $types) public function cleanMediaAction() { try { - $this->_objectManager->get('Magento\Core\Model\Page\Asset\MergeService') + $this->_objectManager->get('Magento\View\Asset\MergeService') ->cleanMergedJsCss(); $this->_eventManager->dispatch('clean_media_cache_after'); - $this->_getSession()->addSuccess( - __('The JavaScript/CSS cache has been cleaned.') - ); - } - catch (\Magento\Core\Exception $e) { + $this->_getSession()->addSuccess(__('The JavaScript/CSS cache has been cleaned.')); + } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); - } - catch (\Exception $e) { + } catch (\Exception $e) { $this->_getSession()->addException( $e, __('An error occurred while clearing the JavaScript/CSS cache.') @@ -268,11 +266,9 @@ public function cleanImagesAction() $this->_getSession()->addSuccess( __('The image cache was cleaned.') ); - } - catch (\Magento\Core\Exception $e) { + } catch (\Magento\Core\Exception $e) { $this->_getSession()->addError($e->getMessage()); - } - catch (\Exception $e) { + } catch (\Exception $e) { $this->_getSession()->addException( $e, __('An error occurred while clearing the image cache.') diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php index 47cba7c717e5b..d7203803eb7ac 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Variable.php @@ -120,7 +120,7 @@ public function editAction() ->_addContent( $this->_view->getLayout()->createBlock('Magento\Backend\Block\System\Variable\Edit') ) - ->_addJs($this->_view->getLayout()->createBlock('Magento\View\Block\Template', '', array( + ->_addJs($this->_view->getLayout()->createBlock('Magento\View\Element\Template', '', array( 'data' => array('template' => 'Magento_Backend::system/variable/js.phtml') ))); $this->_view->renderLayout(); diff --git a/app/code/Magento/Backend/Model/Auth/Session.php b/app/code/Magento/Backend/Model/Auth/Session.php index d54df862667cd..fb023198b7c88 100644 --- a/app/code/Magento/Backend/Model/Auth/Session.php +++ b/app/code/Magento/Backend/Model/Auth/Session.php @@ -63,6 +63,8 @@ class Session /** * @param \Magento\Core\Model\Session\Context $context + * @param \Magento\Session\SidResolverInterface $sidResolver + * @param \Magento\Session\Config\ConfigInterface $sessionConfig * @param \Magento\Acl\Builder $aclBuilder * @param \Magento\Backend\Model\Url $backendUrl * @param \Magento\Backend\App\ConfigInterface $config @@ -70,6 +72,8 @@ class Session */ public function __construct( \Magento\Core\Model\Session\Context $context, + \Magento\Session\SidResolverInterface $sidResolver, + \Magento\Session\Config\ConfigInterface $sessionConfig, \Magento\Acl\Builder $aclBuilder, \Magento\Backend\Model\Url $backendUrl, \Magento\Backend\App\ConfigInterface $config, @@ -78,8 +82,8 @@ public function __construct( $this->_config = $config; $this->_aclBuilder = $aclBuilder; $this->_backendUrl = $backendUrl; - parent::__construct($context, $data); - $this->init('admin'); + parent::__construct($context, $sidResolver, $sessionConfig, $data); + $this->start('admin'); } /** @@ -95,9 +99,9 @@ public function __construct( * @return \Magento\Backend\Model\Auth\Session * @see self::login() */ - public function init($namespace, $sessionName = null) + public function start($namespace = 'default', $sessionName = null) { - parent::init($namespace, $sessionName); + parent::start($namespace, $sessionName); // @todo implement solution that keeps is_first_visit flag in session during redirects return $this; } @@ -209,7 +213,7 @@ public function setIsFirstPageAfterLogin($value) public function processLogin() { if ($this->getUser()) { - $this->renewSession(); + $this->regenerateId(); if ($this->_backendUrl->useSecretKey()) { $this->_backendUrl->renewSecretUrls(); @@ -229,8 +233,7 @@ public function processLogin() */ public function processLogout() { - $this->unsetAll(); - $this->getCookie()->delete($this->getSessionName()); + $this->destroy(); return $this; } @@ -244,14 +247,4 @@ public function isValidForPath($path) { return true; } - - /** - * Always try to get session id from query in backend area - * - * @return bool - */ - protected function _isSidUsedFromQueryParam() - { - return true; - } } diff --git a/app/code/Magento/Backend/Model/Cache/Resource/Grid/Collection.php b/app/code/Magento/Backend/Model/Cache/Resource/Grid/Collection.php index c378d6b8096ad..3f443e53d9729 100644 --- a/app/code/Magento/Backend/Model/Cache/Resource/Grid/Collection.php +++ b/app/code/Magento/Backend/Model/Cache/Resource/Grid/Collection.php @@ -33,12 +33,12 @@ class Collection extends \Magento\Data\Collection protected $_cacheTypeList; /** - * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\App\Cache\TypeListInterface $cacheTypeList */ public function __construct( - \Magento\App\Cache\TypeListInterface $cacheTypeList, - \Magento\Core\Model\EntityFactory $entityFactory + \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\App\Cache\TypeListInterface $cacheTypeList ) { $this->_cacheTypeList = $cacheTypeList; parent::__construct($entityFactory); diff --git a/app/code/Magento/Backend/Model/Config/Backend/Admin/Observer.php b/app/code/Magento/Backend/Model/Config/Backend/Admin/Observer.php index 78f025a1dde32..73fccd88e4f64 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Observer.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Observer.php @@ -89,8 +89,7 @@ public function afterCustomUrlChanged() return; } - $this->_authSession->unsetAll(); - $this->_authSession->getCookie()->delete($this->_authSession->getSessionName()); + $this->_authSession->destroy(); $route = $this->_backendData->getAreaFrontName(); diff --git a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php index b8e152f162774..6cc537374f6f5 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Baseurl.php @@ -26,7 +26,7 @@ class Baseurl extends \Magento\Core\Model\Config\Value { /** - * @var \Magento\Core\Model\Page\Asset\MergeService + * @var \Magento\View\Asset\MergeService */ protected $_mergeService; @@ -35,7 +35,7 @@ class Baseurl extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config - * @param \Magento\Core\Model\Page\Asset\MergeService $mergeService + * @param \Magento\View\Asset\MergeService $mergeService * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -45,7 +45,7 @@ public function __construct( \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, - \Magento\Core\Model\Page\Asset\MergeService $mergeService, + \Magento\View\Asset\MergeService $mergeService, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Backend/Model/Config/Backend/File.php b/app/code/Magento/Backend/Model/Config/Backend/File.php index ad53e13aa4c20..ba08ac5b49f16 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/File.php +++ b/app/code/Magento/Backend/Model/Config/Backend/File.php @@ -61,26 +61,24 @@ class File extends \Magento\Core\Model\Config\Value protected $_dir; /** - * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config + * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory * @param \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData * @param \Magento\Filesystem $filesystem * @param \Magento\App\Dir $dir * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Core\Model\File\UploaderFactory $uploaderFactory, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, + \Magento\Core\Model\File\UploaderFactory $uploaderFactory, \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData, \Magento\Filesystem $filesystem, \Magento\App\Dir $dir, diff --git a/app/code/Magento/Backend/Model/Config/Backend/Secure.php b/app/code/Magento/Backend/Model/Config/Backend/Secure.php index 0dcb6e1dea5fc..8b5bc5373775a 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Secure.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Secure.php @@ -26,7 +26,7 @@ class Secure extends \Magento\Core\Model\Config\Value { /** - * @var \Magento\Core\Model\Page\Asset\MergeService + * @var \Magento\View\Asset\MergeService */ protected $_mergeService; @@ -35,7 +35,7 @@ class Secure extends \Magento\Core\Model\Config\Value * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config - * @param \Magento\Core\Model\Page\Asset\MergeService $mergeService + * @param \Magento\View\Asset\MergeService $mergeService * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data @@ -45,7 +45,7 @@ public function __construct( \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, - \Magento\Core\Model\Page\Asset\MergeService $mergeService, + \Magento\View\Asset\MergeService $mergeService, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php b/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php index ec624916431bb..ae82e04232570 100644 --- a/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php +++ b/app/code/Magento/Backend/Model/Config/Backend/Storage/Media/Database.php @@ -37,21 +37,21 @@ class Database extends \Magento\Core\Model\Config\Value protected $_coreFileStorage = null; /** - * @param \Magento\Core\Helper\File\Storage $coreFileStorage * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config + * @param \Magento\Core\Helper\File\Storage $coreFileStorage * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Core\Helper\File\Storage $coreFileStorage, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, + \Magento\Core\Helper\File\Storage $coreFileStorage, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Backend/Model/Session.php b/app/code/Magento/Backend/Model/Session.php index b5e2226d74429..5f0e0863a5038 100644 --- a/app/code/Magento/Backend/Model/Session.php +++ b/app/code/Magento/Backend/Model/Session.php @@ -29,12 +29,18 @@ class Session extends \Magento\Core\Model\Session\AbstractSession { /** * @param \Magento\Core\Model\Session\Context $context + * @param \Magento\Session\SidResolverInterface $sidResolver + * @param \Magento\Session\Config\ConfigInterface $sessionConfig * @param array $data */ - public function __construct(\Magento\Core\Model\Session\Context $context, array $data = array()) - { - parent::__construct($context, $data); - $this->init('adminhtml'); + public function __construct( + \Magento\Core\Model\Session\Context $context, + \Magento\Session\SidResolverInterface $sidResolver, + \Magento\Session\Config\ConfigInterface $sessionConfig, + array $data = array() + ) { + parent::__construct($context, $sidResolver, $sessionConfig, $data); + $this->start('adminhtml'); } /** @@ -47,14 +53,4 @@ public function isValidForPath($path) { return true; } - - /** - * Always try to get session id from query in backend area - * - * @return bool - */ - protected function _isSidUsedFromQueryParam() - { - return true; - } } diff --git a/app/code/Magento/Backend/Model/Url.php b/app/code/Magento/Backend/Model/Url.php index fbc1d4e42607f..f4e902d153c1f 100644 --- a/app/code/Magento/Backend/Model/Url.php +++ b/app/code/Magento/Backend/Model/Url.php @@ -69,11 +69,6 @@ class Url extends \Magento\Core\Model\Url */ protected $_backendHelper; - /** - * @var \Magento\Core\Model\Session - */ - protected $_coreSession; - /** * Menu config * @@ -106,6 +101,11 @@ class Url extends \Magento\Core\Model\Url */ protected $_coreConfig; + /** + * @var \Magento\Data\Form\FormKey + */ + protected $formKey; + /** * @param \Magento\App\Route\ConfigInterface $routeConfig * @param \Magento\App\RequestInterface $request @@ -113,6 +113,7 @@ class Url extends \Magento\Core\Model\Url * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Backend\Helper\Data $backendHelper * @param \Magento\Core\Model\Session $session + * @param \Magento\Session\SidResolverInterface $sidResolver * @param Menu\Config $menuConfig * @param \Magento\Core\Model\App $app * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -122,6 +123,7 @@ class Url extends \Magento\Core\Model\Url * @param \Magento\Backend\App\ConfigInterface $config * @param \Magento\Core\Model\StoreFactory $storeFactory * @param \Magento\Core\Model\ConfigInterface $coreConfig + * @param \Magento\Data\Form\FormKey $formKey * @param null $areaCode * @param array $data */ @@ -132,6 +134,7 @@ public function __construct( \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Backend\Helper\Data $backendHelper, \Magento\Core\Model\Session $session, + \Magento\Session\SidResolverInterface $sidResolver, \Magento\Backend\Model\Menu\Config $menuConfig, \Magento\Core\Model\App $app, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -141,21 +144,30 @@ public function __construct( \Magento\Backend\App\ConfigInterface $config, \Magento\Core\Model\StoreFactory $storeFactory, \Magento\Core\Model\ConfigInterface $coreConfig, + \Magento\Data\Form\FormKey $formKey, $areaCode = null, array $data = array() ) { $this->_encryptor = $encryptor; parent::__construct( - $routeConfig, $request, $urlSecurityInfo, $coreStoreConfig, - $app, $storeManager, $session, $areaCode, $data + $routeConfig, + $request, + $urlSecurityInfo, + $coreStoreConfig, + $app, + $storeManager, + $session, + $sidResolver, + $areaCode, + $data ); $this->_config = $config; $this->_startupMenuItemId = $coreStoreConfig->getConfig(self::XML_PATH_STARTUP_MENU_ITEM); $this->_backendHelper = $backendHelper; - $this->_coreSession = $session; $this->_menuConfig = $menuConfig; $this->_cache = $cache; $this->_session = $authSession; + $this->formKey = $formKey; $this->_storeFactory = $storeFactory; $this->_coreConfig = $coreConfig; } @@ -241,7 +253,7 @@ public function getUrl($routePath = null, $routeParams = null) */ public function getSecretKey($routeName = null, $controller = null, $action = null) { - $salt = $this->_coreSession->getFormKey(); + $salt = $this->formKey->getFormKey(); $request = $this->getRequest(); if (!$routeName) { if ($request->getBeforeForwardInfo('route_name') !== null) { diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml index 81f6c2eeb0b10..7d5fcda93e339 100644 --- a/app/code/Magento/Backend/etc/adminhtml/di.xml +++ b/app/code/Magento/Backend/etc/adminhtml/di.xml @@ -24,7 +24,6 @@ */ --> - @@ -32,12 +31,10 @@ - - @@ -57,31 +54,6 @@ - - - - - - - - - - - - - - - - - - backend_acl_resources - - - - - Magento_Adminhtml::all - - adminhtml diff --git a/app/code/Magento/Backend/etc/di.xml b/app/code/Magento/Backend/etc/di.xml index 7c9e596e48445..638faa9da90e1 100644 --- a/app/code/Magento/Backend/etc/di.xml +++ b/app/code/Magento/Backend/etc/di.xml @@ -86,6 +86,9 @@ + + + adminhtml @@ -100,6 +103,34 @@ Magento\App\State::PARAM_INSTALL_DATE + + + + + + + + + + + + + + + + + + + + + backend_acl_resources + + + + + Magento_Adminhtml::all + + diff --git a/app/code/Magento/Backend/etc/module.xml b/app/code/Magento/Backend/etc/module.xml index aef7d360109c2..1b227ac2789fc 100755 --- a/app/code/Magento/Backend/etc/module.xml +++ b/app/code/Magento/Backend/etc/module.xml @@ -36,7 +36,7 @@ - + diff --git a/app/code/Magento/Backend/view/adminhtml/admin/login.phtml b/app/code/Magento/Backend/view/adminhtml/admin/login.phtml index 5a63d7d2737d5..af9150cbc8986 100644 --- a/app/code/Magento/Backend/view/adminhtml/admin/login.phtml +++ b/app/code/Magento/Backend/view/adminhtml/admin/login.phtml @@ -31,8 +31,8 @@ <?php echo __('Log into Magento Admin Page') ?> - - + + @@ -66,7 +66,7 @@
- getMessagesBlock()->getGroupedHtml() ?> + getLayout()->getMessagesBlock()->getGroupedHtml() ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/admin/overlay_popup.phtml b/app/code/Magento/Backend/view/adminhtml/admin/overlay_popup.phtml index e851ea8a1ebe0..0aa8593cca20a 100644 --- a/app/code/Magento/Backend/view/adminhtml/admin/overlay_popup.phtml +++ b/app/code/Magento/Backend/view/adminhtml/admin/overlay_popup.phtml @@ -34,13 +34,13 @@
-
getMessagesBlock()->getGroupedHtml() ?>
+
getLayout()->getMessagesBlock()->getGroupedHtml() ?>
getChildHtml('content') ?>
-
getMessagesBlock()->getGroupedHtml() ?>
+
getLayout()->getMessagesBlock()->getGroupedHtml() ?>
getChildHtml('content') ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/admin/page.phtml b/app/code/Magento/Backend/view/adminhtml/admin/page.phtml index a569ffcd12159..0175d0b77c302 100644 --- a/app/code/Magento/Backend/view/adminhtml/admin/page.phtml +++ b/app/code/Magento/Backend/view/adminhtml/admin/page.phtml @@ -43,7 +43,7 @@
getChildHtml('main-top'); ?>
- getMessagesBlock()->getGroupedHtml() ?> + getLayout()->getMessagesBlock()->getGroupedHtml() ?>
getChildHtml('left')): ?> diff --git a/app/code/Magento/Backend/view/adminhtml/admin/popup.phtml b/app/code/Magento/Backend/view/adminhtml/admin/popup.phtml index a56227e8af3df..ef930159ab7ec 100644 --- a/app/code/Magento/Backend/view/adminhtml/admin/popup.phtml +++ b/app/code/Magento/Backend/view/adminhtml/admin/popup.phtml @@ -26,13 +26,13 @@ ?>
-
getMessagesBlock()->getGroupedHtml() ?>
+
getLayout()->getMessagesBlock()->getGroupedHtml() ?>
getChildHtml('content') ?>
-
getMessagesBlock()->getGroupedHtml() ?>
+
getLayout()->getMessagesBlock()->getGroupedHtml() ?>
getChildHtml('content') ?> diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_noroute.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_noroute.xml index b214ee1b22e57..6ad3f1a00398e 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_noroute.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_noroute.xml @@ -25,7 +25,7 @@ --> - + 404 Error

Page not found.

]]> diff --git a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml index 0c1c259cc62cf..31707580ba47d 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/adminhtml_system_config_edit.xml @@ -25,7 +25,7 @@ --> - + jquery/jquery.ba-hashchange.min.js diff --git a/app/code/Magento/Backend/view/adminhtml/layout/default.xml b/app/code/Magento/Backend/view/adminhtml/layout/default.xml index 8093941b8ac89..7cae9191af950 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/default.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/default.xml @@ -29,162 +29,162 @@ Magento Admin - + jquery/jquery.js - + mage/jquery-no-conflict.js - + jquery/jquery-ui.js - + head.load.min.js - + underscore.js - + mage/mage.js - + jquery/jquery.tmpl.min.js - + jquery/jquery.validate.js - + jquery/jquery.hoverIntent.js - + mage/translate.js - + mage/backend/bootstrap.js - + mage/backend/floating-header.js - + prototype/prototype.js - + prototype/window.js - + scriptaculous/builder.js - + scriptaculous/effects.js - + scriptaculous/dragdrop.js - + scriptaculous/controls.js - + scriptaculous/slider.js - + lib/ccard.js - + prototype/validation.js - + varien/js.js - + mage/adminhtml/hash.js - + mage/adminhtml/events.js - + mage/adminhtml/varienLoader.js - + mage/adminhtml/grid.js - + mage/backend/tabs.js - + mage/adminhtml/form.js - + mage/adminhtml/accordion.js - + mage/adminhtml/tools.js - + Magento_Catalog::catalog/product.js - + lib/ds-sleight.js @@ -193,7 +193,7 @@ - + mage/calendar.css @@ -201,17 +201,17 @@ - + jquery/jquery-ui-timepicker-addon.js - + mage/calendar.js - + extjs/ext-tree.js @@ -221,7 +221,7 @@ - + extjs/ext-tree-checkbox.js @@ -231,7 +231,7 @@ - + extjs/resources/css/ext-all.css @@ -241,7 +241,7 @@ - + extjs/resources/css/ytheme-magento.css @@ -251,7 +251,7 @@ - + Magento_Rule::rules.js @@ -261,7 +261,7 @@ - + mage/adminhtml/wysiwyg/tiny_mce/setup.js @@ -271,8 +271,8 @@ - - + + @@ -282,14 +282,14 @@ - - + + - + - + diff --git a/app/code/Magento/Backend/view/adminhtml/layout/editor.xml b/app/code/Magento/Backend/view/adminhtml/layout/editor.xml index 9bb06c3802b9a..b55806ea37c0f 100644 --- a/app/code/Magento/Backend/view/adminhtml/layout/editor.xml +++ b/app/code/Magento/Backend/view/adminhtml/layout/editor.xml @@ -28,47 +28,47 @@ 1 - + Magento_Backend::variables.js - + mage/adminhtml/wysiwyg/widget.js - + lib/flex.js - + lib/FABridge.js - + mage/adminhtml/flexuploader.js - + mage/adminhtml/browser.js - + prototype/window.js - + prototype/windows/themes/default.css - + Magento_Core::prototype/magento.css diff --git a/app/code/Magento/Backend/view/adminhtml/page/head.phtml b/app/code/Magento/Backend/view/adminhtml/page/head.phtml index ca3282a197b5c..73683d148589d 100644 --- a/app/code/Magento/Backend/view/adminhtml/page/head.phtml +++ b/app/code/Magento/Backend/view/adminhtml/page/head.phtml @@ -24,13 +24,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/** @var $this \Magento\Page\Block\Html\Head */ +/** @var $this \Magento\Theme\Block\Html\Head */ ?> <?php echo htmlspecialchars(html_entity_decode($this->getTitle())) ?> - - + + diff --git a/app/code/Magento/Directory/Block/Currency.php b/app/code/Magento/Directory/Block/Currency.php index 5d55b1fbecafd..d337d8ba3f483 100644 --- a/app/code/Magento/Directory/Block/Currency.php +++ b/app/code/Magento/Directory/Block/Currency.php @@ -29,7 +29,7 @@ */ namespace Magento\Directory\Block; -class Currency extends \Magento\View\Block\Template +class Currency extends \Magento\View\Element\Template { /** * Directory url @@ -44,22 +44,20 @@ class Currency extends \Magento\View\Block\Template protected $_currencyFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Directory\Helper\Url $directoryUrl * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Directory\Helper\Url $directoryUrl, \Magento\Directory\Model\CurrencyFactory $currencyFactory, array $data = array() ) { $this->_directoryUrl = $directoryUrl; $this->_currencyFactory = $currencyFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Directory/Block/Data.php b/app/code/Magento/Directory/Block/Data.php index f78cc0037f642..29d7b01370e0a 100644 --- a/app/code/Magento/Directory/Block/Data.php +++ b/app/code/Magento/Directory/Block/Data.php @@ -29,7 +29,7 @@ */ namespace Magento\Directory\Block; -class Data extends \Magento\View\Block\Template +class Data extends \Magento\View\Element\Template { /** * @var \Magento\App\Cache\Type\Config @@ -47,22 +47,36 @@ class Data extends \Magento\View\Block\Template protected $_countryCollFactory; /** - * @param \Magento\View\Block\Template\Context $context + * @var \Magento\Json\EncoderInterface + */ + protected $_jsonEncoder; + + /** + * @var \Magento\Core\Helper\Data + */ + protected $_coreData; + + /** + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Json\EncoderInterface $jsonEncoder * @param \Magento\App\Cache\Type\Config $configCacheType * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, + \Magento\View\Element\Template\Context $context, \Magento\Core\Helper\Data $coreData, + \Magento\Json\EncoderInterface $jsonEncoder, \Magento\App\Cache\Type\Config $configCacheType, \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory, \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); + $this->_coreData = $coreData; + $this->_jsonEncoder = $jsonEncoder; $this->_configCacheType = $configCacheType; $this->_regionCollFactory = $regionCollFactory; $this->_countryCollFactory = $countryCollFactory; @@ -111,7 +125,7 @@ public function getCountryHtmlSelect($defValue = null, $name = 'country_id', $id $options = $this->getCountryCollection()->toOptionArray(); $this->_configCacheType->save(serialize($options), $cacheKey); } - $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Element\Html\Select') ->setName($name) ->setId($id) ->setTitle(__($title)) @@ -154,7 +168,7 @@ public function getRegionHtmlSelect() $options = $this->getRegionCollection()->toOptionArray(); $this->_configCacheType->save(serialize($options), $cacheKey); } - $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Element\Html\Select') ->setName('region') ->setTitle(__('State/Province')) ->setId('state') @@ -203,7 +217,7 @@ public function getRegionsJs() 'name'=>$region->getName() ); } - $regionsJs = $this->_coreData->jsonEncode($regions); + $regionsJs = $this->_jsonEncoder->encode($regions); } \Magento\Profiler::stop('TEST: ' . __METHOD__); return $regionsJs; diff --git a/app/code/Magento/Directory/Helper/Url.php b/app/code/Magento/Directory/Helper/Url.php index e4479a1fb2635..04fe8b56b96e1 100644 --- a/app/code/Magento/Directory/Helper/Url.php +++ b/app/code/Magento/Directory/Helper/Url.php @@ -39,14 +39,14 @@ class Url extends \Magento\Core\Helper\Url protected $_coreData = null; /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Core\Helper\Data $coreData */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\App\Helper\Context $context, - \Magento\Core\Model\StoreManagerInterface $storeManager + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Core\Helper\Data $coreData ) { $this->_coreData = $coreData; parent::__construct($context, $storeManager); diff --git a/app/code/Magento/Directory/Model/Resource/Country/Collection.php b/app/code/Magento/Directory/Model/Resource/Country/Collection.php index 39ee33d70890d..bd027c81317c3 100644 --- a/app/code/Magento/Directory/Model/Resource/Country/Collection.php +++ b/app/code/Magento/Directory/Model/Resource/Country/Collection.php @@ -58,28 +58,30 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_arrayUtils; /** + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger + * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\LocaleInterface $locale - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Directory\Model\Resource\CountryFactory $countryFactory * @param \Magento\Stdlib\ArrayUtils $arrayUtils + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, + \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\LocaleInterface $locale, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Directory\Model\Resource\CountryFactory $countryFactory, \Magento\Stdlib\ArrayUtils $arrayUtils, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_coreStoreConfig = $coreStoreConfig; $this->_locale = $locale; $this->_countryFactory = $countryFactory; diff --git a/app/code/Magento/Directory/Model/Resource/Region/Collection.php b/app/code/Magento/Directory/Model/Resource/Region/Collection.php index ce4b6dd1736e3..ff1fbc9128cb3 100644 --- a/app/code/Magento/Directory/Model/Resource/Region/Collection.php +++ b/app/code/Magento/Directory/Model/Resource/Region/Collection.php @@ -51,25 +51,25 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_locale; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\LocaleInterface $locale + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\LocaleInterface $locale, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_locale = $locale; - parent::__construct( - $eventManager, $logger, $fetchStrategy, $entityFactory, $resource - ); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); } /** diff --git a/app/code/Magento/Directory/Model/Resource/Setup.php b/app/code/Magento/Directory/Model/Resource/Setup.php index 81a9a8f50c035..9772f6dddf3bf 100644 --- a/app/code/Magento/Directory/Model/Resource/Setup.php +++ b/app/code/Magento/Directory/Model/Resource/Setup.php @@ -42,15 +42,15 @@ class Setup extends \Magento\Core\Model\Resource\Setup /** * @param \Magento\Core\Model\Resource\Setup\Context $context + * @param string $resourceName * @param \Magento\Directory\Helper\Data $directoryData - * @param $resourceName * @param string $moduleName * @param string $connectionName */ public function __construct( \Magento\Core\Model\Resource\Setup\Context $context, - \Magento\Directory\Helper\Data $directoryData, $resourceName, + \Magento\Directory\Helper\Data $directoryData, $moduleName = 'Magento_Directory', $connectionName = '' ) { diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php index 066f947eb7c88..a96a790eeda34 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php @@ -54,20 +54,18 @@ class Downloadable */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index 890f781ec375a..1c5d025c5c6df 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -93,9 +93,14 @@ class Links */ protected $_urlFactory; + /** + * @var \Magento\Json\EncoderInterface + */ + protected $_jsonEncoder; + /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\Json\EncoderInterface $jsonEncoder * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase * @param \Magento\Downloadable\Helper\File $downloadableFile * @param \Magento\Core\Model\Registry $coreRegistry @@ -107,7 +112,7 @@ class Links */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\Json\EncoderInterface $jsonEncoder, \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, \Magento\Downloadable\Helper\File $downloadableFile, \Magento\Core\Model\Registry $coreRegistry, @@ -117,6 +122,7 @@ public function __construct( \Magento\Backend\Model\UrlFactory $urlFactory, array $data = array() ) { + $this->_jsonEncoder = $jsonEncoder; $this->_coreRegistry = $coreRegistry; $this->_coreFileStorageDb = $coreFileStorageDatabase; $this->_downloadableFile = $downloadableFile; @@ -124,7 +130,7 @@ public function __construct( $this->_link = $link; $this->_attributeFactory = $attributeFactory; $this->_urlFactory = $urlFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -173,7 +179,7 @@ public function getPurchasedSeparatelyAttribute() */ public function getPurchasedSeparatelySelect() { - $select = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') + $select = $this->getLayout()->createBlock('Magento\View\Element\Html\Select') ->setName('product[links_purchased_separately]') ->setId('downloadable_link_purchase_type') ->setOptions($this->_sourceModel->toOptionArray()) @@ -190,11 +196,12 @@ public function getPurchasedSeparatelySelect() public function getAddButtonHtml() { $addButton = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') - ->setData(array( + ->setData([ 'label' => __('Add New Row'), 'id' => 'add_link_item', - 'class' => 'add' - )); + 'class' => 'add', + 'data_attribute' => ['action' => 'add-link'], + ]); return $addButton->toHtml(); } @@ -399,7 +406,7 @@ public function getConfigJson($type = 'links') $this->getConfig()->setReplaceBrowseWithRemove(true); $this->getConfig()->setWidth('32'); $this->getConfig()->setHideUploadButton(true); - return $this->_coreData->jsonEncode($this->getConfig()->getData()); + return $this->_jsonEncoder->encode($this->getConfig()->getData()); } /** diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php index e254ad3c958a7..0f6c00ab1e600 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php @@ -76,33 +76,39 @@ class Samples */ protected $_urlFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase - * @param \Magento\Downloadable\Helper\File $downloadableFile - * @param \Magento\Core\Model\Registry $coreRegistry - * @param \Magento\Downloadable\Model\Sample $sampleModel - * @param \Magento\Backend\Model\UrlFactory $urlFactory - * @param array $data + /** + * @var \Magento\Json\EncoderInterface */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, - \Magento\Downloadable\Helper\File $downloadableFile, - \Magento\Core\Model\Registry $coreRegistry, - \Magento\Downloadable\Model\Sample $sampleModel, - \Magento\Backend\Model\UrlFactory $urlFactory, - array $data = array() - ) { + protected $_jsonEncoder; + + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase + * @param \Magento\Downloadable\Helper\File $downloadableFile + * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Downloadable\Model\Sample $sampleModel + * @param \Magento\Backend\Model\UrlFactory $urlFactory + * @param array $data + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, + \Magento\Downloadable\Helper\File $downloadableFile, + \Magento\Core\Model\Registry $coreRegistry, + \Magento\Downloadable\Model\Sample $sampleModel, + \Magento\Backend\Model\UrlFactory $urlFactory, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; $this->_coreFileStorageDb = $coreFileStorageDatabase; $this->_downloadableFile = $downloadableFile; $this->_coreRegistry = $coreRegistry; $this->_sampleModel = $sampleModel; $this->_urlFactory = $urlFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -134,11 +140,12 @@ public function isReadonly() public function getAddButtonHtml() { $addButton = $this->getLayout()->createBlock('Magento\Adminhtml\Block\Widget\Button') - ->setData(array( + ->setData([ 'label' => __('Add New Row'), 'id' => 'add_sample_item', 'class' => 'add', - )); + 'data_attribute' => ['action' => 'add-sample'], + ]); return $addButton->toHtml(); } @@ -255,7 +262,7 @@ public function getConfigJson() $this->getConfig()->setReplaceBrowseWithRemove(true); $this->getConfig()->setWidth('32'); $this->getConfig()->setHideUploadButton(true); - return $this->_coreData->jsonEncode($this->getConfig()->getData()); + return $this->_jsonEncoder->encode($this->getConfig()->getData()); } /** diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php index bbacefd508cc6..950e184842cc4 100644 --- a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php +++ b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php @@ -43,25 +43,23 @@ class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\Name */ protected $_itemsFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory - * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory - * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory + * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory + * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Catalog\Model\Product\OptionFactory $optionFactory, - \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, - \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Catalog\Model\Product\OptionFactory $optionFactory, + \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, + \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, + array $data = array() + ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($context, $coreData, $optionFactory, $data); + parent::__construct($context, $optionFactory, $data); } public function getLinks() diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php index 50c393864bb6f..36a856f28d454 100644 --- a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php +++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php @@ -41,29 +41,42 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct protected $_calculationModel; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @var \Magento\Json\EncoderInterface + */ + protected $jsonEncoder; + + /** + * @var \Magento\Core\Helper\Data + */ + protected $coreData; + + /** + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Catalog\Model\Config $catalogConfig * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Math\Random $mathRandom * @param \Magento\Tax\Model\Calculation $calculationModel + * @param \Magento\Json\EncoderInterface $jsonEncoder * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, \Magento\Catalog\Helper\Data $catalogData, \Magento\Math\Random $mathRandom, \Magento\Tax\Model\Calculation $calculationModel, + \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Core\Helper\Data $coreData, array $data = array() ) { $this->_calculationModel = $calculationModel; - parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); + $this->jsonEncoder = $jsonEncoder; + $this->coreData = $coreData; + parent::__construct($context, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** @@ -161,13 +174,12 @@ public function getCurrencyPrice($price) public function getJsonConfig() { $config = array(); - $coreHelper = $this->_coreData; foreach ($this->getLinks() as $link) { - $config[$link->getId()] = $coreHelper->currency($link->getPrice(), false, false); + $config[$link->getId()] = $this->coreData->currency($link->getPrice(), false, false); } - return $coreHelper->jsonEncode($config); + return $this->jsonEncoder->encode($config); } public function getLinkSamlpeUrl($link) diff --git a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php index b0b99d4ec011c..78fa6dc2e57b5 100644 --- a/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/Magento/Downloadable/Block/Checkout/Cart/Item/Renderer.php @@ -44,23 +44,21 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer protected $_downloadProdConfig = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Catalog\Helper\Product\Configuration $productConfig * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Downloadable\Helper\Catalog\Product\Configuration $dwnCtlgProdConfig * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Catalog\Helper\Product\Configuration $productConfig, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Downloadable\Helper\Catalog\Product\Configuration $dwnCtlgProdConfig, array $data = array() ) { $this->_downloadProdConfig = $dwnCtlgProdConfig; - parent::__construct($context, $coreData, $productConfig, $checkoutSession, $data); + parent::__construct($context, $productConfig, $checkoutSession, $data); } /** diff --git a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php index 12217b8460421..7b9ffd3f4c186 100644 --- a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php +++ b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php @@ -33,7 +33,7 @@ */ namespace Magento\Downloadable\Block\Customer\Products; -class ListProducts extends \Magento\View\Block\Template +class ListProducts extends \Magento\View\Element\Template { /** * @var \Magento\Customer\Model\Session @@ -51,16 +51,14 @@ class ListProducts extends \Magento\View\Block\Template protected $_itemsFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Downloadable\Model\Resource\Link\Purchased\CollectionFactory $linksFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Downloadable\Model\Resource\Link\Purchased\CollectionFactory $linksFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, @@ -69,7 +67,7 @@ public function __construct( $this->_customerSession = $customerSession; $this->_linksFactory = $linksFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -112,7 +110,7 @@ protected function _prepareLayout() { parent::_prepareLayout(); - $pager = $this->getLayout()->createBlock('Magento\Page\Block\Html\Pager', 'downloadable.customer.products.pager') + $pager = $this->getLayout()->createBlock('Magento\Theme\Block\Html\Pager', 'downloadable.customer.products.pager') ->setCollection($this->getItems()); $this->setChild('pager', $pager); $this->getItems()->load(); diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php index 0437bbcb168e4..3f26db29f47c8 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Downloadable.php @@ -52,29 +52,27 @@ class Downloadable extends \Magento\Sales\Block\Order\Email\Items\DefaultItems protected $_itemsFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, array $data = array() ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** * Enter description here... * - * @return unknown + * @return \Magento\Downloadable\Model\Link\Purchased */ public function getLinks() { diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php index b650ab0510162..57df3084287a1 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Email/Items/Order/Downloadable.php @@ -52,28 +52,26 @@ class Downloadable extends \Magento\Sales\Block\Order\Email\Items\Order\DefaultO protected $_itemsFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, array $data = array() ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** * Enter description here... * - * @return unknown + * @return \Magento\Downloadable\Model\Link\Purchased */ public function getLinks() { diff --git a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php index f01a1cb70941f..b129a2974ed05 100644 --- a/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php +++ b/app/code/Magento/Downloadable/Block/Sales/Order/Item/Renderer/Downloadable.php @@ -47,8 +47,7 @@ class Downloadable extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRende protected $_itemsFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Stdlib\String $string * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory @@ -56,8 +55,7 @@ class Downloadable extends \Magento\Sales\Block\Order\Item\Renderer\DefaultRende * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Stdlib\String $string, \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, @@ -66,7 +64,7 @@ public function __construct( ) { $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($context, $coreData, $string, $productOptionFactory, $data); + parent::__construct($context, $string, $productOptionFactory, $data); } public function getLinks() diff --git a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php index fbef1005b7405..8b3b68a24fd0e 100644 --- a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php +++ b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/File.php @@ -93,7 +93,7 @@ public function uploadAction() } $result['cookie'] = array( - 'name' => session_name(), + 'name' => $this->_getSession()->getName(), 'value' => $this->_getSession()->getSessionId(), 'lifetime' => $this->_getSession()->getCookieLifetime(), 'path' => $this->_getSession()->getCookiePath(), diff --git a/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php index 7fc2ae64177d8..81538ca63d611 100644 --- a/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php +++ b/app/code/Magento/Downloadable/Helper/Catalog/Product/Configuration.php @@ -51,14 +51,14 @@ class Configuration extends \Magento\App\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\Catalog\Helper\Product\Configuration $productConfigur * @param \Magento\App\Helper\Context $context + * @param \Magento\Catalog\Helper\Product\Configuration $productConfigur * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ public function __construct( - \Magento\Catalog\Helper\Product\Configuration $productConfigur, \Magento\App\Helper\Context $context, - \Magento\Core\Model\Store\Config $coreStoreConfig + \Magento\Catalog\Helper\Product\Configuration $productConfigur, + \Magento\Core\Model\Store\Config $coreStoreConfig ) { $this->_productConfigur = $productConfigur; $this->_coreStoreConfig = $coreStoreConfig; diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php index df7bba3f69fda..f7836508d0274 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -127,19 +127,19 @@ class Download extends \Magento\App\Helper\AbstractHelper protected $_filesystem; /** + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Downloadable\Helper\File $downloadableFile * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb - * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\App\Dir $dirModel * @param \Magento\Filesystem $filesystem */ public function __construct( + \Magento\App\Helper\Context $context, \Magento\Core\Helper\Data $coreData, \Magento\Downloadable\Helper\File $downloadableFile, \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb, - \Magento\App\Helper\Context $context, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\App\Dir $dirModel, \Magento\Filesystem $filesystem diff --git a/app/code/Magento/Downloadable/Helper/File.php b/app/code/Magento/Downloadable/Helper/File.php index 7f21b4c232221..bb53143f047e7 100644 --- a/app/code/Magento/Downloadable/Helper/File.php +++ b/app/code/Magento/Downloadable/Helper/File.php @@ -43,13 +43,13 @@ class File extends \Magento\App\Helper\AbstractHelper protected $_coreFileStorageDatabase = null; /** - * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase * @param array $mimeTypes */ public function __construct( - \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, \Magento\App\Helper\Context $context, + \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase, array $mimeTypes = array() ) { $this->_coreFileStorageDatabase = $coreFileStorageDatabase; diff --git a/app/code/Magento/Downloadable/Model/Resource/Link.php b/app/code/Magento/Downloadable/Model/Resource/Link.php index 2f57c1213e9e6..517bb4ac81f72 100644 --- a/app/code/Magento/Downloadable/Model/Resource/Link.php +++ b/app/code/Magento/Downloadable/Model/Resource/Link.php @@ -59,15 +59,15 @@ class Link extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_storeManager; /** - * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\App\Resource $resource + * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Core\Model\App $app * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Catalog\Helper\Data $catalogData, \Magento\App\Resource $resource, + \Magento\Catalog\Helper\Data $catalogData, \Magento\Core\Model\App $app, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Core\Model\StoreManagerInterface $storeManager diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php index aa5f61dc45f31..901600565f982 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -56,9 +56,9 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra protected $_itemsFactory; /** - * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\App\Dir $coreDir * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory @@ -68,9 +68,9 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra * @param array $data */ public function __construct( - \Magento\Tax\Helper\Data $taxData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Tax\Helper\Data $taxData, \Magento\App\Dir $coreDir, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, @@ -82,7 +82,7 @@ public function __construct( $this->_coreStoreConfig = $coreStoreConfig; $this->_purchasedFactory = $purchasedFactory; $this->_itemsFactory = $itemsFactory; - parent::__construct($taxData, $context, $registry, $coreDir, $resource, $resourceCollection, $data); + parent::__construct($context, $registry, $taxData, $coreDir, $resource, $resourceCollection, $data); } /** diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php index 7bb18f64e4419..08fe08ccda7f2 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -38,36 +38,36 @@ class Creditmemo protected $string; /** - * @param \Magento\Stdlib\String $string - * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\App\Dir $coreDir * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory + * @param \Magento\Stdlib\String $string * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Stdlib\String $string, - \Magento\Tax\Helper\Data $taxData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Tax\Helper\Data $taxData, \Magento\App\Dir $coreDir, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, + \Magento\Stdlib\String $string, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->string = $string; parent::__construct( - $taxData, $context, $registry, + $taxData, $coreDir, $coreStoreConfig, $purchasedFactory, diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php index 7263a9511a695..e960c53fc8417 100644 --- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php @@ -43,36 +43,36 @@ class Invoice protected $string; /** - * @param \Magento\Stdlib\String $string - * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\App\Dir $coreDir * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory + * @param \Magento\Stdlib\String $string * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Stdlib\String $string, - \Magento\Tax\Helper\Data $taxData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Tax\Helper\Data $taxData, \Magento\App\Dir $coreDir, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory, \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory, + \Magento\Stdlib\String $string, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->string = $string; parent::__construct( - $taxData, $context, $registry, + $taxData, $coreDir, $coreStoreConfig, $purchasedFactory, diff --git a/app/code/Magento/Downloadable/etc/module.xml b/app/code/Magento/Downloadable/etc/module.xml index 46791af98683d..061d0ee728cdd 100755 --- a/app/code/Magento/Downloadable/etc/module.xml +++ b/app/code/Magento/Downloadable/etc/module.xml @@ -34,7 +34,7 @@ - + diff --git a/app/code/Magento/Downloadable/view/adminhtml/product/composite/fieldset/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/product/composite/fieldset/downloadable.phtml index 8370ed428ee7f..b84790b780b16 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/product/composite/fieldset/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/product/composite/fieldset/downloadable.phtml @@ -29,50 +29,43 @@ helper('Magento\Catalog\Helper\Product')->getSkipSaleableCheck(); ?> getProduct()->isSaleable() || $_skipSaleableCheck) && $this->hasLinks()):?> -
-

-
-
- getLinks(); ?> - getLinkSelectionRequired(); ?> -
>*' ?>getLinksTitle() ?>
-
- - - - - -
-
+ + + + +
+ + + + +
- +
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tabs.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tabs.php new file mode 100644 index 0000000000000..a4b1a47c2ccbe --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Activate/Permissions/Tabs.php @@ -0,0 +1,39 @@ +setDestElementId('integrations-activate-permissions-content'); + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php index 59f577305daa7..a074c1c892222 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit.php @@ -36,20 +36,18 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_registry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_registry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -61,6 +59,8 @@ protected function _construct() $this->_controller = 'adminhtml_integration'; $this->_blockGroup = 'Magento_Integration'; parent::_construct(); + $this->_removeButton('reset'); + $this->_removeButton('delete'); } /** diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php index 36a404873d3be..1eccbee1b67f6 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tab/Info.php @@ -33,14 +33,10 @@ * * @category Magento * @package Magento_Integration - * @SuppressWarnings(PHPMD.DepthOfInheritance) */ class Info extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface { - /** @var \Magento\Integration\Model\Integration\Source\Authentication */ - protected $_authTypeSource; - /**#@+ * edit_form element names. */ @@ -48,30 +44,10 @@ class Info extends \Magento\Backend\Block\Widget\Form\Generic const DATA_ID = 'integration_id'; const DATA_NAME = 'name'; const DATA_EMAIL = 'email'; - const DATA_AUTHENTICATION = 'authentication'; const DATA_ENDPOINT = 'endpoint'; + const DATA_SETUP_TYPE = 'setup_type'; /**#@-*/ - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource - * @param array $data - */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Integration\Model\Integration\Source\Authentication $authTypeSource, - array $data = array() - ) { - parent::__construct($context, $coreData, $registry, $formFactory, $data); - $this->_authTypeSource = $authTypeSource; - } - /** * Set form id prefix, declare fields for integration info * @@ -83,7 +59,7 @@ protected function _prepareForm() $form = $this->_formFactory->create(); $form->setHtmlIdPrefix(self::HTML_ID_PREFIX); $integrationData = $this->_coreRegistry->registry(Integration::REGISTRY_KEY_CURRENT_INTEGRATION); - $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('Integration'))); + $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('General'))); if (isset($integrationData[self::DATA_ID])) { $fieldset->addField(self::DATA_ID, 'hidden', array('name' => 'id')); } @@ -91,7 +67,7 @@ protected function _prepareForm() self::DATA_NAME, 'text', array( - 'label' => __('Integration Name'), + 'label' => __('Name'), 'name' => self::DATA_NAME, 'required' => true, 'disabled' => false, @@ -104,27 +80,23 @@ protected function _prepareForm() array( 'label' => __('Email'), 'name' => self::DATA_EMAIL, - 'required' => true, 'disabled' => false, 'class' => 'validate-email', - 'maxlength' => '254', + 'maxlength' => '254' ) ); $fieldset->addField( - self::DATA_AUTHENTICATION, - 'select', + self::DATA_ENDPOINT, + 'text', array( - 'label' => __('Authentication'), - 'name' => self::DATA_AUTHENTICATION, + 'label' => __('Callback URL'), + 'name' => self::DATA_ENDPOINT, 'disabled' => false, - 'options' => $this->_authTypeSource->toOptionArray() + // @codingStandardsIgnoreStart + 'note'=> __('When using Oauth for token exchange, enter URL where Oauth credentials can be POST-ed. We strongly recommend you to use https://') + // @codingStandardsIgnoreEnd ) ); - $fieldset->addField( - self::DATA_ENDPOINT, - 'text', - array('label' => __('Endpoint URL'), 'name' => self::DATA_ENDPOINT, 'required' => true, 'disabled' => false) - ); $form->setValues($integrationData); $this->setForm($form); return $this; @@ -169,25 +141,4 @@ public function isHidden() { return false; } - - /** - * Get additional script for tabs block - * - * @return string - */ - protected function _toHtml() - { - $oauth = \Magento\Integration\Model\Integration::AUTHENTICATION_OAUTH; - $authFieldIdSelector = '#' . self::HTML_ID_PREFIX . self::DATA_AUTHENTICATION; - $endpointIdSelector = '#' . self::HTML_ID_PREFIX . self::DATA_ENDPOINT; - $endpointClassSel = '.field-' . self::DATA_ENDPOINT; - $script = <<%s', $script); - } } diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php index 2b5e77ee31edb..4baf8ae6b08b2 100644 --- a/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Edit/Tabs.php @@ -37,6 +37,6 @@ protected function _construct() parent::_construct(); $this->setId('integration_edit_tabs'); $this->setDestElementId('edit_form'); - $this->setTitle(__('Integration Information')); + $this->setTitle(__('Basic Settings')); } } diff --git a/app/code/Magento/Integration/Model/Integration/Source/Authentication.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Grid.php similarity index 66% rename from app/code/Magento/Integration/Model/Integration/Source/Authentication.php rename to app/code/Magento/Integration/Block/Adminhtml/Integration/Grid.php index 9deeac5ae6191..c106a6ac21638 100644 --- a/app/code/Magento/Integration/Model/Integration/Source/Authentication.php +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Grid.php @@ -1,5 +1,7 @@ __('OAuth'), - \Magento\Integration\Model\Integration::AUTHENTICATION_MANUAL => __('Manual'), - ); + return ''; } } diff --git a/app/code/Magento/Integration/Block/Adminhtml/Integration/Token.php b/app/code/Magento/Integration/Block/Adminhtml/Integration/Token.php new file mode 100644 index 0000000000000..e64c122d4235e --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Integration/Token.php @@ -0,0 +1,82 @@ +_formFactory->create(); + $htmlIdPrefix = 'integration_token_'; + $form->setHtmlIdPrefix($htmlIdPrefix); + + $fieldset = $form->addFieldset('base_fieldset', array( + 'legend' => __('Integration Tokens for Extensions'), + 'class' => 'fieldset-wide' + )); + + $fieldset->addField('token', 'text', array( + 'label' => __('Token'), + 'name' => 'token', + 'readonly' => true + )); + + $fieldset->addField('token-secret', 'text', array( + 'label' => __('Token Secret'), + 'name' => 'token-secret', + 'readonly' => true + )); + + $fieldset->addField('client-id', 'text', array( + 'label' => __('Client ID'), + 'name' => 'client-id', + 'readonly' => true + )); + + $fieldset->addField('client-secret', 'text', array( + 'label' => __('Client Secret'), + 'name' => 'client-secret', + 'readonly' => true + )); + + // TODO: retrieve token associated to this integration to populate the form + // $form->setValues($model->getData()); + + $this->setForm($form); + + return parent::_prepareForm(); + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php new file mode 100644 index 0000000000000..011613dc07c68 --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php @@ -0,0 +1,122 @@ + tag. + * + * @package Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer + */ +class Button extends AbstractRenderer +{ + /** + * {@inheritDoc} + */ + public function render(Object $row) + { + /** @var array $attributes */ + $attributes = $this->_prepareAttributes($row); + return sprintf('', $this->_getAttributesStr($attributes), $this->_getValue($row)); + } + + /** + * Whether current item is disabled. + * + * @param \Magento\Object $row + * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _isDisabled(Object $row) + { + return false; + } + + /** + * @param \Magento\Object $row + * @return string + */ + protected function _getDisabledAttribute(Object $row) + { + return $this->_isDisabled($row) ? 'disabled' : ''; + } + + /** + * Prepare attribute list. Values for attributes gathered from two sources: + * - If getter method exists in the class - it is taken from there (getter method for "title" + * attribute will be "_getTitleAttribute", for "onmouseup" - "_getOnmouseupAttribute" and so on.) + * - Then it tries to get it from the button's column layout description. + * If received attribute value is empty - attribute is not added to final HTML. + * + * @param \Magento\Object $row + * @return array + */ + protected function _prepareAttributes(Object $row) + { + $attributes = []; + foreach ($this->_getValidAttributes() as $attributeName) { + $methodName = sprintf('_get%sAttribute', ucfirst($attributeName)); + $rowMethodName = sprintf('get%s', ucfirst($attributeName)); + $attributeValue = method_exists($this, $methodName) + ? $this->$methodName($row) + : $this->getColumn()->$rowMethodName(); + + if ($attributeValue) { + $attributes[] = sprintf('%s="%s"', $attributeName, $this->escapeHtml($attributeValue)); + } + } + return $attributes; + } + + /** + * Get list of available HTML attributes for this element. + * + * @return array + */ + protected function _getValidAttributes() + { + return [ + // HTML global attributes + 'accesskey', 'class', 'id', 'lang', 'style', 'tabindex', 'title', + // HTML mouse event attributes + 'onclick', 'ondblclick', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', + // Element attributes + 'disabled', 'name', 'type', 'value', + ]; + } + + /** + * Get list of attributes rendered as a string (ready to be inserted into tag). + * + * @param array $attributes Array of attributes + * @return string + */ + protected function _getAttributesStr($attributes) + { + return join(' ', $attributes); + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Delete.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Delete.php new file mode 100644 index 0000000000000..a9364800f3e5a --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Delete.php @@ -0,0 +1,54 @@ + tag with "edit" action for the integration grid. + * + * 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) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer\Button; + +use Magento\Object; + +class Delete extends IntegrationAbstract +{ + /** + * Return 'onclick' action for the button (redirect to the integration edit page). + * + * @param \Magento\Object $row + * @return string + */ + protected function _getOnclickAttribute(Object $row) + { + return sprintf("window.location.href='%s'", $this->getUrl('*/*/delete', ['id' => $row->getId()])); + } + + /** + * Get title depending on whether element is disabled or not. + * + * @param \Magento\Object $row + * @return string + */ + protected function _getTitleAttribute(Object $row) + { + return $this->_isDisabled($row) ? __('Uninstall the extension to remove this integration') : __('Remove'); + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Edit.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Edit.php new file mode 100644 index 0000000000000..3c1d6e4a57570 --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/Edit.php @@ -0,0 +1,54 @@ + tag with "edit" action for the integration grid. + * + * 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) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer\Button; + +use Magento\Object; + +class Edit extends IntegrationAbstract +{ + /** + * Return 'onclick' action for the button (redirect to the integration edit page). + * + * @param \Magento\Object $row + * @return string + */ + protected function _getOnclickAttribute(Object $row) + { + return sprintf("window.location.href='%s'", $this->getUrl('*/*/edit', ['id' => $row->getId()])); + } + + /** + * Get title depending on whether element is disabled or not. + * + * @param \Magento\Object $row + * @return string + */ + protected function _getTitleAttribute(Object $row) + { + return $this->_isDisabled($row) ? '' : __('Edit'); + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/IntegrationAbstract.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/IntegrationAbstract.php new file mode 100644 index 0000000000000..76db7a82352e7 --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/IntegrationAbstract.php @@ -0,0 +1,46 @@ +hasData(Integration::SETUP_TYPE) + && $row->getData(Integration::SETUP_TYPE) == Integration::TYPE_CONFIG); + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link.php new file mode 100644 index 0000000000000..d675789d15c67 --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link.php @@ -0,0 +1,164 @@ +_row = $row; + + if (!$this->isVisible()) { + return ''; + } + + $html = sprintf( + '%s', + $this->_getUrl($row), + $this->_getAttributesHtml(), + $this->getCaption() + ); + + return $html; + } + + /** + * Decide whether anything should be rendered. + * + * @return bool + */ + public function isVisible() + { + return true; + } + + /** + * Decide whether action associated with the link is not available. + * + * @return bool + */ + public function isDisabled() + { + return false; + } + + /** + * Return URL pattern for action associated with the link e.g. "(star)(slash)(star)(slash)activate" -> + * will be translated to http://.../admin/integration/activate/id/X + * + * @return string + */ + public function getUrlPattern() + { + return $this->getColumn()->getUrlPattern(); + } + + /** + * Caption for the link. + * + * @return string + */ + public function getCaption() + { + return $this->isDisabled() + ? $this->getColumn()->getDisabledCaption() ?: $this->getColumn()->getCaption() + : $this->getColumn()->getCaption(); + } + + /** + * Return additional HTML parameters for tag, e.g. 'style' + * + * @return string + */ + protected function _getAttributesHtml() + { + $html = []; + + foreach ($this->_getAttributes() as $key => $value) { + if ($value === null || $value == '') { + continue; + } + $html[] = sprintf('%s="%s"', $key, $this->escapeHtml($value)); + } + + return join(' ', $html); + } + + /** + * Return additional HTML attributes for the tag. + * + * @return array + */ + protected function _getAttributes() + { + /** @var \Magento\Core\Helper\Data $helper */ + $helper = $this->helper('Magento\Core\Helper\Data'); + $attributes = ['title' => $this->getCaption()]; + + foreach ($this->_getDataAttributes() as $key => $attr) { + $attributes['data-' . $key] = is_scalar($attr) ? $attr : $helper->jsonEncode($attr); + } + + return $attributes; + } + + /** + * Return HTML data attributes, which treated in special manner: + * - prepended by "data-" + * - JSON-encoded if necessary + * + * @return array + */ + protected function _getDataAttributes() + { + return []; + } + + /** + * Render URL for current item. + * + * @param \Magento\Object $row + * @return string + */ + protected function _getUrl(Object $row) + { + return $this->isDisabled($row) ? '#' : $this->getUrl($this->getUrlPattern(), ['id' => $row->getId()]); + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Activate.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Activate.php new file mode 100644 index 0000000000000..c96b7e74f4b05 --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Activate.php @@ -0,0 +1,78 @@ +_row->getStatus() == Integration::STATUS_INACTIVE) ? '*/*/activate' : '*/*/deactivate'; + } + + /** + * {@inheritDoc} + */ + public function getCaption() + { + return ($this->_row->getStatus() == Integration::STATUS_INACTIVE) ? __('Activate') : __('Deactivate'); + } + + /** + * {@inheritDoc} + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function _getUrl(Object $row) + { + return 'javascript:void(0);'; + } + + /** + * {@inheritDoc} + */ + protected function _getAttributes() + { + return array_merge(parent::_getAttributes(), ['onclick' => 'integration.popup.show(this);']); + } + + /** + * {@inheritDoc} + */ + protected function _getDataAttributes() + { + return [ + 'row-id' => $this->_row->getId(), + 'row-dialog' => $this->_row->getStatus() === Integration::STATUS_ACTIVE ? 'deactivate' : 'permissions' + ]; + } +} diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Reauthorize.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Reauthorize.php new file mode 100644 index 0000000000000..74bd75e6ee633 --- /dev/null +++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Link/Reauthorize.php @@ -0,0 +1,41 @@ +_row->getStatus() == Integration::STATUS_ACTIVE; + } +} diff --git a/app/code/Magento/Integration/Controller/Adminhtml/Integration.php b/app/code/Magento/Integration/Controller/Adminhtml/Integration.php index 5534a570ba037..f5e1693d972a1 100644 --- a/app/code/Magento/Integration/Controller/Adminhtml/Integration.php +++ b/app/code/Magento/Integration/Controller/Adminhtml/Integration.php @@ -21,14 +21,18 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + namespace Magento\Integration\Controller\Adminhtml; use Magento\Backend\App\Action; use Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Info; +use Magento\Integration\Model\Integration as IntegrationKeyConstants; +use Magento\Integration\Exception as IntegrationException; + /** * Controller for integrations management. */ -class Integration extends \Magento\Backend\App\Action +class Integration extends Action { /** Param Key for extracting integration id from Request */ const PARAM_INTEGRATION_ID = 'id'; @@ -36,6 +40,16 @@ class Integration extends \Magento\Backend\App\Action /** Keys used for registering data into the registry */ const REGISTRY_KEY_CURRENT_INTEGRATION = 'current_integration'; + /** Request parameter which define the dialog window requested */ + const PARAM_DIALOG_ID = 'popup_dialog'; + + /**#@+ + * Allowed values for PARAM_DIALOG_ID request parameter + */ + const DIALOG_PERMISSIONS = 'permissions'; + const DIALOG_TOKENS = 'tokens'; + /**#@-*/ + /** * Core registry * @@ -43,6 +57,9 @@ class Integration extends \Magento\Backend\App\Action */ protected $_registry = null; + /** @var \Magento\Logger */ + protected $_logger; + /** @var \Magento\Integration\Service\IntegrationV1Interface */ private $_integrationService; @@ -50,13 +67,16 @@ class Integration extends \Magento\Backend\App\Action * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Integration\Service\IntegrationV1Interface $integrationService * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Logger $logger */ public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Integration\Service\IntegrationV1Interface $integrationService, - \Magento\Core\Model\Registry $registry + \Magento\Core\Model\Registry $registry, + \Magento\Logger $logger ) { $this->_registry = $registry; + $this->_logger = $logger; $this->_integrationService = $integrationService; parent::__construct($context); } @@ -118,15 +138,22 @@ public function editAction() /** Try to recover integration data from session if it was added during previous request which failed. */ $integrationId = (int)$this->getRequest()->getParam(self::PARAM_INTEGRATION_ID); if ($integrationId) { - $integrationData = $this->_integrationService->get($integrationId); + try { + $integrationData = $this->_integrationService->get($integrationId); + } catch (IntegrationException $e) { + $this->_getSession()->addError($e->getMessage()); + $this->_redirect('*/*/'); + return; + } $restoredIntegration = $this->_getSession()->getIntegrationData(); - if (isset($restoredIntegration[Info::DATA_ID]) - && $integrationId == $restoredIntegration[Info::DATA_ID] - ) { + if (isset($restoredIntegration[Info::DATA_ID]) && $integrationId == $restoredIntegration[Info::DATA_ID]) { $integrationData = array_merge($integrationData, $restoredIntegration); } - if (!$integrationData[Info::DATA_ID]) { - $this->_getSession()->addError(__('This integration no longer exists.')); + + if (isset($integrationData[Info::DATA_SETUP_TYPE]) + && $integrationData[Info::DATA_SETUP_TYPE] == IntegrationKeyConstants::TYPE_CONFIG + ) { + //Cannot edit Integrations created from Config. No error necessary just redirect to grid $this->_redirect('*/*/'); return; } @@ -152,10 +179,10 @@ public function editAction() */ public function saveAction() { + /** @var array $integrationData */ + $integrationData = array(); try { $integrationId = (int)$this->getRequest()->getParam(self::PARAM_INTEGRATION_ID); - /** @var array $integrationData */ - $integrationData = array(); if ($integrationId) { $integrationData = $this->_integrationService->get($integrationId); if (!$integrationData[Info::DATA_ID]) { @@ -166,16 +193,22 @@ public function saveAction() } /** @var array $data */ $data = $this->getRequest()->getPost(); - //Merge Post-ed data - $integrationData = array_merge($integrationData, $data); - $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $integrationData); - if (!isset($integrationData[Info::DATA_ID])) { - $this->_integrationService->create($integrationData); + if (!empty($data)) { + if (!isset($data['resource'])) { + $integrationData['resource'] = array(); + } + $integrationData = array_merge($integrationData, $data); + $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $integrationData); + if (!isset($integrationData[Info::DATA_ID])) { + $this->_integrationService->create($integrationData); + } else { + $this->_integrationService->update($integrationData); + } + $this->_getSession() + ->addSuccess(__('The integration \'%1\' has been saved.', $integrationData[Info::DATA_NAME])); } else { - $this->_integrationService->update($integrationData); + $this->_getSession()->addError(__('The integration was not saved.')); } - $this->_getSession()->addSuccess(__('The integration \'%1\' has been saved.', - $integrationData[Info::DATA_NAME])); $this->_redirect('*/*/'); } catch (\Magento\Integration\Exception $e) { $this->_getSession()->addError($e->getMessage())->setIntegrationData($integrationData); @@ -184,12 +217,66 @@ public function saveAction() $this->_getSession()->addError($e->getMessage()); $this->_redirectOnSaveError(); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Core\Model\Logger')->logException($e); + $this->_logger->logException($e); $this->_getSession()->addError($e->getMessage()); $this->_redirectOnSaveError(); } } + /** + * Activates the integration. Also contains intermediate steps (permissions confirmation and tokens). + */ + public function activateAction() + { + $integrationId = (int)$this->getRequest()->getParam(self::PARAM_INTEGRATION_ID); + + if ($integrationId) { + $integrationData = $this->_integrationService->get($integrationId); + if (!$integrationData[Info::DATA_ID]) { + $this->_getSession()->addError(__('This integration no longer exists.')); + $this->_redirect('*/*/'); + return; + } + $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $integrationData); + } else { + $this->_getSession()->addError(__('Integration ID is not specified or is invalid.')); + $this->_redirect('*/*/'); + return; + } + + $dialogName = $this->getRequest()->getParam(self::PARAM_DIALOG_ID); + + if (in_array($dialogName, [self::DIALOG_PERMISSIONS, self::DIALOG_TOKENS])) { + $this->_view->loadLayout($this->_getPopupHandleNames($dialogName)); + } else { + $this->_view->loadLayout(); + } + + $this->_view->renderLayout(); + } + + /** + * @param string $dialogName + * @return array + */ + protected function _getPopupHandleNames($dialogName) + { + $handles = [sprintf('%s_%s_popup', $this->_view->getDefaultLayoutHandle(), $dialogName)]; + + if ($dialogName === self::DIALOG_PERMISSIONS) { + $handleNodes = $this->_view->getLayout()->getUpdate()->getFileLayoutUpdatesXml() + ->xpath('//referenceBlock[@name="integration.activate.permissions.tabs"]/../@id'); + + if (is_array($handleNodes)) { + foreach ($handleNodes as $node) { + $handles[] = (string)$node; + } + } + } + + return $handles; + } + /** * Redirect merchant to 'Edit integration' or 'New integration' if error happened during integration save. */ diff --git a/app/code/Magento/Integration/Helper/Data.php b/app/code/Magento/Integration/Helper/Data.php index 88b0684b8e07f..7becc725d7d0f 100644 --- a/app/code/Magento/Integration/Helper/Data.php +++ b/app/code/Magento/Integration/Helper/Data.php @@ -18,8 +18,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Integration * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,5 +26,26 @@ class Data extends \Magento\App\Helper\AbstractHelper { - + /** + * Make ACL resource array compatible with jQuery jsTree component. + * + * @param array $resources + * @return array + */ + public function mapResources(array $resources) + { + $output = array(); + foreach ($resources as $resource) { + $item = array(); + $item['attr']['data-id'] = $resource['id']; + $item['data'] = $resource['title']; + $item['children'] = array(); + if (isset($resource['children'])) { + $item['state'] = 'open'; + $item['children'] = $this->mapResources($resource['children']); + } + $output[] = $item; + } + return $output; + } } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/PageTest.php b/app/code/Magento/Integration/Model/Cache/Type.php similarity index 60% rename from dev/tests/unit/testsuite/Magento/Core/Model/PageTest.php rename to app/code/Magento/Integration/Model/Cache/Type.php index 19d0c78adfc0b..823a7fe5ff0ad 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/PageTest.php +++ b/app/code/Magento/Integration/Model/Cache/Type.php @@ -20,39 +20,32 @@ * * @category Magento * @package Magento_Core - * @subpackage unit_tests * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model; +/** + * System / Cache Management / Cache type "Integration Configuration" + */ +namespace Magento\Integration\Model\Cache; -class PageTest extends \PHPUnit_Framework_TestCase +class Type extends \Magento\Cache\Frontend\Decorator\TagScope { /** - * @var \Magento\Core\Model\Page + * Cache type code unique among all cache types */ - protected $_object; + const TYPE_IDENTIFIER = 'config_integration'; /** - * @var + * Cache tag used to distinguish the cache type from all other cache */ - protected $_pageAssets; - - protected function setUp() - { - $this->_pageAssets = new \Magento\Core\Model\Page\Asset\Collection; - $this->_object = new \Magento\Core\Model\Page($this->_pageAssets); - } + const CACHE_TAG = 'INTEGRATION'; - protected function tearDown() - { - $this->_pageAssets = null; - $this->_object = null; - } - - public function testGetAssets() + /** + * @param \Magento\App\Cache\Type\FrontendPool $cacheFrontendPool + */ + public function __construct(\Magento\App\Cache\Type\FrontendPool $cacheFrontendPool) { - $this->assertSame($this->_pageAssets, $this->_object->getAssets()); + parent::__construct($cacheFrontendPool->get(self::TYPE_IDENTIFIER), self::CACHE_TAG); } } diff --git a/app/code/Magento/Integration/Model/Config.php b/app/code/Magento/Integration/Model/Config.php new file mode 100644 index 0000000000000..2b24fcd43d086 --- /dev/null +++ b/app/code/Magento/Integration/Model/Config.php @@ -0,0 +1,85 @@ +_configCacheType = $configCacheType; + $this->_configReader = $configReader; + } + + /** + * Return integrations loaded from cache if enabled or from files merged previously + * + * @return array + */ + public function getIntegrations() + { + if (null === $this->_integrations) { + $integrations = $this->_configCacheType->load(self::CACHE_ID); + if ($integrations && is_string($integrations)) { + $this->_integrations = unserialize($integrations); + } else { + $this->_integrations = $this->_configReader->read(); + $this->_configCacheType->save(serialize($this->_integrations), self::CACHE_ID, array(Type::CACHE_TAG)); + } + } + return $this->_integrations; + } +} diff --git a/app/code/Magento/Integration/Model/Config/Converter.php b/app/code/Magento/Integration/Model/Config/Converter.php index f7674e037d034..df21a83630816 100644 --- a/app/code/Magento/Integration/Model/Config/Converter.php +++ b/app/code/Magento/Integration/Model/Config/Converter.php @@ -31,10 +31,7 @@ class Converter implements \Magento\Config\ConverterInterface /**#@+ * Array keys for config internal representation. */ - const KEY_NAME = 'name'; const KEY_EMAIL = 'email'; - const KEY_AUTHENTICATION = 'authentication'; - const KEY_AUTHENTICATION_TYPE = 'type'; const KEY_AUTHENTICATION_ENDPOINT_URL = 'endpoint_url'; /**#@-*/ @@ -51,30 +48,17 @@ public function convert($source) if ($integration->nodeType != XML_ELEMENT_NODE) { continue; } - $integrationId = $integration->attributes->getNamedItem('id')->nodeValue; - $result[$integrationId] = array(); - - /** @var \DOMElement $name */ - $name = $integration->getElementsByTagName('name')->item(0)->nodeValue; - $result[$integrationId][self::KEY_NAME] = $name; + $integrationName = $integration->attributes->getNamedItem('name')->nodeValue; + $result[$integrationName] = array(); /** @var \DOMElement $email */ $email = $integration->getElementsByTagName('email')->item(0)->nodeValue; - $result[$integrationId][self::KEY_EMAIL] = $email; - - /** @var \DOMNodeList $authentication */ - $authentication = $integration->getElementsByTagName('authentication')->item(0); - - $authenticationType = $authentication->attributes->getNamedItem('type')->nodeValue; - $result[$integrationId][self::KEY_AUTHENTICATION] = array( - self::KEY_AUTHENTICATION_TYPE => $authenticationType - ); + $result[$integrationName][self::KEY_EMAIL] = $email; - /** @var \DOMElement $endpointUrl */ - $endpointUrl = $integration->getElementsByTagName('endpoint_url')->item(0); - if ($endpointUrl) { - $result[$integrationId][self::KEY_AUTHENTICATION][self::KEY_AUTHENTICATION_ENDPOINT_URL] = - $endpointUrl->nodeValue; + if ($integration->getElementsByTagName('endpoint_url')->length) { + /** @var \DOMElement $endpointUrl */ + $endpointUrl = $integration->getElementsByTagName('endpoint_url')->item(0)->nodeValue; + $result[$integrationName][self::KEY_AUTHENTICATION_ENDPOINT_URL] = $endpointUrl; } } return $result; diff --git a/app/code/Magento/Integration/Model/Config/Reader.php b/app/code/Magento/Integration/Model/Config/Reader.php index ed33b48afe185..4fd412169b732 100644 --- a/app/code/Magento/Integration/Model/Config/Reader.php +++ b/app/code/Magento/Integration/Model/Config/Reader.php @@ -34,8 +34,7 @@ class Reader extends \Magento\Config\Reader\Filesystem * @var array */ protected $_idAttributes = array( - '/config/service' => 'class', - '/config/service/rest-route' => 'method', + '/integrations/integration' => 'name' ); /** diff --git a/app/code/Magento/Integration/Model/Integration.php b/app/code/Magento/Integration/Model/Integration.php index bd4eb4424a5e9..1822d2e11ef35 100644 --- a/app/code/Magento/Integration/Model/Integration.php +++ b/app/code/Magento/Integration/Model/Integration.php @@ -33,8 +33,8 @@ * @method Integration setEmail(\string $email) * @method \int getStatus() * @method Integration setStatus(\int $value) - * @method \int getAuthentication() - * @method Integration setAuthentication(\int $value) + * @method \int getType() + * @method Integration setType(\int $value) * @method \string getEndpoint() * @method Integration setEndpoint(\string $endpoint) * @method \string getCreatedAt() @@ -45,17 +45,27 @@ class Integration extends \Magento\Core\Model\AbstractModel { /**#@+ - * Integration statuses. + * Integration Status values */ const STATUS_INACTIVE = 0; const STATUS_ACTIVE = 1; /**#@-*/ /**#@+ - * Authentication mechanism + * Integration setup type */ - const AUTHENTICATION_OAUTH = 1; - const AUTHENTICATION_MANUAL = 2; + const TYPE_MANUAL = 0; + const TYPE_CONFIG = 1; + /**#@-*/ + + /**#@+ + * Integration data key constants. + */ + const ID = 'integration_id'; + const NAME = 'name'; + const EMAIL = 'email'; + const ENDPOINT = 'endpoint'; + const SETUP_TYPE = 'setup_type'; /**#@-*/ /** @@ -66,9 +76,9 @@ class Integration extends \Magento\Core\Model\AbstractModel /** * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Customer\Model\Resource\Customer $resource * @param \Magento\Stdlib\DateTime $dateTime - * @param \Magento\Data\Collection\Db|null $resourceCollection + * @param \Magento\Core\Model\Resource\AbstractResource $resource + * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( @@ -97,7 +107,7 @@ protected function _construct() /** * Prepare data to be saved to database * - * @return Integration + * @return \Magento\Integration\Model\Integration */ protected function _beforeSave() { diff --git a/app/code/Magento/Integration/Model/Manager.php b/app/code/Magento/Integration/Model/Manager.php new file mode 100644 index 0000000000000..b19c32335d485 --- /dev/null +++ b/app/code/Magento/Integration/Model/Manager.php @@ -0,0 +1,100 @@ +_integrationService = $integrationService; + $this->_integrationConfig = $integrationConfig; + } + + /** + * Process integrations from config files for the given array of integration names + * + * @param array $integrationNames + * @return array + */ + public function processIntegrationConfig(array $integrationNames) + { + if (empty($integrationNames)) { + return array(); + } + /** @var array $integrations */ + $integrations = $this->_integrationConfig->getIntegrations(); + foreach ($integrationNames as $name) { + $integrationDetails = $integrations[$name]; + $integrationData = array(Integration::NAME => $name); + if (isset($integrationDetails[Converter::KEY_EMAIL])) { + $integrationData[Integration::EMAIL] = $integrationDetails[Converter::KEY_EMAIL]; + } + if (isset($integrationDetails[Converter::KEY_AUTHENTICATION_ENDPOINT_URL])) { + $integrationData[Integration::ENDPOINT] = + $integrationDetails[Converter::KEY_AUTHENTICATION_ENDPOINT_URL]; + } + $integrationData[Integration::SETUP_TYPE] = Integration::TYPE_CONFIG; + // If it already exists, update it + $data = $this->_integrationService->findByName($name); + if (isset($data[Integration::ID])) { + //If Integration already exists, update it. + //For now we will just overwrite the integration with same name but we will need a long term solution + $integrationData[Integration::ID] = $data[Integration::ID]; + $this->_integrationService->update($integrationData); + } else { + $this->_integrationService->create($integrationData); + } + + } + return $integrationNames; + } +} \ No newline at end of file diff --git a/app/code/Magento/Integration/Model/Oauth/Consumer.php b/app/code/Magento/Integration/Model/Oauth/Consumer.php index 262479304b43f..e534d7214fbfd 100644 --- a/app/code/Magento/Integration/Model/Oauth/Consumer.php +++ b/app/code/Magento/Integration/Model/Oauth/Consumer.php @@ -58,19 +58,19 @@ class Consumer extends \Magento\Core\Model\AbstractModel implements ConsumerInte protected $_keyLengthFactory; /** - * @param \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLengthFactory $keyLengthFactory - * @param \Magento\Url\Validator $urlValidator * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLengthFactory $keyLengthFactory + * @param \Magento\Url\Validator $urlValidator * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLengthFactory $keyLengthFactory, - \Magento\Url\Validator $urlValidator, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLengthFactory $keyLengthFactory, + \Magento\Url\Validator $urlValidator, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Integration/Model/Oauth/Nonce.php b/app/code/Magento/Integration/Model/Oauth/Nonce.php index 15fcf0d959ba2..69d84f25309a4 100644 --- a/app/code/Magento/Integration/Model/Oauth/Nonce.php +++ b/app/code/Magento/Integration/Model/Oauth/Nonce.php @@ -46,17 +46,17 @@ class Nonce extends \Magento\Core\Model\AbstractModel protected $_oauthData; /** - * @param \Magento\Integration\Helper\Oauth\Data $oauthData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Integration\Helper\Oauth\Data $oauthData * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Integration\Helper\Oauth\Data $oauthData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Integration\Helper\Oauth\Data $oauthData, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Integration/Model/Oauth/Token.php b/app/code/Magento/Integration/Model/Oauth/Token.php index d5cbe354c0119..f5bf1f6951559 100644 --- a/app/code/Magento/Integration/Model/Oauth/Token.php +++ b/app/code/Magento/Integration/Model/Oauth/Token.php @@ -90,28 +90,29 @@ class Token extends \Magento\Core\Model\AbstractModel protected $_dateTime; /** + * @param \Magento\Core\Model\Context $context + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLengthFactory $keyLengthFactory * @param \Magento\Url\Validator $urlValidator * @param \Magento\Stdlib\DateTime $dateTime * @param \Magento\Integration\Model\Oauth\Consumer\Factory $consumerFactory * @param \Magento\Integration\Helper\Oauth\Data $oauthData * @param \Magento\Oauth\Helper\Oauth $oauthHelper - * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data + * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( + \Magento\Core\Model\Context $context, + \Magento\Core\Model\Registry $registry, \Magento\Integration\Model\Oauth\Consumer\Validator\KeyLengthFactory $keyLengthFactory, \Magento\Url\Validator $urlValidator, \Magento\Stdlib\DateTime $dateTime, \Magento\Integration\Model\Oauth\Consumer\Factory $consumerFactory, \Magento\Integration\Helper\Oauth\Data $oauthData, \Magento\Oauth\Helper\Oauth $oauthHelper, - \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Integration/Model/Resource/Integration.php b/app/code/Magento/Integration/Model/Resource/Integration.php index 9f6671a1b72d7..9fd2fe80c7b83 100644 --- a/app/code/Magento/Integration/Model/Resource/Integration.php +++ b/app/code/Magento/Integration/Model/Resource/Integration.php @@ -21,14 +21,11 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Integration\Model\Resource; /** * Integration resource model - * - * @author Magento Core Team */ -namespace Magento\Integration\Model\Resource; - class Integration extends \Magento\Core\Model\Resource\Db\AbstractDb { /** diff --git a/app/code/Magento/Integration/Model/Resource/Oauth/Consumer.php b/app/code/Magento/Integration/Model/Resource/Oauth/Consumer.php index 21a4937a9d461..57dfef333eafd 100644 --- a/app/code/Magento/Integration/Model/Resource/Oauth/Consumer.php +++ b/app/code/Magento/Integration/Model/Resource/Oauth/Consumer.php @@ -32,10 +32,10 @@ class Consumer extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_dateTime; /** - * @param \Magento\Stdlib\DateTime $dateTime * @param \Magento\App\Resource $resource + * @param \Magento\Stdlib\DateTime $dateTime */ - public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\App\Resource $resource) + public function __construct(\Magento\App\Resource $resource, \Magento\Stdlib\DateTime $dateTime) { $this->_dateTime = $dateTime; parent::__construct($resource); diff --git a/app/code/Magento/Integration/Model/Resource/Oauth/Token.php b/app/code/Magento/Integration/Model/Resource/Oauth/Token.php index 9495ab1e796ae..9463ae100b811 100644 --- a/app/code/Magento/Integration/Model/Resource/Oauth/Token.php +++ b/app/code/Magento/Integration/Model/Resource/Oauth/Token.php @@ -38,10 +38,10 @@ class Token extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_dateTime; /** - * @param \Magento\Stdlib\DateTime $dateTime * @param \Magento\App\Resource $resource + * @param \Magento\Stdlib\DateTime $dateTime */ - public function __construct(\Magento\Stdlib\DateTime $dateTime, \Magento\App\Resource $resource) + public function __construct(\Magento\App\Resource $resource, \Magento\Stdlib\DateTime $dateTime) { $this->_dateTime = $dateTime; parent::__construct($resource); diff --git a/app/code/Magento/Integration/Model/Resource/Setup.php b/app/code/Magento/Integration/Model/Resource/Setup.php new file mode 100644 index 0000000000000..c7f5591334dbf --- /dev/null +++ b/app/code/Magento/Integration/Model/Resource/Setup.php @@ -0,0 +1,69 @@ +_integrationManager = $integrationManager; + parent::__construct($context, $resourceName, $moduleName, $connectionName); + } + + /** + * Initiate integration processing + * + * @param array $integrationNames + * @return array of integration names sent to the next invocation + */ + public function initIntegrationProcessing(array $integrationNames) + { + $this->_integrationManager->processIntegrationConfig($integrationNames); + return $integrationNames; + } +} diff --git a/app/code/Magento/Integration/Service/IntegrationV1.php b/app/code/Magento/Integration/Service/IntegrationV1.php index 3f57375bb723d..49d3f16b533c6 100644 --- a/app/code/Magento/Integration/Service/IntegrationV1.php +++ b/app/code/Magento/Integration/Service/IntegrationV1.php @@ -23,45 +23,59 @@ */ namespace Magento\Integration\Service; +use Magento\Authz\Model\UserIdentifier; +use Magento\Authz\Service\AuthorizationV1Interface as AuthorizationInterface; +use Magento\Integration\Model\Integration\Factory as IntegrationFactory; +use Magento\Authz\Model\UserIdentifier\Factory as UserIdentifierFactory; +use Magento\Integration\Model\Integration as IntegrationModel; + /** * Integration Service. + * * This service is used to interact with integrations. */ class IntegrationV1 implements \Magento\Integration\Service\IntegrationV1Interface { - /** @var \Magento\Integration\Model\Integration\Factory $_integrationFactory */ - private $_integrationFactory; + /** @var IntegrationFactory */ + protected $_integrationFactory; + + /** @var AuthorizationInterface */ + protected $_authzService; + + /** @var UserIdentifierFactory */ + protected $_userIdentifierFactory; /** - * @param \Magento\Integration\Model\Integration\Factory $integrationFactory + * Construct and initialize Integration Factory + * + * @param IntegrationFactory $integrationFactory + * @param AuthorizationInterface $authzService + * @param UserIdentifierFactory $userIdentifierFactory */ - public function __construct(\Magento\Integration\Model\Integration\Factory $integrationFactory) - { + public function __construct( + IntegrationFactory $integrationFactory, + AuthorizationInterface $authzService, + UserIdentifierFactory $userIdentifierFactory + ) { $this->_integrationFactory = $integrationFactory; + $this->_authzService = $authzService; + $this->_userIdentifierFactory = $userIdentifierFactory; } /** - * Create a new Integration - * - * @param array $integrationData - * @return array Integration data - * @throws \Magento\Integration\Exception + * {@inheritdoc} */ public function create(array $integrationData) { $this->_checkIntegrationByName($integrationData['name']); $integration = $this->_integrationFactory->create($integrationData); - $this->_validateIntegration($integration); $integration->save(); + $this->_saveApiPermissions($integration); return $integration->getData(); } /** - * Update an Integration. - * - * @param array $integrationData - * @return array Integration data - * @throws \Magento\Integration\Exception + * {@inheritdoc} */ public function update(array $integrationData) { @@ -71,39 +85,34 @@ public function update(array $integrationData) $this->_checkIntegrationByName($integrationData['name']); } $integration->addData($integrationData); - $this->_validateIntegration($integration); $integration->save(); + $this->_saveApiPermissions($integration); return $integration->getData(); } /** - * Get the details of a specific Integration. - * - * @param int $integrationId - * @return array Integration data - * @throws \Magento\Integration\Exception + * {@inheritdoc} */ public function get($integrationId) { $integration = $this->_loadIntegrationById($integrationId); + $this->_addAllowedResources($integration); return $integration->getData(); } /** - * Validate an integration - * - * @param \Magento\Integration\Model\Integration $integration - * @throws \Magento\Integration\Exception + * {@inheritdoc} */ - private function _validateIntegration(\Magento\Integration\Model\Integration $integration) + public function findByName($name) { - if ($integration->getAuthentication() == \Magento\Integration\Model\Integration::AUTHENTICATION_OAUTH - && !$integration->getEndpoint() - ) { - throw new \Magento\Integration\Exception(__('Please enter endpoint for oAuth.')); + if (!isset($name) || trim($name) === '') { + return null; } + $integration = $this->_integrationFactory->create()->load($name, 'name'); + return $integration->getData(); } + /** * Check if an integration exists by the name * @@ -122,7 +131,7 @@ private function _checkIntegrationByName($name) * Load integration by id. * * @param int $integrationId - * @return \Magento\Integration\Model\Integration + * @return IntegrationModel * @throws \Magento\Integration\Exception */ protected function _loadIntegrationById($integrationId) @@ -133,4 +142,54 @@ protected function _loadIntegrationById($integrationId) } return $integration; } + + /** + * Persist API permissions. + * + * Permissions are expected to be set to integration object by 'resource' key. + * If 'all_resources' is set and is evaluated to true, permissions to all resources will be granted. + * + * @param IntegrationModel $integration + */ + protected function _saveApiPermissions(IntegrationModel $integration) + { + if ($integration->getId()) { + $userIdentifier = $this->_createUserIdentifier($integration->getId()); + if ($integration->getData('all_resources')) { + $this->_authzService->grantAllPermissions($userIdentifier); + } else if (is_array($integration->getData('resource'))) { + $this->_authzService->grantPermissions($userIdentifier, $integration->getData('resource')); + } else { + $this->_authzService->grantPermissions($userIdentifier, array()); + } + } + } + + /** + * Add the list of allowed resources to the integration object data by 'resource' key. + * + * @param IntegrationModel $integration + */ + protected function _addAllowedResources(IntegrationModel $integration) + { + if ($integration->getId()) { + $userIdentifier = $this->_createUserIdentifier($integration->getId()); + $integration->setData('resource', $this->_authzService->getAllowedResources($userIdentifier)); + } + } + + /** + * Instantiate new user identifier for an integration. + * + * @param int $integrationId + * @return UserIdentifier + */ + protected function _createUserIdentifier($integrationId) + { + $userIdentifier = $this->_userIdentifierFactory->create( + UserIdentifier::USER_TYPE_INTEGRATION, + (int)$integrationId + ); + return $userIdentifier; + } } diff --git a/app/code/Magento/Integration/Service/IntegrationV1Interface.php b/app/code/Magento/Integration/Service/IntegrationV1Interface.php index ecc31daa21454..75a8b4e6bd56e 100644 --- a/app/code/Magento/Integration/Service/IntegrationV1Interface.php +++ b/app/code/Magento/Integration/Service/IntegrationV1Interface.php @@ -47,6 +47,15 @@ public function create(array $integrationData); */ public function get($integrationId); + /** + * Find Integration by name. + * + * @param int $integrationName + * @return array|null Integration data or null if not found + * @throws \Magento\Integration\Exception + */ + public function findByName($integrationName); + /** * Update a Integration. diff --git a/app/code/Magento/Integration/etc/cache.xml b/app/code/Magento/Integration/etc/cache.xml new file mode 100644 index 0000000000000..a2d8b29b6a613 --- /dev/null +++ b/app/code/Magento/Integration/etc/cache.xml @@ -0,0 +1,31 @@ + + + + + + Integration configuration file. + + diff --git a/app/code/Magento/Integration/etc/integration/config.xsd b/app/code/Magento/Integration/etc/integration/config.xsd index 5950721c7d8d5..1381c44c4af96 100644 --- a/app/code/Magento/Integration/etc/integration/config.xsd +++ b/app/code/Magento/Integration/etc/integration/config.xsd @@ -34,24 +34,11 @@ - - - - - - - - + - - - - - - @@ -67,9 +54,4 @@ - - - - - diff --git a/app/code/Magento/Integration/etc/module.xml b/app/code/Magento/Integration/etc/module.xml index a064c18a09c5f..f4b9ad3d881cf 100755 --- a/app/code/Magento/Integration/etc/module.xml +++ b/app/code/Magento/Integration/etc/module.xml @@ -24,7 +24,7 @@ */ --> - + 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 5159af92dee65..ddada3104dbd8 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 @@ -237,23 +237,11 @@ ), 'Email address of the contact person' ) - ->addColumn( - 'authentication', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, - null, - array( - 'unsigned' => true, - 'nullable' => false - ), - 'Authentication mechanism' - ) ->addColumn( 'endpoint', \Magento\DB\Ddl\Table::TYPE_TEXT, 255, - array( - 'nullable' => false, - ), + array(), 'Endpoint for Oauth handshake' ) ->addColumn( @@ -266,6 +254,15 @@ ), 'Integration status' ) + ->addColumn( + 'consumer_id', + \Magento\DB\Ddl\Table::TYPE_INTEGER, + null, + array( + 'unsigned' => true + ), + 'Oauth consumer' + ) ->addColumn( 'created_at', \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, @@ -282,13 +279,29 @@ ) ->addIndex( $installer->getIdxName( - 'integration', + $installer->getTable('integration'), array('name'), \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('name'), array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) - ); + ) + ->addIndex( + $installer->getIdxName( + $installer->getTable('integration'), + array('consumer_id'), + \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + ), + array('consumer_id'), + array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE)) + ->addForeignKey( + $installer->getFkName('integration', 'consumer_id', $installer->getTable('oauth_consumer'), 'entity_id'), + 'consumer_id', + $installer->getTable('oauth_consumer'), + 'entity_id', + \Magento\DB\Ddl\Table::ACTION_CASCADE, + \Magento\DB\Ddl\Table::ACTION_CASCADE); + $installer->getConnection()->createTable($table); $installer->endSetup(); 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 new file mode 100644 index 0000000000000..c106a33b75651 --- /dev/null +++ b/app/code/Magento/Integration/sql/integration_setup/upgrade-1.0.0.0-1.0.0.1.php @@ -0,0 +1,39 @@ +getConnection()->addColumn( + $installer->getTable('integration'), + 'setup_type', + array( + 'type' => \Magento\DB\Ddl\Table::TYPE_SMALLINT, + 'unsigned' => true, + 'nullable' => false, + 'default' => 0, + 'comment' => 'Integration type - manual or config file' + ) +); diff --git a/app/code/Magento/Integration/view/adminhtml/integration.css b/app/code/Magento/Integration/view/adminhtml/integration.css new file mode 100644 index 0000000000000..f303d5503fb1c --- /dev/null +++ b/app/code/Magento/Integration/view/adminhtml/integration.css @@ -0,0 +1,91 @@ +/** + * 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) 2013 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +#integrationGrid_table .col-name { + width: 60%; +} + +#integrationGrid_table .col-status, +#integrationGrid_table .col-reauthorize, +#integrationGrid_table .col-authorize { + width: 12%; +} + +#integrationGrid_table .col-delete, +#integrationGrid_table .col-edit { + width: 2%; +} + +#integration-popup-container #resource-tree { + max-height: 170px; + overflow: auto; +} + +#integrationGrid_table .action { + border: none; + border-radius: 0; + background: none; + margin: 0; + padding: 0; + box-shadow: none; + text-shadow: none; + filter: none; +} +#integrationGrid_table .action:before { + font-family: 'MUI-Icons'; + font-style: normal; + speak: none; + font-weight: normal; + font-size: 18px; + -webkit-font-smoothing: antialiased; + color: #b7b3ad; +} +#integrationGrid_table .action:hover:before { + color: #7e7e7e; +} + +#integrationGrid_table .action.edit:before { + content: '\e05b'; +} + +#integrationGrid_table .action.delete:before { + content: '\e07f'; +} + +#integrationGrid_table .action[disabled] { + color: #bbb3b4; + cursor: not-allowed; + opacity: 0.6; +} + +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: none; +} + +.ui-dialog .ui-dialog-buttonpane { + text-align: right; +} + +#integration_token_base_fieldset input[readonly] { + cursor: copy; +} diff --git a/app/code/Magento/Page/view/frontend/link/current.phtml b/app/code/Magento/Integration/view/adminhtml/integration/activate/permissions.phtml similarity index 64% rename from app/code/Magento/Page/view/frontend/link/current.phtml rename to app/code/Magento/Integration/view/adminhtml/integration/activate/permissions.phtml index d8e6268840b44..d99d82572ed4b 100644 --- a/app/code/Magento/Page/view/frontend/link/current.phtml +++ b/app/code/Magento/Integration/view/adminhtml/integration/activate/permissions.phtml @@ -1,5 +1,7 @@ -isCurrent()):?> - - - - +

+
+ getChildHtml('tabs'); ?> +
+
diff --git a/app/code/Magento/Integration/view/adminhtml/integration/popup_container.phtml b/app/code/Magento/Integration/view/adminhtml/integration/popup_container.phtml new file mode 100644 index 0000000000000..59fc19b33e690 --- /dev/null +++ b/app/code/Magento/Integration/view/adminhtml/integration/popup_container.phtml @@ -0,0 +1,37 @@ + + + diff --git a/app/code/Magento/Integration/view/adminhtml/js/integration.js b/app/code/Magento/Integration/view/adminhtml/js/integration.js index a25c3c222d9b2..6e4e805e34f28 100644 --- a/app/code/Magento/Integration/view/adminhtml/js/integration.js +++ b/app/code/Magento/Integration/view/adminhtml/js/integration.js @@ -21,57 +21,118 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /*jshint jquery:true*/ -(function($) { - "use strict"; - $.widget('mage.integration', { - options: { - authType: null, // Auth type : Manual or Oauth - formSelector: null, - endpointIdSelector: null, - endpointContainerClassSelector: null, - requiredClass: 'required-entry' - }, +/*global FORM_KEY*/ +/*global integration*/ +(function($, window) { + window.Integration = function (permissionsDialogUrl, tokensDialogUrl, deactivateDialogUrl, reauthorizeDialogUrl) { + var url = { + permissions: permissionsDialogUrl, + tokens: tokensDialogUrl, + deactivate: deactivateDialogUrl, + reauthorize: reauthorizeDialogUrl + }; - /** - * Initialize integration widget - * @private - */ - _init: function() { - this._toggleEndpoint(); - }, + var _showPopup = function (dialog, title, okButton, url) { + var that = this; - /** - * Bind a click handler to the widget's context element. - * @private - */ - _create: function() { - this._on({ - change: '_toggleEndpoint' - }); - this._on($(this.options.formSelector), { - submit: '_resetEndpoint' - }); - }, + $.ajax({ + url: url, + cache: false, + dataType: 'html', + data: {form_key: window.FORM_KEY}, + method: 'GET', + beforeSend: function () { + // Show the spinner + $('body').trigger('processStart'); + }, + success: function (html) { + var popup = $('#integration-popup-container'); - /** - * Toggle the visibility of the endpoint field based on Auth thype selected - * @private - */ - _toggleEndpoint: function() { - var isOauth = parseInt(this.element.val()) === this.options.authType; - $(this.options.endpointContainerClassSelector).children().toggle(isOauth); - $(this.options.endpointIdSelector).toggleClass(this.options.requiredClass, isOauth); - }, + popup.html(html); - /** - * Reset endpoint field if the Authentication type is not Oauth - * - * @private - */ - _resetEndpoint: function() { - if (parseInt(this.element.val()) !== this.options.authType) { - $(this.options.endpointIdSelector).val(''); + var buttons = [{ + text: $.mage.__('Cancel'), + click: function() { + $(this).dialog('destroy'); + } + }]; + + // Add confirmation button to the list of dialog buttons + buttons.push(okButton); + + popup.dialog({ + title: title, + modal: true, + autoOpen: true, + minHeight: 450, + minWidth: 600, + dialogClass: 'integration-dialog', + position: {at: 'center'}, + buttons: buttons + }); + }, + complete: function () { + // Hide the spinner + $('body').trigger('processStop'); + } + }) + }; + + return { + popup: { + show: function (ctx) { + var dialog = $(ctx).attr('data-row-dialog'); + + if (['permissions', 'deactivate', 'reauthorize', 'tokens'].indexOf(dialog) === -1) { + throw 'Invalid dialog type'; + } + + var integrationId = $(ctx).attr('data-row-id'); + + if (!integrationId) { + throw 'Unable to find integration ID'; + } + + // Replace placeholder in URL with actual ID + var ajaxUrl = url[dialog].replace(':id', integrationId); + + try { + // Get integration name either from current element or from neighbor column + var integrationName = $(ctx).attr('data-row-name') + || $(ctx).parents('tr').find('.col-name').html().trim(); + } catch (e) { + throw 'Unable to find integration name'; + } + + var okButton = { + permissions: { + text: $.mage.__('Allow'), + 'class': 'primary', + // This data is going to be used in the next dialog + 'data-row-id': integrationId, + 'data-row-name': integrationName, + 'data-row-dialog': 'tokens', + click: function () { + // Find the 'Allow' button and clone - it has all necessary data, but is going to be + // destroyed along with the current dialog + var ctx = $(this).parent().find('button.primary').clone(true); + $(this).dialog('destroy'); + // Make popup out of data we saved from 'Allow' button + window.integration.popup.show(ctx); + } + }, + tokens: { + text: $.mage.__('Activate'), + 'class': 'primary', + click: function () { + alert('Not implemented'); + } + } + }; + + _showPopup(dialog, integrationName, okButton[dialog], ajaxUrl); + } } - } - }); -})(jQuery); \ No newline at end of file + }; + }; +})(jQuery, window); diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_permissions_popup.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_permissions_popup.xml new file mode 100644 index 0000000000000..ad4945eacb627 --- /dev/null +++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_permissions_popup.xml @@ -0,0 +1,32 @@ + + + + + + + diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_tokens_popup.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_tokens_popup.xml new file mode 100644 index 0000000000000..e06c57704e8b9 --- /dev/null +++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_activate_tokens_popup.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml index d31f920053486..65c4a96273902 100644 --- a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml +++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_edit.xml @@ -24,13 +24,6 @@ */ --> - - - - Magento_Integration::js/integration.js - - - diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml index 32c982c2dae7f..bc2a4f7d68ec5 100644 --- a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml +++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_grid_block.xml @@ -27,7 +27,7 @@ --> - + integrationGrid \Magento\Integration\Model\Resource\Integration\Collection @@ -41,10 +41,7 @@ - */*/edit - - getId - + No Integrations Found @@ -61,11 +58,48 @@ Status options - 50px status status + + + Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer\Link\Reauthorize + reauthorize + reauthorize + 0 + 0 + + + + + Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer\Link\Activate + activate + activate + 0 + 0 + + + + + Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer\Button\Edit + action edit + edit + edit + 0 + 0 + + + + + Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer\Button\Delete + action delete + delete + delete + 0 + 0 + + diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml index b66612e929e63..718ae1d6e803d 100644 --- a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml +++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_index.xml @@ -26,6 +26,21 @@ */ --> + + + + Magento_Integration::integration.css + + + + + Magento_Integration::js/integration.js + + + + + + diff --git a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.xml b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.xml index f4ea556b8eccc..dadd55f1a451a 100644 --- a/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.xml +++ b/app/code/Magento/Integration/view/adminhtml/layout/adminhtml_integration_new.xml @@ -25,11 +25,4 @@ --> - - - - Magento_Integration::js/integration.js - - - diff --git a/app/code/Magento/Log/Model/Aggregation.php b/app/code/Magento/Log/Model/Aggregation.php index 4432918d76f3d..ff87155c8f151 100644 --- a/app/code/Magento/Log/Model/Aggregation.php +++ b/app/code/Magento/Log/Model/Aggregation.php @@ -51,17 +51,17 @@ class Aggregation extends \Magento\Core\Model\AbstractModel protected $_storeManager; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Log/Model/Cron.php b/app/code/Magento/Log/Model/Cron.php index d94d838949aed..06c1765f3a1d9 100644 --- a/app/code/Magento/Log/Model/Cron.php +++ b/app/code/Magento/Log/Model/Cron.php @@ -76,24 +76,24 @@ class Cron extends \Magento\Core\Model\AbstractModel protected $_templateFactory; /** + * @param \Magento\Core\Model\Context $context + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Email\Model\TemplateFactory $templateFactory * @param \Magento\Log\Model\Log $log * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Translate $translate - * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( + \Magento\Core\Model\Context $context, + \Magento\Core\Model\Registry $registry, \Magento\Email\Model\TemplateFactory $templateFactory, \Magento\Log\Model\Log $log, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Translate $translate, - \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $registry, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Log/Model/Resource/Log.php b/app/code/Magento/Log/Model/Resource/Log.php index 4a09bf99a4b4b..e8b0d357535cd 100644 --- a/app/code/Magento/Log/Model/Resource/Log.php +++ b/app/code/Magento/Log/Model/Resource/Log.php @@ -54,16 +54,16 @@ class Log extends \Magento\Core\Model\Resource\Db\AbstractDb protected $dateTime; /** + * @param \Magento\App\Resource $resource * @param \Magento\Core\Model\Date $date * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Stdlib\DateTime $dateTime - * @param \Magento\App\Resource $resource */ public function __construct( + \Magento\App\Resource $resource, \Magento\Core\Model\Date $date, \Magento\Event\ManagerInterface $eventManager, - \Magento\Stdlib\DateTime $dateTime, - \Magento\App\Resource $resource + \Magento\Stdlib\DateTime $dateTime ) { $this->_date = $date; $this->_eventManager = $eventManager; diff --git a/app/code/Magento/Log/Model/Resource/Visitor.php b/app/code/Magento/Log/Model/Resource/Visitor.php index dceb0cd97edd1..53966211ae24f 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor.php +++ b/app/code/Magento/Log/Model/Resource/Visitor.php @@ -49,16 +49,16 @@ class Visitor extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_storeManager; /** + * @param \Magento\App\Resource $resource * @param \Magento\Core\Model\Date $date * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Stdlib\String $string - * @param \Magento\App\Resource $resource */ public function __construct( + \Magento\App\Resource $resource, \Magento\Core\Model\Date $date, \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Stdlib\String $string, - \Magento\App\Resource $resource + \Magento\Stdlib\String $string ) { $this->_date = $date; $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online.php b/app/code/Magento/Log/Model/Resource/Visitor/Online.php index 2978812ff2b46..265654db0e6ce 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Online.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Online.php @@ -42,13 +42,11 @@ class Online extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_date; /** - * @param \Magento\Core\Model\Date $date * @param \Magento\App\Resource $resource + * @param \Magento\Core\Model\Date $date */ - public function __construct( - \Magento\Core\Model\Date $date, - \Magento\App\Resource $resource - ) { + public function __construct(\Magento\App\Resource $resource, \Magento\Core\Model\Date $date) + { $this->_date = $date; parent::__construct($resource); } diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php b/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php index 8e16d8a6343fd..8920aa07e32ef 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Online/Collection.php @@ -49,23 +49,25 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_customerFactory; /** - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, + \Magento\Customer\Model\CustomerFactory $customerFactory, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_customerFactory = $customerFactory; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); } /** diff --git a/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php b/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php index e2db507913dfb..6aa27621535ee 100644 --- a/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php +++ b/app/code/Magento/Log/Model/Resource/Visitor/Online/Grid/Collection.php @@ -33,25 +33,35 @@ class Collection extends \Magento\Log\Model\Resource\Visitor\Online\Collection protected $_onlineFactory; /** - * @param \Magento\Log\Model\Visitor\OnlineFactory $onlineFactory - * @param \Magento\Customer\Model\CustomerFactory $customerFactory - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param \Magento\Log\Model\Visitor\OnlineFactory $onlineFactory + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Log\Model\Visitor\OnlineFactory $onlineFactory, - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, + \Magento\Customer\Model\CustomerFactory $customerFactory, + \Magento\Log\Model\Visitor\OnlineFactory $onlineFactory, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { $this->_onlineFactory = $onlineFactory; - parent::__construct($customerFactory, $eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct( + $entityFactory, + $logger, + $fetchStrategy, + $eventManager, + $customerFactory, + $connection, + $resource + ); } /** diff --git a/app/code/Magento/Log/Model/Visitor.php b/app/code/Magento/Log/Model/Visitor.php index 9e4deb50052b9..701c8a915429a 100644 --- a/app/code/Magento/Log/Model/Visitor.php +++ b/app/code/Magento/Log/Model/Visitor.php @@ -126,13 +126,11 @@ class Visitor extends \Magento\Core\Model\AbstractModel * @param \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress * @param \Magento\HTTP\PhpEnvironment\ServerAddress $serverAddress * @param \Magento\Stdlib\DateTime $dateTime - * @param array $data - * @param array $ignoredUserAgents - * @param array $ignores * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @param array $ignoredUserAgents + * @param array $ignores + * @param array $data */ public function __construct( \Magento\Core\Model\Context $context, @@ -147,11 +145,11 @@ public function __construct( \Magento\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, \Magento\HTTP\PhpEnvironment\ServerAddress $serverAddress, \Magento\Stdlib\DateTime $dateTime, - array $data = array(), + \Magento\Core\Model\Resource\AbstractResource $resource = null, + \Magento\Data\Collection\Db $resourceCollection = null, array $ignoredUserAgents = array(), array $ignores = array(), - \Magento\Core\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null + array $data = array() ) { $this->_coreStoreConfig = $coreStoreConfig; $this->_customerFactory = $customerFactory; diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php index 15256a4debb3a..cba4e53d63612 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php @@ -43,20 +43,18 @@ class Problem extends \Magento\Backend\Block\Template */ protected $_problemCollection; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Newsletter\Model\Resource\Problem\Collection $problemCollection, + array $data = array() + ) { $this->_problemCollection = $problemCollection; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _construct() diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php index acdd2df811a5e..0f85f9b8944a1 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -45,23 +45,21 @@ class Edit extends \Magento\Backend\Block\Template */ protected $_wysiwygConfig; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _construct() diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php index 349353454346b..c90e96674456f 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php @@ -51,30 +51,28 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_queueFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Newsletter\Model\QueueFactory $queueFactory - * @param \Magento\Core\Model\System\Store $systemStore - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Newsletter\Model\QueueFactory $queueFactory + * @param \Magento\Core\Model\System\Store $systemStore + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Newsletter\Model\QueueFactory $queueFactory, - \Magento\Core\Model\System\Store $systemStore, - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Newsletter\Model\QueueFactory $queueFactory, + \Magento\Core\Model\System\Store $systemStore, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; $this->_systemStore = $systemStore; $this->_queueFactory = $queueFactory; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php index 58d240b988738..ecc6068997bc7 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php @@ -50,26 +50,24 @@ class Preview extends \Magento\Adminhtml\Block\Widget */ protected $_subscriberFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory - * @param \Magento\Newsletter\Model\QueueFactory $queueFactory - * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory + * @param \Magento\Newsletter\Model\QueueFactory $queueFactory + * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Newsletter\Model\TemplateFactory $templateFactory, - \Magento\Newsletter\Model\QueueFactory $queueFactory, - \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Newsletter\Model\TemplateFactory $templateFactory, + \Magento\Newsletter\Model\QueueFactory $queueFactory, + \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, + array $data = array() + ) { $this->_templateFactory = $templateFactory; $this->_queueFactory = $queueFactory; $this->_subscriberFactory = $subscriberFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _toHtml() diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php index 6ec289fd7c6c8..de3148d60decb 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php @@ -50,20 +50,18 @@ class Subscriber extends \Magento\Backend\Block\Template */ protected $_collectionFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Newsletter\Model\Resource\Queue\CollectionFactory $collectionFactory, + array $data = array() + ) { $this->_collectionFactory = $collectionFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid.php index db184b5912e55..f6f9f93c9713a 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid.php @@ -40,22 +40,20 @@ class Grid extends \Magento\Backend\Block\Widget\Grid */ protected $_queueFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Newsletter\Model\QueueFactory $queueFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Newsletter\Model\QueueFactory $queueFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\Newsletter\Model\QueueFactory $queueFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Newsletter\Model\QueueFactory $queueFactory, + array $data = array() + ) { $this->_queueFactory = $queueFactory; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); } /** diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php index ee139ca5be6e9..9c29f3623bb6f 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php @@ -51,22 +51,22 @@ class Website */ protected $_websitesFactory; - /** - * @param \Magento\Backend\Block\Context $context - * @param \Magento\Core\Model\Resource\Helper $resourceHelper - * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory - * @param \Magento\Core\Model\StoreManagerInterface $storeManager - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Context $context + * @param \Magento\Core\Model\Resource\Helper $resourceHelper + * @param \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory + * @param \Magento\Core\Model\StoreManagerInterface $storeManager + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Context $context, - \Magento\Core\Model\Resource\Helper $resourceHelper, - \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory, - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Context $context, + \Magento\Core\Model\Resource\Helper $resourceHelper, + \Magento\Core\Model\Resource\Website\CollectionFactory $websitesFactory, + \Magento\Core\Model\StoreManagerInterface $storeManager, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_storeManager = $storeManager; $this->_websitesFactory = $websitesFactory; diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php index 713c2d132cf6e..ee4a5631bb131 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php @@ -54,23 +54,21 @@ class Edit extends \Magento\Adminhtml\Block\Widget */ protected $_wysiwygConfig; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php index f0a77f8b77d72..a5ec8f0576c4b 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit/Form.php @@ -41,24 +41,22 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_wysiwygConfig; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, + array $data = array() + ) { $this->_wysiwygConfig = $wysiwygConfig; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid.php index a9d911787ce83..f2ddc03b6ee75 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid.php @@ -40,22 +40,20 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended */ protected $_templateCollection; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Url $urlModel - * @param \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Url $urlModel + * @param \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Url $urlModel, - \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Url $urlModel, + \Magento\Newsletter\Model\Resource\Template\Collection $templateCollection, + array $data = array() + ) { $this->_templateCollection = $templateCollection; - parent::__construct($context, $coreData, $urlModel, $data); + parent::__construct($context, $urlModel, $data); $this->setEmptyText(__('No Templates Found')); } diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php index 745ae4d6a8619..90b906a662191 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php @@ -45,23 +45,21 @@ class Preview extends \Magento\Adminhtml\Block\Widget */ protected $_subscriberFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory - * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory + * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Newsletter\Model\TemplateFactory $templateFactory, - \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Newsletter\Model\TemplateFactory $templateFactory, + \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, + array $data = array() + ) { $this->_templateFactory = $templateFactory; $this->_subscriberFactory = $subscriberFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } protected function _toHtml() diff --git a/app/code/Magento/Newsletter/Block/Subscribe.php b/app/code/Magento/Newsletter/Block/Subscribe.php index 146ffc73aa148..3a055f7c1cd35 100644 --- a/app/code/Magento/Newsletter/Block/Subscribe.php +++ b/app/code/Magento/Newsletter/Block/Subscribe.php @@ -34,7 +34,7 @@ namespace Magento\Newsletter\Block; -class Subscribe extends \Magento\View\Block\Template +class Subscribe extends \Magento\View\Element\Template { /** * Newsletter session @@ -44,18 +44,16 @@ class Subscribe extends \Magento\View\Block\Template protected $_newsletterSession; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Newsletter\Model\Session $newsletterSession * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Newsletter\Model\Session $newsletterSession, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->_newsletterSession = $newsletterSession; } diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Problem.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Problem.php index b6b32228ad0e8..389881968ba7f 100644 --- a/app/code/Magento/Newsletter/Controller/Adminhtml/Problem.php +++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Problem.php @@ -24,15 +24,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Newsletter\Controller\Adminhtml; + /** * Newsletter subscribers controller - * - * @category Magento - * @package Magento_Newsletter - * @author Magento Core Team */ -namespace Magento\Newsletter\Controller\Adminhtml; - class Problem extends \Magento\Backend\App\Action { public function indexAction() @@ -58,9 +54,9 @@ public function indexAction() public function gridAction() { - if($this->getRequest()->getParam('_unsubscribe')) { + if ($this->getRequest()->getParam('_unsubscribe')) { $problems = (array) $this->getRequest()->getParam('problem', array()); - if (count($problems)>0) { + if (count($problems) > 0) { $collection = $this->_objectManager->create('Magento\Newsletter\Model\Resource\Problem\Collection'); $collection ->addSubscriberInfo() @@ -75,13 +71,14 @@ public function gridAction() ->addSuccess(__('We unsubscribed the people you identified.')); } - if($this->getRequest()->getParam('_delete')) { + if ($this->getRequest()->getParam('_delete')) { $problems = (array) $this->getRequest()->getParam('problem', array()); - if (count($problems)>0) { + if (count($problems) > 0) { $collection = $this->_objectManager->create('Magento\Newsletter\Model\Resource\Problem\Collection'); - $collection - ->addFieldToFilter($collection->getResource()->getIdFieldName(), - array('in'=>$problems)) + $collection->addFieldToFilter( + $collection->getResource()->getIdFieldName(), + array('in' => $problems) + ) ->load(); $collection->walk('delete'); } @@ -89,7 +86,9 @@ public function gridAction() $this->_objectManager->get('Magento\Adminhtml\Model\Session') ->addSuccess(__('The problems you identified have been deleted.')); } - $this->_view->getLayout()->getMessagesBlock()->setMessages($this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true)); + $this->_view->getLayout()->getMessagesBlock()->setMessages( + $this->_objectManager->get('Magento\Adminhtml\Model\Session')->getMessages(true) + ); $this->_view->loadLayout(false); $this->_view->renderLayout(); diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php index 42760efec49fe..35a9ca2a0c798 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -137,10 +137,8 @@ class Queue extends \Magento\Core\Model\Template protected $_templateFactory; /** - * Construct - * - * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Context $context + * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\App\Emulation $appEmulation * @param \Magento\Core\Model\StoreManagerInterface $storeManager @@ -154,8 +152,8 @@ class Queue extends \Magento\Core\Model\Template * @param array $data */ public function __construct( - \Magento\View\DesignInterface $design, \Magento\Core\Model\Context $context, + \Magento\View\DesignInterface $design, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\App\Emulation $appEmulation, \Magento\Core\Model\StoreManagerInterface $storeManager, @@ -168,7 +166,7 @@ public function __construct( \Magento\Newsletter\Model\Resource\Subscriber\CollectionFactory $subscriberCollectionFactory, array $data = array() ) { - parent::__construct($design, $context, $registry, $appEmulation, $storeManager, $data); + parent::__construct($context, $design, $registry, $appEmulation, $storeManager, $data); $this->_templateFilter = $templateFilter; $this->_date = $date; $this->_locale = $locale; diff --git a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php index cfecd07e597a2..908260980b263 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php @@ -55,24 +55,24 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_customerCollectionFactory; /** - * Construct - * - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerCollectionFactory + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, \Magento\Customer\Model\Resource\Customer\CollectionFactory $customerCollectionFactory, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_customerCollectionFactory = $customerCollectionFactory; } diff --git a/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php index 9e0a5c342cd57..7a108b5f9a774 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php @@ -58,24 +58,24 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_date; /** - * Construct - * - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Core\Model\Date $date + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, \Magento\Core\Model\Date $date, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_date = $date; } diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php index 31e4589d51466..1e5adbcbb77bf 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php @@ -80,26 +80,26 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_customerFactory; /** - * Construct - * - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Customer\Model\CustomerFactory $customerFactory + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, \Magento\Customer\Model\CustomerFactory $customerFactory, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { // _customerFactory is used in parent class constructor $this->_customerFactory = $customerFactory; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); } /** diff --git a/app/code/Magento/Newsletter/Model/Resource/Template.php b/app/code/Magento/Newsletter/Model/Resource/Template.php index 4499857d0b0b7..31469b3c14fb6 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Template.php +++ b/app/code/Magento/Newsletter/Model/Resource/Template.php @@ -44,15 +44,11 @@ class Template extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_date; /** - * Construct - * * @param \Magento\App\Resource $resource * @param \Magento\Core\Model\Date $date */ - public function __construct( - \Magento\Core\Model\Date $date, - \Magento\App\Resource $resource - ) { + public function __construct(\Magento\App\Resource $resource, \Magento\Core\Model\Date $date) + { parent::__construct($resource); $this->_date = $date; } diff --git a/app/code/Magento/Newsletter/Model/Session.php b/app/code/Magento/Newsletter/Model/Session.php index 4cc5ebbecc379..fc51c6bed0a0d 100644 --- a/app/code/Magento/Newsletter/Model/Session.php +++ b/app/code/Magento/Newsletter/Model/Session.php @@ -38,16 +38,20 @@ class Session extends \Magento\Core\Model\Session\AbstractSession { /** * @param \Magento\Core\Model\Session\Context $context + * @param \Magento\Session\SidResolverInterface $sidResolver + * @param \Magento\Session\Config\ConfigInterface $sessionConfig * @param array $data * @param null $sessionName */ public function __construct( \Magento\Core\Model\Session\Context $context, + \Magento\Session\SidResolverInterface $sidResolver, + \Magento\Session\Config\ConfigInterface $sessionConfig, array $data = array(), $sessionName = null ) { - parent::__construct($context, $data); - $this->init('newsletter', $sessionName); + parent::__construct($context, $sidResolver, $sessionConfig, $data); + $this->start('newsletter', $sessionName); } public function addError($message) diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php index bd27e408093de..fc1a2dd88659e 100644 --- a/app/code/Magento/Newsletter/Model/Template.php +++ b/app/code/Magento/Newsletter/Model/Template.php @@ -114,32 +114,32 @@ class Template extends \Magento\Core\Model\Template protected $_filterManager; /** - * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Context $context + * @param \Magento\View\DesignInterface $design * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Core\Model\App\Emulation $appEmulation * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\App\RequestInterface $request * @param \Magento\Newsletter\Model\Template\Filter $filter * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory - * @param \Magento\Core\Model\App\Emulation $appEmulation * @param \Magento\Filter\FilterManager $filterManager * @param array $data */ public function __construct( - \Magento\View\DesignInterface $design, \Magento\Core\Model\Context $context, + \Magento\View\DesignInterface $design, \Magento\Core\Model\Registry $registry, + \Magento\Core\Model\App\Emulation $appEmulation, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\App\RequestInterface $request, \Magento\Newsletter\Model\Template\Filter $filter, \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig, \Magento\Newsletter\Model\TemplateFactory $templateFactory, - \Magento\Core\Model\App\Emulation $appEmulation, \Magento\Filter\FilterManager $filterManager, array $data = array() ) { - parent::__construct($design, $context, $registry, $appEmulation, $storeManager, $data); + parent::__construct($context, $design, $registry, $appEmulation, $storeManager, $data); $this->_storeManager = $storeManager; $this->_request = $request; $this->_filter = $filter; diff --git a/app/code/Magento/Newsletter/etc/module.xml b/app/code/Magento/Newsletter/etc/module.xml index 9e3e41fdad121..e32e58a1ec0f8 100755 --- a/app/code/Magento/Newsletter/etc/module.xml +++ b/app/code/Magento/Newsletter/etc/module.xml @@ -37,7 +37,6 @@ -
diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_edit.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_edit.xml index 516baf9cc90e6..66ca330b77868 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_edit.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_edit.xml @@ -26,22 +26,22 @@ - + jquery/fileUploader/css/jquery.fileupload-ui.css - + jquery/fileUploader/jquery.fileupload.js - + jquery/fileUploader/load-image.min.js - + jquery/fileUploader/jquery.fileupload-fp.js diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml index ceac2a7218715..63dffb21b2f9f 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_edit.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_edit.xml index 2b67f4ce7e5b3..a811ac8b5ac4f 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_edit.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_edit.xml @@ -26,32 +26,32 @@ - + jquery/fileUploader/css/jquery.fileupload-ui.css - + jquery/fileUploader/jquery.iframe-transport.js - + jquery/fileUploader/jquery.fileupload.js - + jquery/fileUploader/load-image.min.js - + jquery/fileUploader/canvas-to-blob.min.js - + jquery/fileUploader/jquery.fileupload-fp.js diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml index e7c0615d8e35b..76e4610715911 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml index 48ec7d0baa002..911f9c400e057 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml b/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml index ebd4622d346b7..b740b9f8b63d0 100644 --- a/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml @@ -25,7 +25,7 @@ --> - + newsletter/manage Newsletter Subscriptions diff --git a/app/code/Magento/Ogone/Block/Paypage.php b/app/code/Magento/Ogone/Block/Paypage.php index 414cf73dbe579..bde8c0d1b4bac 100644 --- a/app/code/Magento/Ogone/Block/Paypage.php +++ b/app/code/Magento/Ogone/Block/Paypage.php @@ -27,7 +27,7 @@ namespace Magento\Ogone\Block; -class Paypage extends \Magento\View\Block\Template +class Paypage extends \Magento\View\Element\Template { protected $_template = 'paypage.phtml'; } diff --git a/app/code/Magento/Ogone/Block/Placeform.php b/app/code/Magento/Ogone/Block/Placeform.php index 5c7885efc9d68..2e3033c964994 100644 --- a/app/code/Magento/Ogone/Block/Placeform.php +++ b/app/code/Magento/Ogone/Block/Placeform.php @@ -26,7 +26,7 @@ namespace Magento\Ogone\Block; -class Placeform extends \Magento\View\Block\Template +class Placeform extends \Magento\View\Element\Template { /** * @var \Magento\Sales\Model\OrderFactory @@ -44,16 +44,14 @@ class Placeform extends \Magento\View\Block\Template protected $_ogoneApi; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Ogone\Model\Api $ogoneApi * @param \Magento\Sales\Model\OrderFactory $salesOrderFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Ogone\Model\Api $ogoneApi, \Magento\Sales\Model\OrderFactory $salesOrderFactory, @@ -62,7 +60,7 @@ public function __construct( $this->_checkoutSession = $checkoutSession; $this->_ogoneApi = $ogoneApi; $this->_salesOrderFactory = $salesOrderFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Ogone/Controller/Api.php b/app/code/Magento/Ogone/Controller/Api.php index e89f40805881d..54bd77aa35f29 100644 --- a/app/code/Magento/Ogone/Controller/Api.php +++ b/app/code/Magento/Ogone/Controller/Api.php @@ -159,7 +159,7 @@ public function placeformAction() $this->_getCheckout()->getQuote()->setIsActive(false)->save(); $this->_getCheckout()->setOgoneQuoteId($this->_getCheckout()->getQuoteId()); $this->_getCheckout()->setOgoneLastSuccessQuoteId($this->_getCheckout()->getLastSuccessQuoteId()); - $this->_getCheckout()->clear(); + $this->_getCheckout()->clearQuote(); $this->_view->loadLayout(); $this->_view->renderLayout(); diff --git a/app/code/Magento/Page/Block/Template/Links/Block.php b/app/code/Magento/Page/Block/Template/Links/Block.php deleted file mode 100644 index 3b9b844e53b62..0000000000000 --- a/app/code/Magento/Page/Block/Template/Links/Block.php +++ /dev/null @@ -1,195 +0,0 @@ - - */ -namespace Magento\Page\Block\Template\Links; - -class Block extends \Magento\View\Block\Template -{ - - /** - * First link flag - * - * @var bool - */ - protected $_isFirst = false; - - /** - * Last link flag - * - * @var bool - */ - protected $_isLast = false; - - /** - * Link label - * - * @var string - */ - protected $_label = null; - - /** - * Link url - * - * @var string - */ - protected $_url = null; - - /** - * Link title - * - * @var string - */ - protected $_title = null; - - /** - * Li elemnt params - * - * @var string - */ - protected $_liPparams = null; - - /** - * A elemnt params - * - * @var string - */ - protected $_aPparams = null; - - /** - * Message before link text - * - * @var string - */ - protected $_beforeText = null; - - /** - * Message after link text - * - * @var string - */ - protected $_afterText = null; - - /** - * Position in link list - * @var int - */ - protected $_position = 0; - - protected $_template = 'Magento_Page::template/linksblock.phtml'; - - /** - * Return link position in link list - * - * @return in - */ - public function getPosition() - { - return $this->_position; - } - - /** - * Return first position flag - * - * @return bool - */ - public function getIsFirst() - { - return $this->_isFirst; - } - - /** - * Set first list flag - * - * @param bool $value - * return \Magento\Page\Block\Template\Links\Block - */ - public function setIsFirst($value) - { - $this->_isFirst = (bool)$value; - return $this; - } - - /** - * Return last position flag - * - * @return bool - */ - public function getIsLast() - { - return $this->_isLast; - } - - /** - * Set last list flag - * - * @param bool $value - * return \Magento\Page\Block\Template\Links\Block - */ - public function setIsLast($value) - { - $this->_isLast = (bool)$value; - return $this; - } - - /** - * Return link label - * - * @return string - */ - public function getLabel() - { - return $this->_label; - } - - /** - * Return link title - * - * @return string - */ - public function getTitle() - { - return $this->_title; - } - - /** - * Return link url - * - * @return string - */ - public function getLinkUrl() - { - return $this->_url; - } - -} diff --git a/app/code/Magento/Page/Helper/Robots.php b/app/code/Magento/Page/Helper/Robots.php deleted file mode 100644 index 3ceaa0738d30b..0000000000000 --- a/app/code/Magento/Page/Helper/Robots.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ -namespace Magento\Page\Helper; - -class Robots extends \Magento\App\Helper\AbstractHelper -{ - const XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS = 'design/search_engine_robots/default_custom_instructions'; - - /** - * @var \Magento\Core\Model\Config - */ - protected $_coreConfig; - - /** - * Constructor - * - * @param \Magento\App\Helper\Context $context - * @param \Magento\Core\Model\Config $coreConfig - */ - public function __construct( - \Magento\App\Helper\Context $context, - \Magento\Core\Model\Config $coreConfig - ) { - parent::__construct( - $context - ); - $this->_coreConfig = $coreConfig; - } - - /** - * Get default value of custom instruction in robots.txt from config - * - * @return string - */ - public function getRobotsDefaultCustomInstructions() - { - return trim((string)$this->_coreConfig->getValue(self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, 'default')); - } -} diff --git a/app/code/Magento/Page/etc/config.xml b/app/code/Magento/Page/etc/config.xml deleted file mode 100644 index ed801ae2e2961..0000000000000 --- a/app/code/Magento/Page/etc/config.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - Magento Commerce - Default Description - Magento, Varien, E-commerce - text/html - utf-8 - - - INDEX,FOLLOW - - - - -
- Magento Commerce - Default welcome msg! -
-
- &copy; 2013 Magento Demo Store. All Rights Reserved. -
-
- - - - favicon - - - -
-
diff --git a/app/code/Magento/Page/etc/di.xml b/app/code/Magento/Page/etc/di.xml deleted file mode 100644 index 7c75b50d25bbf..0000000000000 --- a/app/code/Magento/Page/etc/di.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - page_layouts.xml - - - - - - - - - - - - - - page_layouts_config - - - - - - - - diff --git a/app/code/Magento/Page/view/frontend/js/splitbutton.js b/app/code/Magento/Page/view/frontend/js/splitbutton.js deleted file mode 100644 index 9f2418eb54ebc..0000000000000 --- a/app/code/Magento/Page/view/frontend/js/splitbutton.js +++ /dev/null @@ -1,74 +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. - * - * @category Magento - * @package Magento_Persistent - * @copyright Copyright (c) 2013 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*/ -(function($, undefined) { - "use strict"; - $.widget('mage.splitButton', { - /** - * options with default values - */ - options: { - splitButton: '.split-button', - arrowButton: '.change', - activeClass: 'active' - }, - - /** - * Initialize split button events - * @private - */ - _create: function() { - $(document).on('click', this.options.splitButton + ' > ' + this.options.arrowButton, $.proxy(this._toggleDropDown, this)); - $(document).on('click', $.proxy(this._hideDropDown, this)); - }, - - /** - * Toggle css class for the split button to hide or show drop down menu - * Saves current state of the target. Closes all open drop downs and then - * depending on the stored state the target drop down is toggled. - * @private - * @param {Object} e - */ - _toggleDropDown: function(e) { - var state = $(e.target).closest(this.options.splitButton).hasClass(this.options.activeClass); - this._hideDropDown(); - if (state) { - this._hideDropDown(); - } else { - $(e.target).closest(this.options.splitButton).addClass(this.options.activeClass); - } - return false; - }, - - /** - * Hide all the drop down menus when clicked any where on the page - * @private - */ - _hideDropDown: function() { - $(document).find(this.options.splitButton).removeClass(this.options.activeClass); - } - }); -})(jQuery); diff --git a/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php b/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php index 89e03c5a3daf4..06da984fad2bb 100644 --- a/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php +++ b/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php @@ -42,20 +42,18 @@ class Additional extends \Magento\Backend\Block\Template */ protected $_pageCacheData = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\PageCache\Helper\Data $pageCacheData - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\PageCache\Helper\Data $pageCacheData + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\PageCache\Helper\Data $pageCacheData, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\PageCache\Helper\Data $pageCacheData, + array $data = array() + ) { $this->_pageCacheData = $pageCacheData; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/PageCache/Helper/Data.php b/app/code/Magento/PageCache/Helper/Data.php index 7bc45d76bd1c8..af498dc613172 100644 --- a/app/code/Magento/PageCache/Helper/Data.php +++ b/app/code/Magento/PageCache/Helper/Data.php @@ -64,15 +64,15 @@ class Data extends \Magento\App\Helper\AbstractHelper protected $_coreStoreConfig; /** - * @param \Magento\App\Helper\Context $context + * @param \Magento\App\Helper\Context $context * @param \Magento\PageCache\Model\CacheControlFactory $ccFactory - * @param \Magento\Core\Model\Cookie $cookie - * @param \Magento\Core\Model\Store\Config $coreStoreConfig + * @param \Magento\Stdlib\Cookie $cookie + * @param \Magento\Core\Model\Store\Config $coreStoreConfig */ function __construct( \Magento\App\Helper\Context $context, \Magento\PageCache\Model\CacheControlFactory $ccFactory, - \Magento\Core\Model\Cookie $cookie, + \Magento\Stdlib\Cookie $cookie, \Magento\Core\Model\Store\Config $coreStoreConfig ) { parent::__construct($context); @@ -114,7 +114,9 @@ public function setNoCacheCookie($lifetime = null) if ($this->_isNoCacheCookieLocked) { return $this; } - $lifetime = $lifetime !== null ? $lifetime : $this->_coreStoreConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_LIFETIME); + $lifetime = $lifetime !== null + ? $lifetime + : $this->_coreStoreConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_LIFETIME); if ($this->_cookie->get(self::NO_CACHE_COOKIE)) { $this->_cookie->renew(self::NO_CACHE_COOKIE, $lifetime); } else { @@ -131,7 +133,7 @@ public function setNoCacheCookie($lifetime = null) public function removeNoCacheCookie() { if (!$this->_isNoCacheCookieLocked) { - $this->_cookie->delete(self::NO_CACHE_COOKIE); + $this->_cookie->set(self::NO_CACHE_COOKIE, null); } return $this; } @@ -155,7 +157,7 @@ public function lockNoCacheCookie() */ public function unlockNoCacheCookie() { - $this->_cookie->delete(self::NO_CACHE_LOCK_COOKIE); + $this->_cookie->set(self::NO_CACHE_LOCK_COOKIE, null); $this->_isNoCacheCookieLocked = false; return $this; } diff --git a/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml index 773199f930a68..129c5e9fa6256 100644 --- a/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml +++ b/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml @@ -25,6 +25,6 @@ --> - + diff --git a/app/code/Magento/Paygate/Block/Authorizenet/Info/Cc.php b/app/code/Magento/Paygate/Block/Authorizenet/Info/Cc.php index aa2419e292934..b8796c1f1db9a 100644 --- a/app/code/Magento/Paygate/Block/Authorizenet/Info/Cc.php +++ b/app/code/Magento/Paygate/Block/Authorizenet/Info/Cc.php @@ -26,6 +26,8 @@ namespace Magento\Paygate\Block\Authorizenet\Info; +use Magento\Payment\Block\Info; + class Cc extends \Magento\Payment\Block\Info\Cc { /** @@ -37,6 +39,27 @@ class Cc extends \Magento\Payment\Block\Info\Cc protected $_template = 'Magento_Paygate::info/cc.phtml'; + /** + * @var \Magento\Core\Helper\Data + */ + protected $_coreData; + + /** + * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Payment\Model\Config $paymentConfig + * @param \Magento\Core\Helper\Data $coreData + * @param array $data + */ + public function __construct( + \Magento\View\Element\Template\Context $context, + \Magento\Payment\Model\Config $paymentConfig, + \Magento\Core\Helper\Data $coreData, + array $data = array() + ) { + $this->_coreData = $coreData; + parent::__construct($context, $paymentConfig, $data); + } + /** * Render as PDF * diff --git a/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php b/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php index 5577a9c0e2128..14568cb69cdc2 100644 --- a/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php +++ b/app/code/Magento/Payment/Block/Catalog/Product/View/Profile.php @@ -27,7 +27,7 @@ */ namespace Magento\Payment\Block\Catalog\Product\View; -class Profile extends \Magento\View\Block\Template +class Profile extends \Magento\View\Element\Template { /** * Recurring profile instance @@ -52,20 +52,18 @@ class Profile extends \Magento\View\Block\Template protected $_profileFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Payment\Model\Recurring\ProfileFactory $profileFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Payment\Model\Recurring\ProfileFactory $profileFactory, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->_registry = $registry; $this->_profileFactory = $profileFactory; } @@ -97,7 +95,7 @@ public function getDateHtml() if ($this->_profile->getStartDateIsEditable()) { $this->setDateHtmlId('recurring_start_date'); $calendar = $this->getLayout() - ->createBlock('Magento\View\Block\Html\Date') + ->createBlock('Magento\View\Element\Html\Date') ->setId('recurring_start_date') ->setName(\Magento\Payment\Model\Recurring\Profile::BUY_REQUEST_START_DATETIME) ->setClass('datetime-picker input-text') diff --git a/app/code/Magento/Payment/Block/Form.php b/app/code/Magento/Payment/Block/Form.php index 15536b24333c6..7106e22e882c8 100644 --- a/app/code/Magento/Payment/Block/Form.php +++ b/app/code/Magento/Payment/Block/Form.php @@ -29,7 +29,7 @@ */ namespace Magento\Payment\Block; -class Form extends \Magento\View\Block\Template +class Form extends \Magento\View\Element\Template { /** * Retrieve payment method model diff --git a/app/code/Magento/Payment/Block/Form/Cc.php b/app/code/Magento/Payment/Block/Form/Cc.php index 48245e15900c6..86cbe83c24fc5 100644 --- a/app/code/Magento/Payment/Block/Form/Cc.php +++ b/app/code/Magento/Payment/Block/Form/Cc.php @@ -39,18 +39,16 @@ class Cc extends \Magento\Payment\Block\Form protected $_paymentConfig; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->_paymentConfig = $paymentConfig; } diff --git a/app/code/Magento/Payment/Block/Form/Container.php b/app/code/Magento/Payment/Block/Form/Container.php index 1ae3e7242ec23..f20abbce92e6c 100644 --- a/app/code/Magento/Payment/Block/Form/Container.php +++ b/app/code/Magento/Payment/Block/Form/Container.php @@ -35,7 +35,7 @@ */ namespace Magento\Payment\Block\Form; -class Container extends \Magento\View\Block\Template +class Container extends \Magento\View\Element\Template { /** * Prepare children blocks diff --git a/app/code/Magento/Payment/Block/Info.php b/app/code/Magento/Payment/Block/Info.php index 7baed204b2b5d..4ccd476258373 100644 --- a/app/code/Magento/Payment/Block/Info.php +++ b/app/code/Magento/Payment/Block/Info.php @@ -29,7 +29,7 @@ */ namespace Magento\Payment\Block; -class Info extends \Magento\View\Block\Template +class Info extends \Magento\View\Element\Template { /** * Payment rendered specific information diff --git a/app/code/Magento/Payment/Block/Info/AbstractContainer.php b/app/code/Magento/Payment/Block/Info/AbstractContainer.php index cf9e7f122527d..498804dd3f0f9 100644 --- a/app/code/Magento/Payment/Block/Info/AbstractContainer.php +++ b/app/code/Magento/Payment/Block/Info/AbstractContainer.php @@ -33,7 +33,7 @@ */ namespace Magento\Payment\Block\Info; -abstract class AbstractContainer extends \Magento\View\Block\Template +abstract class AbstractContainer extends \Magento\View\Element\Template { /** * Payment data @@ -43,19 +43,17 @@ abstract class AbstractContainer extends \Magento\View\Block\Template protected $_paymentData = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Payment\Helper\Data $paymentData * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Payment\Helper\Data $paymentData, array $data = array() ) { $this->_paymentData = $paymentData; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Payment/Block/Info/Cc.php b/app/code/Magento/Payment/Block/Info/Cc.php index 7e4ce2c726560..779c219025b1a 100644 --- a/app/code/Magento/Payment/Block/Info/Cc.php +++ b/app/code/Magento/Payment/Block/Info/Cc.php @@ -39,18 +39,16 @@ class Cc extends \Magento\Payment\Block\Info protected $_paymentConfig; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->_paymentConfig = $paymentConfig; } /** diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index ccf2dc17c03f0..e6a94db83009f 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -177,7 +177,7 @@ public function getMethodFormBlock(\Magento\Payment\Model\Method\AbstractMethod * Retrieve payment information block * * @param \Magento\Payment\Model\Info $info - * @return \Magento\View\Block\Template + * @return \Magento\View\Element\Template */ public function getInfoBlock(\Magento\Payment\Model\Info $info) { diff --git a/app/code/Magento/Payment/Model/Billing/AbstractAgreement.php b/app/code/Magento/Payment/Model/Billing/AbstractAgreement.php index c74ffc2bd1372..1239e5dbaf971 100644 --- a/app/code/Magento/Payment/Model/Billing/AbstractAgreement.php +++ b/app/code/Magento/Payment/Model/Billing/AbstractAgreement.php @@ -79,17 +79,17 @@ abstract public function cancel(); protected $_paymentData = null; /** - * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Payment\Helper\Data $paymentData, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Payment/Model/Info.php b/app/code/Magento/Payment/Model/Info.php index 15a7d07acded3..aa918498f4ccd 100644 --- a/app/code/Magento/Payment/Model/Info.php +++ b/app/code/Magento/Payment/Model/Info.php @@ -51,18 +51,18 @@ class Info extends \Magento\Core\Model\AbstractModel protected $_encryptor; /** - * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Encryption\EncryptorInterface $encryptor * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Payment\Helper\Data $paymentData, \Magento\Encryption\EncryptorInterface $encryptor, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Payment/Model/Recurring/Profile.php b/app/code/Magento/Payment/Model/Recurring/Profile.php index e73f9fc19f704..9958e2fdbae81 100644 --- a/app/code/Magento/Payment/Model/Recurring/Profile.php +++ b/app/code/Magento/Payment/Model/Recurring/Profile.php @@ -93,17 +93,17 @@ class Profile extends \Magento\Core\Model\AbstractModel protected $_paymentData = null; /** - * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Payment\Helper\Data $paymentData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Payment\Helper\Data $paymentData, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php index ca41e7aa837a1..9a9c28e9f7e23 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php @@ -36,24 +36,22 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_settlement; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Paypal\Model\Report\Settlement $settlement - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Paypal\Model\Report\Settlement $settlement + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Paypal\Model\Report\Settlement $settlement, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Paypal\Model\Report\Settlement $settlement, + array $data = array() + ) { $this->_settlement = $settlement; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php index 41080a46a66d7..06698a1170b76 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php @@ -49,17 +49,15 @@ class Store /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Config $coreConfig * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Config $coreConfig, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->_coreConfig = $coreConfig; } diff --git a/app/code/Magento/Paypal/Block/Express/Form.php b/app/code/Magento/Paypal/Block/Express/Form.php index 5583bc112b5fc..f9f5ff5aa2940 100644 --- a/app/code/Magento/Paypal/Block/Express/Form.php +++ b/app/code/Magento/Paypal/Block/Express/Form.php @@ -51,16 +51,14 @@ class Form extends \Magento\Paypal\Block\Standard\Form protected $_customerSession; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory * @param \Magento\Paypal\Helper\Data $paypalData * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, \Magento\Paypal\Helper\Data $paypalData, \Magento\Customer\Model\Session $customerSession, @@ -68,7 +66,7 @@ public function __construct( ) { $this->_paypalData = $paypalData; $this->_customerSession = $customerSession; - parent::__construct($context, $coreData, $paypalConfigFactory, $data); + parent::__construct($context, $paypalConfigFactory, $data); } /** @@ -84,7 +82,7 @@ protected function _construct() /** * Set data to block * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Paypal/Block/Express/Review.php b/app/code/Magento/Paypal/Block/Express/Review.php index 6f55be3452b97..6d2cf3c07bf6e 100644 --- a/app/code/Magento/Paypal/Block/Express/Review.php +++ b/app/code/Magento/Paypal/Block/Express/Review.php @@ -33,7 +33,7 @@ */ namespace Magento\Paypal\Block\Express; -class Review extends \Magento\View\Block\Template +class Review extends \Magento\View\Element\Template { /** * @var \Magento\Sales\Model\Quote diff --git a/app/code/Magento/Paypal/Block/Express/Shortcut.php b/app/code/Magento/Paypal/Block/Express/Shortcut.php index 202a726da88c1..0812475998d87 100644 --- a/app/code/Magento/Paypal/Block/Express/Shortcut.php +++ b/app/code/Magento/Paypal/Block/Express/Shortcut.php @@ -29,7 +29,7 @@ */ namespace Magento\Paypal\Block\Express; -class Shortcut extends \Magento\View\Block\Template +class Shortcut extends \Magento\View\Element\Template { /** * Position of "OR" label against shortcut @@ -112,8 +112,7 @@ class Shortcut extends \Magento\View\Block\Template protected $mathRandom; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Paypal\Helper\Data $paypalData * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Core\Model\Registry $registry @@ -125,8 +124,7 @@ class Shortcut extends \Magento\View\Block\Template * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Paypal\Helper\Data $paypalData, \Magento\Payment\Helper\Data $paymentData, \Magento\Core\Model\Registry $registry, @@ -145,11 +143,11 @@ public function __construct( $this->_checkoutSession = $checkoutSession; $this->_checkoutFactory = $checkoutFactory; $this->mathRandom = $mathRandom; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index 2e8eb96bad9b2..99d2ca240f3a7 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -75,22 +75,20 @@ class Iframe extends \Magento\Payment\Block\Form protected $_checkoutSession; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession, array $data = array() ) { $this->_orderFactory = $orderFactory; $this->_checkoutSession = $checkoutSession; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -164,7 +162,7 @@ protected function _getCheckout() /** * Before rendering html, check if is block rendering needed * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Paypal/Block/Logo.php b/app/code/Magento/Paypal/Block/Logo.php index c07fcde8f2ba6..909243ffd23a7 100644 --- a/app/code/Magento/Paypal/Block/Logo.php +++ b/app/code/Magento/Paypal/Block/Logo.php @@ -29,7 +29,7 @@ */ namespace Magento\Paypal\Block; -class Logo extends \Magento\View\Block\Template +class Logo extends \Magento\View\Element\Template { /** * @var \Magento\Paypal\Model\Config @@ -37,19 +37,17 @@ class Logo extends \Magento\View\Block\Template protected $_paypalConfig; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Paypal\Model\Config $paypalConfig * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Paypal\Model\Config $paypalConfig, array $data = array() ) { $this->_paypalConfig = $paypalConfig; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php b/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php index dd80bd9909a78..c2f1780a0f90b 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php +++ b/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php @@ -39,23 +39,21 @@ class Iframe extends \Magento\Paypal\Block\Iframe protected $_paymentData = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Payment\Helper\Data $paymentData * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Payment\Helper\Data $paymentData, array $data = array() ) { $this->_paymentData = $paymentData; - parent::__construct($context, $coreData, $orderFactory, $checkoutSession, $data); + parent::__construct($context, $orderFactory, $checkoutSession, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Payment/Info.php b/app/code/Magento/Paypal/Block/Payment/Info.php index 43185675a35f8..8a5091a426d79 100644 --- a/app/code/Magento/Paypal/Block/Payment/Info.php +++ b/app/code/Magento/Paypal/Block/Payment/Info.php @@ -38,21 +38,19 @@ class Info extends \Magento\Payment\Block\Info\Cc protected $_paypalInfoFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Paypal\Model\InfoFactory $paypalInfoFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Paypal\Model\InfoFactory $paypalInfoFactory, array $data = array() ) { $this->_paypalInfoFactory = $paypalInfoFactory; - parent::__construct($context, $coreData, $paymentConfig, $data); + parent::__construct($context, $paymentConfig, $data); } /** diff --git a/app/code/Magento/Paypal/Block/Standard/Form.php b/app/code/Magento/Paypal/Block/Standard/Form.php index 24b4c42815285..a55739f86c2ec 100644 --- a/app/code/Magento/Paypal/Block/Standard/Form.php +++ b/app/code/Magento/Paypal/Block/Standard/Form.php @@ -50,19 +50,17 @@ class Form extends \Magento\Payment\Block\Form protected $_paypalConfigFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, array $data = array() ) { $this->_paypalConfigFactory = $paypalConfigFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -71,8 +69,8 @@ public function __construct( protected function _construct() { $this->_config = $this->_paypalConfigFactory->create()->setMethod($this->getMethodCode()); - /** @var $mark \Magento\View\Block\Template */ - $mark = $this->_layout->createBlock('Magento\View\Block\Template'); + /** @var $mark \Magento\View\Element\Template */ + $mark = $this->_layout->createBlock('Magento\View\Element\Template'); $mark->setTemplate('Magento_Paypal::payment/mark.phtml') ->setPaymentAcceptanceMarkHref($this->_config->getPaymentMarkWhatIsPaypalUrl($this->_locale)) ->setPaymentAcceptanceMarkSrc($this->_config->getPaymentMarkImageUrl($this->_locale->getLocaleCode())); diff --git a/app/code/Magento/Paypal/Block/Standard/Redirect.php b/app/code/Magento/Paypal/Block/Standard/Redirect.php index 7756aae00407b..4a4f077c901bc 100644 --- a/app/code/Magento/Paypal/Block/Standard/Redirect.php +++ b/app/code/Magento/Paypal/Block/Standard/Redirect.php @@ -25,7 +25,7 @@ */ namespace Magento\Paypal\Block\Standard; -class Redirect extends \Magento\View\Block\AbstractBlock +class Redirect extends \Magento\View\Element\AbstractBlock { /** * @var \Magento\Data\FormFactory @@ -48,7 +48,7 @@ class Redirect extends \Magento\View\Block\AbstractBlock protected $mathRandom; /** - * @param \Magento\View\Block\Context $context + * @param \Magento\View\Element\Context $context * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Data\Form\Element\Factory $elementFactory * @param \Magento\Paypal\Model\StandardFactory $paypalStandardFactory @@ -56,7 +56,7 @@ class Redirect extends \Magento\View\Block\AbstractBlock * @param array $data */ public function __construct( - \Magento\View\Block\Context $context, + \Magento\View\Element\Context $context, \Magento\Data\FormFactory $formFactory, \Magento\Data\Form\Element\Factory $elementFactory, \Magento\Paypal\Model\StandardFactory $paypalStandardFactory, diff --git a/app/code/Magento/Paypal/Helper/Checkout.php b/app/code/Magento/Paypal/Helper/Checkout.php index 0631e8b5d992f..8d82dada50278 100644 --- a/app/code/Magento/Paypal/Helper/Checkout.php +++ b/app/code/Magento/Paypal/Helper/Checkout.php @@ -27,7 +27,7 @@ */ namespace Magento\Paypal\Helper; -class Checkout extends \Magento\App\Helper\AbstractHelper +class Checkout { /** * @var \Magento\Checkout\Model\SessionFactory diff --git a/app/code/Magento/Paypal/Helper/Data.php b/app/code/Magento/Paypal/Helper/Data.php index e74fa3a260e25..4e998b6cbca3f 100644 --- a/app/code/Magento/Paypal/Helper/Data.php +++ b/app/code/Magento/Paypal/Helper/Data.php @@ -49,13 +49,13 @@ class Data extends \Magento\App\Helper\AbstractHelper protected $_agreementFactory; /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\App\Helper\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory ) { $this->_coreData = $coreData; diff --git a/app/code/Magento/Paypal/Model/Observer.php b/app/code/Magento/Paypal/Model/Observer.php index bf3d0d42e1254..95001ff51f6fd 100644 --- a/app/code/Magento/Paypal/Model/Observer.php +++ b/app/code/Magento/Paypal/Model/Observer.php @@ -156,10 +156,7 @@ public function setResponseAfterSaveOrder(\Magento\Event\Observer $observer) if ($payment && in_array($payment->getMethod(), $this->_paypalHss->getHssMethods())) { /* @var $controller \Magento\App\Action\Action */ $controller = $observer->getEvent()->getData('controller_action'); - $result = $this->_coreData->jsonDecode( - $controller->getResponse()->getBody('default'), - \Zend_Json::TYPE_ARRAY - ); + $result = $this->_coreData->jsonDecode($controller->getResponse()->getBody('default')); if (empty($result['error'])) { $this->_view->loadLayout('checkout_onepage_review'); diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php b/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php index 9bbf8b65aa39d..51d8d2d943cdf 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php +++ b/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php @@ -39,21 +39,21 @@ class MerchantCountry extends \Magento\Core\Model\Config\Value protected $_coreData; /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Config $config + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Config $config, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Paypal/etc/module.xml b/app/code/Magento/Paypal/etc/module.xml index ddab4ebe5d13e..dcb5fbc976376 100755 --- a/app/code/Magento/Paypal/etc/module.xml +++ b/app/code/Magento/Paypal/etc/module.xml @@ -40,7 +40,7 @@ - + diff --git a/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_system_config_edit.xml b/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_system_config_edit.xml index 111ee6f1796ac..ad591c874672d 100644 --- a/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_system_config_edit.xml +++ b/app/code/Magento/Paypal/view/adminhtml/layout/adminhtml_system_config_edit.xml @@ -25,7 +25,7 @@ --> - + Magento_Paypal::styles.css diff --git a/app/code/Magento/Paypal/view/frontend/express/review.phtml b/app/code/Magento/Paypal/view/frontend/express/review.phtml index 4da5cd85e50a2..25417eff4424f 100644 --- a/app/code/Magento/Paypal/view/frontend/express/review.phtml +++ b/app/code/Magento/Paypal/view/frontend/express/review.phtml @@ -30,7 +30,7 @@ $shippingAddress = $this->getShippingAddress();

-getMessagesBlock()->toHtml() ?> +getLayout()->getMessagesBlock()->toHtml() ?>
Please confirm your addresses
diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml index 7f3dda071f2ed..60f67beed9f24 100644 --- a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml +++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml @@ -52,5 +52,5 @@ as="agreements" template="onepage/agreements.phtml"/> - + diff --git a/app/code/Magento/Persistent/Block/Form/Remember.php b/app/code/Magento/Persistent/Block/Form/Remember.php index 249c6320ff17d..0ca27a0977049 100644 --- a/app/code/Magento/Persistent/Block/Form/Remember.php +++ b/app/code/Magento/Persistent/Block/Form/Remember.php @@ -34,7 +34,7 @@ namespace Magento\Persistent\Block\Form; -class Remember extends \Magento\View\Block\Template +class Remember extends \Magento\View\Element\Template { /** * Persistent data @@ -49,22 +49,20 @@ class Remember extends \Magento\View\Block\Template protected $mathRandom; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Persistent\Helper\Data $persistentData * @param \Magento\Math\Random $mathRandom * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Persistent\Helper\Data $persistentData, \Magento\Math\Random $mathRandom, array $data = array() ) { $this->_persistentData = $persistentData; $this->mathRandom = $mathRandom; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Persistent/Block/Header/Additional.php b/app/code/Magento/Persistent/Block/Header/Additional.php index 9a748b9526c67..52094da7e1193 100644 --- a/app/code/Magento/Persistent/Block/Header/Additional.php +++ b/app/code/Magento/Persistent/Block/Header/Additional.php @@ -34,7 +34,7 @@ namespace Magento\Persistent\Block\Header; -class Additional extends \Magento\View\Block\Html\Link +class Additional extends \Magento\View\Element\Html\Link { /** * Persistent session @@ -44,19 +44,17 @@ class Additional extends \Magento\View\Block\Html\Link protected $_persistentSession = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Persistent\Helper\Session $persistentSession * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Persistent\Helper\Session $persistentSession, array $data = array() ) { $this->_persistentSession = $persistentSession; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Persistent/Controller/Index.php b/app/code/Magento/Persistent/Controller/Index.php index 3c688069565d7..29c57019dd04b 100644 --- a/app/code/Magento/Persistent/Controller/Index.php +++ b/app/code/Magento/Persistent/Controller/Index.php @@ -135,7 +135,7 @@ protected function _cleanup() ->setCustomerId(null) ->setCustomerGroupId(null); if ($this->_clearCheckoutSession) { - $this->_checkoutSession->unsetAll(); + $this->_checkoutSession->clearStorage(); } $this->_getHelper()->getSession()->removePersistentCookie(); return $this; diff --git a/app/code/Magento/Persistent/Model/Observer.php b/app/code/Magento/Persistent/Model/Observer.php index 4ccc784c9fc9e..8abbc6edf14ea 100644 --- a/app/code/Magento/Persistent/Model/Observer.php +++ b/app/code/Magento/Persistent/Model/Observer.php @@ -231,7 +231,7 @@ public function applyBlockPersistentData($observer) return $this; } - /** @var $block \Magento\View\Block\AbstractBlock */ + /** @var $block \Magento\View\Element\AbstractBlock */ $block = $observer->getEvent()->getBlock(); if (!$block) { @@ -257,7 +257,7 @@ public function applyBlockPersistentData($observer) /** * Emulate 'welcome' block with persistent data * - * @param \Magento\View\Block\AbstractBlock $block + * @param \Magento\View\Element\AbstractBlock $block * @return \Magento\Persistent\Model\Observer */ public function emulateWelcomeBlock($block) @@ -284,7 +284,7 @@ protected function _applyAccountLinksPersistentData() /** * Emulate 'top links' block with persistent data * - * @param \Magento\View\Block\AbstractBlock $block + * @param \Magento\View\Element\AbstractBlock $block */ public function emulateTopLinks($block) { @@ -566,7 +566,7 @@ public function setQuoteGuest($checkQuote = false) && !$this->_persistentData->isShoppingCartPersist() && !$quote->getIsPersistent() ) { - $this->_checkoutSession->unsetAll(); + $this->_checkoutSession->clearQuote()->clearStorage(); return; } @@ -619,7 +619,7 @@ protected function _expirePersistentSession() { $quote = $this->_checkoutSession->setLoadInactive()->getQuote(); if ($quote->getIsActive() && $quote->getCustomerId()) { - $this->_checkoutSession->setCustomer(null)->unsetAll(); + $this->_checkoutSession->setCustomer(null)->clearQuote()->clearStorage(); } else { $quote->setIsActive(true) ->setIsPersistent(false) diff --git a/app/code/Magento/Persistent/Model/Observer/Session.php b/app/code/Magento/Persistent/Model/Observer/Session.php index 9cd0ceb598b7f..245b89f673694 100644 --- a/app/code/Magento/Persistent/Model/Observer/Session.php +++ b/app/code/Magento/Persistent/Model/Observer/Session.php @@ -61,7 +61,7 @@ class Session /** * Cookie model * - * @var \Magento\Core\Model\Cookie + * @var \Magento\Stdlib\Cookie */ protected $_cookie; @@ -86,7 +86,7 @@ class Session * @param \Magento\Persistent\Helper\Session $persistentSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Core\Model\Cookie $cookie + * @param \Magento\Stdlib\Cookie $cookie * @param \Magento\Persistent\Model\SessionFactory $sessionFactory */ public function __construct( @@ -94,7 +94,7 @@ public function __construct( \Magento\Persistent\Helper\Session $persistentSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, - \Magento\Core\Model\Cookie $cookie, + \Magento\Stdlib\Cookie $cookie, \Magento\Persistent\Model\SessionFactory $sessionFactory ) { $this->_persistentData = $persistentData; diff --git a/app/code/Magento/Persistent/Model/Session.php b/app/code/Magento/Persistent/Model/Session.php index 18bc72cc3bec5..354d5a320798b 100644 --- a/app/code/Magento/Persistent/Model/Session.php +++ b/app/code/Magento/Persistent/Model/Session.php @@ -82,7 +82,7 @@ class Session extends \Magento\Core\Model\AbstractModel /** * Cookie model * - * @var \Magento\Core\Model\Cookie + * @var \Magento\Stdlib\Cookie */ protected $_cookie; @@ -99,7 +99,7 @@ class Session extends \Magento\Core\Model\AbstractModel * @param \Magento\Core\Model\Config $coreConfig * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Persistent\Helper\Data $persistentData - * @param \Magento\Core\Model\Cookie $cookie + * @param \Magento\Stdlib\Cookie $cookie * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Math\Random $mathRandom * @param \Magento\Core\Model\Resource\AbstractResource $resource @@ -112,7 +112,7 @@ public function __construct( \Magento\Core\Model\Config $coreConfig, \Magento\Core\Helper\Data $coreData, \Magento\Persistent\Helper\Data $persistentData, - \Magento\Core\Model\Cookie $cookie, + \Magento\Stdlib\Cookie $cookie, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Math\Random $mathRandom, \Magento\Core\Model\Resource\AbstractResource $resource = null, @@ -268,7 +268,7 @@ public function deleteByCustomerId($customerId, $clearCookie = true) */ public function removePersistentCookie() { - $this->_cookie->delete(\Magento\Persistent\Model\Session::COOKIE_NAME); + $this->_cookie->set(\Magento\Persistent\Model\Session::COOKIE_NAME, null); return $this; } @@ -305,8 +305,9 @@ public function deleteExpired($websiteId = null) * * @return \Magento\Core\Model\AbstractModel */ - protected function _afterDeleteCommit() { - $this->_cookie->delete(\Magento\Persistent\Model\Session::COOKIE_NAME); + protected function _afterDeleteCommit() + { + $this->_cookie->set(\Magento\Persistent\Model\Session::COOKIE_NAME, null, 0); return parent::_afterDeleteCommit(); } diff --git a/app/code/Magento/Persistent/etc/persistent.xml b/app/code/Magento/Persistent/etc/persistent.xml index 016f203c61285..044f76275d7b7 100644 --- a/app/code/Magento/Persistent/etc/persistent.xml +++ b/app/code/Magento/Persistent/etc/persistent.xml @@ -32,13 +32,13 @@ header Magento\Persistent\Model\Observer emulateWelcomeBlock - Magento\Page\Block\Html\Header + Magento\Theme\Block\Html\Header top.links Magento\Persistent\Model\Observer emulateTopLinks - Magento\Page\Block\Template\Links + Magento\Theme\Block\Template\Links diff --git a/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml b/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml index 71a0624c3dfd6..461198c273afe 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml @@ -26,10 +26,10 @@ - + - + diff --git a/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml b/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml index 448a2a52b693d..4fc023989173f 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml @@ -26,6 +26,6 @@ - + diff --git a/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml b/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml index 448a2a52b693d..4fc023989173f 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml @@ -26,6 +26,6 @@ - + diff --git a/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml b/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml index 918f120f611e4..955184f57ef8f 100644 --- a/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml +++ b/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml @@ -29,7 +29,7 @@ * "Remember Me" popup template (when click on "What's this?") * */ -/** @var $this \Magento\View\Block\Template */ +/** @var $this \Magento\View\Element\Template */ ?> diff --git a/app/code/Magento/Sales/view/adminhtml/order/giftoptions.phtml b/app/code/Magento/Sales/view/adminhtml/order/giftoptions.phtml index 84238d8b408bd..d7703a65aace2 100644 --- a/app/code/Magento/Sales/view/adminhtml/order/giftoptions.phtml +++ b/app/code/Magento/Sales/view/adminhtml/order/giftoptions.phtml @@ -25,8 +25,8 @@ */ ?> getChildHtml()): ?> -
+
- getChildHtml() ?> + getChildHtml() ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/giftmessage.phtml b/app/code/Magento/Sales/view/adminhtml/order/view/giftmessage.phtml index b3ff75ebf873e..64b5f959ae7b4 100644 --- a/app/code/Magento/Sales/view/adminhtml/order/view/giftmessage.phtml +++ b/app/code/Magento/Sales/view/adminhtml/order/view/giftmessage.phtml @@ -27,33 +27,38 @@ canDisplayGiftmessage()): ?> getMessage()->getMessage() != ''?>
-
-

- -
- - - - - - - - - - - - - - - - - - - - -
 
getSaveButtonHtml(); ?>
-
- -
+
+
+ +
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ getSaveButtonHtml(); ?> +
+
+
diff --git a/app/code/Magento/Sales/view/email/shipment_new.html b/app/code/Magento/Sales/view/email/shipment_new.html index 7516bff4297fa..ecbe06b92a6f4 100644 --- a/app/code/Magento/Sales/view/email/shipment_new.html +++ b/app/code/Magento/Sales/view/email/shipment_new.html @@ -13,7 +13,7 @@ "var order.shipping_address.format('html')":"Shipping Address", "var order.shipping_description":"Shipping Description", "layout handle=\"sales_email_order_shipment_items\" shipment=$shipment order=$order":"Shipment Items Grid", -"block type='Magento\View\Block\Template' area='frontend' template='email/shipment/track.phtml' shipment=$shipment order=$order":"Shipment Track Details", +"block type='Magento\View\Element\Template' area='frontend' template='email/shipment/track.phtml' shipment=$shipment order=$order":"Shipment Track Details", "var comment":"Shipment Comment"} @--> - + sales/billing_agreement Billing Agreements - + sales/order/history My Orders - + sales/recurring_profile Recurring Profiles diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml index 56dab0aeb58f3..21034a95bb1ed 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_creditmemo_items.xml @@ -35,5 +35,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml index f4b71a1e02a90..2eeab00ab07e4 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_invoice_items.xml @@ -35,5 +35,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml index d9319b2aa6944..e48839ce4daa7 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_items.xml @@ -39,5 +39,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml index 65af8bae6d361..7c3c5af2ef5d6 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_email_order_shipment_items.xml @@ -27,5 +27,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml index 9e3b76ec779b4..58f57546682b0 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_creditmemo.xml @@ -45,5 +45,5 @@ - + 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 670254ed3980b..0b22020b15971 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,7 +25,7 @@ --> - + items diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_info_links.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_info_links.xml index 20aa47ee1d77b..acc588c0537fc 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_info_links.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_info_links.xml @@ -25,7 +25,7 @@ --> - + items diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml index 2a043a9834cd5..c978a28a11986 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_invoice.xml @@ -45,5 +45,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml index 4a7d0a4b1c065..3b8df2bea129b 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_print.xml @@ -41,5 +41,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml index fc90247dbe2ef..bb716fc45bfe5 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_printcreditmemo.xml @@ -37,5 +37,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml index 242df26c37935..0f983ef0d343a 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_printinvoice.xml @@ -37,5 +37,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml index e99fb03cb3a93..75e48a98c1c90 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_printshipment.xml @@ -29,5 +29,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml index aa77b807dc935..685401022774f 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml @@ -37,5 +37,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml index 128fbaa960105..8f0fbd3ba3bb2 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_view.xml @@ -44,5 +44,5 @@ - + diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml b/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml index c733d4f48f7c4..8b7d7054a4119 100644 --- a/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml +++ b/app/code/Magento/Sales/view/frontend/layout/sales_recurring_profile_view__tabs.xml @@ -34,7 +34,7 @@ 1 - + Profile Information @@ -43,7 +43,7 @@ - + Related Orders @@ -64,7 +64,7 @@ - + jquery/editableMultiselect/js/jquery.editable.js - + jquery/editableMultiselect/js/jquery.multiselect.js - + mage/backend/editablemultiselect.js - + jquery/editableMultiselect/css/jquery.multiselect.css - + Magento_Core::prototype/magento.css diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php index 6be1972ad428d..76cc7da4dcb2c 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php @@ -38,26 +38,24 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** * Prepare layout * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php index 01565c5b467b5..25c944e26d870 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/AbstractTab.php @@ -48,23 +48,21 @@ abstract class AbstractTab */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\ObjectManager $objectManager - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ObjectManager $objectManager + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\ObjectManager $objectManager, - array $data = array() - ) { - parent::__construct($context, $coreData, $registry, $formFactory, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ObjectManager $objectManager, + array $data = array() + ) { + parent::__construct($context, $registry, $formFactory, $data); $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php index 0b1ec6e8af554..3153b3a3f8dfc 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/Css.php @@ -52,25 +52,23 @@ class Css */ protected $_customCssFile; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\ObjectManager $objectManager - * @param \Magento\Theme\Model\Uploader\Service $uploaderService - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ObjectManager $objectManager + * @param \Magento\Theme\Model\Uploader\Service $uploaderService + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\ObjectManager $objectManager, - \Magento\Theme\Model\Uploader\Service $uploaderService, - array $data = array() - ) { - parent::__construct($context, $coreData, $registry, $formFactory, $objectManager, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ObjectManager $objectManager, + \Magento\Theme\Model\Uploader\Service $uploaderService, + array $data = array() + ) { + parent::__construct($context, $registry, $formFactory, $objectManager, $data); $this->_uploaderService = $uploaderService; } diff --git a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php index 793bdd2669311..3aaaf796b61ae 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php +++ b/app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php @@ -51,29 +51,27 @@ class General */ protected $_fileSize; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\ObjectManager $objectManager - * @param \Magento\View\Design\Theme\Image\PathInterface $themeImagePath - * @param \Magento\File\Size $fileSize - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\ObjectManager $objectManager + * @param \Magento\View\Design\Theme\Image\PathInterface $themeImagePath + * @param \Magento\File\Size $fileSize + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\ObjectManager $objectManager, - \Magento\View\Design\Theme\Image\PathInterface $themeImagePath, - \Magento\File\Size $fileSize, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\ObjectManager $objectManager, + \Magento\View\Design\Theme\Image\PathInterface $themeImagePath, + \Magento\File\Size $fileSize, + array $data = array() + ) { $this->_themeImagePath = $themeImagePath; $this->_fileSize = $fileSize; - parent::__construct($context, $coreData, $registry, $formFactory, $objectManager, $data); + parent::__construct($context, $registry, $formFactory, $objectManager, $data); } /** diff --git a/app/code/Magento/Page/Block/Html.php b/app/code/Magento/Theme/Block/Html.php similarity index 70% rename from app/code/Magento/Page/Block/Html.php rename to app/code/Magento/Theme/Block/Html.php index 3c0f942ab264b..d471d35fdb49a 100644 --- a/app/code/Magento/Page/Block/Html.php +++ b/app/code/Magento/Theme/Block/Html.php @@ -18,26 +18,32 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block; + /** * Html page block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team */ -namespace Magento\Page\Block; - -class Html extends \Magento\View\Block\Template +class Html extends \Magento\View\Element\Template { + /** + * The list of available URLs + * + * @var array + */ protected $_urls = array(); + + /** + * @var string + */ protected $_title = ''; + /** + * Add block data + */ protected function _construct() { parent::_construct(); @@ -50,30 +56,47 @@ protected function _construct() $this->addBodyClass($this->_request->getFullActionName('-')); - $this->_beforeCacheUrl(); + if ($this->_cacheState->isEnabled(self::CACHE_GROUP)) { + $this->_app->setUseSessionVar(true); + } } + /** + * Retrieve base URL + * + * @return string + */ public function getBaseUrl() { return $this->_urls['base']; } + /** + * Retrieve base secure URL + * + * @return mixed + */ public function getBaseSecureUrl() { return $this->_urls['baseSecure']; } + /** + * Retrieve current URL + * + * @return mixed + */ public function getCurrentUrl() { return $this->_urls['current']; } /** - * Print Logo URL (Conf -> Sales -> Invoice and Packing Slip Design) + * Print Logo URL (Conf -> Sales -> Invoice and Packing Slip Design) * - * @return string + * @return string */ - public function getPrintLogoUrl () + public function getPrintLogoUrl() { // load html logo $logo = $this->_storeConfig->getConfig('sales/identity/logo_html'); @@ -88,8 +111,7 @@ public function getPrintLogoUrl () // prevent tiff format displaying in html if (strtolower(substr($logo, -5)) === '.tiff' || strtolower(substr($logo, -4)) === '.tif') { $logo = ''; - } - else { + } else { $logo = 'sales/store/logo/' . $logo; } } @@ -98,25 +120,40 @@ public function getPrintLogoUrl () // buld url if (!empty($logo)) { $logo = $this->_urlBuilder->getBaseUrl(array('_type' => \Magento\Core\Model\Store::URL_TYPE_MEDIA)) . $logo; - } - else { + } else { $logo = ''; } return $logo; } + /** + * Retrieve logo text for print page + * + * @return string + */ public function getPrintLogoText() { return $this->_storeConfig->getConfig('sales/identity/address'); } + /** + * Set header title + * + * @param string $title + * @return \Magento\Theme\Block\Html + */ public function setHeaderTitle($title) { $this->_title = $title; return $this; } + /** + * Retrieve header title + * + * @return string + */ public function getHeaderTitle() { return $this->_title; @@ -126,7 +163,7 @@ public function getHeaderTitle() * Add CSS class to page body tag * * @param string $className - * @return \Magento\Page\Block\Html + * @return \Magento\Theme\Block\Html */ public function addBodyClass($className) { @@ -135,6 +172,11 @@ public function addBodyClass($className) return $this; } + /** + * Retrieve base language + * + * @return string + */ public function getLang() { if (!$this->hasData('lang')) { @@ -143,11 +185,21 @@ public function getLang() return $this->getData('lang'); } + /** + * Retrieve body class + * + * @return string + */ public function getBodyClass() { return $this->_getData('body_class'); } + /** + * Retrieve absolute footer html + * + * @return string + */ public function getAbsoluteFooter() { return $this->_storeConfig->getConfig('design/footer/absolute_footer'); @@ -161,6 +213,12 @@ public function getAbsoluteFooter() */ protected function _afterToHtml($html) { - return $this->_afterCacheUrl($html); + if ($this->_cacheState->isEnabled(self::CACHE_GROUP)) { + $this->_app->setUseSessionVar(false); + \Magento\Profiler::start('CACHE_URL'); + $html = $this->_urlBuilder->sessionUrlVar($html); + \Magento\Profiler::stop('CACHE_URL'); + } + return $html; } } diff --git a/app/code/Magento/Page/Block/Html/Breadcrumbs.php b/app/code/Magento/Theme/Block/Html/Breadcrumbs.php similarity index 73% rename from app/code/Magento/Page/Block/Html/Breadcrumbs.php rename to app/code/Magento/Theme/Block/Html/Breadcrumbs.php index ae7def360bbb2..a7e2d6ff78bc5 100644 --- a/app/code/Magento/Page/Block/Html/Breadcrumbs.php +++ b/app/code/Magento/Theme/Block/Html/Breadcrumbs.php @@ -18,72 +18,77 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; + /** - * Html page block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team + * Html page breadcrumbs block */ -namespace Magento\Page\Block\Html; - -class Breadcrumbs extends \Magento\View\Block\Template +class Breadcrumbs extends \Magento\View\Element\Template { /** - * Array of breadcrumbs + * Current template name * - * array( - * [$index] => array( - * ['label'] - * ['title'] - * ['link'] - * ['first'] - * ['last'] - * ) - * ) + * @var string + */ + protected $_template = 'html/breadcrumbs.phtml'; + + /** + * List of available breadcrumb properties * * @var array */ - protected $_crumbs = null; + protected $_properties = array( + 'label', + 'title', + 'link', + 'first', + 'last', + 'readonly', + ); + + /** + * List of breadcrumbs + * + * @var array + */ + protected $_crumbs; /** * Cache key info * * @var null|array */ - protected $_cacheKeyInfo = null; - - protected $_template = 'html/breadcrumbs.phtml'; + protected $_cacheKeyInfo; /** * Add crumb * * @param string $crumbName * @param array $crumbInfo - * @return \Magento\Page\Block\Html\Breadcrumbs + * @return \Magento\Theme\Block\Html\Breadcrumbs */ public function addCrumb($crumbName, $crumbInfo) { - $properties = array('label', 'title', 'link', 'first', 'last', 'readonly'); - foreach ($properties as $key) { + foreach ($this->_properties as $key) { if (!isset($crumbInfo[$key])) { $crumbInfo[$key] = null; } } + if ((!isset($this->_crumbs[$crumbName])) || (!$this->_crumbs[$crumbName]['readonly'])) { - $this->_crumbs[$crumbName] = $crumbInfo; + $this->_crumbs[$crumbName] = $crumbInfo; } + return $this; } /** * Get cache key informative items + * * Provide string array key to share specific info item with FPC placeholder * * @return array @@ -93,10 +98,9 @@ public function getCacheKeyInfo() if (is_null($this->_cacheKeyInfo)) { $this->_cacheKeyInfo = parent::getCacheKeyInfo() + array( 'crumbs' => base64_encode(serialize($this->_crumbs)), - 'name' => $this->getNameInLayout() + 'name' => $this->getNameInLayout(), ); } - return $this->_cacheKeyInfo; } @@ -114,6 +118,7 @@ protected function _toHtml() $this->_crumbs[key($this->_crumbs)]['last'] = true; } $this->assign('crumbs', $this->_crumbs); + return parent::_toHtml(); } } diff --git a/app/code/Magento/Page/Block/Html/Footer.php b/app/code/Magento/Theme/Block/Html/Footer.php similarity index 71% rename from app/code/Magento/Page/Block/Html/Footer.php rename to app/code/Magento/Theme/Block/Html/Footer.php index 189065b06f291..be4a45a17724d 100644 --- a/app/code/Magento/Page/Block/Html/Footer.php +++ b/app/code/Magento/Theme/Block/Html/Footer.php @@ -18,24 +18,22 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; + /** - * Html page block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team + * Html page footer block */ -namespace Magento\Page\Block\Html; - -class Footer extends \Magento\View\Block\Template +class Footer extends \Magento\View\Element\Template { - + /** + * Copyright information + * + * @var string + */ protected $_copyright; /** @@ -44,26 +42,30 @@ class Footer extends \Magento\View\Block\Template protected $_customerSession; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } + /** + * Set footer data + */ protected function _construct() { $this->addData(array( 'cache_lifetime'=> false, - 'cache_tags' => array(\Magento\Core\Model\Store::CACHE_TAG, \Magento\Cms\Model\Block::CACHE_TAG) + 'cache_tags' => array( + \Magento\Core\Model\Store::CACHE_TAG, + \Magento\Cms\Model\Block::CACHE_TAG, + ) )); } @@ -79,22 +81,20 @@ public function getCacheKeyInfo() $this->_storeManager->getStore()->getId(), (int)$this->_storeManager->getStore()->isCurrentlySecure(), $this->_design->getDesignTheme()->getId(), - $this->_customerSession->isLoggedIn() + $this->_customerSession->isLoggedIn(), ); } - public function setCopyright($copyright) - { - $this->_copyright = $copyright; - return $this; - } - + /** + * Retrieve copyright information + * + * @return string + */ public function getCopyright() { if (!$this->_copyright) { $this->_copyright = $this->_storeConfig->getConfig('design/footer/copyright'); } - return $this->_copyright; } } diff --git a/app/code/Magento/Page/Block/Html/Head.php b/app/code/Magento/Theme/Block/Html/Head.php similarity index 80% rename from app/code/Magento/Page/Block/Html/Head.php rename to app/code/Magento/Theme/Block/Html/Head.php index 4e47cdef77380..8fd9b508f3fd4 100644 --- a/app/code/Magento/Page/Block/Html/Head.php +++ b/app/code/Magento/Theme/Block/Html/Head.php @@ -18,26 +18,19 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; /** - * Html page block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team + * Html page head block */ -namespace Magento\Page\Block\Html; - -class Head extends \Magento\View\Block\Template +class Head extends \Magento\View\Element\Template { /** - * Block template + * Current template name * * @var string */ @@ -63,17 +56,17 @@ class Head extends \Magento\View\Block\Template protected $_objectManager; /** - * @var \Magento\Core\Model\Page\Asset\MergeService + * @var \Magento\View\Asset\MergeService */ private $_assetMergeService; /** - * @var \Magento\Core\Model\Page\Asset\MinifyService + * @var \Magento\View\Asset\MinifyService */ private $_assetMinifyService; /** - * @var \Magento\Page\Model\Asset\GroupedCollection + * @var \Magento\View\Asset\GroupedCollection */ private $_pageAssets; @@ -82,34 +75,32 @@ class Head extends \Magento\View\Block\Template * * @var \Magento\Core\Helper\File\Storage\Database */ - protected $_fileStorageDatabase = null; + protected $_fileStorageDatabase; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase * @param \Magento\ObjectManager $objectManager - * @param \Magento\Core\Model\Page $page - * @param \Magento\Core\Model\Page\Asset\MergeService $assetMergeService - * @param \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService + * @param \Magento\View\Asset\GroupedCollection $assets + * @param \Magento\View\Asset\MergeService $assetMergeService + * @param \Magento\View\Asset\MinifyService $assetMinifyService * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase, \Magento\ObjectManager $objectManager, - \Magento\Core\Model\Page $page, - \Magento\Core\Model\Page\Asset\MergeService $assetMergeService, - \Magento\Core\Model\Page\Asset\MinifyService $assetMinifyService, + \Magento\View\Asset\GroupedCollection $assets, + \Magento\View\Asset\MergeService $assetMergeService, + \Magento\View\Asset\MinifyService $assetMinifyService, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->_fileStorageDatabase = $fileStorageDatabase; $this->_objectManager = $objectManager; $this->_assetMergeService = $assetMergeService; $this->_assetMinifyService = $assetMinifyService; - $this->_pageAssets = $page->getAssets(); + $this->_pageAssets = $assets; } /** @@ -117,19 +108,25 @@ public function __construct( * * @param string $title * @param string $href - * @return \Magento\Page\Block\Html\Head + * @return \Magento\Theme\Block\Html\Head */ public function addRss($title, $href) { - $attributes = 'rel="alternate" type="application/rss+xml" title="' . $title . '"'; $asset = $this->_objectManager->create( - 'Magento\Core\Model\Page\Asset\Remote', array('url' => (string)$href) + 'Magento\View\Asset\Remote', array('url' => (string)$href) ); - $this->_pageAssets->add("link/$href", $asset, array('attributes' => $attributes)); + + $this->_pageAssets->add("link/$href", $asset, array( + 'attributes' => 'rel="alternate" type="application/rss+xml" title="' . $title . '"', + )); + return $this; } /** + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * * Render HTML for the added head items * * @return string @@ -137,23 +134,19 @@ public function addRss($title, $href) public function getCssJsHtml() { foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $block) { - /** @var $block \Magento\View\Block\AbstractBlock */ - if ($block instanceof \Magento\Page\Block\Html\Head\AssetBlock) { - /** @var \Magento\Core\Model\Page\Asset\AssetInterface $asset */ + /** @var $block \Magento\View\Element\AbstractBlock */ + if ($block instanceof \Magento\Theme\Block\Html\Head\AssetBlockInterface) { + /** @var \Magento\View\Asset\AssetInterface $asset */ $asset = $block->getAsset(); - $this->_pageAssets->add( - $block->getNameInLayout(), - $asset, - (array)$block->getProperties() - ); + $this->_pageAssets->add($block->getNameInLayout(), $asset, (array)$block->getProperties()); } } $result = ''; - /** @var $group \Magento\Page\Model\Asset\PropertyGroup */ + /** @var $group \Magento\View\Asset\PropertyGroup */ foreach ($this->_pageAssets->getGroups() as $group) { - $contentType = $group->getProperty(\Magento\Page\Model\Asset\GroupedCollection::PROPERTY_CONTENT_TYPE); - $canMerge = $group->getProperty(\Magento\Page\Model\Asset\GroupedCollection::PROPERTY_CAN_MERGE); + $contentType = $group->getProperty(\Magento\View\Asset\GroupedCollection::PROPERTY_CONTENT_TYPE); + $canMerge = $group->getProperty(\Magento\View\Asset\GroupedCollection::PROPERTY_CAN_MERGE); $attributes = $group->getProperty('attributes'); $ieCondition = $group->getProperty('ie_condition'); $flagName = $group->getProperty('flag_name'); @@ -204,14 +197,14 @@ public function getCssJsHtml() * Render HTML tags referencing corresponding URLs * * @param string $template - * @param array|Iterator $assets + * @param array $assets * @return string */ protected function _renderHtml($template, $assets) { $result = ''; try { - /** @var $asset \Magento\Core\Model\Page\Asset\AssetInterface */ + /** @var $asset \Magento\View\Asset\AssetInterface */ foreach ($assets as $asset) { $result .= sprintf($template, $asset->getUrl()); } @@ -264,7 +257,7 @@ public function getCharset() * Set title element text * * @param string|array $title - * @return \Magento\Page\Block\Html\Head + * @return \Magento\Theme\Block\Html\Head */ public function setTitle($title) { @@ -274,8 +267,11 @@ public function setTitle($title) } else { $this->_pureTitle = $title; } - $this->_data['title'] = $this->_storeConfig->getConfig('design/head/title_prefix') . ' ' . $title + + $this->_data['title'] = $this->_storeConfig->getConfig('design/head/title_prefix') + . ' ' . $title . ' ' . $this->_storeConfig->getConfig('design/head/title_suffix'); + return $this; } @@ -396,7 +392,7 @@ protected function _getFaviconFile() if (!is_null($storeConfig) && $this->_isFile($absolutePath)) { $url = $faviconFile; } else { - $url = $this->getViewFileUrl('Magento_Page::favicon.ico'); + $url = $this->getViewFileUrl('Magento_Theme::favicon.ico'); } return $url; } diff --git a/app/code/Magento/Page/Block/Html/Head/AssetBlock.php b/app/code/Magento/Theme/Block/Html/Head/AssetBlockInterface.php similarity index 85% rename from app/code/Magento/Page/Block/Html/Head/AssetBlock.php rename to app/code/Magento/Theme/Block/Html/Head/AssetBlockInterface.php index 49d790123b70e..b440c35194d78 100644 --- a/app/code/Magento/Page/Block/Html/Head/AssetBlock.php +++ b/app/code/Magento/Theme/Block/Html/Head/AssetBlockInterface.php @@ -18,22 +18,21 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Block\Html\Head; +namespace Magento\Theme\Block\Html\Head; /** * Asset block interface */ -interface AssetBlock +interface AssetBlockInterface { /** * Get block asset - * @return \Magento\Core\Model\Page\Asset\AssetInterface + * + * @return \Magento\View\Asset\AssetInterface */ public function getAsset(); } diff --git a/app/code/Magento/Page/Block/Html/Head/Css.php b/app/code/Magento/Theme/Block/Html/Head/Css.php similarity index 72% rename from app/code/Magento/Page/Block/Html/Head/Css.php rename to app/code/Magento/Theme/Block/Html/Head/Css.php index 9c17ed16d9b46..5f09faa0d7dd6 100644 --- a/app/code/Magento/Page/Block/Html/Head/Css.php +++ b/app/code/Magento/Theme/Block/Html/Head/Css.php @@ -18,30 +18,25 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Block\Html\Head; +namespace Magento\Theme\Block\Html\Head; /** * Css page block */ -class Css extends \Magento\View\Block\AbstractBlock - implements \Magento\Page\Block\Html\Head\AssetBlock +class Css extends \Magento\View\Element\AbstractBlock implements AssetBlockInterface { /** - * Contructor - * - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory + * @param \Magento\View\Element\Template\Context $context + * @param \Magento\View\Asset\ViewFileFactory $viewFileFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory, + \Magento\View\Element\Template\Context $context, + \Magento\View\Asset\ViewFileFactory $viewFileFactory, array $data = array() ) { parent::__construct($context, $data); @@ -57,7 +52,7 @@ public function __construct( /** * Get block asset * - * @return \Magento\Core\Model\Page\Asset\AssetInterface + * @return \Magento\View\Asset\AssetInterface */ public function getAsset() { diff --git a/app/code/Magento/Page/Block/Html/Head/Link.php b/app/code/Magento/Theme/Block/Html/Head/Link.php similarity index 68% rename from app/code/Magento/Page/Block/Html/Head/Link.php rename to app/code/Magento/Theme/Block/Html/Head/Link.php index 74c8935314ae9..6a5597639b7c7 100644 --- a/app/code/Magento/Page/Block/Html/Head/Link.php +++ b/app/code/Magento/Theme/Block/Html/Head/Link.php @@ -18,35 +18,33 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Block\Html\Head; +namespace Magento\Theme\Block\Html\Head; /** * Link page block */ -class Link extends \Magento\View\Block\Template - implements \Magento\Page\Block\Html\Head\AssetBlock +class Link extends \Magento\View\Element\Template implements AssetBlockInterface { + /** + * Virtual content type + */ const VIRTUAL_CONTENT_TYPE = 'link'; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Page\Asset\RemoteFactory $remoteFactory + * @param \Magento\View\Element\Template\Context $context + * @param \Magento\View\Asset\RemoteFactory $remoteFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Page\Asset\RemoteFactory $remoteFactory, + \Magento\View\Element\Template\Context $context, + \Magento\View\Asset\RemoteFactory $remoteFactory, array $data = array() ) { - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); $this->setAsset( $remoteFactory->create(array( 'url' => (string)$this->getData('url'), @@ -58,7 +56,7 @@ public function __construct( /** * Get block asset * - * @return \Magento\Core\Model\Page\Asset\AssetInterface + * @return \Magento\View\Asset\AssetInterface */ public function getAsset() { diff --git a/app/code/Magento/Page/Block/Html/Head/Script.php b/app/code/Magento/Theme/Block/Html/Head/Script.php similarity index 72% rename from app/code/Magento/Page/Block/Html/Head/Script.php rename to app/code/Magento/Theme/Block/Html/Head/Script.php index 43e54b42fa47e..2d94ba22959e9 100644 --- a/app/code/Magento/Page/Block/Html/Head/Script.php +++ b/app/code/Magento/Theme/Block/Html/Head/Script.php @@ -18,30 +18,26 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Block\Html\Head; +namespace Magento\Theme\Block\Html\Head; +use Magento\Theme\Block\Html\Head\AssetBlockInterface; /** * Script page block */ -class Script extends \Magento\View\Block\AbstractBlock - implements \Magento\Page\Block\Html\Head\AssetBlock +class Script extends \Magento\View\Element\AbstractBlock implements AssetBlockInterface { /** - * Contructor - * - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory + * @param \Magento\View\Element\Template\Context $context + * @param \Magento\View\Asset\ViewFileFactory $viewFileFactory * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Model\Page\Asset\ViewFileFactory $viewFileFactory, + \Magento\View\Element\Template\Context $context, + \Magento\View\Asset\ViewFileFactory $viewFileFactory, array $data = array() ) { parent::__construct($context, $data); @@ -56,7 +52,7 @@ public function __construct( /** * Get block asset * - * @return \Magento\Core\Model\Page\Asset\AssetInterface + * @return \Magento\View\Asset\AssetInterface */ public function getAsset() { diff --git a/app/code/Magento/Page/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php similarity index 79% rename from app/code/Magento/Page/Block/Html/Header.php rename to app/code/Magento/Theme/Block/Html/Header.php index 8a55b5178bfe5..ba263345778e9 100644 --- a/app/code/Magento/Page/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -18,47 +18,41 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; + /** - * Html page block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team + * Html page header block */ -namespace Magento\Page\Block\Html; - -class Header extends \Magento\View\Block\Template +class Header extends \Magento\View\Element\Template { + /** + * Current template name + * + * @var string + */ + protected $_template = 'html/header.phtml'; + /** * @var \Magento\Customer\Model\Session */ protected $_customerSession; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, array $data = array() ) { $this->_customerSession = $customerSession; - parent::__construct($context, $coreData, $data); - } - - public function _construct() - { - $this->setTemplate('html/header.phtml'); + parent::__construct($context, $data); } /** @@ -66,7 +60,7 @@ public function _construct() * * @return bool */ - public function getIsHomePage() + public function isHomePage() { return $this->getUrl('', array('_current' => true)) == $this->getUrl( '*/*/*', @@ -74,13 +68,6 @@ public function getIsHomePage() ); } - public function setLogo($logo_src, $logo_alt) - { - $this->setLogoSrc($logo_src); - $this->setLogoAlt($logo_alt); - return $this; - } - /** * Get logo image URL * @@ -94,6 +81,11 @@ public function getLogoSrc() return $this->_data['logo_src']; } + /** + * Retrieve logo text + * + * @return string + */ public function getLogoAlt() { if (empty($this->_data['logo_alt'])) { @@ -102,16 +94,21 @@ public function getLogoAlt() return $this->_data['logo_alt']; } + /** + * Retrieve welcome text + * + * @return string + */ public function getWelcome() { if (empty($this->_data['welcome'])) { if ($this->_appState->isInstalled() && $this->_customerSession->isLoggedIn()) { - $this->_data['welcome'] = __('Welcome, %1!', $this->escapeHtml($this->_customerSession->getCustomer()->getName())); + $this->_data['welcome'] = __('Welcome, %1!', + $this->escapeHtml($this->_customerSession->getCustomer()->getName())); } else { $this->_data['welcome'] = $this->_storeConfig->getConfig('design/header/welcome'); } } - return $this->_data['welcome']; } @@ -134,7 +131,6 @@ protected function _getLogoUrl() } else { $url = $this->getViewFileUrl('images/logo.gif'); } - return $url; } diff --git a/app/code/Magento/Page/Block/Html/Notices.php b/app/code/Magento/Theme/Block/Html/Notices.php similarity index 78% rename from app/code/Magento/Page/Block/Html/Notices.php rename to app/code/Magento/Theme/Block/Html/Notices.php index e24dd186ed3ce..6891bbb6ca192 100644 --- a/app/code/Magento/Page/Block/Html/Notices.php +++ b/app/code/Magento/Theme/Block/Html/Notices.php @@ -18,22 +18,16 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; + /** - * Html notices block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team + * Html page notices block */ -namespace Magento\Page\Block\Html; - -class Notices extends \Magento\View\Block\Template +class Notices extends \Magento\View\Element\Template { /** * @var \Magento\Core\Model\Url @@ -41,19 +35,17 @@ class Notices extends \Magento\View\Block\Template protected $_urlModel; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Core\Model\Url $urlModel * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Core\Model\Url $urlModel, array $data = array() ) { $this->_urlModel = $urlModel; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Page/Block/Html/Pager.php b/app/code/Magento/Theme/Block/Html/Pager.php similarity index 74% rename from app/code/Magento/Page/Block/Html/Pager.php rename to app/code/Magento/Theme/Block/Html/Pager.php index 42c0009aa5ea4..57171ff556395 100644 --- a/app/code/Magento/Page/Block/Html/Pager.php +++ b/app/code/Magento/Theme/Block/Html/Pager.php @@ -18,73 +18,114 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; + /** - * Html page block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team - * - * @todo separate order, mode and pager + * Html pager block + * @SuppressWarnings(PHPMD.ExcessivePublicCount) */ -namespace Magento\Page\Block\Html; - -class Pager extends \Magento\View\Block\Template +class Pager extends \Magento\View\Element\Template { - protected $_collection = null; - protected $_pageVarName = 'p'; - protected $_limitVarName = 'limit'; - protected $_availableLimit = array(10=>10,20=>20,50=>50); - protected $_dispersion = 3; - protected $_displayPages = 5; - protected $_showPerPage = true; - protected $_limit = null; + /** + * Current template name + * + * @var string + */ + protected $_template = 'Magento_Theme::html/pager.phtml'; + + /** + * @var \Magento\Data\Collection + */ + protected $_collection; + + /** + * @var string + */ + protected $_pageVarName = 'p'; + + /** + * @var string + */ + protected $_limitVarName = 'limit'; + + /** + * The list of available pager limits + * + * @var array + */ + protected $_availableLimit = array( + 10 => 10, + 20 => 20, + 50 => 50, + ); + + /** + * @var int + */ + protected $_displayPages = 5; + + /** + * @var bool + */ + protected $_showPerPage = true; + + /** + * @var null + */ + protected $_limit; + + /** + * @var bool + */ protected $_outputRequired = true; /** * Pages quantity per frame + * * @var int */ protected $_frameLength = 5; /** * Next/previous page position relatively to the current frame + * * @var int */ protected $_jump = 5; /** * Frame initialization flag + * * @var bool */ protected $_frameInitialized = false; /** * Start page position in frame + * * @var int */ protected $_frameStart; /** * Finish page position in frame + * * @var int */ protected $_frameEnd; - protected $_template = 'Magento_Page::html/pager.phtml'; - + /** + * Set pager data + */ protected function _construct() { parent::_construct(); $this->setData('show_amounts', true); $this->setData('use_container', true); - } /** @@ -110,12 +151,14 @@ public function getLimit() if ($this->_limit !== null) { return $this->_limit; } + $limits = $this->getAvailableLimit(); if ($limit = $this->getRequest()->getParam($this->getLimitVarName())) { if (isset($limits[$limit])) { return $limit; } } + $limits = array_keys($limits); return $limits[0]; } @@ -124,7 +167,7 @@ public function getLimit() * Setter for limit items per page * * @param int $limit - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ public function setLimit($limit) { @@ -136,12 +179,11 @@ public function setLimit($limit) * Set collection for pagination * * @param \Magento\Data\Collection $collection - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ public function setCollection($collection) { - $this->_collection = $collection - ->setCurPage($this->getCurrentPage()); + $this->_collection = $collection->setCurPage($this->getCurrentPage()); // If not int - then not limit if ((int) $this->getLimit()) { $this->_collection->setPageSize($this->getLimit()); @@ -153,168 +195,268 @@ public function setCollection($collection) } /** - * @return \Magento\Core\Model\Resource\Db\Collection\AbstractCollection + * @return \Magento\Data\Collection */ public function getCollection() { return $this->_collection; } + /** + * @param string $varName + * @return \Magento\Theme\Block\Html\Pager + */ public function setPageVarName($varName) { $this->_pageVarName = $varName; return $this; } + /** + * @return string + */ public function getPageVarName() { return $this->_pageVarName; } + /** + * @param bool $varName + * @return \Magento\Theme\Block\Html\Pager + */ public function setShowPerPage($varName) { - $this->_showPerPage=$varName; + $this->_showPerPage = $varName; return $this; } - public function getShowPerPage() + /** + * @return bool + */ + public function isShowPerPage() { - if(sizeof($this->getAvailableLimit())<=1) { + if (sizeof($this->getAvailableLimit()) <= 1) { return false; } return $this->_showPerPage; } + /** + * Set the name for pager limit data + * + * @param string $varName + * @return \Magento\Theme\Block\Html\Pager + */ public function setLimitVarName($varName) { $this->_limitVarName = $varName; return $this; } + /** + * Retrieve name for pager limit data + * + * @return string + */ public function getLimitVarName() { return $this->_limitVarName; } + /** + * Set pager limit + * + * @param array $limits + */ public function setAvailableLimit(array $limits) { $this->_availableLimit = $limits; } + /** + * Retrieve pager limit + * + * @return array + */ public function getAvailableLimit() { return $this->_availableLimit; } + /** + * @return int + */ public function getFirstNum() { $collection = $this->getCollection(); - return $collection->getPageSize()*($collection->getCurPage()-1)+1; + return $collection->getPageSize() * ($collection->getCurPage() - 1) + 1; } + /** + * @return int + */ public function getLastNum() { $collection = $this->getCollection(); - return $collection->getPageSize()*($collection->getCurPage()-1)+$collection->count(); + return $collection->getPageSize() * ($collection->getCurPage() - 1) + $collection->count(); } + /** + * Retrieve total number of pages + * + * @return int + */ public function getTotalNum() { return $this->getCollection()->getSize(); } + /** + * Check if current page is a first page in collection + * + * @return bool + */ public function isFirstPage() { return $this->getCollection()->getCurPage() == 1; } + /** + * Retrieve number of last page + * + * @return int + */ public function getLastPageNum() { return $this->getCollection()->getLastPageNumber(); } + /** + * Check if current page is a last page in collection + * + * @return bool + */ public function isLastPage() { return $this->getCollection()->getCurPage() >= $this->getLastPageNum(); } + /** + * @param int $limit + * @return bool + */ public function isLimitCurrent($limit) { return $limit == $this->getLimit(); } + /** + * @param int $page + * @return bool + */ public function isPageCurrent($page) { return $page == $this->getCurrentPage(); } + /** + * @return array + */ public function getPages() { $collection = $this->getCollection(); - - $pages = array(); if ($collection->getLastPageNumber() <= $this->_displayPages) { - $pages = range(1, $collection->getLastPageNumber()); - } - else { + return range(1, $collection->getLastPageNumber()); + } else { $half = ceil($this->_displayPages / 2); if ($collection->getCurPage() >= $half && $collection->getCurPage() <= $collection->getLastPageNumber() - $half ) { $start = ($collection->getCurPage() - $half) + 1; $finish = ($start + $this->_displayPages) - 1; - } - elseif ($collection->getCurPage() < $half) { + } elseif ($collection->getCurPage() < $half) { $start = 1; $finish = $this->_displayPages; - } - elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) { + } elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) { $finish = $collection->getLastPageNumber(); $start = $finish - $this->_displayPages + 1; } - - $pages = range($start, $finish); + return range($start, $finish); } - return $pages; } + /** + * @return string + */ public function getFirstPageUrl() { return $this->getPageUrl(1); } + /** + * Retrieve previous page URL + * + * @return string + */ public function getPreviousPageUrl() { return $this->getPageUrl($this->getCollection()->getCurPage(-1)); } + /** + * Retrieve next page URL + * + * @return string + */ public function getNextPageUrl() { return $this->getPageUrl($this->getCollection()->getCurPage(+1)); } + /** + * Retrieve last page URL + * + * @return string + */ public function getLastPageUrl() { return $this->getPageUrl($this->getCollection()->getLastPageNumber()); } + /** + * Retrieve page URL + * + * @param string $page + * @return string + */ public function getPageUrl($page) { - return $this->getPagerUrl(array($this->getPageVarName()=>$page)); + return $this->getPagerUrl(array($this->getPageVarName() => $page)); } + /** + * @param int $limit + * @return string + */ public function getLimitUrl($limit) { - return $this->getPagerUrl(array($this->getLimitVarName()=>$limit)); + return $this->getPagerUrl(array($this->getLimitVarName() => $limit)); } - public function getPagerUrl($params=array()) + /** + * Retrieve page URL by defined parameters + * + * @param array $params + * @return string + */ + public function getPagerUrl($params = array()) { $urlParams = array(); - $urlParams['_current'] = true; - $urlParams['_escape'] = true; - $urlParams['_use_rewrite'] = true; - $urlParams['_query'] = $params; + $urlParams['_current'] = true; + $urlParams['_escape'] = true; + $urlParams['_use_rewrite'] = true; + $urlParams['_query'] = $params; + return $this->getUrl('*/*/*', $urlParams); } @@ -362,6 +504,7 @@ public function getPreviousJumpPage() if (!$this->getJump()) { return null; } + $frameStart = $this->getFrameStart(); if ($frameStart - 1 > 1) { return max(2, $frameStart - $this->getJump()); @@ -390,6 +533,7 @@ public function getNextJumpPage() if (!$this->getJump()) { return null; } + $frameEnd = $this->getFrameEnd(); if ($this->getLastPageNum() - $frameEnd > 1) { return min($this->getLastPageNum() - 1, $frameEnd + $this->getJump()); @@ -432,7 +576,7 @@ public function getJump() * Setter for $_frameLength * * @param int $frame - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ public function setFrameLength($frame) { @@ -452,7 +596,7 @@ public function setFrameLength($frame) * Setter for $_jump * * @param int $jump - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ public function setJump($jump) { @@ -508,7 +652,7 @@ public function canShowNextJump() /** * Initialize frame data, such as frame start, frame start etc. * - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ protected function _initFrame() { @@ -520,20 +664,17 @@ protected function _initFrame() if ($collection->getLastPageNumber() <= $this->getFrameLength()) { $start = 1; $end = $collection->getLastPageNumber(); - } - else { + } else { $half = ceil($this->getFrameLength() / 2); if ($collection->getCurPage() >= $half && $collection->getCurPage() <= $collection->getLastPageNumber() - $half ) { $start = ($collection->getCurPage() - $half) + 1; $end = ($start + $this->getFrameLength()) - 1; - } - elseif ($collection->getCurPage() < $half) { + } elseif ($collection->getCurPage() < $half) { $start = 1; $end = $this->getFrameLength(); - } - elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) { + } elseif ($collection->getCurPage() > ($collection->getLastPageNumber() - $half)) { $end = $collection->getLastPageNumber(); $start = $end - $this->getFrameLength() + 1; } @@ -551,7 +692,7 @@ protected function _initFrame() * Setter for flag _frameInitialized * * @param bool $flag - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ protected function _setFrameInitialized($flag) { @@ -562,7 +703,7 @@ protected function _setFrameInitialized($flag) /** * Check if frame data was initialized * - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ public function isFrameInitialized() { @@ -593,7 +734,7 @@ public function getAnchorTextForNext() * Set whether output of the pager is mandatory * * @param bool $isRequired - * @return \Magento\Page\Block\Html\Pager + * @return \Magento\Theme\Block\Html\Pager */ public function setIsOutputRequired($isRequired) { diff --git a/app/code/Magento/Page/Block/Html/Title.php b/app/code/Magento/Theme/Block/Html/Title.php similarity index 85% rename from app/code/Magento/Page/Block/Html/Title.php rename to app/code/Magento/Theme/Block/Html/Title.php index ce8d97e9bfd0c..8558dda2ff001 100644 --- a/app/code/Magento/Page/Block/Html/Title.php +++ b/app/code/Magento/Theme/Block/Html/Title.php @@ -18,21 +18,16 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Core * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; /** - * Template title block - * - * @author Magento Core Team + * Html page title block */ -namespace Magento\Page\Block\Html; - -class Title extends \Magento\View\Block\Template +class Title extends \Magento\View\Element\Template { /** * Own page title to display on the page @@ -57,7 +52,7 @@ public function getPageTitle() /** * Set own page title * - * @param $pageTitle + * @param string $pageTitle */ public function setPageTitle($pageTitle) { diff --git a/app/code/Magento/Page/Block/Html/Topmenu.php b/app/code/Magento/Theme/Block/Html/Topmenu.php similarity index 91% rename from app/code/Magento/Page/Block/Html/Topmenu.php rename to app/code/Magento/Theme/Block/Html/Topmenu.php index f72d63916238e..e320d337f00b6 100644 --- a/app/code/Magento/Page/Block/Html/Topmenu.php +++ b/app/code/Magento/Theme/Block/Html/Topmenu.php @@ -18,22 +18,16 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Theme\Block\Html; + /** - * Top menu block - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team + * Html page top menu block */ -namespace Magento\Page\Block\Html; - -class Topmenu extends \Magento\View\Block\Template +class Topmenu extends \Magento\View\Element\Template { /** * Top menu data tree @@ -55,12 +49,13 @@ public function _construct() * * @param string $outermostClass * @param string $childrenWrapClass + * @param int $limit * @return string */ public function getHtml($outermostClass = '', $childrenWrapClass = '', $limit = 0) { $this->_eventManager->dispatch('page_block_html_topmenu_gethtml_before', array( - 'menu' => $this->_menu + 'menu' => $this->_menu, )); $this->_menu->setOutermostClass($outermostClass); @@ -70,7 +65,7 @@ public function getHtml($outermostClass = '', $childrenWrapClass = '', $limit = $transportObject = new \Magento\Object(array('html' => $html)); $this->_eventManager->dispatch('page_block_html_topmenu_gethtml_after', array( - 'menu' => $this->_menu, + 'menu' => $this->_menu, 'transportObject' => $transportObject, )); @@ -101,25 +96,28 @@ protected function _countItems($items) * @param \Magento\Backend\Model\Menu $items * @param int $limit * @return array + * * @todo: Add Depth Level limit, and better logic for columns */ protected function _columnBrake($items, $limit) { $total = $this->_countItems($items); - if ($total <= $limit) { return; } + $result[] = array( - 'total' => $total, - 'max' => (int)ceil($total / ceil($total / $limit)) - ); + 'total' => $total, + 'max' => (int)ceil($total / ceil($total / $limit)), + ); $count = 0; $firstCol = true; + foreach ($items as $item) { $place = $this->_countItems($item->getChildren()) + 1; $count += $place; + if ($place >= $limit) { $colbrake = !$firstCol; $count = 0; @@ -129,21 +127,25 @@ protected function _columnBrake($items, $limit) } else { $colbrake = false; } + $result[] = array( 'place' => $place, - 'colbrake' => $colbrake + 'colbrake' => $colbrake, ); + $firstCol = false; } + return $result; } /** * Add sub menu HTML code for current menu item * - * @param $menuItem \Magento\Backend\Model\Menu\Item - * @param $level int - * @param $limit int + * @param \Magento\Data\Tree\Node $child + * @param string $childLevel + * @param string $childrenWrapClass + * @param int $limit * @return string HTML code */ protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit) @@ -152,13 +154,16 @@ protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit) if (!$child->hasChildren()) { return $html; } + if (!empty($childrenWrapClass)) { $html .= '
'; } + $colStops = null; if ($childLevel == 0 && $limit) { $colStops = $this->_columnBrake($child->getChildren(), $limit); } + $html .= '
    '; $html .= $this->_getHtml($child, $childrenWrapClass, $limit, $colStops); $html .= '
'; @@ -166,15 +171,20 @@ protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit) if (!empty($childrenWrapClass)) { $html .= '
'; } + return $html; } - /** * Recursively generates top menu html from data that is specified in $menuTree * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + * * @param \Magento\Data\Tree\Node $menuTree * @param string $childrenWrapClass + * @param int $limit + * @param array $colBrakes * @return string */ protected function _getHtml(\Magento\Data\Tree\Node $menuTree, $childrenWrapClass, $limit, $colBrakes = array()) @@ -193,7 +203,6 @@ protected function _getHtml(\Magento\Data\Tree\Node $menuTree, $childrenWrapClas $itemPositionClassPrefix = $parentPositionClass ? $parentPositionClass . '-' : 'nav-'; foreach ($children as $child) { - $child->setLevel($childLevel); $child->setIsFirst($counter == 1); $child->setIsLast($counter == $childrenCount); @@ -237,11 +246,9 @@ protected function _getRenderedMenuItemAttributes(\Magento\Data\Tree\Node $item) { $html = ''; $attributes = $this->_getMenuItemAttributes($item); - foreach ($attributes as $attributeName => $attributeValue) { $html .= ' ' . $attributeName . '="' . str_replace('"', '\"', $attributeValue) . '"'; } - return $html; } @@ -254,11 +261,7 @@ protected function _getRenderedMenuItemAttributes(\Magento\Data\Tree\Node $item) protected function _getMenuItemAttributes(\Magento\Data\Tree\Node $item) { $menuItemClasses = $this->_getMenuItemClasses($item); - $attributes = array( - 'class' => implode(' ', $menuItemClasses) - ); - - return $attributes; + return array('class' => implode(' ', $menuItemClasses)); } /** diff --git a/app/code/Magento/Theme/Block/Html/Welcome.php b/app/code/Magento/Theme/Block/Html/Welcome.php new file mode 100644 index 0000000000000..19c9308fcd233 --- /dev/null +++ b/app/code/Magento/Theme/Block/Html/Welcome.php @@ -0,0 +1,41 @@ +_layout->getBlock('header')->getWelcome(); + } +} diff --git a/app/code/Magento/Page/Helper/Layout.php b/app/code/Magento/Theme/Helper/Layout.php similarity index 86% rename from app/code/Magento/Page/Helper/Layout.php rename to app/code/Magento/Theme/Helper/Layout.php index 680c21a624c3c..46b1396f4d9c0 100644 --- a/app/code/Magento/Page/Helper/Layout.php +++ b/app/code/Magento/Theme/Helper/Layout.php @@ -18,20 +18,11 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Page layout helper - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team - */ -namespace Magento\Page\Helper; +namespace Magento\Theme\Helper; class Layout extends \Magento\App\Helper\AbstractHelper { @@ -41,30 +32,30 @@ class Layout extends \Magento\App\Helper\AbstractHelper protected $_layout; /** - * @var \Magento\Page\Model\Config + * @var \Magento\Theme\Model\Layout\Config */ protected $_config; /** - * @param \Magento\Page\Model\Config $config - * @param \Magento\View\LayoutInterface $layout * @param \Magento\App\Helper\Context $context + * @param \Magento\Theme\Model\Layout\Config $config + * @param \Magento\View\LayoutInterface $layout */ public function __construct( - \Magento\Page\Model\Config $config, - \Magento\View\LayoutInterface $layout, - \Magento\App\Helper\Context $context + \Magento\App\Helper\Context $context, + \Magento\Theme\Model\Layout\Config $config, + \Magento\View\LayoutInterface $layout ) { - parent::__construct($context); $this->_layout = $layout; $this->_config = $config; + parent::__construct($context); } /** * Apply page layout handle * * @param string $pageLayout - * @return \Magento\Page\Helper\Layout + * @return \Magento\Theme\Helper\Layout */ public function applyHandle($pageLayout) { @@ -85,7 +76,7 @@ public function applyHandle($pageLayout) * (for old design packages) * * @param string $pageLayout - * @return \Magento\Page\Helper\Layout + * @return \Magento\Theme\Helper\Layout */ public function applyTemplate($pageLayout = null) { diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php index ffd0e16b388c9..aaf39aba2d8e8 100644 --- a/app/code/Magento/Theme/Helper/Storage.php +++ b/app/code/Magento/Theme/Helper/Storage.php @@ -98,16 +98,16 @@ class Storage extends \Magento\App\Helper\AbstractHelper protected $_themeFactory; /** + * @param \Magento\App\Helper\Context $context * @param \Magento\Filesystem $filesystem * @param \Magento\Backend\Model\Session $session * @param \Magento\View\Design\Theme\FlyweightFactory $themeFactory - * @param \Magento\App\Helper\Context $context */ public function __construct( + \Magento\App\Helper\Context $context, \Magento\Filesystem $filesystem, \Magento\Backend\Model\Session $session, - \Magento\View\Design\Theme\FlyweightFactory $themeFactory, - \Magento\App\Helper\Context $context + \Magento\View\Design\Theme\FlyweightFactory $themeFactory ) { parent::__construct($context); $this->_filesystem = $filesystem; diff --git a/app/code/Magento/Page/Model/Config.php b/app/code/Magento/Theme/Model/Layout/Config.php similarity index 94% rename from app/code/Magento/Page/Model/Config.php rename to app/code/Magento/Theme/Model/Layout/Config.php index 41844f090c6e5..36fcc1252bafb 100644 --- a/app/code/Magento/Page/Model/Config.php +++ b/app/code/Magento/Theme/Model/Layout/Config.php @@ -20,12 +20,10 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Model; +namespace Magento\Theme\Model\Layout; class Config { @@ -53,7 +51,7 @@ public function __construct( /** * Initialize page layouts list * - * @return \Magento\Page\Model\Config + * @return \Magento\Theme\Model\Layout\Config */ protected function _initPageLayouts() { @@ -70,7 +68,7 @@ protected function _initPageLayouts() /** * Retrieve available page layouts * - * @return array \Magento\Object[] + * @return \Magento\Object[] */ public function getPageLayouts() { diff --git a/app/code/Magento/Page/Model/Config/Converter.php b/app/code/Magento/Theme/Model/Layout/Config/Converter.php similarity index 97% rename from app/code/Magento/Page/Model/Config/Converter.php rename to app/code/Magento/Theme/Model/Layout/Config/Converter.php index faeaa25152672..af20023a8923d 100644 --- a/app/code/Magento/Page/Model/Config/Converter.php +++ b/app/code/Magento/Theme/Model/Layout/Config/Converter.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Model\Config; +namespace Magento\Theme\Model\Layout\Config; class Converter implements \Magento\Config\ConverterInterface { diff --git a/app/code/Magento/Page/Model/Config/Reader.php b/app/code/Magento/Theme/Model/Layout/Config/Reader.php similarity index 96% rename from app/code/Magento/Page/Model/Config/Reader.php rename to app/code/Magento/Theme/Model/Layout/Config/Reader.php index e50e66cc6c2ec..6645e981503fb 100644 --- a/app/code/Magento/Page/Model/Config/Reader.php +++ b/app/code/Magento/Theme/Model/Layout/Config/Reader.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Model\Config; +namespace Magento\Theme\Model\Layout\Config; class Reader extends \Magento\Config\Reader\Filesystem { diff --git a/app/code/Magento/Page/Model/Config/SchemaLocator.php b/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php similarity index 93% rename from app/code/Magento/Page/Model/Config/SchemaLocator.php rename to app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php index cd17bdabf20db..64b6d8cd4af43 100644 --- a/app/code/Magento/Page/Model/Config/SchemaLocator.php +++ b/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Page\Model\Config; +namespace Magento\Theme\Model\Layout\Config; class SchemaLocator implements \Magento\Config\SchemaLocatorInterface { @@ -46,8 +46,8 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface */ public function __construct(\Magento\Module\Dir\Reader $moduleReader) { - $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Page') . '/page_layouts.xsd'; - $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Page') . '/page_layouts_file.xsd'; + $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Theme') . '/page_layouts.xsd'; + $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Theme') . '/page_layouts_file.xsd'; } /** diff --git a/app/code/Magento/Page/Model/Source/Layout.php b/app/code/Magento/Theme/Model/Layout/Source/Layout.php similarity index 87% rename from app/code/Magento/Page/Model/Source/Layout.php rename to app/code/Magento/Theme/Model/Layout/Source/Layout.php index dbb534d0bdae9..4f35ddc45bf09 100644 --- a/app/code/Magento/Page/Model/Source/Layout.php +++ b/app/code/Magento/Theme/Model/Layout/Source/Layout.php @@ -18,33 +18,23 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -/** - * Page layouts source - * - * @category Magento - * @package Magento_Page - * @author Magento Core Team - */ -namespace Magento\Page\Model\Source; +namespace Magento\Theme\Model\Layout\Source; class Layout implements \Magento\Core\Model\Option\ArrayInterface { /** - * @var \Magento\Page\Model\Config + * @var \Magento\Theme\Model\Layout\Config */ protected $_config; /** - * @param \Magento\Page\Model\Config $config + * @param \Magento\Theme\Model\Layout\Config $config */ public function __construct( - \Magento\Page\Model\Config $config + \Magento\Theme\Model\Layout\Config $config ) { $this->_config = $config; } @@ -85,6 +75,7 @@ public function getOptions() /** * Retrieve page layout options array * + * @param bool $withEmpty * @return array */ public function toOptionArray($withEmpty = false) diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php index a6cebc9def537..3003b9c164de9 100644 --- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php +++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php @@ -129,7 +129,7 @@ public function uploadFile($targetPath) ); $result['cookie'] = array( - 'name' => $this->_helper->getSession()->getSessionName(), + 'name' => $this->_helper->getSession()->getName(), 'value' => $this->_helper->getSession()->getSessionId(), 'lifetime' => $this->_helper->getSession()->getCookieLifetime(), 'path' => $this->_helper->getSession()->getCookiePath(), diff --git a/app/code/Magento/Page/etc/adminhtml/system.xml b/app/code/Magento/Theme/etc/adminhtml/system.xml similarity index 99% rename from app/code/Magento/Page/etc/adminhtml/system.xml rename to app/code/Magento/Theme/etc/adminhtml/system.xml index 2f45806cae3d6..06baf8efc7afc 100644 --- a/app/code/Magento/Page/etc/adminhtml/system.xml +++ b/app/code/Magento/Theme/etc/adminhtml/system.xml @@ -19,8 +19,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Magento - * @package Magento_Page * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/Magento/Theme/etc/config.xml b/app/code/Magento/Theme/etc/config.xml index 707f1780a8f8c..0eb1ed6fe065d 100644 --- a/app/code/Magento/Theme/etc/config.xml +++ b/app/code/Magento/Theme/etc/config.xml @@ -27,10 +27,59 @@ --> + + + Magento Commerce + Default Description + Magento, Varien, E-commerce + text/html + utf-8 + + + INDEX,FOLLOW + + + + +
+ Magento Commerce + Default welcome msg! +
+
+ &copy; 2013 Magento Demo Store. All Rights Reserved. +
+
Magento\Theme\Model\Theme\Customization\File\CustomCss + + + + favicon + + +
diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml index e0d6c92995b1b..133b456dedc10 100644 --- a/app/code/Magento/Theme/etc/di.xml +++ b/app/code/Magento/Theme/etc/di.xml @@ -40,4 +40,28 @@ + + + page_layouts.xml + + + + + + + + + + + + + + page_layouts_config + + + + + + + diff --git a/app/code/Magento/Theme/etc/module.xml b/app/code/Magento/Theme/etc/module.xml index 1078e7550e87b..dda559740ee06 100755 --- a/app/code/Magento/Theme/etc/module.xml +++ b/app/code/Magento/Theme/etc/module.xml @@ -25,11 +25,15 @@ --> + + + + - + diff --git a/app/code/Magento/Page/etc/page_layouts.xml b/app/code/Magento/Theme/etc/page_layouts.xml similarity index 100% rename from app/code/Magento/Page/etc/page_layouts.xml rename to app/code/Magento/Theme/etc/page_layouts.xml diff --git a/app/code/Magento/Page/etc/page_layouts.xsd b/app/code/Magento/Theme/etc/page_layouts.xsd similarity index 100% rename from app/code/Magento/Page/etc/page_layouts.xsd rename to app/code/Magento/Theme/etc/page_layouts.xsd diff --git a/app/code/Magento/Page/etc/page_layouts_file.xsd b/app/code/Magento/Theme/etc/page_layouts_file.xsd similarity index 100% rename from app/code/Magento/Page/etc/page_layouts_file.xsd rename to app/code/Magento/Theme/etc/page_layouts_file.xsd diff --git a/app/code/Magento/Page/i18n/de_DE.csv b/app/code/Magento/Theme/i18n/de_DE.csv similarity index 100% rename from app/code/Magento/Page/i18n/de_DE.csv rename to app/code/Magento/Theme/i18n/de_DE.csv diff --git a/app/code/Magento/Page/i18n/en_US.csv b/app/code/Magento/Theme/i18n/en_US.csv similarity index 100% rename from app/code/Magento/Page/i18n/en_US.csv rename to app/code/Magento/Theme/i18n/en_US.csv diff --git a/app/code/Magento/Page/i18n/es_ES.csv b/app/code/Magento/Theme/i18n/es_ES.csv similarity index 100% rename from app/code/Magento/Page/i18n/es_ES.csv rename to app/code/Magento/Theme/i18n/es_ES.csv diff --git a/app/code/Magento/Page/i18n/fr_FR.csv b/app/code/Magento/Theme/i18n/fr_FR.csv similarity index 100% rename from app/code/Magento/Page/i18n/fr_FR.csv rename to app/code/Magento/Theme/i18n/fr_FR.csv diff --git a/app/code/Magento/Page/i18n/nl_NL.csv b/app/code/Magento/Theme/i18n/nl_NL.csv similarity index 100% rename from app/code/Magento/Page/i18n/nl_NL.csv rename to app/code/Magento/Theme/i18n/nl_NL.csv diff --git a/app/code/Magento/Page/i18n/pt_BR.csv b/app/code/Magento/Theme/i18n/pt_BR.csv similarity index 100% rename from app/code/Magento/Page/i18n/pt_BR.csv rename to app/code/Magento/Theme/i18n/pt_BR.csv diff --git a/app/code/Magento/Page/i18n/zh_CN.csv b/app/code/Magento/Theme/i18n/zh_CN.csv similarity index 100% rename from app/code/Magento/Page/i18n/zh_CN.csv rename to app/code/Magento/Theme/i18n/zh_CN.csv diff --git a/app/code/Magento/Page/view/adminhtml/empty.phtml b/app/code/Magento/Theme/view/adminhtml/empty.phtml similarity index 100% rename from app/code/Magento/Page/view/adminhtml/empty.phtml rename to app/code/Magento/Theme/view/adminhtml/empty.phtml diff --git a/app/code/Magento/Page/view/adminhtml/favicon.ico b/app/code/Magento/Theme/view/adminhtml/favicon.ico similarity index 100% rename from app/code/Magento/Page/view/adminhtml/favicon.ico rename to app/code/Magento/Theme/view/adminhtml/favicon.ico diff --git a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_edit.xml b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_edit.xml index 98dcbb5ded4a1..aa713d5164a79 100644 --- a/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_edit.xml +++ b/app/code/Magento/Theme/view/adminhtml/layout/adminhtml_system_design_theme_edit.xml @@ -31,72 +31,72 @@ 1 - + jquery/fileUploader/css/jquery.fileupload-ui.css - + jquery/fileUploader/jquery.iframe-transport.js - + jquery/fileUploader/jquery.fileupload.js - + jquery/fileUploader/load-image.min.js - + jquery/fileUploader/canvas-to-blob.min.js - + jquery/fileUploader/jquery.fileupload-fp.js - + Magento_Theme::js/custom-js-list.js - + mage/adminhtml/browser.js - + jquery/fileUploader/jquery.fileupload-ui.js - + Magento_Theme::js/form.js - + Magento_Theme::js/sortable.js - + Magento_Theme::css/theme.css - + prototype/windows/themes/default.css - + Magento_Core::prototype/magento.css diff --git a/app/code/Magento/Page/view/adminhtml/title.phtml b/app/code/Magento/Theme/view/adminhtml/title.phtml similarity index 97% rename from app/code/Magento/Page/view/adminhtml/title.phtml rename to app/code/Magento/Theme/view/adminhtml/title.phtml index 2f01dabfb785d..2d77a73116afb 100644 --- a/app/code/Magento/Page/view/adminhtml/title.phtml +++ b/app/code/Magento/Theme/view/adminhtml/title.phtml @@ -25,7 +25,7 @@ */ /** - * @var $this \Magento\Page\Block\Html\Title + * @var $this \Magento\Theme\Block\Html\Title */ $titleId = ($this->getTitleId()) ? ' id="' . $this->getTitleId() . '"' : ''; $titleClass = ($this->getTitleClass()) ? ' ' . $this->getTitleClass() : ''; diff --git a/app/code/Magento/Page/view/frontend/1column.phtml b/app/code/Magento/Theme/view/frontend/1column.phtml similarity index 98% rename from app/code/Magento/Page/view/frontend/1column.phtml rename to app/code/Magento/Theme/view/frontend/1column.phtml index da0e81c630b1c..59049a4971927 100644 --- a/app/code/Magento/Page/view/frontend/1column.phtml +++ b/app/code/Magento/Theme/view/frontend/1column.phtml @@ -25,7 +25,7 @@ ?> getBodyClass() ? $this->getBodyClass() : ''; ?> diff --git a/app/code/Magento/Page/view/frontend/2columns-left.phtml b/app/code/Magento/Theme/view/frontend/2columns-left.phtml similarity index 98% rename from app/code/Magento/Page/view/frontend/2columns-left.phtml rename to app/code/Magento/Theme/view/frontend/2columns-left.phtml index 6af17516b6837..eb2c28279c923 100644 --- a/app/code/Magento/Page/view/frontend/2columns-left.phtml +++ b/app/code/Magento/Theme/view/frontend/2columns-left.phtml @@ -25,7 +25,7 @@ ?> getBodyClass() ? $this->getBodyClass() : ''; ?> diff --git a/app/code/Magento/Page/view/frontend/2columns-right.phtml b/app/code/Magento/Theme/view/frontend/2columns-right.phtml similarity index 98% rename from app/code/Magento/Page/view/frontend/2columns-right.phtml rename to app/code/Magento/Theme/view/frontend/2columns-right.phtml index 7b5aae3b2b84d..e15b815a18a94 100644 --- a/app/code/Magento/Page/view/frontend/2columns-right.phtml +++ b/app/code/Magento/Theme/view/frontend/2columns-right.phtml @@ -25,7 +25,7 @@ ?> getBodyClass() ? $this->getBodyClass() : ''; ?> diff --git a/app/code/Magento/Page/view/frontend/3columns.phtml b/app/code/Magento/Theme/view/frontend/3columns.phtml similarity index 98% rename from app/code/Magento/Page/view/frontend/3columns.phtml rename to app/code/Magento/Theme/view/frontend/3columns.phtml index 565563d3fa96d..1af951676bd2c 100644 --- a/app/code/Magento/Page/view/frontend/3columns.phtml +++ b/app/code/Magento/Theme/view/frontend/3columns.phtml @@ -25,7 +25,7 @@ ?> getBodyClass() ? $this->getBodyClass() : ''; ?> diff --git a/app/code/Magento/Page/view/frontend/blank.phtml b/app/code/Magento/Theme/view/frontend/blank.phtml similarity index 95% rename from app/code/Magento/Page/view/frontend/blank.phtml rename to app/code/Magento/Theme/view/frontend/blank.phtml index 947fc6c18a9df..587f0b3c06747 100644 --- a/app/code/Magento/Page/view/frontend/blank.phtml +++ b/app/code/Magento/Theme/view/frontend/blank.phtml @@ -25,7 +25,7 @@ ?> getChildHtml('content'); ?> diff --git a/app/code/Magento/Page/view/frontend/callouts/left_col.phtml b/app/code/Magento/Theme/view/frontend/callouts/left_col.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/callouts/left_col.phtml rename to app/code/Magento/Theme/view/frontend/callouts/left_col.phtml diff --git a/app/code/Magento/Page/view/frontend/callouts/right_col.phtml b/app/code/Magento/Theme/view/frontend/callouts/right_col.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/callouts/right_col.phtml rename to app/code/Magento/Theme/view/frontend/callouts/right_col.phtml diff --git a/app/code/Magento/Page/view/frontend/css/tabs.css b/app/code/Magento/Theme/view/frontend/css/tabs.css similarity index 100% rename from app/code/Magento/Page/view/frontend/css/tabs.css rename to app/code/Magento/Theme/view/frontend/css/tabs.css diff --git a/app/code/Magento/Page/view/frontend/css/validate.css b/app/code/Magento/Theme/view/frontend/css/validate.css similarity index 100% rename from app/code/Magento/Page/view/frontend/css/validate.css rename to app/code/Magento/Theme/view/frontend/css/validate.css diff --git a/app/code/Magento/Page/view/frontend/empty.phtml b/app/code/Magento/Theme/view/frontend/empty.phtml similarity index 97% rename from app/code/Magento/Page/view/frontend/empty.phtml rename to app/code/Magento/Theme/view/frontend/empty.phtml index ccdcbfcd6b0cd..cdf95a051c5ed 100644 --- a/app/code/Magento/Page/view/frontend/empty.phtml +++ b/app/code/Magento/Theme/view/frontend/empty.phtml @@ -25,7 +25,7 @@ ?> getBodyClass() ? $this->getBodyClass() : ''; ?> diff --git a/app/code/Magento/Page/view/frontend/favicon.ico b/app/code/Magento/Theme/view/frontend/favicon.ico similarity index 100% rename from app/code/Magento/Page/view/frontend/favicon.ico rename to app/code/Magento/Theme/view/frontend/favicon.ico diff --git a/app/code/Magento/Page/view/frontend/html/block.phtml b/app/code/Magento/Theme/view/frontend/html/block.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/html/block.phtml rename to app/code/Magento/Theme/view/frontend/html/block.phtml diff --git a/app/code/Magento/Page/view/frontend/html/breadcrumbs.phtml b/app/code/Magento/Theme/view/frontend/html/breadcrumbs.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/html/breadcrumbs.phtml rename to app/code/Magento/Theme/view/frontend/html/breadcrumbs.phtml diff --git a/app/code/Magento/Page/view/frontend/html/bugreport.phtml b/app/code/Magento/Theme/view/frontend/html/bugreport.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/html/bugreport.phtml rename to app/code/Magento/Theme/view/frontend/html/bugreport.phtml diff --git a/app/code/Magento/Page/view/frontend/html/copyright.phtml b/app/code/Magento/Theme/view/frontend/html/copyright.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/html/copyright.phtml rename to app/code/Magento/Theme/view/frontend/html/copyright.phtml diff --git a/app/code/Magento/Page/view/frontend/html/footer.phtml b/app/code/Magento/Theme/view/frontend/html/footer.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/html/footer.phtml rename to app/code/Magento/Theme/view/frontend/html/footer.phtml diff --git a/app/code/Magento/Page/view/frontend/html/head.phtml b/app/code/Magento/Theme/view/frontend/html/head.phtml similarity index 100% rename from app/code/Magento/Page/view/frontend/html/head.phtml rename to app/code/Magento/Theme/view/frontend/html/head.phtml diff --git a/app/code/Magento/Page/view/frontend/html/header.phtml b/app/code/Magento/Theme/view/frontend/html/header.phtml similarity index 95% rename from app/code/Magento/Page/view/frontend/html/header.phtml rename to app/code/Magento/Theme/view/frontend/html/header.phtml index d7747717eee25..d4cf4564380ea 100644 --- a/app/code/Magento/Page/view/frontend/html/header.phtml +++ b/app/code/Magento/Theme/view/frontend/html/header.phtml @@ -23,14 +23,14 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** - * @var \Magento\Page\Block\Html\Header $this + * @var \Magento\Theme\Block\Html\Header $this */ ?> getShowPart()): case 'logo': ?> getThemeName() ? $this->getThemeName() : $this->getLogoAlt();?> - getIsHomePage()):?> + isHomePage()):?> diff --git a/app/code/Magento/Page/view/frontend/html/notices.phtml b/app/code/Magento/Theme/view/frontend/html/notices.phtml similarity index 96% rename from app/code/Magento/Page/view/frontend/html/notices.phtml rename to app/code/Magento/Theme/view/frontend/html/notices.phtml index 7814e18e1c7c8..ccd407388ab80 100644 --- a/app/code/Magento/Page/view/frontend/html/notices.phtml +++ b/app/code/Magento/Theme/view/frontend/html/notices.phtml @@ -25,7 +25,7 @@ ?> displayNoscriptNotice()): ?> @@ -57,7 +57,7 @@ // getViewFileUrl('mage/cookies.js')?>", - "getViewFileUrl('Magento_Page::js/notices.js')?>", function() { + "getViewFileUrl('Magento_Theme::js/notices.js')?>", function() { $('#notice-cookie-block').cookieBlock({ cookieAllowButtonSelector: '#btn-cookie-allow', cookieName: '', diff --git a/app/code/Magento/Page/view/frontend/html/pager.phtml b/app/code/Magento/Theme/view/frontend/html/pager.phtml similarity index 98% rename from app/code/Magento/Page/view/frontend/html/pager.phtml rename to app/code/Magento/Theme/view/frontend/html/pager.phtml index 689cd83158f3a..d4cf5ebc5709d 100644 --- a/app/code/Magento/Page/view/frontend/html/pager.phtml +++ b/app/code/Magento/Theme/view/frontend/html/pager.phtml @@ -27,7 +27,7 @@ /** * Pager template * - * @see \Magento\Page\Block\Html\Pager + * @see \Magento\Theme\Block\Html\Pager */ ?> getCollection()->getSize()): ?> @@ -48,7 +48,7 @@

- getShowPerPage()): ?> + isShowPerPage()): ?>
+ + + +
+
+ +
+ + +
+
array( + "treeInitData" => $this->getTree(), + "treeInitSelectedData" => $this->getSelectedResources(), + ) + ))); + ?>">
+
+
+
diff --git a/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml b/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml index 8207b80348c07..3399d3e9e0dfb 100644 --- a/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml +++ b/app/code/Magento/Webapi/view/adminhtml/rolesusersgridjs.phtml @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2013 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * - * @var \Magento\View\Block\Template $this + * @var \Magento\View\Element\Template $this */ ?> getLayout()->getBlock('webapi.role.edit.tab.users.grid'); ?> diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webhook.php b/app/code/Magento/Webhook/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webhook.php new file mode 100644 index 0000000000000..3b71bab910f85 --- /dev/null +++ b/app/code/Magento/Webhook/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webhook.php @@ -0,0 +1,64 @@ +_subscriptionData = $registry->registry(self::REGISTRY_KEY_CURRENT_SUBSCRIPTION); } diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php index ebfc1ffb0a2ff..bac3dfadbab2e 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Registration/Create/Form/Container.php @@ -39,19 +39,17 @@ class Container extends \Magento\Backend\Block\Template /** @var array */ protected $_subscriptionData; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { + parent::__construct($context, $data); $this->_subscriptionData = $registry->registry(self::REGISTRY_KEY_CURRENT_SUBSCRIPTION);; } diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php index 0ace3ac27362d..fb57603916ae0 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit.php @@ -38,19 +38,17 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container /** @var array $_subscriptionData */ protected $_subscriptionData; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { - parent::__construct($context, $coreData, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { + parent::__construct($context, $data); $this->_objectId = 'id'; $this->_blockGroup = 'Magento_Webhook'; diff --git a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php index 19dbf98d2d48d..53585d4d4bd82 100644 --- a/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php +++ b/app/code/Magento/Webhook/Block/Adminhtml/Subscription/Edit/Form.php @@ -49,27 +49,25 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** @var \Magento\Webhook\Model\Source\Hook $_hook */ protected $_hook; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Webhook\Model\Source\Format $format - * @param \Magento\Webhook\Model\Source\Authentication $authentication - * @param \Magento\Webhook\Model\Source\Hook $hook - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Webhook\Model\Source\Format $format + * @param \Magento\Webhook\Model\Source\Authentication $authentication + * @param \Magento\Webhook\Model\Source\Hook $hook + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Webhook\Model\Source\Format $format, - \Magento\Webhook\Model\Source\Authentication $authentication, - \Magento\Webhook\Model\Source\Hook $hook, - array $data = array() - ) { - parent::__construct($context, $coreData, $registry, $formFactory, $data); + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Webhook\Model\Source\Format $format, + \Magento\Webhook\Model\Source\Authentication $authentication, + \Magento\Webhook\Model\Source\Hook $hook, + array $data = array() + ) { + parent::__construct($context, $registry, $formFactory, $data); $this->_formFactory = $formFactory; $this->_registry = $registry; $this->_format = $format; diff --git a/app/code/Magento/Webhook/Model/Job.php b/app/code/Magento/Webhook/Model/Job.php index d313a0bbfd1d3..aa31958ff8e25 100644 --- a/app/code/Magento/Webhook/Model/Job.php +++ b/app/code/Magento/Webhook/Model/Job.php @@ -67,20 +67,20 @@ class Job extends \Magento\Core\Model\AbstractModel implements \Magento\PubSub\J ); /** + * @param \Magento\Core\Model\Context $context + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Webhook\Model\Event\Factory $eventFactory * @param \Magento\Webhook\Model\Subscription\Factory $subscriptionFactory - * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Stdlib\DateTime $dateTime * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( + \Magento\Core\Model\Context $context, + \Magento\Core\Model\Registry $registry, \Magento\Webhook\Model\Event\Factory $eventFactory, \Magento\Webhook\Model\Subscription\Factory $subscriptionFactory, - \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $coreRegistry, \Magento\Stdlib\DateTime $dateTime, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, @@ -89,7 +89,7 @@ public function __construct( $this->_eventFactory = $eventFactory; $this->_subscriptionFactory = $subscriptionFactory; $this->_dateTime = $dateTime; - parent::__construct($context, $coreRegistry, $resource, $resourceCollection, $data); + parent::__construct($context, $registry, $resource, $resourceCollection, $data); } /** diff --git a/app/code/Magento/Webhook/Model/Resource/Event/Collection.php b/app/code/Magento/Webhook/Model/Resource/Event/Collection.php index 81df66dec3253..1acca1484ad2c 100644 --- a/app/code/Magento/Webhook/Model/Resource/Event/Collection.php +++ b/app/code/Magento/Webhook/Model/Resource/Event/Collection.php @@ -50,25 +50,27 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_dateTime; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Stdlib\DateTime $dateTime + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource - * @param null $timeoutIdling + * @param mixed $timeoutIdling */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, \Magento\Stdlib\DateTime $dateTime, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null, $timeoutIdling = null ) { $this->_dateTime = $dateTime; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_timeoutIdling = is_null($timeoutIdling) ? self::DEFAULT_TIMEOUT_IDLING_EVENTS : $timeoutIdling; } diff --git a/app/code/Magento/Webhook/Model/Resource/Job/Collection.php b/app/code/Magento/Webhook/Model/Resource/Job/Collection.php index b8129754f59d8..56d6bb022ffc2 100644 --- a/app/code/Magento/Webhook/Model/Resource/Job/Collection.php +++ b/app/code/Magento/Webhook/Model/Resource/Job/Collection.php @@ -43,25 +43,27 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_timeoutIdling; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager * @param \Magento\Stdlib\DateTime $dateTime + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource - * @param null $timeoutIdling + * @param mixed $timeoutIdling */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, \Magento\Stdlib\DateTime $dateTime, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null, $timeoutIdling = null ) { $this->dateTime = $dateTime; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_timeoutIdling = is_null($timeoutIdling) ? self::DEFAULT_TIMEOUT_IDLING_JOBS : $timeoutIdling; } diff --git a/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php b/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php index 9b1ce3657fc16..77165d8b8e6a0 100644 --- a/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php +++ b/app/code/Magento/Webhook/Model/Resource/Subscription/Collection.php @@ -37,22 +37,24 @@ class Collection protected $_endpointResource; /** - * @param \Magento\Webhook\Model\Resource\Endpoint $endpointResource - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Webhook\Model\Resource\Endpoint $endpointResource + * @param mixed $connection * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Webhook\Model\Resource\Endpoint $endpointResource, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, + \Magento\Webhook\Model\Resource\Endpoint $endpointResource, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_endpointResource = $endpointResource; } diff --git a/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php b/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php index 2d6c06e4cf198..445f890b54d7c 100644 --- a/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php +++ b/app/code/Magento/Webhook/Model/Resource/Subscription/Grid/Collection.php @@ -31,24 +31,34 @@ class Collection extends \Magento\Webhook\Model\Resource\Subscription\Collection { /** - * @param \Magento\Webhook\Model\Subscription\Config $subscriptionConfig - * @param \Magento\Webhook\Model\Resource\Endpoint $endpointResource - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Core\Model\Resource\Db\Abstract $resource + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Webhook\Model\Resource\Endpoint $endpointResource + * @param \Magento\Webhook\Model\Subscription\Config $subscriptionConfig + * @param mixed $connection + * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Webhook\Model\Subscription\Config $subscriptionConfig, - \Magento\Webhook\Model\Resource\Endpoint $endpointResource, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, + \Magento\Webhook\Model\Resource\Endpoint $endpointResource, + \Magento\Webhook\Model\Subscription\Config $subscriptionConfig, + $connection = null, \Magento\Core\Model\Resource\Db\AbstractDb $resource = null ) { - parent::__construct($endpointResource, $eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct( + $entityFactory, + $logger, + $fetchStrategy, + $eventManager, + $endpointResource, + $connection, + $resource + ); $subscriptionConfig->updateSubscriptionCollection(); } } diff --git a/app/code/Magento/Webhook/Model/Subscription.php b/app/code/Magento/Webhook/Model/Subscription.php index 0496978978631..577a752b8bd0a 100644 --- a/app/code/Magento/Webhook/Model/Subscription.php +++ b/app/code/Magento/Webhook/Model/Subscription.php @@ -79,18 +79,18 @@ class Subscription private $_endpointLoaded = false; /** - * @param \Magento\Webhook\Model\Endpoint $endpoint * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $coreRegistry + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Webhook\Model\Endpoint $endpoint * @param \Magento\Stdlib\DateTime $dateTime * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Webhook\Model\Endpoint $endpoint, \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $coreRegistry, + \Magento\Core\Model\Registry $registry, + \Magento\Webhook\Model\Endpoint $endpoint, \Magento\Stdlib\DateTime $dateTime, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, @@ -100,7 +100,7 @@ public function __construct( if (!isset($data['status'])) { $data['status'] = \Magento\PubSub\SubscriptionInterface::STATUS_INACTIVE; } - parent::__construct($context, $coreRegistry, $resource, $resourceCollection, $data); + parent::__construct($context, $registry, $resource, $resourceCollection, $data); $this->_dateTime = $dateTime; $this->_endpoint = $endpoint; } diff --git a/app/code/Magento/Webhook/etc/module.xml b/app/code/Magento/Webhook/etc/module.xml index dea459d845594..b18c83866ff35 100755 --- a/app/code/Magento/Webhook/etc/module.xml +++ b/app/code/Magento/Webhook/etc/module.xml @@ -33,7 +33,7 @@ - + diff --git a/app/code/Magento/Webhook/etc/webapi.xml b/app/code/Magento/Webhook/etc/webapi.xml index f02d078933053..91337f8f30d88 100644 --- a/app/code/Magento/Webhook/etc/webapi.xml +++ b/app/code/Magento/Webhook/etc/webapi.xml @@ -27,10 +27,10 @@ --> - - - /:subscriptionId - /:subscriptionId - /:subscriptionId + + + /:subscriptionId + /:subscriptionId + /:subscriptionId diff --git a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_integration_activate_permissions_webhook.xml b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_integration_activate_permissions_webhook.xml new file mode 100644 index 0000000000000..aa1363b086265 --- /dev/null +++ b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_integration_activate_permissions_webhook.xml @@ -0,0 +1,36 @@ + + + + + + + integration_activate_permissions_tabs_webhook + integration_activate_permissions_tabs_webhook + + + diff --git a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_activate.xml b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_activate.xml index 955fa49477950..1a1f6c161aa2a 100644 --- a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_activate.xml +++ b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_activate.xml @@ -24,39 +24,39 @@ */ --> - + - + mui/reset.css - + Magento_Webhook::css/boxes.css - + Magento_Webhook::css/webhook.css - + jquery/jquery.js - + prototype/prototype.js - + mage/translate.js - + mage/adminhtml/tools.js diff --git a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_failed.xml b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_failed.xml index 9fe59844735c2..22f174b3596c2 100644 --- a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_failed.xml +++ b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_failed.xml @@ -24,34 +24,34 @@ */ --> - + - + mui/reset.css - + Magento_Webhook::css/boxes.css - + Magento_Webhook::css/webhook.css - + prototype/prototype.js - + mage/translate.js - + mage/adminhtml/tools.js diff --git a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_succeeded.xml b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_succeeded.xml index 6fc417e3d6888..0b5f63b08e1ad 100644 --- a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_succeeded.xml +++ b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_succeeded.xml @@ -24,39 +24,39 @@ */ --> - + - + mui/reset.css - + Magento_Webhook::css/boxes.css - + Magento_Webhook::css/webhook.css - + jquery/jquery.js - + prototype/prototype.js - + mage/translate.js - + mage/adminhtml/tools.js diff --git a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_user.xml b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_user.xml index b97b78f07b88c..a31415ba405cd 100644 --- a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_user.xml +++ b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_registration_user.xml @@ -24,49 +24,49 @@ */ --> - + - + mui/reset.css - + Magento_Webhook::css/boxes.css - + Magento_Webhook::css/webhook.css - + jquery/jquery.js - + jquery/jquery.validate.js - + Magento_Webhook::js/validate_form.js - + prototype/prototype.js - + mage/translate.js - + mage/adminhtml/tools.js diff --git a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_subscription_index.xml b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_subscription_index.xml index 014dba75e4687..2ff17af732fde 100644 --- a/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_subscription_index.xml +++ b/app/code/Magento/Webhook/view/adminhtml/layout/adminhtml_webhook_subscription_index.xml @@ -25,12 +25,12 @@ --> - + Magento_Webhook::css/modal.css - + Magento_Webhook::js/webhook.js diff --git a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php index 1fbf1565c8b1a..4bb315a10bcdd 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -61,7 +61,6 @@ class Tax /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Directory\Model\Config\Source\Country $sourceCountry * @param \Magento\Directory\Helper\Data $directoryHelper * @param \Magento\Core\Model\Registry $registry @@ -69,7 +68,6 @@ class Tax */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Directory\Model\Config\Source\Country $sourceCountry, \Magento\Directory\Helper\Data $directoryHelper, \Magento\Core\Model\Registry $registry, @@ -78,7 +76,7 @@ public function __construct( $this->_sourceCountry = $sourceCountry; $this->_directoryHelper = $directoryHelper; $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } public function getProduct() diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index 910af37a16e38..5d1b8ede61c26 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -72,18 +72,18 @@ class Data extends \Magento\App\Helper\AbstractHelper protected $_storeManager; /** + * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Weee\Model\Tax $weeeTax * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\App\Helper\Context $context * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig */ public function __construct( + \Magento\App\Helper\Context $context, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Weee\Model\Tax $weeeTax, \Magento\Tax\Helper\Data $taxData, - \Magento\App\Helper\Context $context, \Magento\Core\Model\Registry $coreRegistry, \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig ) { diff --git a/app/code/Magento/Weee/Model/Observer.php b/app/code/Magento/Weee/Model/Observer.php index bc5b7a1543dc5..5b578fb750959 100644 --- a/app/code/Magento/Weee/Model/Observer.php +++ b/app/code/Magento/Weee/Model/Observer.php @@ -51,22 +51,22 @@ class Observer extends \Magento\Core\Model\AbstractModel protected $_layout; /** + * @param \Magento\Core\Model\Context $context + * @param \Magento\Core\Model\Registry $registry * @param \Magento\View\LayoutInterface $layout * @param \Magento\Weee\Model\Tax $weeeTax * @param \Magento\Weee\Helper\Data $weeeData - * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $registry * @param \Magento\Catalog\Model\Product\Type $productType * @param \Magento\Core\Model\Resource\AbstractResource $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( + \Magento\Core\Model\Context $context, + \Magento\Core\Model\Registry $registry, \Magento\View\LayoutInterface $layout, \Magento\Weee\Model\Tax $weeeTax, \Magento\Weee\Helper\Data $weeeData, - \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $registry, \Magento\Catalog\Model\Product\Type $productType, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, diff --git a/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php b/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php index c24d91ff8d6c9..6b46ab9fb5821 100644 --- a/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php +++ b/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php @@ -42,12 +42,12 @@ class Tax extends \Magento\Core\Model\Resource\Db\AbstractDb protected $_storeManager; /** - * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\App\Resource $resource + * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Model\StoreManagerInterface $storeManager, - \Magento\App\Resource $resource + \Magento\App\Resource $resource, + \Magento\Core\Model\StoreManagerInterface $storeManager ) { $this->_storeManager = $storeManager; parent::__construct($resource); diff --git a/app/code/Magento/Weee/Model/Tax.php b/app/code/Magento/Weee/Model/Tax.php index b6d37d38d9b56..f2dfff70c2db6 100644 --- a/app/code/Magento/Weee/Model/Tax.php +++ b/app/code/Magento/Weee/Model/Tax.php @@ -83,29 +83,27 @@ class Tax extends \Magento\Core\Model\AbstractModel protected $_customerSession; /** + * @param \Magento\Core\Model\Context $context + * @param \Magento\Core\Model\Registry $registry * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Tax\Model\CalculationFactory $calculationFactory * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Weee\Helper\Data $weeeData - * @param \Magento\Core\Model\Context $context - * @param \Magento\Core\Model\Registry $registry * @param \Magento\Weee\Model\Resource\Tax $resource * @param \Magento\Data\Collection\Db $resourceCollection * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( + \Magento\Core\Model\Context $context, + \Magento\Core\Model\Registry $registry, \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Tax\Model\CalculationFactory $calculationFactory, \Magento\Customer\Model\Session $customerSession, \Magento\Tax\Helper\Data $taxData, \Magento\Weee\Helper\Data $weeeData, - \Magento\Core\Model\Context $context, - \Magento\Core\Model\Registry $registry, \Magento\Weee\Model\Resource\Tax $resource, \Magento\Data\Collection\Db $resourceCollection = null, array $data = array() diff --git a/app/code/Magento/Weee/etc/module.xml b/app/code/Magento/Weee/etc/module.xml index 1d8ed69830ee4..03689c4dfdf29 100644 --- a/app/code/Magento/Weee/etc/module.xml +++ b/app/code/Magento/Weee/etc/module.xml @@ -41,7 +41,7 @@ - + diff --git a/app/code/Magento/Weee/view/adminhtml/layout/catalog_product_new.xml b/app/code/Magento/Weee/view/adminhtml/layout/catalog_product_new.xml index 67e03446f33f4..49e11783bf4e5 100644 --- a/app/code/Magento/Weee/view/adminhtml/layout/catalog_product_new.xml +++ b/app/code/Magento/Weee/view/adminhtml/layout/catalog_product_new.xml @@ -25,7 +25,7 @@ --> - + Magento_Weee::js/fpt-attribute.js diff --git a/app/code/Magento/Weee/view/frontend/layout/default.xml b/app/code/Magento/Weee/view/frontend/layout/default.xml index 26fdf1e9b573a..2bbac368204e3 100644 --- a/app/code/Magento/Weee/view/frontend/layout/default.xml +++ b/app/code/Magento/Weee/view/frontend/layout/default.xml @@ -25,7 +25,7 @@ --> - + Magento_Weee::tax-toggle.js diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php index ad6391b69c18a..27535e6c3f1ca 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php @@ -41,20 +41,26 @@ class Chooser extends \Magento\Backend\Block\Template */ protected $_elementFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param array $data + /** + * @var \Magento\Json\EncoderInterface + */ + protected $_jsonEncoder; + + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Data\Form\Element\Factory $elementFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Data\Form\Element\Factory $elementFactory, + array $data = array() + ) { + $this->_jsonEncoder = $jsonEncoder; $this->_elementFactory = $elementFactory; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -185,7 +191,7 @@ protected function _toHtml() $chooser->setData('after_element_html', $hiddenHtml . $chooseButton->toHtml()); // render label and chooser scripts - $configJson = $this->_coreData->jsonEncode($config->getData()); + $configJson = $this->_jsonEncoder->encode($config->getData()); return ' diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php index 6010890677e5b..78ec59d665b26 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php @@ -41,24 +41,22 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_widgetFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Widget\Model\WidgetFactory $widgetFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Widget\Model\WidgetFactory $widgetFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Widget\Model\WidgetFactory $widgetFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Widget\Model\WidgetFactory $widgetFactory, + array $data = array() + ) { $this->_widgetFactory = $widgetFactory; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** @@ -78,6 +76,7 @@ protected function _prepareForm() 'title' => __('Widget Type'), 'name' => 'widget_type', 'required' => true, + 'onchange' => "wWidget.validateField()", 'options' => $this->_getWidgetSelectOptions(), 'after_element_html' => $this->_getWidgetSelectAfterHtml(), )); diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php index 9356107cd9b8c..877923015ac67 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php @@ -42,20 +42,18 @@ class Edit extends \Magento\Adminhtml\Block\Widget\Form\Container */ protected $_coreRegistry = null; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + array $data = array() + ) { $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php index 1af83ccfba3d5..9be04df32d3c2 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php @@ -34,7 +34,7 @@ */ namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser; -class Container extends \Magento\View\Block\Html\Select +class Container extends \Magento\View\Element\Html\Select { /** * @var \Magento\View\Layout\ProcessorFactory @@ -47,14 +47,14 @@ class Container extends \Magento\View\Block\Html\Select protected $_themesFactory; /** - * @param \Magento\View\Block\Context $context + * @param \Magento\View\Element\Context $context * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory * @param array $data */ public function __construct( - \Magento\View\Block\Context $context, + \Magento\View\Element\Context $context, \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory, \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory, array $data = array() @@ -78,7 +78,7 @@ protected function _construct() /** * Add necessary options * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php index bef7ba3202a84..2424951442a0d 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php @@ -32,7 +32,7 @@ * @method getArea() * @method getTheme() */ -class DesignAbstraction extends \Magento\View\Block\Html\Select +class DesignAbstraction extends \Magento\View\Element\Html\Select { /** * @var \Magento\View\Layout\ProcessorFactory @@ -50,14 +50,14 @@ class DesignAbstraction extends \Magento\View\Block\Html\Select protected $_appState; /** - * @param \Magento\View\Block\Context $context + * @param \Magento\View\Element\Context $context * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory * @param \Magento\App\State $appState * @param array $data */ public function __construct( - \Magento\View\Block\Context $context, + \Magento\View\Element\Context $context, \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory, \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory, \Magento\App\State $appState, @@ -72,7 +72,7 @@ public function __construct( /** * Add necessary options * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php index 93cef5b4c0c18..0ed066fb3c6e2 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php @@ -32,7 +32,7 @@ * @method getArea() * @method getTheme() */ -class Layout extends \Magento\View\Block\Html\Select +class Layout extends \Magento\View\Element\Html\Select { /** * @var \Magento\Core\Model\Layout\PageType\Config @@ -40,12 +40,12 @@ class Layout extends \Magento\View\Block\Html\Select protected $_config; /** - * @param \Magento\View\Block\Context $context + * @param \Magento\View\Element\Context $context * @param \Magento\Core\Model\Layout\PageType\Config $config * @param array $data */ public function __construct( - \Magento\View\Block\Context $context, + \Magento\View\Element\Context $context, \Magento\Core\Model\Layout\PageType\Config $config, array $data = array() ) { @@ -56,7 +56,7 @@ public function __construct( /** * Add necessary options * - * @return \Magento\View\Block\AbstractBlock + * @return \Magento\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php index 9c8c9c07be5d2..5f72c4dbdade5 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php @@ -50,7 +50,7 @@ protected function _toHtml() $html = ''; $html .= $widgetTemplate['label']; } else { - $html = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') + $html = $this->getLayout()->createBlock('Magento\View\Element\Html\Select') ->setName('template') ->setClass('select') ->setOptions($this->getWidgetTemplates()) diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php index d3fd95318f60a..552c946c98fd8 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -49,7 +49,6 @@ class Main /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $registry * @param \Magento\Data\FormFactory $formFactory * @param \Magento\Core\Model\System\Store $store @@ -58,7 +57,6 @@ class Main */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $registry, \Magento\Data\FormFactory $formFactory, \Magento\Core\Model\System\Store $store, @@ -67,7 +65,7 @@ public function __construct( ) { $this->_store = $store; $this->_themeLabelFactory = $themeLabelFactory; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 26352ca9a7cbf..b4e4151892694 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -46,20 +46,18 @@ class Layout */ protected $_productType; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Catalog\Model\Product\Type $productType - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Catalog\Model\Product\Type $productType + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Catalog\Model\Product\Type $productType, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Catalog\Model\Product\Type $productType, + array $data = array() + ) { $this->_productType = $productType; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** @@ -142,7 +140,7 @@ public function getTemplateChooserUrl() */ public function getDisplayOnSelectHtml() { - $selectBlock = $this->getLayout()->createBlock('Magento\View\Block\Html\Select') + $selectBlock = $this->getLayout()->createBlock('Magento\View\Element\Html\Select') ->setName('widget_instance[{{id}}][page_group]') ->setId('widget_instance[{{id}}][page_group]') ->setClass('required-entry page_group_select select') diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php index e0e25c717354c..8312279739455 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php @@ -49,24 +49,22 @@ class Settings */ protected $_themeLabelFactory; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Theme\LabelFactory $themeLabelFactory, + array $data = array() + ) { $this->_themeLabelFactory = $themeLabelFactory; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } protected function _construct() diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php index 522462d4879ed..06a23fef50ceb 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php @@ -53,27 +53,25 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic */ protected $_sourceModelPool; - /** - * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Core\Model\Option\ArrayPool $sourceModelPool - * @param \Magento\Widget\Model\Widget $widget - * @param array $data + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Core\Model\Option\ArrayPool $sourceModelPool + * @param \Magento\Widget\Model\Widget $widget + * @param array $data */ - public function __construct( - \Magento\Backend\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, - \Magento\Core\Model\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Core\Model\Option\ArrayPool $sourceModelPool, - \Magento\Widget\Model\Widget $widget, - array $data = array() - ) { + public function __construct( + \Magento\Backend\Block\Template\Context $context, + \Magento\Core\Model\Registry $registry, + \Magento\Data\FormFactory $formFactory, + \Magento\Core\Model\Option\ArrayPool $sourceModelPool, + \Magento\Widget\Model\Widget $widget, + array $data = array() + ) { $this->_sourceModelPool = $sourceModelPool; $this->_widget = $widget; - parent::__construct($context, $coreData, $registry, $formFactory, $data); + parent::__construct($context, $registry, $formFactory, $data); } /** diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php index 4ebacd8f1b41f..b1d1f08122af9 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Widget/Instance.php @@ -108,9 +108,9 @@ class Instance extends \Magento\Core\Model\AbstractModel protected $mathRandom; /** - * @param \Magento\Escaper $escaper * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Escaper $escaper * @param \Magento\View\FileSystem $viewFileSystem * @param \Magento\App\Cache\TypeListInterface $cacheTypeList * @param \Magento\Catalog\Model\Product\Type $productType @@ -124,16 +124,16 @@ class Instance extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Escaper $escaper, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Escaper $escaper, \Magento\View\FileSystem $viewFileSystem, \Magento\App\Cache\TypeListInterface $cacheTypeList, \Magento\Catalog\Model\Product\Type $productType, \Magento\Widget\Model\Config\Reader $reader, \Magento\Widget\Model\Widget $widgetModel, \Magento\Widget\Model\NamespaceResolver $namespaceResolver, - \Magento\Math\Random $mathRandom, + \Magento\Math\Random $mathRandom, \Magento\Core\Model\Resource\AbstractResource $resource = null, \Magento\Data\Collection\Db $resourceCollection = null, array $relatedCacheTypes = array(), @@ -525,7 +525,7 @@ public function generateLayoutUpdateXml($container, $templatePath = '') $templateFilename = $this->_viewFileSystem->getFilename($templatePath, array( 'area' => $this->getArea(), 'themeId' => $this->getThemeId(), - 'module' => \Magento\View\Block\AbstractBlock::extractModuleName($this->getType()), + 'module' => \Magento\View\Element\AbstractBlock::extractModuleName($this->getType()), )); if (!$this->getId() && !$this->isCompleteToCreate() || ($templatePath && !is_readable($templateFilename))) { return ''; diff --git a/app/code/Magento/Widget/etc/module.xml b/app/code/Magento/Widget/etc/module.xml index 9122cc760288e..6ff15cc90dc2c 100755 --- a/app/code/Magento/Widget/etc/module.xml +++ b/app/code/Magento/Widget/etc/module.xml @@ -34,7 +34,7 @@ - + diff --git a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml index 0e60abfb1be61..4b70635ef0c58 100644 --- a/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml +++ b/app/code/Magento/Widget/view/adminhtml/layout/adminhtml_widget_instance_edit.xml @@ -28,22 +28,22 @@ 1 - + mage/adminhtml/wysiwyg/widget.js - + prototype/window.js - + prototype/windows/themes/default.css - + Magento_Core::prototype/magento.css diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php index 579097edb9427..8a33aa02f36b8 100644 --- a/app/code/Magento/Wishlist/Block/AbstractBlock.php +++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php @@ -82,8 +82,7 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd protected $_productFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Catalog\Model\Config $catalogConfig * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData @@ -95,8 +94,7 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, @@ -110,7 +108,7 @@ public function __construct( $this->_wishlistData = $wishlistData; $this->_customerSession = $customerSession; $this->_productFactory = $productFactory; - parent::__construct($context, $coreData, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); + parent::__construct($context, $catalogConfig, $registry, $taxData, $catalogData, $mathRandom, $data); } /** @@ -376,7 +374,7 @@ public function addItemPriceBlockType($type, $block = '', $template = '') * Returns block to render item with some product type * * @param string $productType - * @return \Magento\View\Block\Template + * @return \Magento\View\Element\Template */ protected function _getItemPriceBlock($productType) { diff --git a/app/code/Magento/Wishlist/Block/Customer/Sharing.php b/app/code/Magento/Wishlist/Block/Customer/Sharing.php index e32f00a8035dc..ff3d5249cc6db 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Sharing.php +++ b/app/code/Magento/Wishlist/Block/Customer/Sharing.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Customer; -class Sharing extends \Magento\View\Block\Template +class Sharing extends \Magento\View\Element\Template { /** * Entered Data cache @@ -56,22 +56,20 @@ class Sharing extends \Magento\View\Block\Template protected $_wishlistSession; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Wishlist\Model\Config $wishlistConfig * @param \Magento\Core\Model\Session\Generic $wishlistSession * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Wishlist\Model\Config $wishlistConfig, \Magento\Core\Model\Session\Generic $wishlistSession, array $data = array() ) { $this->_wishlistConfig = $wishlistConfig; $this->_wishlistSession = $wishlistSession; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php index cb1550a9af9db..9b7d8ceb48767 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php @@ -42,8 +42,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock protected $_helperPool; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Catalog\Model\Config $catalogConfig * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData @@ -56,8 +55,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, @@ -72,7 +70,6 @@ public function __construct( $this->_helperPool = $helperPool; parent::__construct( $context, - $coreData, $catalogConfig, $registry, $taxData, diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php index 302551bf31894..2ea5230065bc8 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Block\Customer\Wishlist; -class Button extends \Magento\View\Block\Template +class Button extends \Magento\View\Element\Template { /** * Wishlist config @@ -50,22 +50,20 @@ class Button extends \Magento\View\Block\Template protected $_wishlistData = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Wishlist\Model\Config $wishlistConfig * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Wishlist\Model\Config $wishlistConfig, array $data = array() ) { $this->_wishlistData = $wishlistData; $this->_wishlistConfig = $wishlistConfig; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php index 4f930c5d455d6..7fb2ba4217c58 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php @@ -41,8 +41,7 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock protected $_helperPool; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Catalog\Model\Config $catalogConfig * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData @@ -55,8 +54,7 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, @@ -71,7 +69,6 @@ public function __construct( $this->_helperPool = $helperPool; parent::__construct( $context, - $coreData, $catalogConfig, $registry, $taxData, diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php index 6414151dd8944..ba564048139bf 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Block\Customer\Wishlist; -class Items extends \Magento\View\Block\Template +class Items extends \Magento\View\Element\Template { /** * Retrieve table column object list diff --git a/app/code/Magento/Wishlist/Block/Item/Configure.php b/app/code/Magento/Wishlist/Block/Item/Configure.php index 3562deab31b55..a74efd661760e 100644 --- a/app/code/Magento/Wishlist/Block/Item/Configure.php +++ b/app/code/Magento/Wishlist/Block/Item/Configure.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Item; -class Configure extends \Magento\View\Block\Template +class Configure extends \Magento\View\Element\Template { /** * Wishlist data @@ -51,22 +51,20 @@ class Configure extends \Magento\View\Block\Template protected $_coreRegistry = null; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Core\Model\Registry $registry * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Core\Model\Registry $registry, array $data = array() ) { $this->_wishlistData = $wishlistData; $this->_coreRegistry = $registry; - parent::__construct($context, $coreData, $data); + parent::__construct($context, $data); } /** diff --git a/app/code/Magento/Wishlist/Block/Link.php b/app/code/Magento/Wishlist/Block/Link.php index d5e0e115d3cea..5cfc742ca61eb 100644 --- a/app/code/Magento/Wishlist/Block/Link.php +++ b/app/code/Magento/Wishlist/Block/Link.php @@ -27,7 +27,7 @@ */ namespace Magento\Wishlist\Block; -class Link extends \Magento\Page\Block\Link +class Link extends \Magento\View\Element\Html\Link { /** * @return string diff --git a/app/code/Magento/Wishlist/Block/Render/Item/Price.php b/app/code/Magento/Wishlist/Block/Render/Item/Price.php index 511814fb9c9d8..44d494bff43cf 100644 --- a/app/code/Magento/Wishlist/Block/Render/Item/Price.php +++ b/app/code/Magento/Wishlist/Block/Render/Item/Price.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Block\Render\Item; -class Price extends \Magento\View\Block\Template +class Price extends \Magento\View\Element\Template { /** * Returns html for rendering non-configured product diff --git a/app/code/Magento/Wishlist/Block/Share/Email/Rss.php b/app/code/Magento/Wishlist/Block/Share/Email/Rss.php index a27d74e79feb5..11b29c3b9af14 100644 --- a/app/code/Magento/Wishlist/Block/Share/Email/Rss.php +++ b/app/code/Magento/Wishlist/Block/Share/Email/Rss.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Share\Email; -class Rss extends \Magento\View\Block\Template +class Rss extends \Magento\View\Element\Template { protected $_template = 'email/rss.phtml'; diff --git a/app/code/Magento/Wishlist/Block/Share/Wishlist.php b/app/code/Magento/Wishlist/Block/Share/Wishlist.php index 8675bd1f62fce..568496ab822e8 100644 --- a/app/code/Magento/Wishlist/Block/Share/Wishlist.php +++ b/app/code/Magento/Wishlist/Block/Share/Wishlist.php @@ -49,8 +49,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock protected $_customerFactory; /** - * @param \Magento\View\Block\Template\Context $context - * @param \Magento\Core\Helper\Data $coreData + * @param \Magento\View\Element\Template\Context $context * @param \Magento\Catalog\Model\Config $catalogConfig * @param \Magento\Core\Model\Registry $registry * @param \Magento\Tax\Helper\Data $taxData @@ -63,8 +62,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock * @param array $data */ public function __construct( - \Magento\View\Block\Template\Context $context, - \Magento\Core\Helper\Data $coreData, + \Magento\View\Element\Template\Context $context, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Core\Model\Registry $registry, \Magento\Tax\Helper\Data $taxData, @@ -79,7 +77,6 @@ public function __construct( $this->_customerFactory = $customerFactory; parent::__construct( $context, - $coreData, $catalogConfig, $registry, $taxData, diff --git a/app/code/Magento/Wishlist/Helper/Data.php b/app/code/Magento/Wishlist/Helper/Data.php index e31029d64759f..7b23d60ddc7c6 100644 --- a/app/code/Magento/Wishlist/Helper/Data.php +++ b/app/code/Magento/Wishlist/Helper/Data.php @@ -111,8 +111,8 @@ class Data extends \Magento\App\Helper\AbstractHelper protected $_storeManager; /** - * @param \Magento\Core\Helper\Data $coreData * @param \Magento\App\Helper\Context $context + * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Core\Model\Registry $coreRegistry * @param \Magento\Core\Model\Store\Config $coreStoreConfig * @param \Magento\Customer\Model\Session $customerSession @@ -120,8 +120,8 @@ class Data extends \Magento\App\Helper\AbstractHelper * @param \Magento\Core\Model\StoreManagerInterface $storeManager */ public function __construct( - \Magento\Core\Helper\Data $coreData, \Magento\App\Helper\Context $context, + \Magento\Core\Helper\Data $coreData, \Magento\Core\Model\Registry $coreRegistry, \Magento\Core\Model\Store\Config $coreStoreConfig, \Magento\Customer\Model\Session $customerSession, diff --git a/app/code/Magento/Wishlist/Model/Observer.php b/app/code/Magento/Wishlist/Model/Observer.php index dde9b2050341f..e0cf923465ec8 100644 --- a/app/code/Magento/Wishlist/Model/Observer.php +++ b/app/code/Magento/Wishlist/Model/Observer.php @@ -56,9 +56,9 @@ class Observer extends \Magento\Core\Model\AbstractModel protected $_wishlistFactory; /** - * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry + * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Wishlist\Model\WishlistFactory $wishlistFactory @@ -67,9 +67,9 @@ class Observer extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, \Magento\Wishlist\Model\WishlistFactory $wishlistFactory, diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php index ea27f3a4f2bea..63dde55fced44 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php @@ -157,12 +157,12 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl protected $_appState; /** - * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData - * @param \Magento\Sales\Helper\Admin $adminhtmlSales - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData + * @param \Magento\Sales\Helper\Admin $adminhtmlSales * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Date $date * @param \Magento\Wishlist\Model\Config $wishlistConfig @@ -174,14 +174,17 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl * @param \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory * @param \Magento\Wishlist\Model\Resource\Item $resource * @param \Magento\App\State $appState + * @param mixed $connection + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\CatalogInventory\Helper\Data $catalogInventoryData, - \Magento\Sales\Helper\Admin $adminhtmlSales, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, + \Magento\CatalogInventory\Helper\Data $catalogInventoryData, + \Magento\Sales\Helper\Admin $adminhtmlSales, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Date $date, \Magento\Wishlist\Model\Config $wishlistConfig, @@ -192,7 +195,8 @@ public function __construct( \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory, \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory, \Magento\Wishlist\Model\Resource\Item $resource, - \Magento\App\State $appState + \Magento\App\State $appState, + $connection = null ) { $this->_inventoryData = $catalogInventoryData; $this->_adminhtmlSales = $adminhtmlSales; @@ -206,7 +210,7 @@ public function __construct( $this->_catalogConfFactory = $catalogConfFactory; $this->_catalogAttrFactory = $catalogAttrFactory; $this->_appState = $appState; - parent::__construct($eventManager, $logger, $fetchStrategy, $entityFactory, $resource); + parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); } /** diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php index 424c18bf64708..0d94baede9c89 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php @@ -37,12 +37,12 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection protected $_registryManager; /** - * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData - * @param \Magento\Sales\Helper\Admin $adminhtmlSales - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Core\Model\EntityFactory $entityFactory * @param \Magento\Logger $logger * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Core\Model\EntityFactory $entityFactory + * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData + * @param \Magento\Sales\Helper\Admin $adminhtmlSales * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Date $date * @param \Magento\Wishlist\Model\Config $wishlistConfig @@ -52,17 +52,20 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory * @param \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory * @param \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory - * @param \Magento\Core\Model\Registry $registry * @param \Magento\Wishlist\Model\Resource\Item $resource * @param \Magento\App\State $appState + * @param \Magento\Core\Model\Registry $registry + * @param mixed $connection + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\CatalogInventory\Helper\Data $catalogInventoryData, - \Magento\Sales\Helper\Admin $adminhtmlSales, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Core\Model\EntityFactory $entityFactory, \Magento\Logger $logger, \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Core\Model\EntityFactory $entityFactory, + \Magento\Event\ManagerInterface $eventManager, + \Magento\CatalogInventory\Helper\Data $catalogInventoryData, + \Magento\Sales\Helper\Admin $adminhtmlSales, \Magento\Core\Model\StoreManagerInterface $storeManager, \Magento\Core\Model\Date $date, \Magento\Wishlist\Model\Config $wishlistConfig, @@ -72,14 +75,32 @@ public function __construct( \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory, \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory, \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory, - \Magento\Core\Model\Registry $registry, \Magento\Wishlist\Model\Resource\Item $resource, - \Magento\App\State $appState + \Magento\App\State $appState, + \Magento\Core\Model\Registry $registry, + $connection = null ) { $this->_registryManager = $registry; - parent::__construct($catalogInventoryData, $adminhtmlSales, $eventManager, $logger, $fetchStrategy, - $entityFactory, $storeManager, $date, $wishlistConfig, $productVisibility, $coreResource, - $optionCollFactory, $productCollFactory, $catalogConfFactory, $catalogAttrFactory, $resource, $appState); + parent::__construct( + $entityFactory, + $logger, + $fetchStrategy, + $eventManager, + $catalogInventoryData, + $adminhtmlSales, + $storeManager, + $date, + $wishlistConfig, + $productVisibility, + $coreResource, + $optionCollFactory, + $productCollFactory, + $catalogConfFactory, + $catalogAttrFactory, + $resource, + $appState, + $connection + ); } /** diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php index b8ec3dcfaeb50..c1e735617d55b 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -122,16 +122,16 @@ class Wishlist extends \Magento\Core\Model\AbstractModel protected $_useCurrentWebsite; /** - * @param \Magento\Catalog\Helper\Product $catalogProduct - * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Core\Model\Context $context * @param \Magento\Core\Model\Registry $registry - * @param \Magento\Wishlist\Model\Resource\Wishlist $resource - * @param \Magento\Wishlist\Model\Resource\Wishlist\Collection $resourceCollection + * @param \Magento\Catalog\Helper\Product $catalogProduct + * @param \Magento\Wishlist\Helper\Data $wishlistData + * @param Resource\Wishlist $resource + * @param Resource\Wishlist\Collection $resourceCollection * @param \Magento\Core\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Model\Date $date - * @param \Magento\Wishlist\Model\ItemFactory $wishlistItemFactory - * @param \Magento\Wishlist\Model\Resource\Item\CollectionFactory $wishlistCollFactory + * @param ItemFactory $wishlistItemFactory + * @param Resource\Item\CollectionFactory $wishlistCollFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Math\Random $mathRandom * @param \Magento\Stdlib\DateTime $dateTime @@ -139,10 +139,10 @@ class Wishlist extends \Magento\Core\Model\AbstractModel * @param array $data */ public function __construct( - \Magento\Catalog\Helper\Product $catalogProduct, - \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Core\Model\Context $context, \Magento\Core\Model\Registry $registry, + \Magento\Catalog\Helper\Product $catalogProduct, + \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Wishlist\Model\Resource\Wishlist $resource, \Magento\Wishlist\Model\Resource\Wishlist\Collection $resourceCollection, \Magento\Core\Model\StoreManagerInterface $storeManager, diff --git a/app/code/Magento/Wishlist/etc/module.xml b/app/code/Magento/Wishlist/etc/module.xml index 9cc2b1f2db5e5..8c41c6fad7aa9 100755 --- a/app/code/Magento/Wishlist/etc/module.xml +++ b/app/code/Magento/Wishlist/etc/module.xml @@ -34,7 +34,7 @@ - + diff --git a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml index d09393e45db01..0ec5b11b768c1 100644 --- a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml @@ -25,7 +25,7 @@ */ /** - * @var $this \Magento\View\Block\Template + * @var $this \Magento\View\Element\Template */ ?>