TAILIEUCHUNG - Drupal 7 First Look phần 10

Drupal cũng cung cấp phương pháp để tải các thông tin bổ sung về các lĩnh vực, lĩnh vực bó, trình định dạng lĩnh vực, và các vật dụng trường từ các mô-đun của bạn. Chúng bao gồm:Một số thay đổi được thực hiện cho hệ thống truy cập nút và hệ thống cho phép để làm cho nó dễ dàng hơn để làm cho | Chapter 7 Getting information about fields Drupal also provides methods to load additional information about fields field bundles field formatters and field widgets from your modules. These include field_info_bundles field_info_field field_info_fields field_info_by_id field_info_field_settings field_info_field_types field_info_formatter_settings field_info_formatter_types field_info_instance field_info_instances field_info_instance_ settings field_info_storage_settings field_info_storage_types field_info_widget_settings field_info_widget_types The information about fields is cached in the database to improve performance. You can clear the cache programmatically by calling field_info_cache_clear which will cause the cache to be automatically rebuilt. No actual data is removed when calling this method. Node access and permission changes Several changes were made to the node access system and permission system to make it easier to make Drupal more secure. Let s look at the new features that have been added first. Added methods The Node API has been extended to include several new methods to give you more information and better control over the permission system. hook_node_access This hook allows you to influence whether or not a particular operation can be performed by a user on a given node. You are passed the node being accessed as well as the account performing the action. You are also given one of four possible operations create delete update or view. You should return one of the following constants NODE_ACCESS_ALLOW if the operation is allowed NODE_ACCESS_DENY if the operation should be prevented NODE_ACCESS_IGNORE if your module does not care one way or the other ------------------------------- 237 ---------------------------- Drupal 7 for Developers This hook takes the place of the old hook_access module from Drupal 6. hook_node_access_records_alter Similar to hook_node_access this hook allows you to change the permissions for a node before they are written to

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.