সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ব্লকলি > রেজিস্ট্রি > getClassFromOptions
registry.getClassFromOptions() ফাংশন
প্রদত্ত প্রকারের জন্য ব্লকলি বিকল্পগুলি থেকে ক্লাস পায়। এটি প্লাগইনগুলির জন্য ব্যবহৃত হয় যা একটি অন্তর্নির্মিত বৈশিষ্ট্যকে ওভাররাইড করে। (যেমন টুলবক্স)
স্বাক্ষর:
export declare function getClassFromOptions<T>(type: Type<T>, options: Options, opt_throwIfMissing?: boolean): (new (...p1: any[]) => T) | null;
পরামিতি
প্যারামিটার | টাইপ | বর্ণনা |
---|
টাইপ | টাইপ <T> | প্লাগইন এর ধরন. |
বিকল্প | অপশন | প্রদত্ত প্লাগইন চেক করার জন্য অপশন অবজেক্ট। |
opt_throwIfMissing | বুলিয়ান | (ঐচ্ছিক) আমরা যদি প্লাগইনটি খুঁজে না পাই তাহলে একটি ত্রুটি নিক্ষেপ করব কি না। |
রিটার্ন:
(নতুন (...p1: any[]) => T) | নাল
প্লাগইন জন্য ক্লাস.
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],["The `registry.getClassFromOptions()` function retrieves a plugin's class from Blockly options based on its type. It takes the plugin's type, an options object, and an optional boolean to determine if an error should be thrown if the plugin is missing. It returns the plugin's class or `null` if not found. This is useful for plugins, like the Toolbox, which replace default functionality, and to find the given plugin on the option object.\n"]]