Skip to content

Commit

Permalink
V1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricio-tonny committed Apr 17, 2024
1 parent d74f6e0 commit 966d678
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 87 deletions.
14 changes: 6 additions & 8 deletions Block/Adminhtml/System/Config/Documentation.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php

/**
* @package Buzz_Base
* @company Buzz
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/

namespace Buzz\Base\Block\Adminhtml\System\Config;

Expand All @@ -16,14 +15,13 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele

return '<p style="font-size: 18px; font-weight: 600; margin-top: 15px;">Sobre o módulo</p>
<br>
<p>Versão: 1.6</p>
<p>Versão: 1.7</p>
<br>
<p>Este módulo tem como objetivo centralizar todos os módulos da BUZZ.</p>
<br>
<div style="padding: 20px; border: solid 1px #000; background: #eee;">
<p style="font-size: 16px;">Esperado para as próximas versões do módulo:</p>
<br>
<p> - Listar módulos instalados da BUZZ;</p>
<br>
<p> - Campo para inserção de CSS customizado (Magento Backend);</p>
<br>
</div>
Expand Down
9 changes: 4 additions & 5 deletions Block/Adminhtml/SystemInfo.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php

/**
* @package Buzz_Base
* @company Buzz
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/

namespace Buzz\Base\Block\Adminhtml;

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Buzz Desenvolvimento

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 4 additions & 5 deletions Model/ModuleInfoProvider.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php

/**
* @package Buzz_Base
* @company Buzz
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/

declare(strict_types=1);

Expand Down
27 changes: 9 additions & 18 deletions Model/Serializer.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?php

/**
* @package Buzz_Base
* @company Buzz
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/

namespace Buzz\Base\Model;

use Magento\Framework\ObjectManagerInterface;
use Magento\Framework\Serialize\SerializerInterface;
use Magento\Framework\Unserialize\Unserialize;
use Zend\Serializer\Adapter\PhpSerialize;
use Zend\Serializer\Serializer as SerializerFactory;

/**
* Wrapper for Serialize
Expand All @@ -31,31 +28,25 @@ class Serializer
*/
private $unserialize;

/**
* @var PhpSerialize
*/
private $phpSerialize;

public function __construct(
ObjectManagerInterface $objectManager,
Unserialize $unserialize
) {
if (interface_exists(SerializerInterface::class)) {
// for magento later then 2.2
// For Magento >= 2.2
$this->serializer = $objectManager->get(SerializerInterface::class);
}
$this->unserialize = $unserialize;
$this->phpSerialize = SerializerFactory::getDefaultAdapter(); //deus ex machina
}

public function serialize($value)
{
try {
if ($this->serializer === null) {
return $this->phpSerialize->serialize($value);
if ($this->serializer !== null) {
return $this->serializer->serialize($value);
}

return $this->serializer->serialize($value);
return '{}';
} catch (\Exception $e) {
return '{}';
}
Expand All @@ -74,7 +65,7 @@ public function unserialize($value)
try {
return $this->serializer->unserialize($value);
} catch (\InvalidArgumentException $exception) {
return $this->phpSerialize->unserialize($value);
return false;
}
}
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Instalando esse módulo no Magento, temos dois arquivos de CSS padrões implemen

- [x] Testado em Magento 2.2.x
- [x] Testado em Magento 2.3.x
- [x] Testado em Magento 2.4.3
- [x] Testado em Magento 2.4.4
- [x] Testado em Magento 2.4.x

**ATENÇÃO:** Para Magento acima de _2.4.3_ é necessário baixar o pacote Zend, pois ele foi descontinuado a partir desta versão, para download do pacote, veja o comando abaixo:

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "buzzdev/base",
"description": "Base Module to implement css for frontend/adminhtml and translate",
"description": "Base Module to implement css for frontend/adminhtml",
"type": "magento2-module",
"version": "1.0.0",
"license": [
Expand All @@ -20,9 +20,9 @@
},
"authors": [
{
"name": "Team BUZZ",
"name": "Mauricio Ant. Silva",
"email": "mauricio@plataformamagento.com.br",
"homepage": "https://github.com/Buzz-Dev-Web"
"homepage": "https://github.com/mauricio-tonny"
}
]
}
18 changes: 6 additions & 12 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0"?>
<!--
/**
* @package Buzz_Base
* @author Team Buzz Web
* @copyright Copyright (c)
* @version 1.1
*/
/**
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<system>
Expand All @@ -20,12 +19,7 @@
<label>System Information</label>
<!-- Exibi as informações gerais da loja -->
<frontend_model>Buzz\Base\Block\Adminhtml\SystemInfo</frontend_model>
</group>
<!-- <group id="base_instaled" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Installed Modules</label>
Exibe os módulos instalados
<frontend_model>Buzz\Base\Block\Adminhtml\Modules</frontend_model>
</group> -->
</group>
<group id="base_netx" translate="label" type="text" sortOrder="999" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Next deployments</label>
<frontend_model>Buzz\Base\Block\Adminhtml\System\Config\Documentation</frontend_model>
Expand Down
24 changes: 0 additions & 24 deletions etc/config.xml

This file was deleted.

11 changes: 5 additions & 6 deletions etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0"?>
<!--
/**
* @package Buzz_Base
* @author Team Buzz Web
* @copyright Copyright (c)
* @version 1.1
*/
/**
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Buzz_Base" setup_version="1.0.0"/>
Expand Down
8 changes: 7 additions & 1 deletion view/adminhtml/layout/default.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0"?>

<!--
/**
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Buzz_Base::css/zz_backcustom.css" type="stylesheet"/>
Expand Down
8 changes: 7 additions & 1 deletion view/frontend/layout/default.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0"?>

<!--
/**
* @package Buzz_Base
* @author github.com/mauricio-tonny
* @copyright Copyright (c)
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<css src="Buzz_Base::css/zz_custom.css" type="stylesheet"/>
Expand Down
2 changes: 0 additions & 2 deletions view/frontend/web/css/zz_custom.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/* remove amazon pay */

.password-info {
display: none !important;
}


/* icone do fechar na opcao do zoom (tema porto) */

.fotorama--fullscreen .fotorama__fullscreen-icon:before {
content: "\f847"!important;
}

0 comments on commit 966d678

Please sign in to comment.