Hầu hết chúng ta đều sử dụng IDE PHP Storm rất nổi tiếng để code PHP và Magento. Bản thân PHP Storm đã support magento, tuy nhiên mới chỉ dừng ở mức độ rất cơ bản. Một sự “khó chịu” thường thấy như đọc file di.xml, muốn xem code của class, thao tác theo thói quen là giữ Ctrl + Click vào tên class để xem nội dung file. Nhưng điều này ko thể được, vì PHP Storm ko support file .xml

hướng dẫn sử dụng Magento PHP Storm Plugin

Khi thấy chán vì phải code mấy file “thủ tục” như .xml, registration.php mở đầu module, code tạo controller, block trong magento? Gần đây, Magento đã đưa Project PHP Storm Plugin lên trên Github để cộng đồng contribute. Và đã release đến phiên bản 1.0.1. và được đánh giá khá tốt.

Các chức năng chính của PHP Storm Plugin

  • Configuration smart completion and references for XML/JavaScript files
  • Navigate to configuration reference in scope of class/interface
  • Go to plugin reference in scope of class/interface and method
  • Navigate to Web API configuration reference in scope of class/interface and method
  • Plugin class methods generation
  • Plugin declaration inspection
  • RequireJS reference navigation and completion
  • MFTF reference navigation and completion
  • GraphQL navigation line markers
  • Code generation
  • Inspections for XML configuration

Sử dụng Magento PHP Storm Plugin

hướng dẫn sử dụng Magento PHP Storm Plugin
Thao tác vào nhanh class ở file Xml. Đơn giản chỉ Ctrl + Click
Sử dụng Magento PHP Storm Plugin
Thao tác vào nhanh class ở file Xml. Đơn giản chỉ Ctrl + Click
image
Tạo Module Magento ư? Chỉ việc New -> Magento Module thôi
Sử dụng Magento PHP Storm Plugin
Tạo Block, Controller… đơn giản thôi
Sử dụng Magento PHP Storm Plugin
Tạo Plugin: chuột phải vào hàm cần plugin

Cài đặt Magento PHP Storm Plugin

Cài đặt Magento PHP Storm Plugin
File->Settings-> Plugins: Search Magento và install
Cài đặt Magento PHP Storm Plugin
File->Settings-> Plugins: Search Magento và install
Nếu bạn là một Magento Developer, ưa thích làm sản phẩm quốc tế trong lĩnh vực bán lẻ - thương mại điện tử! Tham gia Tuyển dụng Magento Developer, môi trường làm việc từ xa, địa điểm tự do, quản lý linh hoạt theo Agile.

Tham khảo

Hướng dẫn sử dụng Magento PHP Storm Plugin

Hãy đăng ký nhận tin để là người đầu tiên đọc bài viết mới nhất từ chúng tôi nhé

Posted 
Jun 12, 2020
 in 
Tech
 category

Bài viết khác từ

Tech

category

View All